Skip to content

Conversation

@COHL7500
Copy link
Collaborator

@COHL7500 COHL7500 commented Nov 14, 2025

This pull request introduces several improvements and updates across the frontend codebase, including dependency upgrades, stricter linting and commit standards, Tailwind CSS v4 migration, and minor bug fixes. The changes enhance code quality, maintainability, and ensure compatibility with the latest tooling.

Tooling and Dependency Upgrades:

  • Upgraded Tailwind CSS to v4, updated related dependencies (@tailwindcss/postcss, @tailwindcss/typography), and removed html-to-docx from dependencies. Also updated @radix-ui/react-slot and added @tiptap/extension-character-count. [1] [2] [3] [4] [5]
  • Updated Biome configuration to the latest schema and enabled Tailwind CSS directives parsing. Added new lint rules for stricter code style and correctness. [1] [2] [3]
  • Updated frontend/components.json alias for utils to point to the correct path.

CI and Commit Standards:

  • Added Commitlint configuration and checks to enforce conventional commit messages in the frontend. Integrated Commitlint into the CI workflow and enabled full git history fetching for proper linting. [1] [2] [3]
  • Updated CI workflow to trigger only on pull requests to main, not on direct pushes.

Tailwind CSS v4 Migration and Styling:

  • Migrated global CSS to use Tailwind v4 syntax, replaced @tailwind with @import, added custom variants and theme variables, and updated prose styles. [1] [2]
  • Updated postcss.config.mjs to use the new Tailwind v4 plugin format.

Frontend Code and UI Improvements:

  • Fixed a typo in the Library view text for better Danish localization.
  • Improved layout structure in RootLayout to ensure correct padding and min-height.
  • Removed unnecessary debug logging from the getPrompts API function.
  • Refactored session expiration and update age calculation to use underscore notation for clarity.

Maintenance:

  • Removed the obsolete TEST_RESULTS.md file, as it is no longer relevant to the current codebase.

@github-actions
Copy link

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "Fix/bugs and cleanup". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

@COHL7500 COHL7500 changed the title Fix/bugs and cleanup fix: Bugs and Cleanup Nov 14, 2025
@COHL7500 COHL7500 force-pushed the fix/bugs-and-cleanup branch from 5beec9c to fee7949 Compare November 14, 2025 16:30
@COHL7500 COHL7500 force-pushed the fix/bugs-and-cleanup branch from ccfff88 to 08d9e37 Compare November 15, 2025 23:23
@COHL7500 COHL7500 force-pushed the fix/bugs-and-cleanup branch from 15d0d82 to dbc0037 Compare November 16, 2025 00:12
@COHL7500 COHL7500 marked this pull request as ready for review November 16, 2025 00:14
@mhenrichsen mhenrichsen requested a review from Copilot November 17, 2025 07:42
Copilot finished reviewing on behalf of mhenrichsen November 17, 2025 07:46
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades the frontend to Tailwind CSS v4, introduces stricter code quality standards through Biome and Commitlint, and includes various bug fixes and improvements across the codebase. The migration involves substantial changes to CSS syntax, component styling, and tooling configuration.

Key Changes:

  • Migration from Tailwind CSS v3 to v4 with new @import syntax and theme configuration
  • Added Commitlint for conventional commit message enforcement in CI
  • Updated validation constants and refactored prompt/history management with improved type safety
  • Removed obsolete files (test results, unused SVGs) and dependencies

Reviewed Changes

Copilot reviewed 40 out of 48 changed files in this pull request and generated 22 comments.

