Skip to content

fix(console-ui): one legacy-theme migration for every console - #5479

Merged
shepherdjerred merged 1 commit into
mainfrom
console-theme-dedupe
Nov 28, 2026
Merged

shepherdjerred merged 1 commit into
mainfrom
console-theme-dedupe

Conversation

@shepherdjerred

Copy link
Copy Markdown
Owner

Why

D1 (#5468) gave Delivery a copy of Tracker's theme.ts and theme.test.ts: the same migrateLegacyTheme, browser wrapper and tests, with only the old storage key changed. As a result:

  • main's jscpd ratchet fails on that clone;
  • the repo-wide pre-commit hook rejects every commit until it's gone.

What

  • console-ui exports migrateLegacyTheme(legacyKey, storage) and migrateLegacyThemeInBrowser(legacyKey) beside createThemeStore. Its tests cover:
    • carry-over to the shared key;
    • the shared key winning when both exist;
    • the no-op case.
  • Delivery's and Tracker's theme.ts call it with their own old key (delivery-theme, tracker.theme). Their duplicated tests are removed.

Demo

None — mechanical move of an identical helper into the shared package, with no behaviour change. The browser storage migration is unchanged and still tested once in console-ui.

before (main 369ca51f59): jscpd baseline ratchet failed (delivery shell/theme.ts ↔ tracker ui/theme.ts)
after:            jscpd baseline ratchet passed

Verification

  • bun run jscpd: ratchet passed.
  • bunx turbo run build typecheck test lint --filter=@shepherdjerred/console-ui --filter=@shepherdjerred/delivery --filter=@shepherdjerred/tracker: all pass.
  • bunx lefthook run pre-commit passes, including the repo-wide jscpd hook.

🤖 Generated with Claude Code

Why
D1 (#5468) gave Delivery a copy of Tracker's theme.ts and theme.test.ts:
the same migrateLegacyTheme, browser wrapper and tests with only the old
key changed. main's jscpd ratchet now fails on that clone, and the
repo-wide pre-commit hook rejects every commit until it is gone.

What
- console-ui exports migrateLegacyTheme(legacyKey, storage) and
  migrateLegacyThemeInBrowser(legacyKey) beside createThemeStore; its tests
  cover carry-over, shared-key-wins and no-op.
- Delivery's and Tracker's theme.ts call it with their old key
  ("delivery-theme", "tracker.theme"); their duplicated tests are removed.

Verification
- `bun run jscpd`: baseline ratchet passed (failed on main 369ca51 before).
- `bunx turbo run build typecheck test lint --filter=@shepherdjerred/console-ui
  --filter=@shepherdjerred/delivery --filter=@shepherdjerred/tracker`: pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@shepherdjerred

Copy link
Copy Markdown
Owner Author

This change is part of the following stack:

Change managed by git-spice.

@greptile-apps

greptile-apps Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@shepherdjerred

Copy link
Copy Markdown
Owner Author

@codex review

Automated re-review request for 35f1661 from the CI review gate.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T21:32:00.374516Z 35f1661 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@shepherdjerred
shepherdjerred merged commit 636fa15 into main Nov 28, 2026
2 of 6 checks passed
@shepherdjerred
shepherdjerred deleted the console-theme-dedupe branch November 28, 2026 21:31
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 35f16616f6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant