Conversation
…eScript, Vite, Tailwind v4
….0, add engines field
… restrictions in AGENTS.md
… recommend new branch
…sole logs, adjust MockedProvider import, add table UI component, update imports and documentation
There was a problem hiding this comment.
Pull request overview
This PR merges the agentic-upgrade branch into main, primarily upgrading the frontend toolchain/dependencies (Vite/React/Tailwind/Vitest) and updating build/CI configuration to match the new stack.
Changes:
- Upgrade core dependencies/dev tooling (React, Vite, Tailwind CSS, Vitest, ESLint, Radix UI, etc.) and adjust related configuration.
- Migrate Tailwind setup to v4-style configuration (CSS
@import/@theme, new Vite + PostCSS plugins) and update many Tailwind utility strings in UI components. - Update CI/Docker workflows and project docs for Node/bun-based workflows.
Reviewed changes
Copilot reviewed 32 out of 35 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.ts | Adds Tailwind Vite plugin; keeps Vitest config in Vite config. |
| tsconfig.app.json | Expands include list to add Vitest globals typing. |
| tailwind.config.js | Removes Tailwind v3 JS config (migration toward Tailwind v4 CSS-first config). |
| src/pages/users/hooks/useSseUsers.tsx | Adjusts SSE retry option handling. |
| src/pages/users/hooks/useRolesGraphql.tsx | Reorders effect/helper function (logic remains equivalent). |
| src/pages/users/hooks/useColumns.tsx | Updates Tailwind classes for focus/outline styling. |
| src/pages/users/Users.test.tsx | Updates EventSource mocking and Apollo MockedProvider usage; dynamic import of Users. |
| src/lib/keycloak.ts | Changes Keycloak realm value. |
| src/components/ui/table.tsx | Updates Tailwind selector syntax for footer row borders. |
| src/components/ui/sheet.tsx | Updates Tailwind focus outline class. |
| src/components/ui/select.tsx | Updates Tailwind sizing/outline + Radix variable class syntax. |
| src/components/ui/navigation-menu.tsx | Updates Tailwind classes (including z-index + variant syntax changes). |
| src/components/ui/input.tsx | Updates Tailwind focus-visible outline class. |
| src/components/ui/dropdown-menu.tsx | Updates Tailwind outline + data-* variant syntax. |
| src/components/ui/dialog.tsx | Updates Tailwind focus outline class. |
| src/components/ui/command.tsx | Updates Tailwind selector syntax for cmdk sub-elements. |
| src/components/ui/card.tsx | Updates Tailwind shadow utility. |
| src/components/ui/button.tsx | Updates Tailwind focus-visible outline class. |
| src/components/ui/badge.tsx | Updates Tailwind focus outline class. |
| src/components/custom/multiple-selector.tsx | Updates Tailwind data-* variant syntax and outline classes. |
| src/components/custom/data-table.tsx | Fixes TanStack types import to come from public API. |
| src/components/custom/coockie-consent.tsx | Updates z-index Tailwind utility. |
| src/components/app/nav-item.tsx | Fixes useLocation import source to react-router-dom. |
| src/App.css | Migrates Tailwind directives to v4 CSS-first setup and theme tokens. |
| postcss.config.js | Switches to @tailwindcss/postcss plugin config. |
| package.json | Updates scripts, dependency versions, and adds Node engine requirement. |
| README.md | Adds Node version setup guidance. |
| Dockerfile | Updates Bun base image and uses bun.lockb in build stage. |
| AGENTS.md | Updates agent guidance toward bun workflows and adds codegen-first guidance. |
| .nvmrc | Pins Node version. |
| .github/workflows/main-branch-docker.yml | Refactors workflow to build/test before Docker publish on main. |
| .github/workflows/ci.yml | Adds CI workflow for pushes/PRs (install/codegen/test/build). |
| .eslintrc.cjs | Adjusts lint rules and disables some react-hooks rules. |
Comments suppressed due to low confidence (1)
AGENTS.md:52
AGENTS.mdsaysbun run build“Type-checks (tsc -b) then produces production bundle”, butpackage.jsonnow definesbuildasvite buildonly (notsc). Update this table entry (or reintroduce the typecheck step) so the documented workflow matches the actual scripts.
| Command | Description |
| -------------------------- | ------------------------------------------------------------------- |
| `bun run dev` | Starts Vite dev server (default port 3000). |
| `bun run build` | Type‑checks (`tsc -b`) then produces production bundle. |
| `bun run preview` | Serves the production build locally (`vite preview`). |
| `bun run prod` | Serves built assets with `serve -s dist`. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "dev": "vite", | ||
| "build": "tsc -b && vite build", | ||
| "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
| "build": "vite build", | ||
| "lint": "eslint -c .eslintrc.cjs . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
| "preview": "vite preview", |
There was a problem hiding this comment.
The build script no longer runs tsc (type-check), so CI will no longer fail on TypeScript type errors that Vite’s build may not catch. Consider adding a separate typecheck script (e.g., tsc -b or tsc --noEmit) and running it in CI to keep type safety guarantees.
| const optionsRef = useRef(options) | ||
| const retryCountRef = useRef(0) | ||
| const maxAttempts = optionsRef.current.maxRetries || 5 | ||
| const maxAttempts = options.maxRetries ?? 5 | ||
|
|
There was a problem hiding this comment.
Switching from optionsRef.current.maxRetries || 5 to options.maxRetries ?? 5 changes behavior when maxRetries is 0: maxAttempts becomes 0, and the hook will never connect because retryCountRef.current < maxAttempts will be false on the first attempt. If 0 is meant to mean “no retries” (but still allow the initial connection), adjust the logic (e.g., treat 0 as 1 attempt, or separate initial attempt vs retries).
| <DialogContent className="overflow-hidden p-0 shadow-lg"> | ||
| <Command className="[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"> | ||
| <Command className="**:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 **:[[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5"> | ||
| {children} |
There was a problem hiding this comment.
The className string contains **:[[cmdk-…]]: sequences, which don’t match the Tailwind arbitrary selector/variant syntax used elsewhere in this codebase (and look like accidental Markdown). This will likely cause these styles to never apply. Replace these with valid Tailwind selectors (e.g., the previous [&_[cmdk-group-heading]]: pattern) so CommandDialog renders correctly.
There was a problem hiding this comment.
are you sure? i updated to tailwind v4
| className={cn( | ||
| "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", | ||
| "overflow-hidden p-1 text-foreground **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group-heading]]:text-muted-foreground", | ||
| className | ||
| )} |
There was a problem hiding this comment.
Same issue here: **:[[cmdk-group-heading]]: is not a valid Tailwind selector/variant and will be ignored, so group heading spacing/typography won’t be applied. Use valid Tailwind arbitrary selector syntax for cmdk group headings.
There was a problem hiding this comment.
are you sure? i updated to tailwind v4
| 'react-hooks/set-state-in-effect': 'off', | ||
| 'react-hooks/incompatible-library': 'off', | ||
| 'react-hooks/exhaustive-deps': 'off', | ||
| 'no-unused-disable': 'off', |
There was a problem hiding this comment.
no-unused-disable is not a core ESLint rule, and there’s no plugin configured that provides it. ESLint will typically error on unknown rule names, which would break bun run lint/CI. Remove this rule entry or replace it with the correct rule from an installed plugin (or rely on --report-unused-disable-directives which is already passed on the CLI).
| 'no-unused-disable': 'off', |
| className={cn( | ||
| "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", | ||
| "top-full z-1 flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", | ||
| className |
There was a problem hiding this comment.
z-1 is not part of Tailwind’s default z-index scale (and will be ignored unless you’ve explicitly added it). Previously this used an arbitrary value (z-[1]). Consider reverting to z-[1] or switching to a standard z-index utility (e.g., z-10) to preserve the intended stacking behavior.
There was a problem hiding this comment.
are you sure? i updated to tailwind v4
| /// <reference types="vitest" /> | ||
| /// <reference types="vitest" /> | ||
| import { defineConfig } from 'vite' |
There was a problem hiding this comment.
There are two identical /// <reference types="vitest" /> lines at the top of this file. Remove the duplicate to avoid confusion and keep the config clean.
c15198a to
ae5fba0
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 36 out of 40 changed files in this pull request and generated 7 comments.
Comments suppressed due to low confidence (1)
AGENTS.md:52
- AGENTS.md states
bun run buildtype-checks withtsc -b, butpackage.jsonnow runs onlyvite build. If type-checking is still required in CI, either reintroducetscinto the build pipeline or update the documentation to reflect the new behavior (and add a separate typecheck step).
| `bun run dev` | Starts Vite dev server (default port 3000). |
| `bun run build` | Type‑checks (`tsc -b`) then produces production bundle. |
| `bun run preview` | Serves the production build locally (`vite preview`). |
| `bun run prod` | Serves built assets with `serve -s dist`. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| className={cn( | ||
| "origin-top-center relative mt-1.5 h-[var(--radix-navigation-menu-viewport-height)] w-full overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 md:w-[var(--radix-navigation-menu-viewport-width)]", | ||
| 'origin-top-center bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-90 relative mt-1.5 h-(--radix-navigation-menu-viewport-height) w-full overflow-hidden rounded-md border shadow-lg md:w-(--radix-navigation-menu-viewport-width)', | ||
| className |
There was a problem hiding this comment.
The NavigationMenu viewport sizing classes use h-(--radix-navigation-menu-viewport-height) / md:w-(--radix-navigation-menu-viewport-width), which is not valid Tailwind arbitrary-value syntax. These will be ignored and the Radix viewport may render with incorrect dimensions.
| bun run generate:graphql | ||
| ``` | ||
|
|
||
| This command re‑generates the GraphQL types and hooks (e.g., `src/graphql/generated.ts`). It must be executed any time the GraphQL schema changes and must be run before `bun run test` or `bun run build`. Ensure this step is included in any CI pipeline or local workflow. |
There was a problem hiding this comment.
AGENTS.md says codegen outputs src/graphql/generated.ts, but codegen is now configured to generate into src/graphql/generated/ (client preset). Update this example path so agents/CI guidance matches the actual output location.
| This command re‑generates the GraphQL types and hooks (e.g., `src/graphql/generated.ts`). It must be executed any time the GraphQL schema changes and must be run before `bun run test` or `bun run build`. Ensure this step is included in any CI pipeline or local workflow. | |
| This command re‑generates the GraphQL types and hooks (e.g., files in `src/graphql/generated/`). It must be executed any time the GraphQL schema changes and must be run before `bun run test` or `bun run build`. Ensure this step is included in any CI pipeline or local workflow. |
| className={cn( | ||
| "top-full z-[1] flex h-1.5 items-end justify-center overflow-hidden data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in", | ||
| 'data-[state=visible]:animate-in data-[state=hidden]:animate-out data-[state=hidden]:fade-out data-[state=visible]:fade-in top-full z-1 flex h-1.5 items-end justify-center overflow-hidden', | ||
| className |
There was a problem hiding this comment.
z-1 is not a standard Tailwind z-index utility (common options are z-0, z-10, etc., or z-[1]). As written, this class will likely be ignored and the indicator stacking may regress.
| const GetAllPermissionsDocument = graphql(` | ||
| query GetAllPermissions($page: Int, $size: Int, $sort: String, $direction: String) { | ||
| getAllPermissions(page: $page, size: $size, sort: $sort, direction: $direction) { | ||
| id | ||
| name | ||
| } | ||
| } | ||
| `) |
There was a problem hiding this comment.
GetAllPermissionsDocument is created inside the hook body, so it is re-evaluated on every render. Even if the generated graphql() helper returns a cached DocumentNode, hoisting the document definition to module scope makes the hook cheaper and avoids accidental identity changes if the codegen implementation changes.
| position === "popper" && | ||
| "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" | ||
| 'p-1', | ||
| position === 'popper' && 'h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)' |
There was a problem hiding this comment.
The viewport class uses h-(--radix-select-trigger-height) / min-w-(--radix-select-trigger-width), which is not valid Tailwind arbitrary-value syntax and will be ignored. This should use the bracket form for CSS variables so the select viewport sizes correctly.
| position === 'popper' && 'h-(--radix-select-trigger-height) w-full min-w-(--radix-select-trigger-width)' | |
| position === 'popper' && | |
| 'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]' |
| className={cn( | ||
| "overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground", | ||
| 'text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium', | ||
| className | ||
| )} |
There was a problem hiding this comment.
Same issue here: **:[[cmdk-group-heading]]:... is not valid Tailwind syntax, so these styles won't apply to group headings. Replace with the correct selector/variant syntax used elsewhere in the file.
|
@xcodeassociated I've opened a new pull request, #3, to work on those changes. Once the pull request is ready, I'll request review from you. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 36 out of 40 changed files in this pull request and generated 15 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| const navigationMenuTriggerStyle = cva( | ||
| "group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50" | ||
| 'group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-hidden disabled:pointer-events-none disabled:opacity-50 data-active:bg-accent/50 data-[state=open]:bg-accent/50' |
There was a problem hiding this comment.
The data attribute variant data-active: should use square brackets. Change to data-[active]:bg-accent/50 to match Tailwind CSS syntax. The adjacent data-[state=open]:bg-accent/50 uses correct syntax.
| const keycloak = new Keycloak({ | ||
| url: import.meta.env.VITE_APP_KEYCLOAK_URL, | ||
| realm: 'master', | ||
| realm: 'app', |
There was a problem hiding this comment.
The Keycloak realm has been changed from 'master' to 'app'. Ensure that the Keycloak server has an 'app' realm configured and that all necessary clients, roles, and users are properly set up in this new realm. This is a breaking change that will affect authentication for all users.
| // eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
| // @ts-expect-error | ||
| test: { |
There was a problem hiding this comment.
The @ts-expect-error comment suggests there's a type incompatibility with the test configuration in Vite. In Vite 5+, the test configuration should be properly typed when using /// <reference types="vitest" />. Consider investigating the actual TypeScript error and fixing it rather than suppressing it, or add a comment explaining why this suppression is necessary.
| {...props} | ||
| /> | ||
| const Card = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(({ className, ...props }, ref) => ( | ||
| <div ref={ref} className={cn('bg-card text-card-foreground rounded-lg border shadow-xs', className)} {...props} /> |
There was a problem hiding this comment.
The utility class shadow-xs does not exist in Tailwind CSS. The valid shadow utilities are: shadow-sm, shadow (default), shadow-md, shadow-lg, shadow-xl, shadow-2xl, shadow-inner, shadow-none. Use shadow-sm for the smallest shadow, or define a custom shadow utility if needed.
| <div ref={ref} className={cn('bg-card text-card-foreground rounded-lg border shadow-xs', className)} {...props} /> | |
| <div ref={ref} className={cn('bg-card text-card-foreground rounded-lg border shadow-sm', className)} {...props} /> |
| 'data-disabled:bg-muted-foreground data-disabled:text-muted data-disabled:hover:bg-muted-foreground', | ||
| 'data-fixed:bg-muted-foreground data-fixed:text-muted data-fixed:hover:bg-muted-foreground', |
There was a problem hiding this comment.
The data attribute variants data-disabled:, data-active:, and data-fixed: should use square brackets in Tailwind CSS. Change to data-[disabled]:, data-[active]:, and data-[fixed]: to ensure these conditional styles are applied correctly.
| 'data-disabled:bg-muted-foreground data-disabled:text-muted data-disabled:hover:bg-muted-foreground', | |
| 'data-fixed:bg-muted-foreground data-fixed:text-muted data-fixed:hover:bg-muted-foreground', | |
| 'data-[disabled]:bg-muted-foreground data-[disabled]:text-muted data-[disabled]:hover:bg-muted-foreground', | |
| 'data-[fixed]:bg-muted-foreground data-[fixed]:text-muted data-[fixed]:hover:bg-muted-foreground', |
| ref={ref} | ||
| className={cn( | ||
| "relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", | ||
| 'focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50', |
There was a problem hiding this comment.
The data attribute variant data-disabled: should use square brackets. Change to data-[disabled]:pointer-events-none data-[disabled]:opacity-50 to match Tailwind CSS syntax.
| 'focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50', | |
| 'focus:bg-accent focus:text-accent-foreground relative flex w-full cursor-default items-center rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50', |
| "dev": "vite", | ||
| "build": "tsc -b && vite build", | ||
| "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", | ||
| "build": "vite build", |
There was a problem hiding this comment.
The build script has been changed from tsc -b && vite build to just vite build, removing the TypeScript compilation step. While Vite does perform type checking during development, this means type errors won't block production builds. Consider adding a separate type-check script (e.g., "type-check": "tsc --noEmit") and running it in CI before building.
| "build": "vite build", | |
| "build": "vite build", | |
| "type-check": "tsc --noEmit", |
| <SheetOverlay /> | ||
| <SheetPrimitive.Content ref={ref} className={cn(sheetVariants({ side }), className)} {...props}> | ||
| {children} | ||
| <SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"> |
There was a problem hiding this comment.
The utility class rounded-xs does not exist in Tailwind CSS (v3 or v4). The valid border-radius utilities are: rounded-none, rounded-sm, rounded (default), rounded-md, rounded-lg, rounded-xl, rounded-2xl, rounded-3xl, rounded-full. Consider using rounded-sm instead, or define a custom utility if a smaller radius is specifically needed.
| <SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"> | |
| <SheetPrimitive.Close className="ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"> |
| ref={ref} | ||
| className={cn( | ||
| "relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50", | ||
| 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50', |
There was a problem hiding this comment.
The utility class rounded-xs does not exist in Tailwind CSS. Use rounded-sm instead. This same issue also appears in the command.tsx and select.tsx files.
| 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center rounded-xs px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50', | |
| 'data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground relative flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50', |
| useEffect(() => { | ||
| if (!roles && !loading && !error && data) { | ||
| getRoles() | ||
| } | ||
|
|
||
| return () => { | ||
| setRoles(undefined) | ||
| } | ||
| }, [data, loading, error]) |
There was a problem hiding this comment.
The getRoles function is defined within the component but not included in the useEffect dependency array (line 47), yet it's called from within the effect. This violates the exhaustive-deps rule (which was disabled in .eslintrc.cjs). Consider either moving getRoles inside the useEffect, wrapping it in useCallback, or ensuring this pattern is intentional and documented.
Merges updates from agentic-upgrade into main.