Skip to content
Myr

keys.ts

This file

Path

apps/web/src/client/keys.ts

21 lines · 1.0 KiB · TypeScript

Last changed by

Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248

History of this file

Take it

The walk stopped after 200 commits: lines older than 678c8b8 point at it.

Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248

line 1why, one step back
1// Each key is one string: Reactivity treats every element of a key list as a key of its own.

Give the web its W9 dependencies, components, project nav, line and revision helpers, and a stub for every new pageoscabrielbefore adoption254268a

line 2why, one step back
2import type { AskId, ProjectName, ProposalId } from "@repo/protocol/ids";

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 3–8why, one step back
3
4export const keys = {5 ask: (project: ProjectName, ask: AskId): readonly string[] => [6 `ask:${project}/${ask}`,7 `project:${project}`,8 ],

Give the web its W9 dependencies, components, project nav, line and revision helpers, and a stub for every new pageoscabrielbefore adoption254268a

line 9why, one step back
9 code: (project: ProjectName): readonly string[] => [`code:${project}`],

Merge build/comments-web-rest into mainoscabrielbefore adoption0eb1248

line 10why, one step back
10 // Not the project's key, so a page's reads can refetch without replaying every event.

Review fixes for 1202oscabrielbefore adoption512af5a

line 11why, one step back
11 events: (project: ProjectName): readonly string[] => [`events:${project}`],

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 12–13why, one step back
12 front: (): readonly string[] => ["front"],
13 ledger: (project: ProjectName): readonly string[] => [`ledger:${project}`],

Give the web its W9 dependencies, components, project nav, line and revision helpers, and a stub for every new pageoscabrielbefore adoption254268a

line 14why, one step back
14 policy: (project: ProjectName): readonly string[] => [`policy:${project}`],

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

line 15why, one step back
15 project: (project: ProjectName): readonly string[] => [`project:${project}`],

Give the web its W9 dependencies, components, project nav, line and revision helpers, and a stub for every new pageoscabrielbefore adoption254268a

lines 16–19why, one step back
16 proposal: (project: ProjectName, proposal: ProposalId): readonly string[] => [
17 `proposal:${project}/${proposal}`,18 `project:${project}`,19 ],

Merge build/614-env-service: deciders set write-only values for @sensitive items, the public sees the env shape, and checks see only placeholdersoscabrielbefore adoption678c8b8

lines 20–21why, one step back
20 today: (): readonly string[] => ["today"],
21};