Skip to content

fix: logout, feat: styles, refactor: colors, fix: colors, refactor: colors and imports and fix: Dockerfile - #81

Merged
Friedrich482 merged 8 commits into
mainfrom
features
Jul 31, 2025
Merged

Friedrich482 merged 8 commits into
mainfrom
features

Conversation

@Friedrich482

@Friedrich482 Friedrich482 commented Jul 31, 2025 •

Copy link
Copy Markdown
Owner

Commits

  • fix: logout

    • properly deleted the cookie when the logout button is pressed on the dashboard
  • feat: styles

    • added new styles in the globals.css of the ui package
    • removed the main layout from the auth pages (login and sign up)
  • refactor: colors

    • replaced all occurrences of *-moon tailwind classes by *-primary
  • feat: styles

    • used the predefined styles (in the globals.css) on the dashboard page and avoided at maximum magic colors
  • fix: colors

    • removed too specific colors from the classNames and only used colors defined in the base style
  • refactor: colors and imports

    • removed all the remaining specific colors from the dashboard components
    • updated all the imports relative to getLanguageName and getLanguageColor
  • fix: Dockerfile

    • fixed the issues of the Dockerfile: make sure that all packages are properly built
    • moved the .dockerignore from apps/api to .
    • removed the error during compilation of the trpc package

Summary by CodeRabbit

  • Style

    • Updated global and component styles to use theme-based CSS variables for colors, borders, and fonts, replacing hardcoded values.
    • Unified and simplified border, background, and text color classes across the dashboard and UI components.
    • Switched to a global stylesheet for dashboard app styling.
    • Improved font consistency by setting "Inter" as the default font family.
    • Refined form, error, and tooltip styling with semantic color classes.
    • Adjusted header, footer, sidebar, and navigation styling for a cleaner look.
    • Enhanced icon and spinner components to use variant-based styling.
  • New Features

    • Added export path for utility modules in the UI package for easier access.
  • Bug Fixes

    • Ensured authentication cookies are cleared with secure options on logout.
  • Refactor

    • Updated import paths for utility functions to a centralized location.
    • Simplified navigation and layout structure for login and register pages.
    • Streamlined component JSX structure by removing unnecessary wrappers.
  • Chores

    • Added build scripts to common and trpc packages.
    • Updated Dockerfile and build configurations for improved workspace builds.

-  properly deleted the cookie when the logout button is pressed on the dashboard
- added new styles in the globals.css of the ui package
- removed the main layout from the auth pages (login and sign up)
- replaced all occurrences of `*-moon` tailwind classes by `*-primary`
- used the predefined styles (in the globals.css) on the dashboard page and avoided at maximum magic colors
- removed too specific colors from the classNames and only used colors defined in the base style
- removed all the remaining specific colors from the dashboard components
- updated all the imports relative to `getLanguageName` and `getLanguageColor`
- fixed the issues of the Dockerfile: make sure that all packages are properly built
- moved the `.dockerignore` from apps/api to .
- removed the error during compilation of the trpc package
@coderabbitai

coderabbitai Bot commented Jul 31, 2025 •

Copy link
Copy Markdown

Walkthrough

This update centralizes and refines styling and utility management across the project. It migrates language/color utilities from @repo/common to @repo/ui/utils, consolidates CSS into a global stylesheet, and updates theme variables and Tailwind configuration. Several Docker and build scripts are adjusted for multi-package builds. Numerous UI components receive class name and styling updates to align with new theme conventions.

Changes