Show a summary per file
File Description
frontend/package.json Upgraded Tailwind v4, added character count extension, Commitlint dependencies, removed html-to-docx
frontend/biome.json Updated schema to v2.3.5, enabled Tailwind directives parsing, added stricter lint rules
frontend/postcss.config.mjs Updated plugin from tailwindcss to @tailwindcss/postcss for v4 compatibility
frontend/tailwind.config.ts Removed entire config file (v4 uses CSS-based configuration)
frontend/src/app/globals.css Migrated to Tailwind v4 syntax with @import, @theme, custom variants, and prose utilities
frontend/src/app/layout.tsx Improved layout structure with min-height container wrapper
frontend/src/shared/constants.ts Reduced minimum length constraints, consolidated title/name constants, added prompt categories
frontend/src/shared/schemas/history.ts Updated to use consolidated asset name length constants
frontend/src/lib/constants.ts Added comprehensive Danish meeting/note type categories
frontend/src/lib/ui/core/shadcn/*.tsx Updated Tailwind class syntax for v4 data attribute selectors and CSS improvements
frontend/src/lib/ui/custom/prompt-library/* Refactored to use PromptDTO consistently, improved type safety in mutations
frontend/src/lib/ui/custom/dialog/PromptDialog.tsx Migrated to centralized validation with validatePromptDTO, improved error handling
frontend/src/lib/ui/custom/ExportFormatSelect.tsx New Select component replacing dropdown menu for export format
frontend/src/lib/hooks/*.ts Replaced .forEach() with for...of loops per Biome rules
.github/workflows/ci.yml Added Commitlint check, removed push trigger, enabled full git history fetch
TEST_RESULTS.md Removed obsolete test documentation file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

data-slot="table-head"
className={cn(
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
"text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]",
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The selector syntax *:[[role=checkbox]] appears incorrect. This should likely be [&>[role=checkbox]] to match direct children with role="checkbox", consistent with the original syntax. The double bracket syntax is not valid CSS.

Copilot uses AI. Check for mistakes.
data-slot="table-cell"
className={cn(
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
"p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 *:[[role=checkbox]]:translate-y-[2px]",
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The selector syntax *:[[role=checkbox]] appears incorrect. This should likely be [&>[role=checkbox]] to match direct children with role="checkbox", consistent with the original syntax. The double bracket syntax is not valid CSS.

Copilot uses AI. Check for mistakes.
data-slot="select-item"
className={cn(
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The data attribute selector syntax has been changed from data-[disabled] to data-disabled, but this is incorrect. The proper Tailwind v4 syntax for data attributes should use brackets like data-[disabled]:pointer-events-none. The current syntax will not match elements with the data-disabled attribute.

Suggested change
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",
"focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",

Copilot uses AI. Check for mistakes.
data-inset={inset}
className={cn(
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The data attribute selector syntax has been changed from data-[inset] to data-inset, but this is incorrect. The proper Tailwind v4 syntax for data attributes should use brackets like data-[inset]:pl-8. The current syntax will not match elements with the data-inset attribute.

Suggested change
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-inset:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",

Copilot uses AI. Check for mistakes.
variants: {
orientation: {
vertical: ["flex-col [&>*]:w-full [&>.sr-only]:w-auto"],
vertical: ["flex-col *:w-full [&>.sr-only]:w-auto"],
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The universal selector syntax *:w-full is overly broad and will affect all child elements. This should be [&>*]:w-full to only target direct children, consistent with the original implementation pattern.

Copilot uses AI. Check for mistakes.
horizontal: [
"flex-row items-center",
"[&>[data-slot=field-label]]:flex-auto",
"*:data-[slot=field-label]:flex-auto",
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The universal selector syntax *:data-[slot=field-label]:flex-auto is incorrect. It should be [&>[data-slot=field-label]]:flex-auto to properly target child elements with the data attribute, consistent with the original implementation.

Copilot uses AI. Check for mistakes.
responsive: [
"flex-col [&>*]:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:[&>*]:w-auto",
"@md/field-group:[&>[data-slot=field-label]]:flex-auto",
"flex-col *:w-full [&>.sr-only]:w-auto @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto",
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The universal selector syntax *:w-full is overly broad and will affect all child elements. This should be [&>*]:w-full to only target direct children. Additionally, @md/field-group:*:w-auto should be @md/field-group:[&>*]:w-auto for consistency.

Copilot uses AI. Check for mistakes.
--chart-3: 197 37% 24%;
--chart-4: 43 74% 66%;
--chart-5: 27 87% 67%;
---removed-scrollbar-size: 15px;
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The custom CSS variable name ---removed-scrollbar-size has three hyphens instead of the standard two. CSS custom properties should start with exactly two hyphens (e.g., --removed-scrollbar-size). The extra hyphen may cause this variable to be ignored or cause unexpected behavior.

Suggested change
---removed-scrollbar-size: 15px;
--removed-scrollbar-size: 15px;

Copilot uses AI. Check for mistakes.
data-inset={inset}
className={cn(
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",
"px-2 py-1.5 text-sm font-medium data-inset:pl-8",
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The data attribute selector syntax has been changed from data-[inset] to data-inset, but this is incorrect. The proper Tailwind v4 syntax for data attributes should use brackets like data-[inset]:pl-8. The current syntax will not match elements with the data-inset attribute.

Suggested change
"px-2 py-1.5 text-sm font-medium data-inset:pl-8",
"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",

Copilot uses AI. Check for mistakes.
data-slot="field-group"
className={cn(
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
Copy link

Copilot AI Nov 17, 2025

Choose a reason for hiding this comment

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

The universal selector syntax *:data-[slot=field-group]:gap-4 is incorrect. It should be [&>[data-slot=field-group]]:gap-4 to properly target child elements with the data attribute, consistent with the original implementation.

Suggested change
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 *:data-[slot=field-group]:gap-4",
"group/field-group @container/field-group flex w-full flex-col gap-7 data-[slot=checkbox-group]:gap-3 [&>[data-slot=field-group]]:gap-4",

Copilot uses AI. Check for mistakes.
@COHL7500 COHL7500 force-pushed the fix/bugs-and-cleanup branch from 409f35b to 0610236 Compare November 17, 2025 20:01
@COHL7500 COHL7500 force-pushed the fix/bugs-and-cleanup branch from 0610236 to efb69c2 Compare November 17, 2025 20:02
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.

2 participants