Skip to content

fix(ui): restore the pre-rebrand gittensory_ legacy localStorage keys - #7895

Closed
shin-core wants to merge 1 commit into
JSONbored:mainfrom
shin-core:fix/rebrand-legacy-localstorage-keys-7782
Closed

fix(ui): restore the pre-rebrand gittensory_ legacy localStorage keys#7895
shin-core wants to merge 1 commit into
JSONbored:mainfrom
shin-core:fix/rebrand-legacy-localstorage-keys-7782

Conversation

@shin-core

Copy link
Copy Markdown
Contributor

What & why

Closes #7782.

Commit 112bc4a83 (#5405) gave useLocalStorage a legacyKey param so a pre-rebrand gittensory_* localStorage value migrates forward to the new loopover_* key. Two days later 81e4ac34d (#5743, the full gittensoryloopover cutover) did a blanket text substitution that also rewrote two string literals that were supposed to keep the old prefix:

  • onboarding-preview-card.tsxLEGACY_DISMISS_KEY became identical to the current DISMISS_KEY.
  • notification-readiness-card.tsx — the notification opt-in legacy key became identical to its current key.

With key === legacyKey, useLocalStorage's fallback reads the same key it just missed under, so a maintainer who dismissed the onboarding card or opted into notifications before the rebrand silently loses that preference (the card reappears / notifications default back to off). Every other rebrand-migrated key (try-it.tsx's gittensory.session_token, etc.) survived intact.

The fix

Restore both legacy keys to their pre-rebrand gittensory_-prefixed literals, matching the still-correct try-it.tsx pattern. No other legacy keys are touched. This is a string-literal-only change — nothing rendered changes, so there's no visual diff.

Tests

A regression test per component, extending the existing test file:

  • onboarding-preview-card: seeds gittensory_maintainer_onboarding_preview_dismissed and asserts the card stays hidden, the demo API call is skipped, and the value is written forward to the current key.
  • notification-readiness-card: seeds gittensory_notification_opt_in and asserts the pill shows "opt-in enabled" and the value is migrated to the current key.

Verified bug-catching: reverting either key to the corrupted loopover_ value fails its regression test.