Cohort / File(s) Change Summary
Docker and Build System Updates
.dockerignore, apps/api/Dockerfile, apps/api/tsconfig.build.json, packages/common/package.json, packages/trpc/package.json
Added newline to .dockerignore; enhanced Dockerfile to build additional workspaces and updated run command; simplified API tsconfig; added build scripts to common and trpc.
Global Styling and Theme Refactor
apps/dashboard/src/index.css, packages/ui/src/globals.css, packages/ui/tailwind.config.ts, apps/dashboard/index.html, apps/dashboard/src/constants.ts
Replaced local CSS with global stylesheet; overhauled CSS variables and theme; removed "moon" color, added font family in Tailwind config; updated index.html stylesheet path and body classes; changed chart color to CSS variable.
UI Utility Migration
apps/dashboard/src/components/CustomChartToolTip.tsx, apps/dashboard/src/components/dashboard-page/charts/GeneralStatsChart.tsx, apps/dashboard/src/components/dashboard-page/charts/PeriodLanguagesChart.tsx, apps/dashboard/src/components/dashboard-page/charts/dayLanguagesChart/DayLanguagesChart.tsx, apps/dashboard/src/components/project-page/charts/ProjectLanguagesTimeOnPeriodChart.tsx, apps/dashboard/src/components/project-page/files-list/Files.tsx, apps/dashboard/src/hooks/fetch/useSuspenseQueryPeriodLangChart.tsx, apps/dashboard/src/hooks/projects/useSuspenseQueryProjectsLangChart.tsx, apps/dashboard/src/hooks/useLanguagesDropDown.tsx, packages/ui/package.json
Changed imports of getLanguageColor/getLanguageName from @repo/common to @repo/ui/utils; added export for utils in ui package.
Dashboard Component Styling
apps/dashboard/src/components/dashboard-page/Dashboard.tsx, apps/dashboard/src/components/dashboard-page/DashboardTitle.tsx, apps/dashboard/src/components/dashboard-page/PeriodDropDown.tsx, apps/dashboard/src/components/dashboard-page/charts/PeriodProjects.tsx, apps/dashboard/src/components/dashboard-page/charts/PeriodTimeChart.tsx, apps/dashboard/src/components/layout/Footer.tsx, apps/dashboard/src/components/layout/Layout.tsx, apps/dashboard/src/components/layout/header/Header.tsx, apps/dashboard/src/components/layout/header/HorizontalNavbar.tsx, apps/dashboard/src/components/layout/header/SideBar.tsx, apps/dashboard/src/components/layout/header/ToggleThemeDropDown.tsx, apps/dashboard/src/components/not-found-page/NotFound.tsx, apps/dashboard/src/components/project-page/Project.tsx, apps/dashboard/src/components/project-page/charts/CircularPacking.tsx, apps/dashboard/src/components/project-page/charts/FilesCirclePackingChart.tsx, apps/dashboard/src/components/project-page/charts/ProjectTimeOnPeriodChart.tsx, apps/dashboard/src/components/project-page/files-list/FilesList.tsx, apps/dashboard/src/components/project-page/files-list/LanguagesDropDown.tsx, apps/dashboard/src/components/suspense/ErrorFallback.tsx, apps/dashboard/src/hooks/auth/useTogglePassword.tsx, apps/dashboard/src/components/CustomRangeDatesSelector.tsx, apps/dashboard/src/components/login-page/LoginForm.tsx, apps/dashboard/src/components/register-page/RegisterForm.tsx
Updated or removed color classes, replaced hardcoded colors with theme variables, simplified structure, and updated button/link usage for consistency with new theme.
Routing Changes
apps/dashboard/src/main.tsx
Moved "login" and "register" routes outside of the main layout wrapper.
UI Package Component Update
packages/ui/src/components/ui/CalendarPopover.tsx, packages/ui/src/components/ui/Icon.tsx, packages/ui/src/components/ui/form.tsx
Updated calendar shadow color to use "primary"; refactored Icon to simplify class handling and button usage; replaced error color classes in form components with theme-based "destructive".

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant DashboardApp
    participant UIUtils
    participant GlobalStyles

    User->>DashboardApp: Navigates to dashboard or project page
    DashboardApp->>UIUtils: Import getLanguageColor/getLanguageName from @repo/ui/utils
    DashboardApp->>GlobalStyles: Apply global CSS and theme variables
    DashboardApp-->>User: Renders components with updated theme and utility usage
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~18 minutes

Possibly related PRs

  • Friedrich482/mooncode#74: Refactors and centralizes UI utilities and components, directly related to the migration of getLanguageColor and getLanguageName to @repo/ui/utils.

Poem

The moon’s new colors softly gleam,
As rabbits hop through CSS and theme.
Utilities moved, imports anew,
A dashboard fresh, with global hue.
With Docker tuned and routes in line,
This bunny’s code is looking fine!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 042ef20 and 5f2c0f1.

📒 Files selected for processing (1)
  • packages/ui/src/components/ui/Icon.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/ui/src/components/ui/Icon.tsx
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch features

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Friedrich482 Friedrich482 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes reviewed

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🔭 Outside diff range comments (1)
apps/dashboard/src/hooks/auth/useTogglePassword.tsx (1)

8-14: Replace clickable <div> with an accessible <button>.

Using a plain div for an interactive control blocks keyboard users and screen-reader announcements.

