Skip to content

feat(theme,app): light/dark color-mode toggle + chrome refactor + post-Tailwind-v4 polish - #3077

Merged
tada5hi merged 6 commits into
masterfrom
feat/color-mode-support
May 25, 2026
Merged

tada5hi merged 6 commits into
masterfrom
feat/color-mode-support

Conversation

@tada5hi

@tada5hi tada5hi commented May 25, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds an in-app light/dark color-mode toggle and finishes the work the
Tailwind v4 migration (#3075) left half-done in the chrome / theme
layer. Two commits:

  1. `feat(theme,app)` — installs `@vuecs/nuxt` for SSR-safe color-mode
    persistence (cookie-backed `.dark` class on ``), drops a
    sun/moon toggle into the header navbar, and refactors the theme to
    token-driven dark mode.

  2. `fix(theme,app)` — bundle of follow-up fixes uncovered while
    testing the toggle in the browser. Notable ones:

    • Navbar visibility regression. Tailwind v4 ships its own
      `.collapse` utility (`visibility: collapse`) which was leaking
      through the Bootstrap-compat layer's `display: flex !important`
      override and making the entire `<nav class="page-navbar">`
      invisible at md+. Dropped the bare `.collapse` class from the
      template and scoped the hide rule to `.navbar-collapse:not(.show)`.

    • Tailwind `dark:` variant fix. Added
      `@custom-variant dark (&:where(.dark, .dark ))` in
      `@authup/client-web-kit-theme` so every `dark:bg-
      ` /
      `dark:hover:bg-*` utility fires when the in-app toggle activates,
      regardless of OS preference. Without this, a user on a light OS
      toggling dark mode got a half-broken cascade (semantic tokens
      flipped via the `.dark` class, but every `dark:`-prefixed utility
      stayed dormant on its `prefers-color-scheme: dark` media query).

    • Mode-aware chrome. `--authup-chrome-*` tokens alias semantic
      vuecs tokens in light mode; `.dark` block pins them back to
      authup's historical warm-dark palette (`#34353a` ≈ 32% L) so the
      dark chrome stays the recognizable authup shade rather than
      vuecs's `neutral-800` (would blend into the page-content bg).
      Refactor extends to all four chrome stylesheets (header / sidebar
      / footer / navbar) — they previously kept hardcoded literals that
      the earlier commit message claimed were tokenized but weren't.

    • Softer dark content bg, top-level cascade override.
      `@vuecs/design`'s `.dark` block lives at CSS top level (outside
      any cascade layer); under the cascade-layers spec, a
      `@layer base { .dark { ... } }` override loses to a top-level rule
      regardless of source order. Hoisted just `--vc-color-bg` to a
      top-level `.dark { ... }` block so authup can soften the
      near-black `neutral-900` content bg without being beaten by
      vuecs. Filed upstream issue (linked below) proposing vuecs/design
      wrap its `:root` / `.dark` blocks in a named cascade layer.

    • Active / hover nav text on brand backgrounds: pinned to white
      directly rather than `--authup-chrome-fg`, which flipped to dark
      text in light mode (unreadable on the indigo / tan brand colors,
      which don't flip with mode).

    • Pagination hover + disabled state: enabled buttons hover to
      `primary-600` / `on-primary` (matches active button as a
      "this would be the active page" preview); disabled buttons get
      `opacity: 0.5` + `cursor: not-allowed` + hover pinned to resting
      state so they're visually inert under the pointer.

    • Section dividers (`.vc-nav-separator`): made the parent a
      flex row so the `:before` / `:after` lines with `flex: 1`
      actually render flanking the centered text; switched line color
      from `--authup-chrome-bg-elevated` (only ~1.5% L apart from
      chrome-bg in light mode) to `--authup-chrome-fg-muted` at 0.3
      opacity for consistent subtle visibility in both modes.

Upstream tracker

`tada5hi/vuecs#1595` —
proposes wrapping `@vuecs/design`'s `:root` / `.dark` token blocks in
a named cascade layer so downstream consumers can override semantic
tokens from inside `@layer base` cleanly (the workaround used in this
PR is to hoist the override to top level).

Test plan

  • Run `npm run build` from repo root; confirm all packages and
    apps build cleanly.
  • Run `npm run lint` from repo root; confirm no new lint errors.
  • In `apps/client-web`, click the sun/moon toggle in the header
    navbar — chrome (header, sidebar, footer, dropdown menus) flips
    between authup's warm-dark and a light surface; content area
    flips between light and a softened dark (not near-black).
  • Hover an enabled pagination button in both light + dark mode —
    should preview `primary-600` blue. Hover a disabled one
    (e.g. First / Prev on page 1) — dimmed at 50% opacity,
    `not-allowed` cursor, no color change.
  • Confirm the section divider in the sidebar nav renders flanking
    lines with the label centered in both modes.
  • Toggle dark mode while OS preference is light; every
    `dark:*` utility in vuecs components (form inputs, table rows,
    borders) should pick up the dark styling — not stay in
    light-OS-pref state.

Summary by CodeRabbit

  • New Features

    • Header theme toggle (light/dark) with accessible controls and icon.
  • Improvements

    • System-aware color-mode persistence and consistent dark-mode behavior.
    • Broad theme refresh using design tokens for more consistent colors and component appearance.
    • Updated table rendering across list pages for improved table behavior.
    • Polished pagination, navigation, and header collapse/hover/disabled visuals.
  • Chores

    • Dependency and theme package updates.

Review Change Stack

tada5hi added 2 commits May 24, 2026 18:14
Three changes bundled:

1. @vuecs/nuxt module — installed and wired in nuxt.config.ts for
   SSR-safe color-mode persistence. Configured with `themes: []` (our
   existing plugins/vuecs.ts keeps owning theme registration + per-
   package installs) and `injectTokens: false` (@vuecs/design comes in
   via @authup/client-web-kit-theme's CSS @import chain). Module
   provides auto-imported `useColorMode()` backed by the `vc-color-mode`
   cookie + automatic `.dark` / `.light` class on <html>.

2. Color-mode toggle button in apps/client-web/components/header.vue.
   Sun icon when dark, moon when light; aria-label + aria-pressed
   reflect state. Sits in the navbar-gadgets ul next to the language
   switcher — both right-aligned via margin-left:auto.

3. authup CSS refactored to use tokens so dark mode 'just works':

   - New brand-token block in packages/client-web-theme/src/index.css
     under @layer base. Two groups:
     * Chrome tokens (--authup-chrome-*) — alias `--vc-color-neutral-*`
       shades. Stay dark in both light and dark mode (chrome is
       always dark in authup's design — header / sidebar / footer /
       dropdown menus).
     * Brand accents (--authup-brand-{gold,coral,indigo,tan}) — the
       authup identity colors. Unchanged across modes.
   - Content / list / card stylesheets reference `--vc-color-bg`,
     `--vc-color-fg`, `--vc-color-bg-muted`, `--vc-color-bg-elevated`,
     `--vc-color-border`, `--vc-color-warning-*`, `--vc-color-error-*`,
     `--vc-color-info-*`, `--vc-color-primary-*` directly. Those flip
     automatically via @vuecs/design's `.dark` block — no per-class
     dark-mode rules needed.

   Refactored files:
   - packages/client-web-theme/src/styles/{root,navigation,card}.css
   - packages/client-web-theme/src/styles/core/{header,sidebar,navbar,footer}.css
   - packages/client-web-kit-theme/src/styles/{list,form-validation}.css

Verified dev render: navbar-gadgets shows the new color toggle + the
language switcher together, right-aligned in the header.
…ixes

Bundle of related fixes uncovered while iterating on the post-Tailwind
v4 color-mode work.

  1. Navbar visibility (regression from Bootstrap → Tailwind v4 swap).
     Tailwind v4 ships a built-in `.collapse` utility that sets
     `visibility: collapse`, which leaked through the compat layer's
     `display: flex !important` override on `.navbar-collapse`: even
     at md+ the entire `<nav class="page-navbar navbar-expand-md">`
     subtree rendered invisible (display flipped back, visibility
     stayed). Dropped the bare `.collapse` class from
     `apps/client-web/components/header.vue` and scoped the compat
     hide rule to `.navbar-collapse:not(.show)`.

  2. Chrome tokens flip with color mode. `--authup-chrome-bg` /
     `-fg` / `-border` etc. now alias `--vc-color-bg-elevated` /
     `-fg` / `-border` in `:root` (auto-light); the `.dark` block
     pins them back to authup's historical warm-dark palette
     (#34353a ≈ 32% L) so the dark chrome stays the recognizable
     authup shade rather than vuecs's neutral-800 (which would
     blend into the page-content bg). Refactor extends to the
     four chrome CSS files (header, sidebar, footer, footer) —
     they previously kept hardcoded `#34353a` / `#fff` / `#aeb2b7`
     literals that the earlier commit's message claimed were
     tokenized but weren't (the file writes never landed in
     6c4c0a7).

  3. Softer dark content bg, top-level overrides. `@vuecs/design`'s
     `.dark` block lives at the CSS top level (outside any cascade
     layer); under the cascade-layers spec, a `@layer base { .dark { ... } }`
     override loses to a top-level rule regardless of source order.
     Lifted just the `--vc-color-bg` override to a top-level
     `.dark { ... }` block at the end of `index.css` — same cascade
     tier as vuecs/design, source order then wins. Picked
     `neutral-700` (≈ 32% L) over vuecs's `neutral-900` (≈ 20% L)
     so the content surface is no longer near-black against the
     warm chrome. Comment links the workaround to upstream
     tracker tada5hi/vuecs#1595 (proposes wrapping vuecs/design's
     `:root` / `.dark` blocks in a named cascade layer).

  4. Tailwind `dark:` variant keyed off `.dark` class, not
     `@media (prefers-color-scheme: dark)`. Added
     `@custom-variant dark (&:where(.dark, .dark *))` in
     `@authup/client-web-kit-theme` so every `dark:bg-*` /
     `dark:text-*` / `dark:hover:bg-*` utility fires when the
     in-app toggle activates, regardless of OS preference. Without
     this, a user on a light OS toggling the in-app dark mode got
     a half-broken cascade — semantic tokens flipped via vuecs's
     `.dark`-class block, but every theme-tailwind `dark:` utility
     stayed dormant. Symptom: `hover:bg-neutral-100` beating an
     absent `dark:hover:bg-neutral-700` on pagination buttons in
     toggled-dark mode (light hover on dark surface).

  5. Active / hover nav text pinned to white. The brand backgrounds
     (`--authup-brand-indigo`, `--authup-brand-tan`) don't flip with
     mode; using `--authup-chrome-fg` would paint dark text on the
     brand background in light mode (unreadable on indigo, weak on
     tan). Set explicit `color: #ffffff` on the active / hover
     `<VCNavLink>` rules.

  6. Pagination hover preview + disabled-state polish. Enabled
     pagination buttons now hover to `primary-600` / `on-primary`
     (matches the active page button's resting color — acts as a
     "this would be the active page" preview). Disabled buttons
     (First / Prev on page 1, Next / Last on last page) get
     `opacity: 0.5` + `cursor: not-allowed` and their hover
     bg/border/color pinned to the resting state so they're
     visually inert under the pointer in both modes. Rule lives at
     the top level rather than inside `@layer components` to
     sidestep cascade-layer surprises.

  7. Section dividers (`.vc-nav-separator`). The `:before` / `:after`
     pseudo-elements had `flex: 1` but the parent wasn't flex, so
     they collapsed to zero width and the section labels rendered
     left-aligned without flanking lines. Made the separator a flex
     row with a small gap, and switched the line color from
     `--authup-chrome-bg-elevated` (only ~1.5% L apart from
     chrome-bg in light mode) to `--authup-chrome-fg-muted` at
     0.3 opacity, which has consistent subtle visibility against
     chrome-bg in both modes.