Validation

  • apps/loopover-ui: vitest run (both files, 11 tests) pass; tsc --noEmit exit 0; eslint clean; Prettier clean.
  • Per the issue, apps/loopover-ui is not under the src/** 99% patch gate (UI-only path); the regression tests are the coverage deliverable. Branched off current main, mergeable-clean.

JSONbored#5743's blanket gittensory->loopover rename overwrote two localStorage legacy-key
string literals that were supposed to keep the OLD prefix, so useLocalStorage's
migration fallback read the same key it had just missed under -- silently dropping
a pre-rebrand preference. Restore LEGACY_DISMISS_KEY in onboarding-preview-card and
the notification opt-in legacy key in notification-readiness-card to their
gittensory_-prefixed values (matching the still-correct try-it.tsx pattern), so a
maintainer's pre-rebrand onboarding dismissal / notification opt-in migrates
forward instead of appearing lost. Adds a regression test per component that seeds
the legacy key and asserts the value is read forward to the current key.
@shin-core
shin-core requested a review from JSONbored as a code owner July 21, 2026 16:21
@superagent-security superagent-security Bot added the contributor:flagged Contributor flagged for review by trust analysis. label Jul 21, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

🚨 Contributor flagged. Click here for more info: Superagent Dashboard

@loopover-orb loopover-orb Bot added the gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier. label Jul 21, 2026
@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Caution

🛑 LoopOver review result - fixes required

Review updated: 2026-07-21 16:32:18 UTC

4 files · 1 AI reviewer · no blockers · CI failing · blocked

🛑 Suggested Action - Fix Blockers

Review summary
This is a narrow, correctly-targeted string-literal fix: it restores the two `gittensory_`-prefixed legacy localStorage keys that were accidentally rewritten to match their current-key counterparts during the #5743 rebrand, which made the `legacyKey` migration fallback in `useLocalStorage` a no-op (key === legacyKey). The fix is traceable to the root cause, matches the still-correct `try-it.tsx` pattern cited in the description, and is accompanied by regression tests per component that seed the pre-rebrand key and assert both correct UI behavior and forward-migration to the current key. The change is a clean, well-scoped bugfix tied to issue #7782 with no unrelated surface area.

Nits — 3 non-blocking
  • The two regression tests are near-duplicates of each other (seed legacy key, render, assert migrated value) — consider a shared helper if more legacy-key migrations need similar coverage in the future.
  • notification-readiness-card.test.tsx:121 manually clears localStorage at the end of the new test instead of relying on a `beforeEach`/`afterEach` reset like the other test file does, which is a minor inconsistency in test hygiene within the same PR.
  • Consider verifying no other components share this same rebrand-corrupted-legacyKey pattern beyond the two fixed here and `try-it.tsx`, e.g. via a repo-wide search for `useLocalStorage(` calls, to fully close out Two rebrand legacy-key fallbacks were silently destroyed by the gittensory->loopover blanket rename #7782 in one pass.

CI checks failing

  • validate
  • validate-code
Flagged checks (non-blocking)
  • Contributor trust — Contributor flagged for review

Decision drivers

  • ✅ Code review — No blockers (1 reviewer)
  • ✅ Gate result — Passing (No configured blocker found.)
Context & advisory signals — never blocks the verdict
Signal Result Evidence
Linked issue ✅ Linked #7782
Related work ✅ No active overlap found No same-issue or scoped active PR overlap found.
Change scope ✅ 20/20 Low review scope from cached public metadata (1 linked issue).
Validation posture ✅ 25/25 PR body includes validation/test evidence.
Contributor workload ✅ 10/10 Author activity: 90 registered-repo PR(s), 50 merged, 0 issue(s).
Contributor context ✅ Confirmed Gittensor contributor shin-core; Gittensor profile; 90 PR(s), 0 issue(s).
Improvement ✅ Minor risk: clean · value: minor · LLM: minor
Linked issue satisfaction

Addressed
The diff restores both LEGACY_DISMISS_KEY in onboarding-preview-card.tsx and the legacy notification opt-in key in notification-readiness-card.tsx to their distinct gittensory_-prefixed literals, exactly matching the try-it.tsx pattern cited in the issue, and adds a regression test per component seeding the legacy key and asserting correct migration to the current key.

Review context
  • Author: shin-core
  • Role context: outside_contributor
  • Public audience mode: oss maintainer
  • Lane context: Repository is configured for direct PR review.
  • Public profile languages: TypeScript, JavaScript, Solidity, Dart, Python, CSS, PHP, Rust
  • Official Gittensor activity: 90 PR(s), 0 issue(s).
  • PR-specific overlap: none found.
Contributor next steps
  • Keep the PR focused and include validation evidence before maintainer review.
Signal definitions
  • Related work = same linked issue, overlapping active PRs, or title/path similarity.
  • Change scope = cached public metadata such as size labels, draft state, and review-burden hints.
  • Validation posture = whether the PR provides enough public validation/test evidence for maintainer review.
  • Contributor workload = public contributor activity and cleanup pressure, not a repo-wide quality failure.
  • Contributor context = public GitHub/Gittensor identity context; non-Gittensor status is not a blocker.
🧪 Chat with LoopOver

Ask 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.

  • @loopover ask <question> answers contribution-quality Q&A with source citations and freshness.
  • @loopover chat <question> answers in natural prose from cached decision-pack facts via local inference (maintainer/collaborator; read-only).
  • A plain-language @loopover mention with a real question is routed to the closest matching read-only command automatically — no exact syntax required.

Full command reference: https://loopover.ai/docs/loopover-commands

🧪 Experimental — new and may change.

Visual preview
Route Viewport Before (production) After (this PR's preview) Diff
/ desktop before /
before /
after /
after /
/ mobile before / (mobile)
before / (mobile)
after / (mobile)
after / (mobile)

Click any thumbnail to open the full-size screenshot. Before = production · After = this PR's preview deploy.

Scroll preview
Route Before (production) After (this PR's preview)
/ before / (scroll)
before / (scroll)
after / (scroll)
after / (scroll)

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.

  • Re-run LoopOver review

@loopover-orb

loopover-orb Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

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.

@loopover-orb loopover-orb Bot closed this Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor:flagged Contributor flagged for review by trust analysis. gittensor:bug Gittensor-scored bug fix — scores a 0.05x multiplier.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Two rebrand legacy-key fallbacks were silently destroyed by the gittensory->loopover blanket rename

1 participant