-<div
-  className="absolute z-10 pr-2 hover:text-primary"
-  onClick={handleEyeIconClick}
-  title={`${isPasswordVisible ? "Hide" : "Show"} the password`}
->
+<button
+  type="button"
+  className="absolute z-10 pr-2 hover:text-primary focus:outline-none"
+  onClick={handleEyeIconClick}
+  aria-label={isPasswordVisible ? "Hide password" : "Show password"}
+>

Benefits: proper semantics, tab focus, Enter/Space activation, and ARIA label.
No visual changes required; Tailwind applies the same styles to <button>.

♻️ Duplicate comments (1)
apps/dashboard/src/hooks/fetch/useSuspenseQueryPeriodLangChart.tsx (1)

2-2: Same alias-resolution check as above

Ensure @repo/ui/utils/getLanguageColor resolves correctly in every package that consumes this hook (storybook, tests, SSR build, etc.).

🧹 Nitpick comments (10)
apps/dashboard/src/components/dashboard-page/PeriodDropDown.tsx (1)

76-78: Potentially redundant utility classes

flex items-center justify-center may already be the default layout of the Button component. If so, you can drop them and keep only gap-2 for brevity.

apps/dashboard/src/hooks/useLanguagesDropDown.tsx (1)

3-4: Double-check both util re-exports

Both getLanguageColor and getLanguageName moved to @repo/ui/utils. Make sure:

  • They are re-exported with identical signatures.
  • Dead copies were removed from @repo/common to avoid divergent behaviour.

Consider adding a short unit test asserting both functions return the same value for a known slug to guard against regressions.

apps/dashboard/src/components/layout/Footer.tsx (1)

3-3: Possible dark-mode visual regression

Removing dark:border-neutral-800 drops the darker top border. If the global border color falls back to a lighter shade, the footer may blend with the background in dark mode. Please eyeball the page under prefers-color-scheme: dark.

apps/dashboard/src/components/CustomRangeDatesSelector.tsx (1)

31-48: Color token removal – accessibility pass

text-moon was stripped, relying on the link variant’s default color. Confirm:

  • Minimum 4.5:1 contrast ratio on both light & dark themes.
  • Focus/hover states still obvious.

If contrast fails, re-introduce a semantic token instead of a hard-coded class.

apps/dashboard/src/components/dashboard-page/charts/PeriodLanguagesChart.tsx (1)

55-56: Generic border class may pick an unintended colour

Previously the component used border-neutral-600/50, now it relies on Tailwind’s default border (usually border-border).
If the design relies on a subtle neutral border, confirm that the new token resolves to the desired colour in both themes.

apps/dashboard/src/components/project-page/charts/ProjectLanguagesTimeOnPeriodChart.tsx (1)

46-47: Border simplification – minor visual regression check

Dropping the explicit neutral tint for the generic border class could change contrast. Validate in both light and dark modes to ensure the chart card still separates from the background.

packages/ui/src/components/ui/CalendarPopover.tsx (1)

65-66: Duplicate class definition

Same concern for the range-mode branch—ensure shadow-primary is available or switch to an inline style (shadow-[0_0_0_2px_hsl(var(--primary))]) to guarantee the effect.

packages/common/package.json (1)

19-21: Consider adding a clean & build lifecycle

Adding a dedicated build script is 👍.
For packages published from dist/, stale artifacts can sneak in after file renames. A tiny enhancement:

-    "build": "tsc"
+    "clean": "rimraf dist",
+    "build": "npm run clean && tsc"

or wire it into npm run prepare so publishing never forgets to compile.

apps/dashboard/src/components/not-found-page/NotFound.tsx (1)

5-11: Add descriptive alt text for the 404 illustration.

The decorative SVG currently has no alt, creating an empty announcement for screen-readers.

-<img src="/broken_moon.svg" />
+<img src="/broken_moon.svg" alt="" role="presentation" />

If the image is informative, replace "" with a meaningful description instead of marking it decorative.

apps/dashboard/src/components/project-page/Project.tsx (1)

32-32: Consider using JSX children pattern instead of children prop.

The static analysis tool correctly identifies that React components should use JSX children rather than passing children as a prop.

Apply this diff to follow React conventions:

