refactor(frontend): every stored key declares its kind, and preferences follow the account
storage.ts's registry gives each key a kind (pref, device, view, cache, public); a key without one does not compile. A contract test refuses a key spelled out elsewhere, an account preference read or written straight from storage instead of through usePref, and an e2e seed of a key nobody reads. The keys the next account's wipe keeps are the public ones. The seven preferences kept only in the browser move onto usePref: start on Home, the onboarding dismissal, the release banner's last version, the channel manager's layout, the Plex playlist layout, the playlist rail's sort and channel discovery's sort. usePref reads an older bare-string copy, and a value only this browser held is saved to the server once, so the account's other devices get it. Performance mode is the device's: it is neither read from the account nor saved to it.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import { LS } from "./storage";
|
||||
import { createStore } from "./store";
|
||||
|
||||
// The debug recorder's app-wide state — what several surfaces open or read, held outside any
|
||||
@@ -47,7 +48,7 @@ export const useComposerSession = (): string | null => composing.useValue();
|
||||
// Step markers are numbered per session. The count survives a reload (sessionStorage, per tab): a
|
||||
// reproduction is often "reload and it happens again", and step 4 coming back as step 1 would make
|
||||
// the list the issue is drafted from contradict itself.
|
||||
const STEP_KEY = "siftlode.debugSteps";
|
||||
const STEP_KEY = LS.debugSteps;
|
||||
|
||||
function readSteps(): Record<string, number> {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user