Skip to content

Dev tools · Search params & storage

8 modules · 43 exports · 1 repository · 0 e2e tests · 0 routes

The state Dev tools keeps in the URL and in the browser's storage. Every param has a default and never fails to decode, see Search params, and each definition should have an assertRoundTrips test. The definitions of the whole app are listed in the reference.

Search params

URL logInAsSearchParams

app/features/dev-tools/dev-tools-search-params.ts:5

ParamValueDefaultLoaderDescription
userId v.nullable(v.pipe(v.number(), v.integer(), v.minValue(1)))nulltrue

null stops impersonating.

returnTo v.nullable(v.pipe(v.string(), v.startsWith("/")))nulltrue

Used in dev-tools-urls.tsdev.log-in-as.ts

URL usersSearchParams

app/features/dev-tools/dev-tools-search-params.ts:15No round-trip test

ParamValueDefaultLoaderDescription
ids v.array(v.pipe(v.number(), v.integer(), v.minValue(1)))[]true

Used in dev-tools-urls.tsdev.users.ts

Web storage

localStorage devToolbarPersisted

app/features/dev-tools/dev-tools-persisted.ts:4

Keydev-toolbar
Valuev.object({ isMinimized: v.boolean() })
Default{ isMinimized: false }

Used in DevToolbar.tsx

localStorage scenarioLogInPersisted

app/features/dev-tools/dev-tools-persisted.ts:12

Whether running a scenario logs in as its user, or only opens its page as whoever you are.

Keydev-scenario-log-in
Valuev.boolean()
Defaulttrue

Used in ScenariosApp.tsx

localStorage scenarioFilterPersisted

app/features/dev-tools/dev-tools-persisted.ts:20

What the scenario list was last filtered by.

Keydev-scenario-filter
Valuev.string()
Default""

Used in ScenariosApp.tsx

localStorage scenarioParamsPersisted

app/features/dev-tools/dev-tools-persisted.ts:28

The parameters each scenario was last run with, keyed by scenario id.

Key prefixdev-scenario-params__
Valuev.record(v.string(), v.union([v.string(), v.number()]))
Default{}

Used in ScenariosApp.tsx

localStorage simulateAdsPersisted

app/features/dev-tools/dev-tools-persisted.ts:36

Whether grey stand-ins fill the ad slots, for checking the layout with ads while Fuse is off.

Keydev-simulate-ads
Valuev.boolean()
Defaultfalse

Used in Fuse.tsxTriggersApp.tsx