-    children={children}
+  >
+    {children}
+  </ErrorBoundary>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ab3d689 and 042ef20.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (48)
  • .dockerignore (1 hunks)
  • apps/api/Dockerfile (2 hunks)
  • apps/api/src/auth/auth.service.ts (1 hunks)
  • apps/api/tsconfig.build.json (1 hunks)
  • apps/dashboard/index.html (1 hunks)
  • apps/dashboard/src/components/CustomChartToolTip.tsx (1 hunks)
  • apps/dashboard/src/components/CustomRangeDatesSelector.tsx (2 hunks)
  • apps/dashboard/src/components/dashboard-page/Dashboard.tsx (2 hunks)
  • apps/dashboard/src/components/dashboard-page/DashboardTitle.tsx (1 hunks)
  • apps/dashboard/src/components/dashboard-page/PeriodDropDown.tsx (1 hunks)
  • apps/dashboard/src/components/dashboard-page/charts/GeneralStatsChart.tsx (5 hunks)
  • apps/dashboard/src/components/dashboard-page/charts/PeriodLanguagesChart.tsx (2 hunks)
  • apps/dashboard/src/components/dashboard-page/charts/PeriodProjects.tsx (2 hunks)
  • apps/dashboard/src/components/dashboard-page/charts/PeriodTimeChart.tsx (2 hunks)
  • apps/dashboard/src/components/dashboard-page/charts/dayLanguagesChart/DayLanguagesChart.tsx (2 hunks)
  • apps/dashboard/src/components/layout/Footer.tsx (1 hunks)
  • apps/dashboard/src/components/layout/Layout.tsx (1 hunks)
  • apps/dashboard/src/components/layout/header/Header.tsx (1 hunks)
  • apps/dashboard/src/components/layout/header/HorizontalNavbar.tsx (1 hunks)
  • apps/dashboard/src/components/layout/header/SideBar.tsx (2 hunks)
  • apps/dashboard/src/components/layout/header/ToggleThemeDropDown.tsx (1 hunks)
  • apps/dashboard/src/components/login-page/LoginForm.tsx (3 hunks)
  • apps/dashboard/src/components/not-found-page/NotFound.tsx (1 hunks)
  • apps/dashboard/src/components/project-page/Project.tsx (1 hunks)
  • apps/dashboard/src/components/project-page/charts/CircularPacking.tsx (1 hunks)
  • apps/dashboard/src/components/project-page/charts/FilesCirclePackingChart.tsx (1 hunks)
  • apps/dashboard/src/components/project-page/charts/ProjectLanguagesTimeOnPeriodChart.tsx (2 hunks)
  • apps/dashboard/src/components/project-page/charts/ProjectTimeOnPeriodChart.tsx (3 hunks)
  • apps/dashboard/src/components/project-page/files-list/Files.tsx (1 hunks)
  • apps/dashboard/src/components/project-page/files-list/FilesList.tsx (1 hunks)
  • apps/dashboard/src/components/project-page/files-list/LanguagesDropDown.tsx (1 hunks)
  • apps/dashboard/src/components/register-page/RegisterForm.tsx (4 hunks)
  • apps/dashboard/src/components/suspense/ErrorFallback.tsx (1 hunks)
  • apps/dashboard/src/constants.ts (1 hunks)
  • apps/dashboard/src/hooks/auth/useTogglePassword.tsx (1 hunks)
  • apps/dashboard/src/hooks/fetch/useSuspenseQueryPeriodLangChart.tsx (1 hunks)
  • apps/dashboard/src/hooks/projects/useSuspenseQueryProjectsLangChart.tsx (1 hunks)
  • apps/dashboard/src/hooks/useLanguagesDropDown.tsx (1 hunks)
  • apps/dashboard/src/index.css (1 hunks)
  • apps/dashboard/src/main.tsx (1 hunks)
  • packages/common/package.json (1 hunks)
  • packages/trpc/package.json (1 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/ui/src/components/ui/CalendarPopover.tsx (2 hunks)
  • packages/ui/src/components/ui/Icon.tsx (1 hunks)
  • packages/ui/src/components/ui/form.tsx (3 hunks)
  • packages/ui/src/globals.css (2 hunks)
  • packages/ui/tailwind.config.ts (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (4)
packages/ui/src/components/ui/CalendarPopover.tsx (1)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
apps/dashboard/src/main.tsx (1)
apps/dashboard/src/utils/authLoader.ts (1)
  • authRouteLoader (30-56)
packages/ui/src/components/ui/form.tsx (1)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
packages/ui/src/components/ui/Icon.tsx (2)
packages/ui/src/components/ui/button.tsx (1)
  • Button (27-27)
packages/ui/src/lib/utils.ts (1)
  • cn (4-6)
🪛 Biome (2.1.2)
apps/dashboard/src/components/project-page/Project.tsx

[error] 32-32: Avoid passing children using a prop

The canonical way to pass children in React is to use JSX elements

(lint/correctness/noChildrenProp)

🔇 Additional comments (59)
apps/dashboard/src/components/dashboard-page/PeriodDropDown.tsx (1)

75-78: Confirm default variant keeps sufficient contrast & state styles

Changing the trigger from variant="secondary" with explicit bg-neutral-200 dark:bg-accent to variant="default" delegates all coloring to the design-system token.
Please verify in both light and dark themes that:

  1. Text & icon meet WCAG 2.1 AA contrast against the new background.
  2. Hover / focus / active states remain visually distinct.

If the UI kit guarantees this, no action needed; otherwise consider re-introducing an explicit semantic variant or extending the Button variants.

.dockerignore (1)

2-3: LGTM! Good formatting practice.

Adding the trailing newline follows POSIX text file conventions and is a good practice.

packages/trpc/package.json (1)

10-11: LGTM! Standard TypeScript build configuration.

The addition of the build script using tsc is standard for TypeScript packages and will enable proper compilation during Docker builds. The trailing comma on the lint script follows good JSON formatting practices.

apps/api/src/auth/auth.service.ts (1)

139-143: Excellent security improvement for logout functionality.

Adding the explicit cookie clearing options (httpOnly: true, secure: true, sameSite: "none") ensures the authentication cookie is properly cleared during logout. This matches the security attributes used when setting the cookie and addresses potential issues where browsers might not clear cookies without these explicit options.

apps/dashboard/src/components/project-page/files-list/Files.tsx (1)

3-4: LGTM! Consistent import path migration.

The import path updates from @repo/common to @repo/ui/utils align with the broader refactoring to centralize UI-related utilities. This change maintains functionality while improving code organization.

apps/dashboard/src/components/CustomChartToolTip.tsx (1)

2-2: LGTM! Consistent with utility migration pattern.

The import path update from @repo/common/getLanguageName to @repo/ui/utils/getLanguageName is consistent with the broader refactoring to centralize UI utilities and maintains functionality while improving code organization.

apps/dashboard/src/hooks/projects/useSuspenseQueryProjectsLangChart.tsx (1)

3-3: Confirm @repo/ui export & path mapping

getLanguageColor is now imported from @repo/ui/utils. Verify that:

  1. packages/ui/package.json exports "./utils/getLanguageColor" (or the glob)
  2. All tsconfig/webpack path aliases include the new utils/* mapping

Without this, consumers of the hook will break at compile-time/runtime.

apps/dashboard/src/components/project-page/files-list/LanguagesDropDown.tsx (1)

27-30: Verify secondary-variant background now that explicit classes were removed

Dropping bg-neutral-200 dark:bg-accent means the button’s background is now whatever variant="secondary" defines.
Double-check that the secondary variant already adapts for both light & dark themes; otherwise the trigger may appear transparent or lose sufficient colour contrast.

apps/dashboard/src/components/layout/header/ToggleThemeDropDown.tsx (1)

23-26: Semantic colour swap looks correct

Replacing the hard-coded border-moon/60 with the theme token border-primary/60 keeps styling consistent with the new palette. Nothing else to flag.

apps/dashboard/src/components/dashboard-page/charts/PeriodLanguagesChart.tsx (1)

24-25: Import path moved to @repo/ui/utils – ensure export map is in place

The build will fail if packages/ui didn’t expose utils/getLanguageColor via its exports field or TS path mapping. Confirm that was updated along with this change.

apps/dashboard/src/components/dashboard-page/DashboardTitle.tsx (1)

16-17: Good move to semantic text-destructive

Switching from a hard-coded red to a semantic token keeps error styling theme-aware. No further issues.

apps/dashboard/src/components/project-page/charts/ProjectLanguagesTimeOnPeriodChart.tsx (1)

17-18: Import path update mirrors other files – confirm consistency

Same note as earlier: make sure @repo/ui/utils/getLanguageColor is exported and aliased consistently, otherwise chart pages will break.

apps/dashboard/src/components/dashboard-page/charts/dayLanguagesChart/DayLanguagesChart.tsx (2)

46-46: Styling tweak looks good

Removing the explicit border-neutral-600/50 token keeps the component on your global border color scheme—good consolidation.


12-14: ✅ Default exports and package exports for utils are correctly configured

  • packages/ui/src/utils/getLanguageColor.ts and getLanguageName.ts both use export default.
  • packages/ui/package.json’s exports field includes
    "./utils/*": "./src/utils/*.ts"

No further changes are needed—imports from @repo/ui/utils/... will resolve as expected.

apps/dashboard/src/components/project-page/charts/FilesCirclePackingChart.tsx (1)

53-53: Border colour simplification approved

Consistent with the new global theme—nothing else to flag here.

apps/dashboard/src/constants.ts (1)

74-74: Beware SVG fill with CSS variables

recharts applies fill/stroke as plain SVG attributes (<rect fill="hsl(var(--primary))">).
Browsers don’t resolve CSS vars in raw SVG attributes—only in style="…". If chartConfig.time.color is ultimately used as an SVG attribute you’ll get no colour.

Confirm where the value ends up; if it’s an attribute, resolve the var in CSS instead or inline it via style.

apps/dashboard/src/components/layout/Layout.tsx (1)

9-9: Confirm CSS-variable colour is resolved by ClipLoader.

react-spinners forwards the color prop straight to the generated <span style="border-color …">. Browsers resolve hsl(var(--primary)) only if --primary is defined as three space-separated HSL components (e.g. 220 80% 50%).
If the variable is still using the old HEX string it will fail, turning the spinner black.

Run the app in both light & dark themes and in Firefox/Chrome to make sure the spinner tint matches the rest of the UI.

apps/dashboard/src/components/project-page/charts/ProjectTimeOnPeriodChart.tsx (2)

52-52: Border colour now falls back to Tailwind default – intentional?

Removing border-neutral-600/50 leaves the colour to border’s default (hsl(var(--border))).
Double-check the contrast against the chart background; the old semi-transparent neutral might have been chosen for subtle separation.


103-104: Ensure CSS variables resolve inside SVG stroke attributes.

hsl(var(--destructive)) is valid CSS, but some older Chromium builds failed to resolve custom properties in SVG presentation attributes.
Test in your supported browser matrix; if issues appear, fallback to currentColor and style the enclosing element.

Example fallback pattern:

stroke="currentColor"
className="text-destructive"

Also applies to: 116-117

apps/dashboard/src/components/dashboard-page/charts/PeriodTimeChart.tsx (2)

39-39: Good refactoring of border styling.

Removing the specific border-neutral-600/50 class in favor of the generic border class aligns with the broader styling standardization effort across the dashboard components.


85-85: Excellent use of CSS variable for theme consistency.

Replacing the hardcoded hex color #dc2626 with hsl(var(--destructive)) improves theme maintainability and follows the semantic color naming convention being adopted across the project.

apps/dashboard/src/components/project-page/files-list/FilesList.tsx (2)

22-22: Consistent border styling improvement.

Removing the specific border-neutral-600/50 class maintains consistency with the styling standardization being applied across dashboard components.


28-28: Better semantic color usage.

Replacing text-red-600 with text-destructive provides better semantic meaning and aligns with the design system approach being implemented throughout the project.

apps/dashboard/src/components/layout/header/Header.tsx (1)

6-6: Excellent theme system integration.

The replacement of explicit background colors (bg-neutral-100, dark:bg-neutral-950) and border color (border-neutral-800) with the semantic bg-background class demonstrates proper integration with the design system. This approach improves theme consistency and reduces maintenance overhead.

apps/dashboard/index.html (2)

10-10: Good alignment with font system changes.

Replacing the background color classes with font-sans aligns well with the global CSS variable system mentioned in the AI summary. This approach centralizes font and background styling in the theme system.


6-6: Stylesheet path change is safe.

Vite processes <link href="./src/index.css"> in apps/dashboard/index.html as a module import and rewrites it correctly in dev and build. No absolute‐path configuration was found in vite.config.ts or elsewhere, and the CSS importer in Vite will resolve the file under apps/dashboard/src/index.css without issues. No further action needed.

apps/dashboard/src/main.tsx (1)

46-59: Auth pages safe outside Layout wrapper

Verification shows that neither LoginForm nor RegisterForm import anything from the Layout or consume any Layout‐provided context:

  • No import … from ".../layout/…".
  • No usage of useContext or .Context in auth page components.
  • Layout.tsx only provides header, footer, and a navigation‐based spinner—no context providers.

Removing the <Layout /> wrapper for auth routes will not break functionality.

apps/dashboard/src/components/login-page/LoginForm.tsx (2)

89-89: LGTM: Improved visual hierarchy

The addition of font-extrabold enhances the prominence of the login heading, improving the visual hierarchy of the form.


102-102: LGTM: Consistent with color theme refactoring

The replacement of focus-visible:ring-moon/65 with border-border aligns perfectly with the broader effort to remove the "moon" color from the codebase in favor of CSS variable-based theming. This ensures consistent styling across components.

Also applies to: 121-121

packages/ui/tailwind.config.ts (1)

66-68: LGTM: Consistent CSS variable approach for theming

The addition of font family configuration using CSS variables (var(--font-sans)) is excellent practice. This maintains consistency with the color theming approach and enables centralized font management across the application.

apps/dashboard/src/index.css (1)

1-1: Global stylesheet import confirmed

  • ✓ packages/ui/src/globals.css exists and begins with
    @tailwind base;
    @tailwind components;
    @tailwind utilities;
    @layer base { :root { /* CSS variables */ } }
  • Contains a comprehensive set of CSS variables under :root.

Please verify that any style rules originally declared in apps/dashboard/src/index.css (e.g., local base or component-specific selectors) were migrated into globals.css and are no longer needed locally.

apps/api/Dockerfile (1)

16-18: LGTM: Proper multi-workspace build strategy

The addition of build steps for @repo/common and @repo/trpc workspaces correctly handles the monorepo dependencies. This ensures all required packages are built before the main API application.

apps/api/tsconfig.build.json (1)

3-3: Build configuration is complete in base tsconfig.json

The base apps/api/tsconfig.json already defines all essential build compilerOptions— outDir, declaration/declarationMap, and sourceMap—and enables composite for project references. TypeScript will infer rootDir when not explicitly set. No missing build settings were found, so relying on the base config is safe.

packages/ui/src/components/ui/form.tsx (1)

96-96: LGTM! Consistent theme adoption for error states.

The replacement of hardcoded red color classes (text-red-600, ring-red-600) with semantic theme variables (text-destructive, ring-destructive) improves maintainability and ensures consistent theming across the application.

Also applies to: 122-122, 162-162

apps/dashboard/src/components/suspense/ErrorFallback.tsx (1)

35-35: LGTM! Consistent error styling refactor.

The removal of explicit border color (border-neutral-600/50) and replacement of hardcoded red text (text-red-600) with semantic destructive color (text-destructive) aligns with the broader theme consistency effort across the dashboard.

