fix(ui): restore config sidebar/nav/subnav/tag-picker CSS (#2508)#2513
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
…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>
10 tasks
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>
7 tasks
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>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2508.
Summary
Upstream sync
0667aa5596(v2026.3.22, #2400) replaced the configsidebar+nav+subnav+search__tag-*CSS family with a flat.config-top-tabshorizontal bar as part of a dashboard-v2 redesign. The fork'sui/src/ui/views/config.tskept 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 byscripts/audit-css-class-drift.mjscluster 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.csswith pre-sync rules, imported AFTER upstreamconfig.cssso the.config-layoutgrid override cascades. Zero TS changes —config.tskept 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 from0667aa5596^:ui/src/styles/config.css) for.config-sidebar*,.config-nav*,.config-subnav*,.config-search__hint*,.config-search__tag-*. Includes.config-layouttwo-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 colorrgba(255, 77, 77, 0.4)in.config-subnav__item.activereplaced withcolor-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 upstreamconfig.cssso 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
pnpm dev: sidebar/tabs, tag picker, subnav) requires human browser pass — same as fix(ui): migrate app-render.ts to upstream nav-section + topbar class vocabulary (#2501) #2506's unchecked item. Deterministic parts fully verified: exact-match sweep confirms 21 emitted classes ↔ 21 defined classes.04a7853f0ftheme-toggle/nav drift) and fix(ui): migrate channels.nostr btn-sm reference to btn--sm (BEM modifier) — style(ui) clarity pass drift #2510 (cluster 3 —21ac4b9a8a.btn-smdrift). Different files, no conflict.ui/only, nosrc/middleware/changes.Test plan
pnpm check(format:check + tsgo + lint + lint:tmp:no-random-messaging + lint:no-remoteclaw-ai) — all passpnpm canvas:a2ui:bundle— builds (457 kB, 66 ms)pnpm vitest run --config vitest.unit.config.ts ui/src/ui/— 4 files / 43 tests passcheck-rebrand-leakage.sh,check-no-zombie-imports.mjs,check-stub-debt.mjs,check-throwing-stub-callers.mjs— all passnode scripts/audit-css-class-drift.mjs— cluster 1 (0667aa5596) shows 0 orphans (21 → 0)References
0667aa5596(sync: upstream to v2026.3.22 (2522 commits) #2400)🤖 Generated with Claude Code