Skip to content

test(themes): end-to-end theme-picker recolor verification (k5a.5)#49

Merged
brandon-fryslie merged 1 commit into
mainfrom
brandon-theming-k5a.5
May 29, 2026
Merged

test(themes): end-to-end theme-picker recolor verification (k5a.5)#49
brandon-fryslie merged 1 commit into
mainfrom
brandon-theming-k5a.5

Conversation

@brandon-fryslie

Copy link
Copy Markdown
Contributor

What

Adds an end-to-end regression test proving epic k5a done-gate #1: a set-state theme click recolors the whole bar live.

Why this test is needed

The existing widget test (test/dsl-widgets.test.ts) passes a static basePalette into renderDsl, so it verifies the click writes SessionState and active-marking moves — but never the recolor. The recolor lives in the daemon's per-render basePalette resolution (effectiveThemeName -> resolverForThemeName), which is outside renderDsl. This test replicates that resolution exactly as src/daemon/server.ts does, so it proves the loop a real daemon runs.

Asserts

  • The whole bar's background-color footprint changes (dark↔light themes are disjoint).
  • The non-picker plain segment itself recolors (not just the picker).
  • Active-marking tracks the rendered theme: config-default bold initially, picked option bold after the click.

[LAW:verifiable-goals][LAW:single-enforcer] — drives the real spine (registerDslConfig + renderDsl + parseHandlerUrl + VERBS), no parallel rig.

Scope note

The theme picker was also added to the user's live ~/.config/cc-candybar/config.json5 (outside the repo) and verified end-to-end through the real installed click path (daemon + URL handler both rebuilt — both were stale pre-widgets/pre-set-state builds). The picker's collapse + overflow UX (a width-paginated menu widget) is tracked as follow-up k5a.6, which keeps epic k5a open until the picker is genuinely usable.

Copilot AI review requested due to automatic review settings May 29, 2026 21:00

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 end-to-end regression test for epic k5a done-gate #1, verifying that clicking a theme picker option recolors the entire bar live by replicating the daemon's per-render basePalette resolution.

Changes:

  • New test file exercises real spine: registerDslConfig + renderDsl + parseHandlerUrl + VERBS.
  • Asserts whole-bar background SGR footprint changes (disjoint dark↔light), the non-picker plain segment recolors, and active-marking tracks the rendered theme.

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

Proves epic k5a done-gate #1: a set-state `theme` click recolors the WHOLE
bar live. The existing widget test passes a STATIC basePalette into renderDsl,
so it verifies the click writes SessionState but never the recolor — which
lives in the daemon's per-render basePalette resolution (effectiveThemeName ->
resolverForThemeName), OUTSIDE renderDsl. This test replicates that resolution
exactly as src/daemon/server.ts does, so a click changes the bytes a non-picker
segment renders.

Asserts: whole-bar bg-color footprint changes (dark<->light disjoint), the
non-picker segment itself recolors, and active-marking tracks the rendered
theme (config-default bold initially, picked option bold after the click).

[LAW:verifiable-goals][LAW:single-enforcer] drives the real spine —
registerDslConfig + renderDsl + parseHandlerUrl + VERBS, no parallel rig.

Follow-up k5a.6 owns the paginated-menu widget (collapse + width-paginated
navigation) that replaces the flat overflowing picker.
@elton-prawn elton-prawn force-pushed the brandon-theming-k5a.5 branch from 5bc4e6f to 34e6a64 Compare May 29, 2026 21:06
@brandon-fryslie brandon-fryslie merged commit dab7b9e into main May 29, 2026
6 checks passed
@brandon-fryslie brandon-fryslie deleted the brandon-theming-k5a.5 branch May 29, 2026 21:08
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.

3 participants