Skip to content

perf: run each migration once unless it opts into every start - #1200

Merged
ankit merged 5 commits into
mainfrom
claude/chat-removal-once-92815f
Oct 13, 2026
Merged

ankit merged 5 commits into
mainfrom
claude/chat-removal-once-92815f

Conversation

@ankit

@ankit ankit commented Oct 13, 2026

Copy link
Copy Markdown
Owner

Migrations ran on every background start, forever. `chat-removal` read all of storage with `get(null)` each time, which is megabytes for big profiles.

  • The runner now records a `migration_` completion key after a migration succeeds, and skips it on later starts. All keys are read in one targeted `get`.
  • `everyStart: true` opts out. Only `styles-metadata-update` and `styles-modified-time-update` use it, because synced data can still need those repairs.
  • `chat-removal` and `commands-to-browser` drop their own flag checks. `commands-to-browser`'s old flag already matches its new key.

Review notes: `default-shortcut-update` and `sync-storage-update` keep checking their legacy flags, so upgraders run each one last time as a no-op before the new key is set. A migration that throws gets no key and runs again next start.

Testing: runner tests cover recording keys, skipping done migrations, `everyStart`, and a failed read. Typecheck, lint and `yarn test` pass.

🤖 Generated with Claude Code

ankit and others added 2 commits October 13, 2026 11:52
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Bundle size

No change to what the popup or content scripts load.

Bundle Size Change Gzip Change
Popup 174.7 KB – 48.1 KB –
fonts/fonts.css 2.9 KB – 458 B –
popup/index.css 23.3 KB – 5.2 KB –
popup/index.js 148.5 KB – 42.5 KB –
Content script (document_start) 78.5 KB – 21.2 KB –
editor/index.js 40.2 KB – 10.2 KB –
inject-css/index.js 35.2 KB – 9.6 KB –
site-bridge/index.js 3.1 KB – 1.4 KB –

ankit and others added 3 commits October 13, 2026 17:12
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ankit
ankit merged commit f007950 into main Oct 13, 2026
7 checks passed
@ankit
ankit deleted the claude/chat-removal-once-92815f branch October 13, 2026 21:26
@ankit ankit mentioned this pull request Oct 14, 2026
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