Skip to content

fix(ui): migrate app-render nav + theme-toggle to upstream sidebar + theme-orb — resolve v2026.3.13-1 sync drift (#2509)#2514

Merged
alexey-pelykh merged 1 commit intomainfrom
fix/2509-sidebar-theme-orb
Apr 23, 2026
Merged

fix(ui): migrate app-render nav + theme-toggle to upstream sidebar + theme-orb — resolve v2026.3.13-1 sync drift (#2509)#2514
alexey-pelykh merged 1 commit intomainfrom
fix/2509-sidebar-theme-orb

Conversation

@alexey-pelykh
Copy link
Copy Markdown

Summary

Cluster 2 of #2502 CSS class drift. The v2026.3.13-1 upstream sync (04a7853f0f, #2398) renamed .nav*.sidebar* and replaced the .theme-toggle* segmented-button with .theme-orb* trigger + dropdown. Fork-diverged files missed the paired call-site update; #2501/#2506 covered the .nav-section / .topbar / .brand* subset — this PR covers the residue.

Fixes #2509. Part of the cluster filed by #2502.

Changes

  • ui/src/ui/app-render.ts:251: <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.
  • ui/src/ui/app-render.helpers.ts: replace renderThemeToggle segmented-button implementation with theme-orb trigger + dropdown menu pattern mirroring upstream f76a3c5225. New helpers: setOpen / toggleOpen / pickMode / renderThemeModeIcon / THEME_MODE_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).

Rename table

Render code emitted Upstream CSS now has Defining line
.nav .sidebar layout.css:324
.nav--collapsed .sidebar--collapsed layout.css:350
.theme-toggle .theme-orb components.css:391
.theme-toggle__track .theme-orb__menu components.css:427
.theme-toggle__indicator (removed — orb uses __option--active instead) n/a
.theme-toggle__button .theme-orb__option components.css:455
.theme-toggle__button.active .theme-orb__option--active components.css:479
(new structural concept) .theme-orb__trigger + .theme-orb--open components.css:397, 448

Test plan

  • pnpm tsgo (0 errors)
  • pnpm lint (0 warnings, 0 errors across 3926 files)
  • pnpm format — idempotent
  • pnpm canvas:a2ui:bundle + pnpm test (800 test files, 7014 tests passing, 3 pre-existing skips)
  • Fork-integrity gates: check-no-zombie-imports.mjs, check-stub-debt.mjs (126 baseline), check-throwing-stub-callers.mjs — all pass
  • node scripts/audit-css-class-drift.mjs: cluster 04a7853f0f is gone from the report (orphans 36→31, clusters 3→2); remaining clusters (0667aa5596: 21 config-*, 21ac4b9a8a: 1 .btn-sm) are out of scope per audit(ui): one-shot CSS class drift audit — surface fork-side references with no CSS definition #2502's per-cluster routing
  • Visual smoke: load /overview, /chat, /agents; toggle sidebar collapse; cycle Light / Dark / System from the theme orb

Pattern class

Third instance of the definition-site-sync-without-paired-call-site-update variant documented in HQ #57. #2493 (type/class variant) and #2501 (CSS nav-section/topbar/brand subset) were the first two. Build-time gate tracked in #2503; per-cluster routing in #2502.

🤖 Generated with Claude Code

…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>
@alexey-pelykh alexey-pelykh merged commit a31bba1 into main Apr 23, 2026
15 checks passed
@alexey-pelykh alexey-pelykh deleted the fix/2509-sidebar-theme-orb branch April 23, 2026 22:28
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 app-render nav + theme-toggle to upstream sidebar + theme-orb — residual v2026.3.13-1 drift after #2501

1 participant