apps/dashboard/src/components/dashboard-page/Dashboard.tsx (2)

15-15: LGTM! Theme-aware text color inheritance.

Removing explicit text color classes (text-black dark:text-white) allows the component to inherit appropriate colors from the theme system, improving consistency and maintainability.


51-51: LGTM! Consistent error styling update.

The replacement of hardcoded text-red-600 with semantic text-destructive maintains the same visual treatment while adopting the theme system for better consistency across the application.

apps/dashboard/src/components/project-page/charts/CircularPacking.tsx (1)

75-89: LGTM! Theme-aware SVG text styling.

The replacement of hardcoded white fill colors with CSS variable-based colors (hsl(var(--muted-foreground))) and the addition of appropriate font weight classes improves theme consistency and typography in the circular packing chart.

apps/dashboard/src/components/layout/header/HorizontalNavbar.tsx (1)

8-14: LGTM! Simplified structure with consistent theming.

The removal of the unnecessary Button wrapper and direct use of Link with semantic color classes (text-muted-foreground/60 hover:text-primary) simplifies the component structure while maintaining theme consistency.

apps/dashboard/src/components/project-page/Project.tsx (2)

30-30: LGTM! Good semantic color usage.

The change from text-red-600 to text-destructive aligns well with the theme refactoring to use semantic color classes instead of hardcoded ones.