Copilot AI review requested due to automatic review settings May 25, 2026 13:50
@coderabbitai

coderabbitai Bot commented May 25, 2026 •

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

This PR wires a header dark-mode toggle to Nuxt/@vuecs color-mode, configures Tailwind to use a .dark variant, replaces hardcoded colors with CSS design tokens across theme styles, migrates ATable → VCTable across pages, adjusts pagination behavior, and bumps related @vuecs devDependencies.

Changes

Dark Mode Theme Toggle and Design Token System

Layer / File(s) Summary
Header dark mode toggle and Nuxt setup
apps/client-web/components/header.vue, apps/client-web/nuxt.config.ts, apps/client-web/package.json
Header imports useColorMode() exposing isDark and toggleColorMode; navbar collapse class removed and theme-toggle button added. Nuxt config adds @vuecs/nuxt with colorMode: { value: 'system' }, injectTokens: false, and related options; apps/client-web/package.json adds/bumps @vuecs/* devDeps including @vuecs/nuxt.
Tailwind dark variant and kit index
packages/client-web-kit-theme/src/index.css, packages/client-web-theme/src/index.css
Kit index adds explicit Tailwind cascade @layer ordering and @custom-variant dark so dark: utilities respond to .dark; client-web theme index defines concrete --authup-* tokens and .dark overrides; navbar collapse compat selector scoped and pagination overrides hoisted.
Form validation, list, pagination, and card tokens
packages/client-web-kit-theme/src/styles/form-validation.css, packages/client-web-kit-theme/src/styles/list.css, packages/client-web-theme/src/styles/card.css
Validation labels, hints, list items, pagination, and card styles replace literal colors with --vc-color-* and --authup-* CSS variables.
Chrome component token migration
packages/client-web-theme/src/styles/core/header.css, packages/client-web-theme/src/styles/core/footer.css, packages/client-web-theme/src/styles/core/navbar.css, packages/client-web-theme/src/styles/core/sidebar.css
Header, footer, navbar, and sidebar styles now use --authup-chrome-* and --authup-brand-* tokens for background/foreground/border and dropdown/menu colors.
Navigation and root content token migration
packages/client-web-theme/src/styles/navigation.css, packages/client-web-theme/src/styles/root.css
Navigation link colors, separators, active/hover backgrounds, root body, headings, page-content, and login panel now use --authup-* and --vc-color-* tokens.
ATable → VCTable migration across pages
apps/client-web/pages/*/index.vue, packages/client-web-kit/src/components/utility/*
Multiple pages replace legacy ATable/fields usage with VCTable/columns, updating props, slot signatures (typed row), and removing the ATable wrapper and its export.
Utility exports, pagination behavior, and docs
packages/client-web-kit/src/components/utility/index.ts, packages/client-web-kit/src/components/utility/pagination/module.ts, .agents/*
Removed ATable barrel export; buildPagination now passes hideDisabled: true to VCPagination; docs updated to reflect VCTable usage and new @vuecs/core install merging behavior.
Package bumps
apps/*/package.json, packages/*/package.json
DevDependency version bumps for multiple @vuecs/* packages across apps and packages manifests; no public API signature changes.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • authup/authup#3069: Related UI migration work; overlaps on table-rendering compatibility and ATable/VCTable behavior.

Poem

🐇🌙 I flipped the switch from light to night,
CSS tokens hummed and set things right,
Tables swapped their wrappers with a hop,
Nuxt remembers dark — the rabbit won't stop,
Hooray! design blooms in moonlit white.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding a light/dark color-mode toggle, refactoring chrome tokens, and completing Tailwind v4 polish work across the theme and app layers.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/color-mode-support

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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI 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.

Pull request overview

Adds an in-app light/dark mode toggle for the Nuxt client app and finishes the Tailwind v4 post-migration polish by moving remaining chrome/content styles to token-driven theming (including dark-mode cascade fixes and a few UI regressions).

Changes:

  • Integrates @vuecs/nuxt to provide SSR-safe color-mode persistence and exposes a header toggle wired via useColorMode().
  • Refactors chrome (header/sidebar/footer/navbar) + legacy styles (root/card/list/form-validation) to rely on --vc-color-* / --authup-* tokens instead of hardcoded colors.
  • Addresses Tailwind v4 collisions and cascade-layer edge cases (scoped navbar collapse rule; hoisted .dark override for --vc-color-bg; pagination hover/disabled behavior).

Reviewed changes

Copilot reviewed 14 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
packages/client-web-theme/src/styles/root.css Switches body/content/login colors to vuecs semantic tokens for mode-aware styling.
packages/client-web-theme/src/styles/navigation.css Tokenizes nav colors, fixes separator layout/contrast, and pins active/hover text for brand backgrounds.
packages/client-web-theme/src/styles/core/sidebar.css Tokenizes sidebar chrome colors (bg/fg) and brand accent color.
packages/client-web-theme/src/styles/core/navbar.css Tokenizes navbar chrome colors and cleans up spacing/formatting.
packages/client-web-theme/src/styles/core/header.css Tokenizes header chrome colors and borders for light/dark support.
packages/client-web-theme/src/styles/core/footer.css Tokenizes footer chrome colors and link accent.
packages/client-web-theme/src/styles/card.css Tokenizes card/list-like surfaces and borders for consistent theming.
packages/client-web-theme/src/index.css Introduces authup chrome/brand tokens, scopes navbar-collapse hide rule, and adds top-level overrides for dark bg + pagination interactions.
packages/client-web-kit-theme/src/styles/list.css Tokenizes list + legacy pagination colors against vuecs semantic tokens.
packages/client-web-kit-theme/src/styles/form-validation.css Deduplicates header and tokenizes validation state colors.
packages/client-web-kit-theme/src/index.css Adds a Tailwind dark custom variant keyed off .dark class (not OS preference).
apps/client-web/package.json Adds @vuecs/nuxt dependency for color-mode support.
apps/client-web/nuxt.config.ts Registers @vuecs/nuxt module and configures it to only handle color mode persistence.
apps/client-web/components/header.vue Adds the light/dark toggle button and removes the conflicting .collapse class from navbar content.
package-lock.json Locks @vuecs/nuxt and its dependency graph.

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

@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: 1

🧹 Nitpick comments (1)
packages/client-web-theme/src/styles/navigation.css (1)

35-40: ⚡ Quick win

Prefer a semantic token over hardcoded #ffffff for active/hover nav text.

Line 39 and Line 65 should use a theme token (for example var(--vc-color-on-primary)) to keep the token system fully consistent and easier to evolve.

Proposed refactor
 .vc-nav-items .vc-nav-item.vc-nav-item-nested:hover > .vc-nav-link,
 .vc-nav-items .vc-nav-item.vc-nav-item-nested:active > .vc-nav-link,
 .vc-nav-items .vc-nav-item.vc-nav-item-nested.active > .vc-nav-link {
     background: var(--authup-brand-tan);
-    color: `#ffffff`;
+    color: var(--vc-color-on-primary);
 }
@@
 .vc-nav-items .vc-nav-link.router-link-exact-active,
 .vc-nav-items .vc-nav-link.nuxt-link-exact-active {
     cursor: pointer;
-    color: `#ffffff`;
+    color: var(--vc-color-on-primary);
     background: var(--authup-brand-indigo) !important;
 }

Also applies to: 64-67

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/client-web-theme/src/styles/navigation.css` around lines 35 - 40,
Replace hardcoded white text color (`#ffffff`) in the active/hover nav rules with
the semantic theme token (e.g. var(--vc-color-on-primary)) so the design token
system is used consistently; update the selectors .vc-nav-items
.vc-nav-item.vc-nav-item-nested:hover > .vc-nav-link, .vc-nav-items
.vc-nav-item.vc-nav-item-nested:active > .vc-nav-link, .vc-nav-items
.vc-nav-item.vc-nav-item-nested.active > .vc-nav-link and the corresponding
block around lines 64-67 to use the token instead of `#ffffff`.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/client-web-kit-theme/src/styles/list.css`:
- Around line 24-29: There is an extra blank line before the box-shadow
declaration causing a declaration-empty-line-before stylelint error; remove the
empty line so the declarations for background-color, border, box-shadow and
transition are consecutive (i.e., delete the blank line preceding the box-shadow
rule in packages/client-web-kit-theme/src/styles/list.css) to satisfy the
linter.

---

Nitpick comments:
In `@packages/client-web-theme/src/styles/navigation.css`:
- Around line 35-40: Replace hardcoded white text color (`#ffffff`) in the
active/hover nav rules with the semantic theme token (e.g.
var(--vc-color-on-primary)) so the design token system is used consistently;
update the selectors .vc-nav-items .vc-nav-item.vc-nav-item-nested:hover >
.vc-nav-link, .vc-nav-items .vc-nav-item.vc-nav-item-nested:active >
.vc-nav-link, .vc-nav-items .vc-nav-item.vc-nav-item-nested.active >
.vc-nav-link and the corresponding block around lines 64-67 to use the token
instead of `#ffffff`.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 19356e82-fed6-4198-8eb5-ffea1445f4ac

📥 Commits

Reviewing files that changed from the base of the PR and between a49d1da and edaaff1.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (14)
  • apps/client-web/components/header.vue
  • apps/client-web/nuxt.config.ts
  • apps/client-web/package.json
  • packages/client-web-kit-theme/src/index.css
  • packages/client-web-kit-theme/src/styles/form-validation.css
  • packages/client-web-kit-theme/src/styles/list.css
  • packages/client-web-theme/src/index.css
  • packages/client-web-theme/src/styles/card.css
  • packages/client-web-theme/src/styles/core/footer.css
  • packages/client-web-theme/src/styles/core/header.css
  • packages/client-web-theme/src/styles/core/navbar.css
  • packages/client-web-theme/src/styles/core/sidebar.css
  • packages/client-web-theme/src/styles/navigation.css
  • packages/client-web-theme/src/styles/root.css

Comment on lines +24 to 29
background-color: var(--vc-color-bg-muted);
border: 1px solid var(--vc-color-border);

box-shadow: 0 4px 25px 0 rgba(0,0,0,.1);
box-shadow: 0 4px 25px 0 rgba(0, 0, 0, .1);
transition: all .3s ease-in-out;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Remove the extra blank line before box-shadow to satisfy stylelint.

Line 27 introduces an empty line before a declaration, which violates declaration-empty-line-before.

Proposed fix
 .list .list-item {
     background-color: var(--vc-color-bg-muted);
     border: 1px solid var(--vc-color-border);
-
     box-shadow: 0 4px 25px 0 rgba(0, 0, 0, .1);
     transition: all .3s ease-in-out;
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
background-color: var(--vc-color-bg-muted);
border: 1px solid var(--vc-color-border);
box-shadow: 0 4px 25px 0 rgba(0,0,0,.1);
box-shadow: 0 4px 25px 0 rgba(0, 0, 0, .1);
transition: all .3s ease-in-out;
background-color: var(--vc-color-bg-muted);
border: 1px solid var(--vc-color-border);
box-shadow: 0 4px 25px 0 rgba(0, 0, 0, .1);
transition: all .3s ease-in-out;
🧰 Tools
🪛 Stylelint (17.11.1)

[error] 27-27: Expected no empty line before declaration (declaration-empty-line-before)

(declaration-empty-line-before)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/client-web-kit-theme/src/styles/list.css` around lines 24 - 29,
There is an extra blank line before the box-shadow declaration causing a
declaration-empty-line-before stylelint error; remove the empty line so the
declarations for background-color, border, box-shadow and transition are
consecutive (i.e., delete the blank line preceding the box-shadow rule in
packages/client-web-kit-theme/src/styles/list.css) to satisfy the linter.

tada5hi added 3 commits May 25, 2026 16:58
…ounds

Release-please bundle tada5hi/vuecs#1588 went out today; relevant
fixes for authup:

  - @vuecs/design 1.0.1 — wraps :root + .dark token defaults in
    @layer vuecs (closes tada5hi/vuecs#1595, filed from this branch).
    Lets consumers override --vc-color-* tokens from inside their own
    @layer base without hoisting outside the layer structure.
  - @vuecs/core 3.1.0 — installThemeManager now MERGES install
    options into the existing manager rather than dropping them on
    second install (closes tada5hi/vuecs#1591). Defuses the
    first-install-wins trap the previous CLAUDE.md notes warned
    about.
  - @vuecs/table 1.1.1 — typed `cell-${string}` / `header-${string}`
    slots via template-literal SlotsType (closes #1592). The TS
    reason for the <ATable> wrapper is now obsolete (the wrapper
    still earns its keep for the bvnext :items/:fields prop bridge
    and headerClass alignment derivation).
  - @vuecs/pagination 2.1.0 — adds `hideDisabled` prop that
    unrenders edge controls at page boundaries; orthogonal to the
    disabled-state CSS in this branch (we still need the CSS for
    callers that don't opt in).
  - @vuecs/elements 1.2.0, @vuecs/navigation 3.0.1,
    @vuecs/overlays 1.0.1 — `as:` prop widened (#1587). Non-breaking.

Code changes:

  1. Bumped every @vuecs/* caret in apps/{client-web,server-core}
     and packages/{client-web-kit,client-web-theme,
     client-web-kit-theme} to the new versions.

  2. @authup/client-web-kit-theme/src/index.css: declared explicit
     `@layer theme, vuecs, base, components, utilities;` at the top
     of the file so vuecs's @layer-wrapped tokens get positioned
     BEFORE Tailwind's @layer base (where authup's overrides live).
     Layer order is established at first appearance, and Tailwind's
     `@import "tailwindcss"` itself declares its layer order — by
     declaring ours first we control which layer sits where.

  3. @authup/client-web-theme/src/index.css: moved the
     `--vc-color-bg: var(--vc-color-neutral-700)` softening back
     INTO the @layer base { .dark { ... } } block alongside the
     other chrome-token overrides. Pre-1.0.1 this had to live at the
     top level (since vuecs/design's .dark was outside any layer);
     with vuecs/design 1.0.1's @layer vuecs wrapping and our explicit
     layer order, @layer base now wins on source order as intended.
     The standalone top-level .dark block at the bottom of the file
     is gone.

  4. Pagination hover override comment in
     @authup/client-web-theme/src/index.css updated — the old
     comment speculated about a cascade-layer surprise that turned
     out to be the `dark:` variant default firing on
     `prefers-color-scheme` rather than `.dark` class; that's
     handled by the @custom-variant declaration in the kit theme.
     The top-level + !important placement is now described as
     belt-and-suspenders (either would suffice independently) rather
     than as a forced workaround.

  5. .agents/structure.md — rewrote the "plugin install order" trap
     section to reflect @vuecs/core 3.1.0's merging behavior. The
     `name: 'vuecs'` declaration on the consumer plugin still stays
     (other plugins depend on it for explicit ordering), but the
     "first-install-wins ⇒ unstyled forms" failure mode no longer
     applies.

  6. .agents/architecture.md — `<ATable>` wrapper section updated.
     Notes the SlotsType issue is resolved upstream
     (tada5hi/vuecs#1592), and recasts the wrapper's remaining
     responsibility as the bvnext prop-shape bridge + alignment
     derivation. Drop conditions revised: rewrite call sites or
     absorb into a kit helper.
`@vuecs/table` 1.1.1 added template-literal slot typing for
`cell-${string}` / `header-${string}` (tada5hi/vuecs#1592) and
its auto-render path now dispatches consumer-provided
`#cell-<key>` / `#header-<key>` templates onto each cell. The
TypeScript reason the `<ATable>` wrapper existed is solved
upstream; the bvnext prop-shape bridge and `headerClass`-based
alignment derivation are now folded into the per-page call sites.

Per-page changes (9 entity index pages):

  - Replaced `<ATable :items="props.data" :fields="fields" ...>`
    with `<VCTable :data="props.data" :columns="columns" ...>`.
    `<VCTable>` is globally registered via `installTable` in
    `apps/client-web/plugins/vuecs.ts` so no per-file import is
    needed.
  - Renamed the local `fields` variable to `columns`.
  - For centered headers, switched `headerClass: 'text-center'`
    to `'text-center!'` (Tailwind v4 important-suffix). Without
    the `!`, `theme-tailwind`'s baked-in `text-left font-medium`
    on `tableHeadCell.classes.root` wins on source order. Body
    cells need no `!` — `<VCTableCell>`'s root only bakes
    `align-middle`.

TypeScript trade-offs intentional (mirrors what `<ATable>` did
internally):

  - Dropped the entity generic from column declarations
    (`TableColumn<Role>[]` → `TableColumn[]`). `TableColumn` is
    invariant in `Row` because of the contravariant `accessor:
    (row: Row) => unknown` arm, so `TableColumn<Role>[]` is NOT
    assignable to `TableColumnRaw<unknown>[]` (vuecs's columns
    prop type). The wrapper hid this with a `Record<string, any>`
    cast; per-page we just default to `Row=unknown`.
  - Slot prop row type is `{ row: any }` rather than
    `{ row: Role }`. Slot function params are contravariant: a
    function accepting `{ row: Role }` cannot be assigned to
    `(props: TableCellSlotProps<unknown>) => unknown` because
    `unknown` doesn't widen to `Role`. `any` is bivariant and
    accepts both directions. Per-template body accesses
    (`row.field`) keep working through `any`.

Wrapper removal:

  - `packages/client-web-kit/src/components/utility/ATable.vue`
    deleted.
  - Removed the `ATable` export from
    `packages/client-web-kit/src/components/utility/index.ts`.
  - Updated the comment in `entity/collection/module.ts` that
    used `<ATable>` as the canonical example of a custom body
    slot — points at `<VCTable>` with `:columns` driving
    auto-render instead.

Docs:

  - `.agents/structure.md`: UI-stack matrix row for Tables now
    documents `<VCTable>` directly and the `text-center!`
    pattern.
  - `.agents/architecture.md`: replaced the `<ATable>` wrapper
    section with a "Table usage" section. Updated the bvnext
    removal list to note the wrapper retirement.
Four follow-ups from the self-audit:

  1. Pagination disabled-hover rule no longer touches `color` or
     `border-color`. The original override set `border-color:
     var(--color-neutral-300) !important` for the disabled hover
     state, but the resting state's border comes from the
     `border-neutral-300 dark:border-neutral-700` utility chain on
     the button — and palette tokens DON'T flip with mode, so in
     dark mode the override forced `neutral-300` over the resting
     `neutral-700`, introducing a visible border-color flicker on
     hover. Likewise `color: var(--color-fg) !important` was a no-op
     because no `hover:*` utility on the button changes text color.
     New rule overrides only `background-color`, which is the only
     property `hover:bg-neutral-100` / `dark:hover:bg-neutral-700`
     actually mutates.

  2. Dead token `--authup-chrome-bg-hover` removed from both the
     `:root` and `.dark` declarations. Declared during the chrome-
     token refactor but never referenced anywhere in the codebase.

  3. Enabled pagination buttons now use `:focus-visible:not(:disabled)`
     rather than `:focus:not(:disabled)`. Matches the convention used
     elsewhere in the theme (`.btn` compat class uses
     `focus-visible:outline-*`). The change suppresses the brief
     primary-600 flash when a button is mouse-clicked (mouse focus
     doesn't trigger `:focus-visible`), while keyboard focus still
     gets the same visible feedback.

  4. Nested nav-link `border-left-color` was hitting the same light-
     mode contrast trap we fixed on `.vc-nav-separator`:
     `--authup-chrome-bg-elevated` is only ~1.5% lightness apart
     from chrome-bg in light mode, so the 6px border-left
     disappeared against the near-white chrome surface. Switched to
     `color-mix(in oklab, var(--authup-chrome-fg-muted) 30%,
     transparent)` — same mid-tone token the separator now uses,
     with `color-mix` standing in for opacity since border-left-
     color can't be alpha-blended via `opacity` (would dim the link
     text alongside).
…nation hideDisabled

Resolves the remaining audit follow-ups from the previous review:

  1. `tableHeadCell.classes.root` override in `clientWebTheme()`.
     Theme-tailwind ships `"px-3 text-left font-medium"` as the root
     class for table head cells. With that baked-in `text-left`,
     a consumer-side `headerClass: 'text-center'` on a `TableColumn`
     would lose on CSS source order — so authup's entity index pages
     had to use Tailwind v4's `!important` suffix (`'text-center!'`)
     to override. Stripping the baked `text-left` at the theme
     override layer (the `elements` block in `clientWebTheme()`)
     centralises the fix: plain `headerClass: 'text-center'` now
     works everywhere. Walked the `!` suffix back out of all 9 entity
     index pages.

     The same override layer is the natural fix point if
     theme-tailwind ever bakes alignment into `tableCell.classes.root`
     (today it's only `"px-3 align-middle"`, so cellClass already
     works without `!`). Closes the related audit smell about
     `cellClass: 'text-center'` fragility — fragility persists
     theoretically, but the single fix point limits the blast radius
     to one file when it surfaces.

  2. `hideDisabled: true` on `<VCPagination>` via `buildPagination`.
     vuecs/pagination 2.1.0 added the prop; with it set, edge
     controls (First / Prev on page 1, Next / Last on the last page)
     are unrendered instead of rendered-disabled. The previous
     audit-follow-up commit `2fa336854` had cleaned up the
     disabled-state CSS rules but left them in place defensively;
     they're now redundant and removed. The remaining
     `:not(:disabled)` filter on the hover-preview rule stays as a
     belt-and-suspenders guard for callers that use `<VCPagination>`
     directly without `buildPagination`'s opt-in.

  3. Upstream issue filed: tada5hi/vuecs#1601 — proposes making
     `<VCTable>` (and `<VCTableLite>`) generic over `Row` so
     consumer slot prop types can carry through, addressing the
     TS-coverage trade-off the `<ATable>` removal commit
     intentionally accepted. No authup-side code change for this
     yet; we keep the `{ row: any }` pragmatism documented in
     `.agents/architecture.md` and revisit when the upstream
     proposal lands.

Documentation:

  - `.agents/structure.md` UI-stack matrix Tables row updated:
    `headerClass: 'text-center'` now described as the in-place
    convention, with the `clientWebTheme()` override explained as
    the seam.
  - `.agents/architecture.md` Table usage section rewritten to
    match — drops the Tailwind v4 `!` mention in favour of the
    theme override.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
apps/client-web/pages/identity-providers/index/index.vue (1)

124-128: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fix NuxtLink “disabled” behavior (still navigates)
In apps/client-web/pages/identity-providers/index/index.vue (lines 124-128), NuxtLink doesn’t support a disabled prop, so the link remains navigable even with :disabled="!hasEditPermission". Gate the link with v-if="hasEditPermission" and render a disabled non-link control otherwise.

Suggested fix
-                    <NuxtLink
-                        :to="'/identity-providers/'+ row.id"
-                        class="btn btn-xs btn-outline-primary me-1"
-                        :disabled="!hasEditPermission"
-                    >
-                        <i class="fa-solid fa-bars" />
-                    </NuxtLink>
+                    <NuxtLink
+                        v-if="hasEditPermission"
+                        :to="'/identity-providers/'+ row.id"
+                        class="btn btn-xs btn-outline-primary me-1"
+                    >
+                        <i class="fa-solid fa-bars" />
+                    </NuxtLink>
+                    <button
+                        v-else
+                        type="button"
+                        class="btn btn-xs btn-outline-primary me-1"
+                        disabled
+                        aria-disabled="true"
+                    >
+                        <i class="fa-solid fa-bars" />
+                    </button>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/client-web/pages/identity-providers/index/index.vue` around lines 124 -
128, NuxtLink does not honor a disabled prop so change the conditional
rendering: replace the NuxtLink that uses :disabled="!hasEditPermission" with a
v-if="hasEditPermission" NuxtLink for the editable case (pointing to
'/identity-providers/'+ row.id) and render a non-link disabled control (e.g., a
span/button with the same classes and a disabled appearance) in the v-else
branch; update references around NuxtLink and hasEditPermission/row.id to ensure
the disabled state is purely non-navigable.
apps/client-web/pages/clients/index/index.vue (1)

152-156: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

NuxtLink :disabled won’t reliably block navigation.

In apps/client-web/pages/clients/index/index.vue (lines ~152-156), the action uses <NuxtLink :to="'/clients/'+ row.id" :disabled="!hasEditPermission">, but Nuxt 4 NuxtLink has no disabled behavior that prevents navigation—so users can still click through.

Suggested fix
-                    <NuxtLink
-                        :to="'/clients/'+ row.id"
-                        class="btn btn-xs btn-outline-primary me-1"
-                        :disabled="!hasEditPermission"
-                    >
-                        <i class="fa-solid fa-bars" />
-                    </NuxtLink>
+                    <NuxtLink
+                        v-if="hasEditPermission"
+                        :to="'/clients/' + row.id"
+                        class="btn btn-xs btn-outline-primary me-1"
+                    >
+                        <i class="fa-solid fa-bars" />
+                    </NuxtLink>
+                    <span
+                        v-else
+                        class="btn btn-xs btn-outline-primary me-1 disabled"
+                        aria-disabled="true"
+                    >
+                        <i class="fa-solid fa-bars" />
+                    </span>
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/client-web/pages/clients/index/index.vue` around lines 152 - 156, The
NuxtLink element using :disabled="!hasEditPermission" doesn't prevent
navigation; replace the direct <NuxtLink :to="'/clients/'+ row.id"> usage (the
NuxtLink around row.id) with a control that checks hasEditPermission before
navigating — e.g., render a non-link button/span when !hasEditPermission or
change to a button with a click handler that does if (!hasEditPermission)
return; else call navigateTo('/clients/'+ row.id) (or programmatically invoke
router.push) so clicks are blocked when hasEditPermission is false; update the
element that references row.id and hasEditPermission accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@apps/client-web/pages/clients/index/index.vue`:
- Around line 152-156: The NuxtLink element using :disabled="!hasEditPermission"
doesn't prevent navigation; replace the direct <NuxtLink :to="'/clients/'+
row.id"> usage (the NuxtLink around row.id) with a control that checks
hasEditPermission before navigating — e.g., render a non-link button/span when
!hasEditPermission or change to a button with a click handler that does if
(!hasEditPermission) return; else call navigateTo('/clients/'+ row.id) (or
programmatically invoke router.push) so clicks are blocked when
hasEditPermission is false; update the element that references row.id and
hasEditPermission accordingly.

In `@apps/client-web/pages/identity-providers/index/index.vue`:
- Around line 124-128: NuxtLink does not honor a disabled prop so change the
conditional rendering: replace the NuxtLink that uses
:disabled="!hasEditPermission" with a v-if="hasEditPermission" NuxtLink for the
editable case (pointing to '/identity-providers/'+ row.id) and render a non-link
disabled control (e.g., a span/button with the same classes and a disabled
appearance) in the v-else branch; update references around NuxtLink and
hasEditPermission/row.id to ensure the disabled state is purely non-navigable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 365cc10c-109a-4f0f-9752-3c1008aa56ba

📥 Commits

Reviewing files that changed from the base of the PR and between 3b96c4f and e2c34d9.

📒 Files selected for processing (18)
  • .agents/architecture.md
  • .agents/structure.md
  • apps/client-web/pages/clients/index/index.vue
  • apps/client-web/pages/identity-providers/index/index.vue
  • apps/client-web/pages/permissions/index/index.vue
  • apps/client-web/pages/policies/index/index.vue
  • apps/client-web/pages/realms/index/index.vue
  • apps/client-web/pages/robots/index/index.vue
  • apps/client-web/pages/roles/index/index.vue
  • apps/client-web/pages/scopes/index/index.vue
  • apps/client-web/pages/users/index/index.vue
  • packages/client-web-kit/src/components/utility/ATable.vue
  • packages/client-web-kit/src/components/utility/entity/collection/module.ts
  • packages/client-web-kit/src/components/utility/index.ts
  • packages/client-web-kit/src/components/utility/pagination/module.ts
  • packages/client-web-theme/src/index.css
  • packages/client-web-theme/src/index.ts
  • packages/client-web-theme/src/styles/navigation.css
💤 Files with no reviewable changes (2)
  • packages/client-web-kit/src/components/utility/index.ts
  • packages/client-web-kit/src/components/utility/ATable.vue
✅ Files skipped from review due to trivial changes (3)
  • packages/client-web-kit/src/components/utility/entity/collection/module.ts
  • .agents/architecture.md
  • .agents/structure.md

@tada5hi

tada5hi commented May 25, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented May 25, 2026

Copy link
Copy Markdown
✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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