Skip to content

fix(ui): restore config sidebar/nav/subnav/tag-picker CSS (#2508)#2513

Merged
alexey-pelykh merged 1 commit intomainfrom
fix/ui-migrate-config-sidebar-top-tabs-2508
Apr 23, 2026
Merged

fix(ui): restore config sidebar/nav/subnav/tag-picker CSS (#2508)#2513
alexey-pelykh merged 1 commit intomainfrom
fix/ui-migrate-config-sidebar-top-tabs-2508

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Closes #2508.

Summary

Upstream sync 0667aa5596 (v2026.3.22, #2400) replaced the config sidebar + nav + subnav + search__tag-* CSS family with a flat .config-top-tabs horizontal bar as part of a dashboard-v2 redesign. The fork's ui/src/ui/views/config.ts kept the vertical sidebar layout (with icons, tag picker, and two-level subsection nav) — features upstream removed entirely. Result: settings view shipped with 21 orphaned class references (reported by scripts/audit-css-class-drift.mjs cluster 1).

Third confirmed instance of the "definition-site sync without paired call-site update" variant documented in HQ #57 (after #2493 and #2501).

Approach

Fork-owned CSS restore (hybrid pattern from #2506): add a fork-owned ui/src/styles/config-sidebar.css with pre-sync rules, imported AFTER upstream config.css so the .config-layout grid override cascades. Zero TS changes — config.ts kept as-is.

Full TS rename to upstream vocabulary (sidebar → config-top-tabs) was rejected: upstream's layout is horizontal flat tabs with no icons / no tag picker / no subnav. A rename without restructuring would inherit upstream's horizontal layout and break the sidebar UX. That would be a product change, not a drift fix.

  • ui/src/styles/config-sidebar.css (new, 372 LOC): restored pre-sync rules (recovered verbatim from 0667aa5596^:ui/src/styles/config.css) for .config-sidebar*, .config-nav*, .config-subnav*, .config-search__hint*, .config-search__tag-*. Includes .config-layout two-column grid override and mobile breakpoints (768px, 480px). Theme selector migrated from pre-sync [data-theme="light"] to current [data-theme-mode="light"] convention (matches 30× occurrences in config.css, 23× in components.css). Hardcoded legacy brand color rgba(255, 77, 77, 0.4) in .config-subnav__item.active replaced with color-mix(in srgb, var(--accent) 40%, transparent) for theme consistency (matches established idiom, 28× across styles tree).
  • ui/src/styles.css (+1 LOC): import the new file immediately after upstream config.css so cascade overrides work.

Fork-owned CSS file is conflict-free against future upstream syncs of config.css — upstream has zero rules for any of the 21 restored classes.

Scope notes

Test plan

  • pnpm check (format:check + tsgo + lint + lint:tmp:no-random-messaging + lint:no-remoteclaw-ai) — all pass
  • pnpm canvas:a2ui:bundle — builds (457 kB, 66 ms)
  • pnpm vitest run --config vitest.unit.config.ts ui/src/ui/ — 4 files / 43 tests pass
  • Fork-integrity gates: check-rebrand-leakage.sh, check-no-zombie-imports.mjs, check-stub-debt.mjs, check-throwing-stub-callers.mjs — all pass
  • node scripts/audit-css-class-drift.mjs — cluster 1 (0667aa5596) shows 0 orphans (21 → 0)
  • Exact-match class-emit/class-define sweep — 21 emitted ↔ 21 defined, no missing, no extra, no typos
  • Visual smoke — load settings view in light + dark themes, verify sidebar, tag picker, and subnav render correctly (requires human browser pass)

References

🤖 Generated with Claude Code

…2026.3.22 sync drift (#2508)

Upstream sync `0667aa5596` (v2026.3.22, #2400) replaced the config
sidebar + nav + subnav + tag-picker CSS family with a flat
`.config-top-tabs` horizontal bar as part of a dashboard-v2 redesign.
The fork's `ui/src/ui/views/config.ts` kept the vertical sidebar
layout (with icons, tag picker, and two-level subsection nav) —
features upstream removed entirely. Result: settings view shipped
with 21 orphaned class references (reported by
`scripts/audit-css-class-drift.mjs` cluster 1).

Third confirmed instance of the "definition-site sync without paired
call-site update" variant documented in HQ #57 (after #2493 and
#2501).

## Approach

Fork-owned CSS restore (hybrid pattern from #2506): add a fork-owned
`ui/src/styles/config-sidebar.css` with pre-sync rules, imported
AFTER upstream `config.css` so the `.config-layout` grid override
cascades. Zero TS changes — config.ts kept as-is.

Full TS rename to upstream vocabulary (sidebar → config-top-tabs)
was rejected: upstream's layout is horizontal flat tabs with no
icons / no tag picker / no subnav. A rename without restructuring
would inherit upstream's horizontal layout and break the sidebar
UX. Full restructure is a product change, not a drift fix.

## Changes

- `ui/src/styles/config-sidebar.css` (new, 372 LOC): restored rules
  for .config-sidebar/__header/__title/__footer, .config-nav family,
  .config-subnav family, .config-search__hint/__hint-label, and the
  .config-search__tag-* picker family. Includes .config-layout
  two-column grid override and mobile breakpoints (768px, 480px).
  Theme selector migrated from pre-sync `[data-theme="light"]` to
  current `[data-theme-mode="light"]` convention (matches 30×
  occurrences in config.css, 23× in components.css). Hardcoded
  legacy brand color `rgba(255, 77, 77, 0.4)` in
  `.config-subnav__item.active` replaced with
  `color-mix(in srgb, var(--accent) 40%, transparent)` for theme
  consistency (matches established idiom, 28× across styles tree).
- `ui/src/styles.css` (+1 LOC): import the new file immediately
  after upstream `config.css` so cascade overrides work.

Fork-owned CSS is conflict-free against future upstream syncs of
`config.css` — upstream has zero rules for the 21 restored classes.

## Scope notes

- AC3 (`pnpm dev` visual smoke of sidebar/tabs, tag picker, subnav)
  requires human browser pass — same as #2506's unchecked item.
  Deterministic parts fully verified: exact-match sweep confirms
  21 emitted classes ↔ 21 defined classes.
- Peer tracks in this wave: #2509 (cluster 2 — `04a7853f0f`
  theme-toggle/nav) and #2510 (cluster 3 — `21ac4b9a8a` `.btn-sm`).
  Different files, no conflict.
- Not LIVE-smoke-test triggering: touches `ui/` only, no
  `src/middleware/` changes.

## Test plan

- [x] `pnpm check` (format:check + tsgo + lint + lint:tmp + lint:no-remoteclaw-ai) — all pass
- [x] `pnpm canvas:a2ui:bundle` — builds (457 kB, 66 ms)
- [x] `pnpm vitest run --config vitest.unit.config.ts ui/src/ui/` — 4 files / 43 tests pass
- [x] Fork-integrity gates: `check-rebrand-leakage.sh`, `check-no-zombie-imports.mjs`, `check-stub-debt.mjs`, `check-throwing-stub-callers.mjs` — all pass
- [x] `node scripts/audit-css-class-drift.mjs` — cluster 1 (0667aa5) 21 → 0 orphans
- [x] Exact-match sweep — 21 classes emitted by config.ts ↔ 21 classes defined in config-sidebar.css (no missing, no extra, no typos)
- [ ] Visual smoke — load settings view in light + dark themes, verify sidebar, tag picker, subnav render correctly (requires human browser pass)

## References

- Closes #2508
- Audit parent: #2502
- Sync commit: `0667aa5596` (#2400)
- Similar fix precedent: #2501 / #2506 (v2026.3.13-1 nav + topbar drift)
- HQ post-mortem: remoteclaw/hq#57 (now 3 confirmed instances)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@alexey-pelykh alexey-pelykh merged commit 64d35fd into main Apr 23, 2026
15 checks passed
@alexey-pelykh alexey-pelykh deleted the fix/ui-migrate-config-sidebar-top-tabs-2508 branch April 23, 2026 22:27
alexey-pelykh added a commit that referenced this pull request Apr 24, 2026
…am-sync class renames from silently desyncing (#2503)

Adds lint:ui:no-css-class-drift pnpm script invoking the existing
scripts/audit-css-class-drift.mjs (#2502), and appends it to the
pnpm check chain so the lint CI job now fails on any template-string
class reference in ui/src/**/*.{ts,tsx,html} that has no matching
rule in the CSS files reachable from ui/src/styles.css.

Baseline on main: 0 orphans / 403 references / 733 defined classes
(cluster fixes from #2506, #2512, #2513, #2514, #2515 already
resolved all existing drift before this gate is wired, per the
#2503 AC "All findings from D-1 resolved BEFORE this check is wired
into CI").

Script name adapted from the issue's suggested lint:css-classes to
lint:ui:no-css-class-drift — matches the lint:<area>:no-<thing>
pattern used by lint:ui:no-raw-window-open,
lint:tmp:no-random-messaging, and
lint:plugins:no-monolithic-plugin-sdk-entry-imports.

Documented in CLAUDE.md § Formatting & Linting (local-dev
orientation) and § Fork-integrity gates (CI/fork-lifecycle
orientation, cross-referenced with the existing rebrand /
zombie-import / stub-debt / throwing-stub-callers /
obsolescence-audit gates).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
alexey-pelykh added a commit that referenced this pull request Apr 24, 2026
…am-sync class renames from silently desyncing (#2503) (#2516)

Adds lint:ui:no-css-class-drift pnpm script invoking the existing
scripts/audit-css-class-drift.mjs (#2502), and appends it to the
pnpm check chain so the lint CI job now fails on any template-string
class reference in ui/src/**/*.{ts,tsx,html} that has no matching
rule in the CSS files reachable from ui/src/styles.css.

Baseline on main: 0 orphans / 403 references / 733 defined classes
(cluster fixes from #2506, #2512, #2513, #2514, #2515 already
resolved all existing drift before this gate is wired, per the
#2503 AC "All findings from D-1 resolved BEFORE this check is wired
into CI").

Script name adapted from the issue's suggested lint:css-classes to
lint:ui:no-css-class-drift — matches the lint:<area>:no-<thing>
pattern used by lint:ui:no-raw-window-open,
lint:tmp:no-random-messaging, and
lint:plugins:no-monolithic-plugin-sdk-entry-imports.

Documented in CLAUDE.md § Formatting & Linting (local-dev
orientation) and § Fork-integrity gates (CI/fork-lifecycle
orientation, cross-referenced with the existing rebrand /
zombie-import / stub-debt / throwing-stub-callers /
obsolescence-audit gates).

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

fix(ui): migrate config-sidebar family to upstream config-top-tabs vocabulary — v2026.3.22 sync drift

1 participant