37-37: LGTM! Simplified styling by relying on inherited colors.

Removing the explicit text color classes (text-black dark:text-white) is consistent with the theme refactoring approach and lets the component inherit colors from the theme.

apps/dashboard/src/components/register-page/RegisterForm.tsx (2)

91-93: LGTM! Enhanced branding and visual hierarchy.

The updated title "Register to MoonCode" with font-extrabold improves branding and visual prominence. Good enhancement to the user experience.


104-104: LGTM! Consistent theme refactoring across input fields.

The replacement of focus-visible:ring-moon/65 with border-border across all input fields aligns perfectly with the broader color refactoring from moon-specific colors to semantic CSS classes.

Also applies to: 121-121, 141-141

apps/dashboard/src/components/dashboard-page/charts/PeriodProjects.tsx (3)

31-31: LGTM! Simplified border styling.

Removing the specific border-neutral-600/50 classes in favor of simpler border classes aligns with the theme simplification goals and reduces hardcoded color dependencies.

Also applies to: 50-50


39-40: LGTM! Consistent color migration from moon to primary.

The systematic replacement of text-moon/85 with text-primary/85 maintains visual consistency while aligning with the broader theme refactoring to remove moon color references.

Also applies to: 64-64


54-54: LGTM! Icon styling updated consistently.

