fix(ui): restore the two rebrand legacy localStorage keys (#7782) - #7849
fix(ui): restore the two rebrand legacy localStorage keys (#7782)#7849galuis116 wants to merge 1 commit into
Conversation
…7782) JSONbored#5405 gave useLocalStorage a legacyKey param so a pre-rebrand gittensory_* value is read once and migrated forward to the loopover_* key. Two days later JSONbored#5743's blanket gittensory->loopover substitution rewrote two string literals it should not have, leaving legacyKey identical to the current key: - onboarding-preview-card.tsx's LEGACY_DISMISS_KEY - notification-readiness-card.tsx's notification opt-in legacy key With both keys equal, useLocalStorage's fallback re-reads the same key it just missed, so a maintainer who dismissed the onboarding card or opted into notifications before the rebrand silently loses that preference. Restores both literals to their pre-rebrand gittensory_* values, matching the uncorrupted shape still present in api/try-it.tsx. Every other rebrand-migrated legacy key was already distinct and is left untouched. Adds a regression test per component asserting a value stored only under the legacy key is read AND written forward to the current key; both fail against the pre-fix literals and pass after.
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
|
Caution 🛑 LoopOver review result - fixes requiredReview updated: 2026-07-21 15:06:48 UTC
Review summary Nits — 2 non-blocking
CI checks failing
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. Visual preview
Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy. Scroll preview
A short scroll-through clip (desktop) — click either thumbnail to open the full animation. Evidence for scroll-linked behavior a single screenshot can't show. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
|
This pull request changes UI/visual code but its screenshot evidence is incomplete. Every required viewport × theme combination needs its own before/after image pair in a labeled table row (e.g. "Desktop · Light | before | after"). Still missing: Desktop · Dark, Tablet · Dark, Mobile · Dark. Please resubmit with the remaining rows filled in. See https://github.com/JSONbored/loopover/blob/main/.claude/skills/contributing-to-loopover/SKILL.md for the exact format and examples. This is an automated maintenance action. |


Summary
Closes #7782.
#5405 gave
useLocalStoragealegacyKeyparam so a user's pre-rebrandgittensory_*localStorage value is read once and migrated forward to the newloopover_*key. Two days later, #5743's blanketgittensory->loopoversubstitution ran across ~480 files and rewrote two string literals that were supposed to stay on the old prefix, leavinglegacyKeyidentical to the current key:app-panels/onboarding-preview-card.tsx-LEGACY_DISMISS_KEYnotification-readiness-card.tsx- the notification opt-in legacy keyWhen both keys are equal,
useLocalStorage's fallback branch re-reads the exact key it just missed, so the migration is a no-op: a maintainer who dismissed the onboarding-preview card, or opted into notifications, before the rebrand silently loses that preference (the card reappears / they are defaulted back to notifications-off).This restores both literals to their pre-rebrand values, verified against
git show 112bc4a83:gittensory_maintainer_onboarding_preview_dismissedgittensory_notification_opt_inmatching the uncorrupted shape still present at
api/try-it.tsx(STORAGE_KEY = "loopover.session_token"/LEGACY_STORAGE_KEY = "gittensory.session_token"). Every other rebrand-migrated legacy key (try-it.tsx,app.workbench.tsx,app.runs.tsx,app.index.tsx) was already genuinely distinct and is left untouched.Regression tests
One per component, extending each component's existing test file and harness:
onboarding-preview-card.test.tsx- a dismissal stored only under the legacy key keeps the card hidden (and skips the API call), and the value is written forward to the current key.notification-readiness-card.test.tsx- an opt-in stored only under the legacy key renders "opt-in enabled" and is written forward; plus the negative case (neither key set stays "opt-in required").Both new tests were confirmed to fail against the pre-fix literals and pass after - i.e. they genuinely pin this bug rather than restating current behavior.
Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #7782).Validation
git diff --checknpm run actionlint- no workflow files touched.npm run ui:typecheck(clean across both UI workspaces)@loopover/uisuite: 81 files / 550 tests pass, including the 3 new ones.npm run test:coverage/test:workers/build:mcp/test:mcp-pack/ui:openapi:check- not run: this changes two string literals plus tests underapps/loopover-ui/and touches no backend, worker, MCP, or OpenAPI surface.npm audit --audit-level=moderate- no dependency changes.If any required check was skipped, explain why:
src/**lines are modified, socodecov/patchhas no changed lines to score (apps/**is outside Codecov'scoverage.include).ui:lintcould not be run meaningfully on this Windows checkout:core.autocrlf=truemakes prettier reportDelete CRon every file in the repo (including files this PR never touches), so its output is not a signal here. Excluding that CRLF noise,eslintreports no issues on the four changed files, and the committed diff is LF-normalized (48 insertions / 3 deletions, no whole-file rewrite).Safety
try-it.tsx's session-token key is deliberately untouched.)UI Evidencesection - n/a: there is no visual diff. Nothing about layout, copy, or styling changes; for any given stored state the rendered output is identical. The only behavioral difference is which localStorage key is read during the one-time migration, which is why this is pinned by the two regression tests above rather than by a screenshot.Notes
{ dismissed: boolean }) while the notification card stores a bare boolean, so each regression test seeds the legacy key with that component's own serialized shape.