fix(ui): migrate app-render.ts to upstream nav-section + topbar class vocabulary (#2501)#2506
Merged
alexey-pelykh merged 1 commit intomainfrom Apr 23, 2026
Merged
Conversation
… vocabulary — resolve v2026.3.13-1 sync drift (#2501) Sync 04a7853 brought upstream's dashboard-v2 refactor of layout.css, which renamed .nav-group/.nav-label families to .nav-section/.nav-section__label and removed .topbar-left/.brand* entirely. ui/src/ui/app-render.ts was not paired-updated (fork-diverged), so render code emitted classes with no defining CSS rule — sidebar chevrons rendered as raw +/- glyphs and the topbar lost its flex layout (brand block collided with status pills). Changes: - app-render.ts: migrate nav-group/nav-label vocabulary to nav-section; replace text chevron with icons.chevronDown SVG (upstream CSS rotates via .nav-section--collapsed); add nav-section__label--static modifier for the Resources static label. - styles/topbar-brand.css (new, fork-owned): restore .topbar-left / .brand* rules deleted upstream; restore justify-content: space-between on .topbar; define .nav-section__label--static. Lives in a fork-owned file so future syncs of layout.css land without conflict. - styles.css: import topbar-brand.css between layout.css and layout.mobile.css so mobile's .brand-title override still takes effect. Second instance of the definition-site sync without paired call-site update variant documented in HQ #57. Audit (#2502) and build-time gate (#2503) tracked separately.
7 tasks
alexey-pelykh
added a commit
that referenced
this pull request
Apr 23, 2026
…theme-orb vocabulary — resolve v2026.3.13-1 sync drift (#2509) Cluster 2 of #2502 CSS class drift audit. The v2026.3.13-1 upstream sync (04a7853, #2398) also renamed `.nav*` → `.sidebar*` and replaced the `.theme-toggle*` segmented-button component with `.theme-orb*` trigger + dropdown. ui/src/ui/app-render.ts and app-render.helpers.ts were fork-diverged and not paired-updated in #2501/#2506 — this PR covers the residue (5 orphans from the same sync commit). Changes: - app-render.ts: `<aside class="nav …nav--collapsed">` → `.sidebar …sidebar--collapsed` (the `.nav` rule was removed upstream; `.sidebar` at layout.css:324 + `.sidebar--collapsed` at layout.css:350 plus 20+ descendant selectors at layout.css:630-801 drive the collapsed visual). - app-render.helpers.ts: replace `renderThemeToggle` segmented-button implementation with theme-orb trigger + dropdown menu pattern mirroring upstream f76a3c5. Adds setOpen/toggleOpen/pickMode helpers, THEME_ MODE_OPTIONS, and renderThemeModeIcon (DRY over trigger + options). Preserves fork's pointer-coord ThemeTransitionContext for the ripple theme transition (upstream's `pick` targets skins, not modes — fork needs the fine-grained origin). Keeps local renderSunIcon / renderMoonIcon / renderMonitorIcon helpers (still live via renderThemeModeIcon). Verification: - `node scripts/audit-css-class-drift.mjs`: cluster 04a7853 is gone from the report (orphans 36→31, clusters 3→2); remaining clusters (0667aa5: 21 config-*, 21ac4b9: 1 .btn-sm) are out of scope per #2502's per-cluster routing. - `pnpm tsgo` (0 errors), `pnpm lint` (0 warnings/errors), `pnpm test` (800 files, 7014 tests passing), `pnpm format` idempotent. - Fork-integrity gates: zombie-import, stub-debt (126 baseline), throwing-stub-callers — all pass. Third instance of the definition-site-sync-without-paired-call-site- update variant documented in HQ #57 (#2493 and #2501 were the first two). 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 23, 2026
…2026.3.22 sync drift (#2508) (#2513) 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
added a commit
that referenced
this pull request
Apr 23, 2026
…theme-orb vocabulary — resolve v2026.3.13-1 sync drift (#2509) (#2514) Cluster 2 of #2502 CSS class drift audit. The v2026.3.13-1 upstream sync (04a7853, #2398) also renamed `.nav*` → `.sidebar*` and replaced the `.theme-toggle*` segmented-button component with `.theme-orb*` trigger + dropdown. ui/src/ui/app-render.ts and app-render.helpers.ts were fork-diverged and not paired-updated in #2501/#2506 — this PR covers the residue (5 orphans from the same sync commit). Changes: - app-render.ts: `<aside class="nav …nav--collapsed">` → `.sidebar …sidebar--collapsed` (the `.nav` rule was removed upstream; `.sidebar` at layout.css:324 + `.sidebar--collapsed` at layout.css:350 plus 20+ descendant selectors at layout.css:630-801 drive the collapsed visual). - app-render.helpers.ts: replace `renderThemeToggle` segmented-button implementation with theme-orb trigger + dropdown menu pattern mirroring upstream f76a3c5. Adds setOpen/toggleOpen/pickMode helpers, THEME_ MODE_OPTIONS, and renderThemeModeIcon (DRY over trigger + options). Preserves fork's pointer-coord ThemeTransitionContext for the ripple theme transition (upstream's `pick` targets skins, not modes — fork needs the fine-grained origin). Keeps local renderSunIcon / renderMoonIcon / renderMonitorIcon helpers (still live via renderThemeModeIcon). Verification: - `node scripts/audit-css-class-drift.mjs`: cluster 04a7853 is gone from the report (orphans 36→31, clusters 3→2); remaining clusters (0667aa5: 21 config-*, 21ac4b9: 1 .btn-sm) are out of scope per #2502's per-cluster routing. - `pnpm tsgo` (0 errors), `pnpm lint` (0 warnings/errors), `pnpm test` (800 files, 7014 tests passing), `pnpm format` idempotent. - Fork-integrity gates: zombie-import, stub-debt (126 baseline), throwing-stub-callers — all pass. Third instance of the definition-site-sync-without-paired-call-site- update variant documented in HQ #57 (#2493 and #2501 were the first two). 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) 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>
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 #2501.
Summary
Sync
04a7853f0f(v2026.3.13-1) brought upstream'sui/src/styles/layout.csswholesale, renaming.nav-group/.nav-labelfamilies to.nav-section/.nav-section__labeland removing.topbar-left/.brand*entirely as part of a dashboard-v2 refactor. The fork'sui/src/ui/app-render.tswas not paired-updated (heavily fork-diverged), so render code emitted classes with no defining CSS rule:+/−glyphs instead of styled chevrons (CSS expected an SVG child at.nav-section__chevron svg)..topbar { justify-content: space-between }was removed alongside.topbar-left.Second confirmed instance (within hours of #2493 post-mortem) of the "definition-site sync without paired call-site update" variant documented in HQ #57.
Approach
Option 2 from the issue (hybrid): migrate nav to upstream vocabulary; add fork-owned CSS for the brand block that upstream removed without replacement.
ui/src/ui/app-render.ts: migratednav-group/nav-label→nav-section/nav-section__label; replaced text chevron withicons.chevronDownSVG (upstream CSS handles collapse rotation via.nav-section--collapsed .nav-section__chevron { transform: rotate(-90deg) }); addednav-section__label--staticmodifier for the Resources static label.ui/src/styles/topbar-brand.css(new, fork-owned): restored the exact pre-sync.topbar-left/.brand/.brand-logo/.brand-text/.brand-title/.brand-subrules (recovered from04a7853f0f^:ui/src/styles/layout.css); restored.topbar { justify-content: space-between }; defined.nav-section__label--statichover suppression.ui/src/styles.css: importedtopbar-brand.cssbetweenlayout.cssandlayout.mobile.cssso that mobile's.brand-titleoverride still takes effect (caught during polish).Fork-owned CSS file is conflict-free against future upstream syncs of
layout.css.Scope notes
.theme-orb__triggermigration) is explicitly scoped "if migrating" in the issue. Not migrated in this PR —app-render.helpers.tsrenderThemeTogglestill uses.theme-toggle*classes which have no CSS rules onmain(pre-existing regression from the same v2026.3.13-1 sync). Deferred as a follow-up candidate.ui/only, nosrc/middleware/changes.Test plan
pnpm check(format:check + tsgo + lint + lint:tmp:no-random-messaging + lint:no-remoteclaw-ai) — all passpnpm vitest run --config vitest.unit.config.ts ui/src/ui/— 4 files / 43 tests passpnpm canvas:a2ui:bundle— builds cleancheck-no-zombie-imports.mjs,check-stub-debt.mjs,check-throwing-stub-callers.mjs,check-rebrand-leakage.sh— all pass.nav-group|.nav-label|.topbar-left|.brand-text|.brand-subinui/— 0 hits outside the intentional new file/overview,/chat,/agentsin light + dark themes (requires human browser pass)References