The stroke color updates from stroke-primary/85 (assuming moon was replaced) maintain the same opacity and visual weight while using the new primary color theme.

Also applies to: 59-59

apps/dashboard/src/components/layout/header/SideBar.tsx (3)

16-16: LGTM! Simplified navigation styling with semantic classes.

The updated styling using bg-background and border-r simplifies the component while maintaining visual consistency through semantic CSS classes.


31-31: LGTM! Cleaned up empty className attribute.

Removing the empty className attribute improves code cleanliness.


33-39: LGTM! Simplified navigation structure with semantic styling.

Removing the unnecessary Button wrapper and using direct Link with semantic text classes (text-muted-foreground/60 hover:text-primary) improves component structure and aligns with the theme refactoring goals.

apps/dashboard/src/components/dashboard-page/charts/GeneralStatsChart.tsx (4)

3-4: LGTM! Import paths updated to reflect package reorganization.

The migration of getLanguageColor and getLanguageName imports from @repo/common to @repo/ui/utils aligns with the broader utility reorganization mentioned in the PR objectives.


10-10: LGTM! Simplified border styling.

Removing the specific border-neutral-600/50 classes in favor of generic border classes simplifies the styling and reduces hardcoded color dependencies.

Also applies to: 60-60


66-66: LGTM! Systematic color migration from moon to primary.

The consistent replacement of text-moon/85 with text-primary/85 across all stat values maintains visual consistency while implementing the theme refactoring goals.

Also applies to: 86-86, 98-98


75-75: LGTM! Semantic error color usage.

Changing from text-red-600 to text-destructive for negative percentage values uses semantic color classes, improving theme consistency and maintainability.

packages/ui/src/components/ui/Icon.tsx (2)

16-19: LGTM! Improved styling consistency.

The refactoring to use Button component's variant and size props instead of hardcoded classes aligns well with the broader styling standardization effort. The use of the cn utility for class merging is appropriate.


21-21: Verify Icon rendering without classes

After the refactor the <Icon /> component no longer accepts a className. Make sure that using

<Button variant="ghost" size="icon">
  <Icon />
</Button>

still applies the correct styling (e.g. size-10 [&_svg]:size-auto) so the SVG renders at the intended dimensions.

• Check packages/ui/src/components/ui/button-variants.ts to confirm that the icon size entry includes the expected Tailwind classes.
• Verify in the browser that the icon scales correctly inside the button.

packages/ui/src/globals.css (4)

6-57: LGTM! Comprehensive theme standardization.

The extensive CSS variable updates create a solid foundation for centralized theming. The HSL format provides precise color control and the addition of sidebar, font, and shadow variables supports the broader UI standardization effort.


38-40: Verify font standardization to Inter across all font families.

All font families (sans, serif, mono) are set to "Inter, sans-serif". This standardization might be intentional, but typically serif and mono fonts serve different purposes.

Consider if this is the intended design choice, or if serif and mono should use different font families:

 --font-sans: Inter, sans-serif;
---font-serif: Inter, sans-serif;
---font-mono: Inter, sans-serif;
+--font-serif: "Times New Roman", serif;
+--font-mono: "Fira Code", monospace;

112-115: LGTM! Modern viewport height and font implementation.

The use of 100dvh (dynamic viewport height) is appropriate for modern browsers and provides better mobile experience than 100vh. The "Inter Variable" font family aligns with the CSS variables defined above.


126-126: Excellent use of CSS variables for scrollbar styling.

The change from hardcoded RGB values to hsl(var(--border)) ensures the scrollbar styling respects the theme and provides consistency across light/dark modes.

Comment thread apps/api/Dockerfile
Comment thread packages/ui/package.json
Comment thread packages/ui/src/components/ui/CalendarPopover.tsx
Comment thread packages/ui/src/components/ui/Icon.tsx Outdated
- removed unused property `iconClassName`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant