@coffre/ui 0.15.0 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/dist/audit-sentences.d.ts +56 -0
  2. package/dist/audit-sentences.js +886 -0
  3. package/dist/audit-sentences.js.map +1 -0
  4. package/dist/chunks/audit-sentence-C8NnAdjF.js +48 -0
  5. package/dist/chunks/audit-sentence-C8NnAdjF.js.map +1 -0
  6. package/dist/chunks/{connected-apps-CGUQlFMx.js → connected-apps-6sMSgQ9U.js} +5 -5
  7. package/dist/chunks/{connected-apps-CGUQlFMx.js.map → connected-apps-6sMSgQ9U.js.map} +1 -1
  8. package/dist/chunks/{delete-place-CswZ-meh.js → delete-place-T469tSN9.js} +5 -5
  9. package/dist/chunks/{delete-place-CswZ-meh.js.map → delete-place-T469tSN9.js.map} +1 -1
  10. package/dist/chunks/{directory-DrswWQLT.js → directory-B_gVf7UL.js} +18 -17
  11. package/dist/chunks/directory-B_gVf7UL.js.map +1 -0
  12. package/dist/chunks/{folders-A6sbR_PG.js → folders-CVYauIDz.js} +3 -3
  13. package/dist/chunks/{folders-A6sbR_PG.js.map → folders-CVYauIDz.js.map} +1 -1
  14. package/dist/chunks/{grants-C0cb2oii.js → grants-Dn_EW2XW.js} +8 -8
  15. package/dist/chunks/grants-Dn_EW2XW.js.map +1 -0
  16. package/dist/chunks/{multi-combobox-B3SEv1gq.js → multi-combobox-fbBRzi9z.js} +3 -3
  17. package/dist/chunks/{multi-combobox-B3SEv1gq.js.map → multi-combobox-fbBRzi9z.js.map} +1 -1
  18. package/dist/chunks/{offboarding-C1jbG_dk.js → offboarding-CXM464J_.js} +81 -80
  19. package/dist/chunks/offboarding-CXM464J_.js.map +1 -0
  20. package/dist/chunks/{page-CfhC9Hp1.js → page-Cb0ZjGda.js} +7 -12
  21. package/dist/chunks/page-Cb0ZjGda.js.map +1 -0
  22. package/dist/chunks/{personal-tokens-xC9wulhg.js → personal-tokens-CSHMlRHy.js} +7 -7
  23. package/dist/chunks/personal-tokens-CSHMlRHy.js.map +1 -0
  24. package/dist/chunks/{principal-CI17XK13.js → principal-BKJxbAtE.js} +2 -2
  25. package/dist/chunks/{principal-CI17XK13.js.map → principal-BKJxbAtE.js.map} +1 -1
  26. package/dist/chunks/{principal-page-CdSeftGD.js → principal-page-COPmTDVW.js} +132 -19
  27. package/dist/chunks/principal-page-COPmTDVW.js.map +1 -0
  28. package/dist/chunks/{project-page-CHxjBE97.js → project-page-g5_n46Nz.js} +3 -3
  29. package/dist/chunks/{project-page-CHxjBE97.js.map → project-page-g5_n46Nz.js.map} +1 -1
  30. package/dist/chunks/protected-DEWeOrmI.js +77 -0
  31. package/dist/chunks/protected-DEWeOrmI.js.map +1 -0
  32. package/dist/chunks/{queries-D1JuimTu.js → queries-D4_o-bz3.js} +22 -155
  33. package/dist/chunks/queries-D4_o-bz3.js.map +1 -0
  34. package/dist/chunks/{references-D5llUGQL.js → references-wTh_DT0M.js} +27 -23
  35. package/dist/chunks/references-wTh_DT0M.js.map +1 -0
  36. package/dist/chunks/{role-field-CoCv8wse.js → role-field-BiP09qfN.js} +5 -5
  37. package/dist/chunks/role-field-BiP09qfN.js.map +1 -0
  38. package/dist/chunks/{row-state-CYH7kZHl.js → row-state-CYhtmUkc.js} +3 -3
  39. package/dist/chunks/{row-state-CYH7kZHl.js.map → row-state-CYhtmUkc.js.map} +1 -1
  40. package/dist/chunks/{signin-errors-TlQmQe0t.js → signin-errors-BMnox7XD.js} +5 -19
  41. package/dist/chunks/signin-errors-BMnox7XD.js.map +1 -0
  42. package/dist/chunks/{theme-rF44Wbmm.js → theme-imSolE1q.js} +3 -3
  43. package/dist/chunks/{theme-rF44Wbmm.js.map → theme-imSolE1q.js.map} +1 -1
  44. package/dist/chunks/{ui-CGdORVzW.js → ui-Q_Eczt7m.js} +7 -3
  45. package/dist/chunks/{ui-CGdORVzW.js.map → ui-Q_Eczt7m.js.map} +1 -1
  46. package/dist/chunks/{use-action-BxrHTBZw.js → use-action-BfnN-De2.js} +3 -3
  47. package/dist/chunks/{use-action-BxrHTBZw.js.map → use-action-BfnN-De2.js.map} +1 -1
  48. package/dist/chunks/{use-change-BorW2R6C.js → use-change-Cc0X4sF3.js} +6 -4
  49. package/dist/chunks/use-change-Cc0X4sF3.js.map +1 -0
  50. package/dist/chunks/{use-roles-BZnJ9Cq0.js → use-roles-stcv2QFj.js} +13 -56
  51. package/dist/chunks/use-roles-stcv2QFj.js.map +1 -0
  52. package/dist/chunks/{use-shell-CPskgi1k.js → use-shell-DMhLa2sh.js} +3 -3
  53. package/dist/chunks/{use-shell-CPskgi1k.js.map → use-shell-DMhLa2sh.js.map} +1 -1
  54. package/dist/index.d.ts +23 -55
  55. package/dist/index.js +12 -31
  56. package/dist/index.js.map +1 -1
  57. package/dist/pages/account.js +12 -12
  58. package/dist/pages/account.js.map +1 -1
  59. package/dist/pages/approval.js +2 -2
  60. package/dist/pages/audit.js +173 -196
  61. package/dist/pages/audit.js.map +1 -1
  62. package/dist/pages/device-login.js +2 -2
  63. package/dist/pages/environment.js +445 -252
  64. package/dist/pages/environment.js.map +1 -1
  65. package/dist/pages/login.js +6 -15
  66. package/dist/pages/login.js.map +1 -1
  67. package/dist/pages/oauth-authorize.js +2 -2
  68. package/dist/pages/project-access.js +11 -11
  69. package/dist/pages/project-environments.js +359 -28
  70. package/dist/pages/project-environments.js.map +1 -1
  71. package/dist/pages/project-settings.js +8 -8
  72. package/dist/pages/project.js +3 -3
  73. package/dist/pages/projects.js +8 -8
  74. package/dist/pages/service-account.js +19 -16
  75. package/dist/pages/service-account.js.map +1 -1
  76. package/dist/pages/service-accounts.js +6 -7
  77. package/dist/pages/service-accounts.js.map +1 -1
  78. package/dist/pages/settings.d.ts +1 -6
  79. package/dist/pages/settings.js +155 -286
  80. package/dist/pages/settings.js.map +1 -1
  81. package/dist/pages/unregistered.js +2 -2
  82. package/dist/pages/user.js +7 -8
  83. package/dist/pages/user.js.map +1 -1
  84. package/dist/pages/users.js +6 -7
  85. package/dist/pages/users.js.map +1 -1
  86. package/package.json +8 -3
  87. package/src/components/actions-log.tsx +8 -61
  88. package/src/components/directory.tsx +10 -9
  89. package/src/components/grants.tsx +2 -2
  90. package/src/components/icons.tsx +0 -2
  91. package/src/components/offboarding.tsx +9 -16
  92. package/src/components/page.tsx +2 -3
  93. package/src/components/personal-tokens.tsx +5 -2
  94. package/src/components/principal-page.tsx +5 -4
  95. package/src/components/protected.tsx +39 -52
  96. package/src/components/references.tsx +18 -7
  97. package/src/components/role-editor.tsx +68 -99
  98. package/src/components/role-field.tsx +1 -1
  99. package/src/components/trusted-workloads.tsx +6 -5
  100. package/src/components/ui.tsx +5 -0
  101. package/src/lib/audit-proofs.ts +51 -0
  102. package/src/lib/audit-sentences.ts +490 -529
  103. package/src/lib/bindings.ts +6 -0
  104. package/src/lib/changes.ts +3 -1
  105. package/src/lib/coffre.ts +2 -2
  106. package/src/lib/queries.ts +19 -168
  107. package/src/lib/reveal.ts +32 -5
  108. package/src/lib/roles.ts +10 -36
  109. package/src/lib/row-reads.ts +2 -2
  110. package/src/lib/signin-errors.ts +5 -33
  111. package/src/options.ts +3 -19
  112. package/src/pages/account.tsx +1 -1
  113. package/src/pages/audit.tsx +151 -228
  114. package/src/pages/environment.tsx +373 -247
  115. package/src/pages/login.tsx +2 -4
  116. package/src/pages/project-environments.tsx +322 -20
  117. package/src/pages/service-accounts.tsx +1 -1
  118. package/src/pages/settings.tsx +49 -134
  119. package/src/pages/user.tsx +2 -2
  120. package/src/pages/users.tsx +1 -1
  121. package/src/parity.ts +11 -20
  122. package/src/styles/globals.css +107 -273
  123. package/dist/chunks/actions-log-DupYCEyV.js +0 -1134
  124. package/dist/chunks/actions-log-DupYCEyV.js.map +0 -1
  125. package/dist/chunks/directory-DrswWQLT.js.map +0 -1
  126. package/dist/chunks/environment-actions-8rL9Cw6X.js +0 -576
  127. package/dist/chunks/environment-actions-8rL9Cw6X.js.map +0 -1
  128. package/dist/chunks/grants-C0cb2oii.js.map +0 -1
  129. package/dist/chunks/offboarding-C1jbG_dk.js.map +0 -1
  130. package/dist/chunks/page-CfhC9Hp1.js.map +0 -1
  131. package/dist/chunks/personal-tokens-xC9wulhg.js.map +0 -1
  132. package/dist/chunks/principal-page-CdSeftGD.js.map +0 -1
  133. package/dist/chunks/queries-D1JuimTu.js.map +0 -1
  134. package/dist/chunks/references-D5llUGQL.js.map +0 -1
  135. package/dist/chunks/role-field-CoCv8wse.js.map +0 -1
  136. package/dist/chunks/signin-errors-TlQmQe0t.js.map +0 -1
  137. package/dist/chunks/use-change-BorW2R6C.js.map +0 -1
  138. package/dist/chunks/use-roles-BZnJ9Cq0.js.map +0 -1
  139. package/src/components/environment-actions.tsx +0 -508
@@ -5,80 +5,22 @@ import { useSuspenseQuery } from '@tanstack/react-query';
5
5
  import { Link } from '@tanstack/react-router';
6
6
  import { toast } from 'sonner';
7
7
  import { useCoffre } from '../lib/coffre';
8
- import { pageRoute } from '../lib/page-route';
9
8
  import { affects, queries } from '../lib/queries';
10
9
  import { useAction } from '../lib/use-action';
11
10
  import { useShell } from '../lib/use-shell';
12
11
  import { Card, Fact, PageHeader } from '../components/page';
13
12
  import { ScopeField } from '../components/role-field';
14
13
  import { RolesSettings } from '../components/role-editor';
15
- import { PageTabs } from '../components/tabs';
16
14
  import { ErrorLine, Modal, Spinner, Toggletip } from '../components/ui';
17
- import { Info, Key, Pencil, Settings, ShieldCheck } from '../components/icons';
18
- import type { settings as settingsRoute } from '../options';
15
+ import { Info, Pencil } from '../components/icons';
19
16
 
20
- const Route = pageRoute<typeof settingsRoute>();
17
+ /** The instance's settings. Your own are under Account, at the sidebar's foot. */
21
18
 
22
- /**
23
- * The instance's settings, a tab each: General, the instance and who
24
- * creates service accounts; Roles, the project roles or the global ones;
25
- * Keys, for whoever runs the instance. Your own settings are under
26
- * Account, at the sidebar's foot.
27
- */
28
19
  export function SettingsPage() {
29
- const { tab, roles } = Route.useSearch();
30
- const { capabilities } = useShell();
31
- // One route, its tab in the search: a link is current only for its own search, but Roles for either of its two.
32
- const current = { exact: true, includeSearch: true } as const;
33
- return (
34
- <>
35
- <PageHeader title="Settings" />
36
- <PageTabs label="Settings sections">
37
- {[
38
- <Link key="general" to="/settings" search={{}} activeOptions={current}>
39
- <Settings size={15} />
40
- General
41
- </Link>,
42
- <Link key="roles" to="/settings" search={{ tab: 'roles' }} activeOptions={{ includeSearch: true }}>
43
- <ShieldCheck size={15} />
44
- Roles
45
- </Link>,
46
- capabilities.runsInstance && (
47
- <Link key="keys" to="/settings" search={{ tab: 'keys' }} activeOptions={current}>
48
- <Key size={15} />
49
- Keys
50
- </Link>
51
- ),
52
- ]}
53
- </PageTabs>
54
- {tab === undefined ? (
55
- <General />
56
- ) : tab === 'keys' ? (
57
- <KeysTab />
58
- ) : (
59
- <RolesSettings
60
- kind={roles === 'global' ? 'instance-role' : 'role'}
61
- switcher={
62
- <nav className="segmented" aria-label="Roles">
63
- <Link to="/settings" search={{ tab: 'roles' }} activeOptions={current}>
64
- Project roles
65
- </Link>
66
- <Link to="/settings" search={{ tab: 'roles', roles: 'global' }} activeOptions={current}>
67
- Global roles
68
- </Link>
69
- </nav>
70
- }
71
- />
72
- )}
73
- </>
74
- );
75
- }
76
-
77
- /** The instance, as its deployment set it up, and who creates service accounts. */
78
- function General() {
79
20
  const { auth, capabilities } = useShell();
80
21
  const client = useCoffre();
81
22
  const { data: directory } = useSuspenseQuery(queries.directory(client, capabilities.canManageGrants));
23
+ const { data: keys } = useSuspenseQuery(queries.auditKeys(client, capabilities.runsInstance));
82
24
  const { data: settings } = useSuspenseQuery(queries.settings(client, capabilities.runsInstance));
83
25
  const providers = auth?.signin?.providers.map((provider) => provider.label) ?? [];
84
26
 
@@ -88,6 +30,8 @@ function General() {
88
30
 
89
31
  return (
90
32
  <>
33
+ <PageHeader title="Settings" />
34
+
91
35
  <Card
92
36
  labelledBy="instance"
93
37
  title="Instance"
@@ -111,40 +55,35 @@ function General() {
111
55
  </span>
112
56
  </Fact>
113
57
  {principals !== null && (
114
- <Fact label="Directory">
115
- <span>
116
- <Link to="/users">
117
- {users} user{users === 1 ? '' : 's'}
118
- </Link>
119
- {' · '}
120
- <Link to="/service-accounts">
121
- {tokens} service account{tokens === 1 ? '' : 's'}
122
- </Link>
123
- </span>
124
- </Fact>
58
+ <>
59
+ <Fact label="Directory">
60
+ <span>
61
+ <Link to="/users">
62
+ {users} user{users === 1 ? '' : 's'}
63
+ </Link>
64
+ {' · '}
65
+ <Link to="/service-accounts">
66
+ {tokens} service account{tokens === 1 ? '' : 's'}
67
+ </Link>
68
+ </span>
69
+ </Fact>
70
+ </>
125
71
  )}
126
72
  </dl>
127
73
  </Card>
74
+
75
+ <RolesSettings />
128
76
  {settings?.ok === true && <ServiceSetup scope={settings.serviceAccounts} />}
77
+ {keys?.ok === true && <Keys keys={keys} />}
129
78
  </>
130
79
  );
131
80
  }
132
81
 
133
82
  /**
134
- * Who creates service accounts without running the instance, and where:
135
- * anyone who holds access, inside this scope, giving one at most what they
136
- * hold there. Narrowed, the rest takes an Admin whose own scope reaches it.
83
+ * Who sets up service accounts without running the instance: anyone who
84
+ * holds access, inside this scope, giving one at most what they hold there.
85
+ * Narrowed, the rest takes an Admin whose own scope reaches it.
137
86
  */
138
- function serviceSetupInWords(scope: Scope): string {
139
- if (unscoped(scope)) return 'Anyone with access, in every project and environment';
140
- const { projects, environments } = scope;
141
- if ((projects !== 'all' && 'only' in projects && projects.only.length === 0) || (environments !== 'all' && 'only' in environments && environments.only.length === 0)) {
142
- return 'Admins only';
143
- }
144
- const where = scopeInWords(scope);
145
- return `Anyone with access, in ${where.charAt(0).toLowerCase()}${where.slice(1)}; elsewhere, Admins`;
146
- }
147
-
148
87
  function ServiceSetup({ scope }: { scope: Scope }) {
149
88
  const client = useCoffre();
150
89
  const [open, setOpen] = useState(false);
@@ -156,25 +95,27 @@ function ServiceSetup({ scope }: { scope: Scope }) {
156
95
  setError(null);
157
96
  };
158
97
  return (
159
- <Card labelledBy="service-setup" title="Service accounts">
98
+ <Card
99
+ labelledBy="service-setup"
100
+ title="Service accounts"
101
+ description="Anyone who holds access sets up service accounts for CI where this lets them: the account, its tokens and its OIDC trust, giving it at most what they hold. Elsewhere, an Admin whose scope reaches it does."
102
+ actions={
103
+ <button className="btn" type="button" onClick={() => setOpen(true)}>
104
+ <Pencil size={14} />
105
+ Edit
106
+ </button>
107
+ }
108
+ >
160
109
  <dl className="facts">
161
- <Fact
162
- label="Who creates them"
163
- action={
164
- <button className="btn btn-sm" type="button" onClick={() => setOpen(true)} aria-label="Edit who creates service accounts">
165
- <Pencil size={14} />
166
- Edit
167
- </button>
168
- }
169
- >
170
- <span>{serviceSetupInWords(scope)}</span>
110
+ <Fact label="Set up by people in">
111
+ <span>{unscoped(scope) ? 'Every project and environment' : scopeInWords(scope)}</span>
171
112
  </Fact>
172
113
  </dl>
173
114
  <Modal
174
115
  open={open}
175
116
  onOpenChange={(next) => (next ? setOpen(true) : close())}
176
- title="Who creates service accounts"
177
- description="Anyone with access creates service accounts in these projects and environments, giving them at most what they hold there; elsewhere, Admins do. All except prod keeps prod's to Admins."
117
+ title="Who sets up service accounts"
118
+ description="People set up service accounts, and give them what they hold, in these projects and environments. All except prod keeps prod's to Admins."
178
119
  >
179
120
  <form
180
121
  className="form"
@@ -183,7 +124,7 @@ function ServiceSetup({ scope }: { scope: Scope }) {
183
124
  run(() => client.settings.set({ serviceAccounts: draft }), {
184
125
  affects: affects.settings(),
185
126
  onSuccess: () => {
186
- toast.success('Saved who creates service accounts');
127
+ toast.success('Saved where people set up service accounts');
187
128
  setOpen(false);
188
129
  setError(null);
189
130
  },
@@ -207,62 +148,36 @@ function ServiceSetup({ scope }: { scope: Scope }) {
207
148
  );
208
149
  }
209
150
 
210
- function KeysTab() {
211
- const { capabilities } = useShell();
212
- const { data: keys } = useSuspenseQuery(queries.auditKeys(useCoffre(), capabilities.runsInstance));
213
- if (keys === null) return null;
214
- return keys.ok ? <Keys keys={keys} /> : <ErrorLine error={`The keys could not be read. ${keys.error}`} />;
215
- }
216
-
217
- /** Where a vault key is kept, in words: the deployment's own, or a key service's. */
218
- function keptIn(provider: string): string {
219
- if (provider === 'local') return "kept in the deployment's configuration";
220
- if (provider === 'aws-kms') return 'kept in AWS KMS';
221
- return `kept in ${provider}`;
222
- }
223
-
224
- /** A key's identifier by its end, `…3f9a2c`, enough to tell it from another; the whole of it a hover away. */
225
- function KeyId({ id }: { id: string }) {
226
- return (
227
- <span className="mono" title={id}>
228
- {id.length <= 8 ? id : `…${id.slice(-6)}`}
229
- </span>
230
- );
231
- }
232
-
233
151
  /**
234
152
  * What the keys you keep are checked against: no secret, so shown. The keys
235
153
  * themselves are checked by `coffre verify keys`, on your machine: a vault
236
154
  * key typed into a web page would be within reach of everything running in it.
237
155
  */
238
156
  function Keys({ keys }: { keys: RouteOutput<'GET /audit/keys'> }) {
239
- const { current, checks } = keys.vault;
240
- const replaced = new Set(checks.map((check) => check.vaultId).filter((id) => id !== current.vaultId)).size;
157
+ const { kek, previous } = keys;
241
158
  return (
242
159
  <Card
243
160
  labelledBy="keys"
244
161
  title="Keys"
245
162
  description={
246
163
  <>
247
- To check your vault key and app key against these, run <code>coffre verify keys</code>.
164
+ To check the vault key you keep, or the signing key you gave the vault, run <code>coffre verify keys</code>.
165
+ It reads the key on your machine and sends it nowhere.
248
166
  </>
249
167
  }
250
168
  >
251
169
  <dl className="facts">
170
+ <Fact label="Vault ID">
171
+ <span className="mono">{kek.id}</span>
172
+ </Fact>
252
173
  <Fact label="Vault key">
253
174
  <span>
254
- <KeyId id={current.vaultId} /> <span className="muted">· {keptIn(current.provider)}</span>
175
+ Held by <span className="mono">{kek.provider}</span>
176
+ {previous.length > 0 && `; ${previous.length} earlier vault key${previous.length === 1 ? '' : 's'} still unwrapping what ${previous.length === 1 ? 'it' : 'they'} wrapped`}
255
177
  </span>
256
- {replaced > 0 && (
257
- <span className="muted">
258
- {replaced} earlier vault key{replaced === 1 ? '' : 's'} still checkable
259
- </span>
260
- )}
261
- </Fact>
262
- <Fact label="App key">
263
- <KeyId id={keys.app.keyId} />
264
178
  </Fact>
265
179
  </dl>
266
180
  </Card>
267
181
  );
268
182
  }
183
+
@@ -27,8 +27,8 @@ export function UserAppsPage() {
27
27
  const client = useCoffre();
28
28
  const member = memberRef('user', Route.useParams().user);
29
29
  const { data: report } = useSuspenseQuery(queries.report(client, member, useShell().capabilities.runsInstance));
30
- // Their layout says why there is no report.
31
- if (report?.ok !== true || report.report === null) return null;
30
+ // Their layout says why there is no report, or no tab where it lists no apps.
31
+ if (report?.ok !== true || report.report === null || report.report.apps === null) return null;
32
32
  return (
33
33
  <ConnectedAppsCard
34
34
  apps={report.report.apps}
@@ -30,7 +30,7 @@ export function UsersPage() {
30
30
  principals={users}
31
31
  hasRemoved={result.removed.some((principal) => principal.principalType === 'user')}
32
32
  />
33
- <RemovedList principalType="user" removed={result.removed} reads={result.reads} />
33
+ <RemovedList principalType="user" removed={result.removed} />
34
34
  </>
35
35
  );
36
36
  }
package/src/parity.ts CHANGED
@@ -47,22 +47,17 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
47
47
  ],
48
48
  },
49
49
  'PUT /projects/:project/:environment': {
50
- ui: [
51
- { does: 'a project › Environments › Add environment, empty, inheriting, a copy or references', in: 'components/environment-actions.tsx', call: 'environments.create' },
52
- { does: "an environment › ⋯ › Fork…, the same dialog, inheriting from it", in: 'components/environment-actions.tsx', call: 'environments.create' },
53
- { does: "an environment › ⋯ › My own dev › Make my own dev", in: 'pages/environment.tsx', call: 'environments.create' },
54
- ],
50
+ ui: [{ does: 'a project › Environments › Add environment, empty, inheriting, a copy or references', in: 'pages/project-environments.tsx', call: 'environments.create' }],
55
51
  },
56
52
  'PATCH /projects/:project/:environment': {
57
53
  ui: [
58
- { does: "an environment's card or page › ⋯ › Rename…, Archive…; an archived card › ⋯ › Restore…", in: 'components/environment-actions.tsx', call: 'environments.update' },
59
- { does: "an environment's card or page › ⋯ › Protect…; for an Owner of its project Unprotect…", in: 'components/protected.tsx', call: 'environments.protect' },
54
+ { does: "an environment's card › ⋯ › Rename, Archive…, Restore", in: 'pages/project-environments.tsx', call: 'environments.update' },
55
+ { does: "an environment's card › ⋯ › Protect…, and for an Owner of its project Unprotect…", in: 'pages/project-environments.tsx', call: 'environments.protect' },
60
56
  ],
61
57
  },
62
58
  'DELETE /projects/:project/:environment': {
63
59
  ui: [
64
60
  { does: "an archived environment's card › ⋯ › Delete…, its path typed out", in: 'components/delete-place.tsx', call: 'environments.delete' },
65
- { does: 'your own dev, `dev@me`, its card or page › ⋯ › Delete…', in: 'components/environment-actions.tsx', call: 'environments.delete' },
66
61
  { does: 'the same dialog: what deleting would erase and revoke', in: 'lib/queries.ts', call: 'environments.previewDelete' },
67
62
  ],
68
63
  },
@@ -84,14 +79,14 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
84
79
  'GET /secrets/:project/:environment': { ui: [{ does: 'an environment: its secrets', in: 'pages/environment.tsx', call: 'secrets.list' }] },
85
80
  'PATCH /secrets/:project/:environment': {
86
81
  ui: [
87
- { does: 'an environment › Add secret, Edit, then Save under the table', in: 'pages/environment.tsx', call: 'secrets.set' },
82
+ { does: 'an environment › Add secret, Edit, then Save', in: 'pages/environment.tsx', call: 'secrets.set' },
88
83
  { does: 'an environment › Import .env, after its plan', in: 'pages/environment.tsx', call: 'secrets.set' },
89
84
  { does: 'a secret › ⋯ › Who sees it, stricter: at once, its value kept', in: 'pages/environment.tsx', call: 'secrets.set' },
90
85
  ],
91
86
  },
92
87
  'PATCH /secrets/:project/:environment/:key': {
93
88
  ui: [
94
- { does: "a secret › Edit: its name, then Save under the table", in: 'pages/environment.tsx', call: 'secrets.rename' },
89
+ { does: "a secret › Edit: its name, then Save", in: 'pages/environment.tsx', call: 'secrets.rename' },
95
90
  { does: 'a secret › ⋯ › Archive; an archived one › ⋯ › Restore', in: 'pages/environment.tsx', call: 'secrets.update' },
96
91
  { does: "a fork › an override › ⋯ › Reset to its parent; a reset one › ⋯ › Use its own value again; Undo after either", in: 'lib/changes.ts', call: 'secrets.inherit' },
97
92
  ],
@@ -140,7 +135,7 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
140
135
  ui: [
141
136
  { does: 'Users › Add user; Service accounts › Add service account', in: 'components/directory.tsx', call: 'members.add' },
142
137
  { does: 'a project › Service accounts › Add service account › New service account: made with its grant, in one call', in: 'pages/project-access.tsx', call: 'members.add' },
143
- { does: 'a user › ⋯ › Change global role', in: 'components/directory.tsx', call: 'members.add' },
138
+ { does: 'a user › ⋯ › Change role', in: 'components/directory.tsx', call: 'members.add' },
144
139
  ],
145
140
  },
146
141
  'DELETE /members/:member': { ui: [{ does: 'a user or service account › ⋯ › Remove…', in: 'components/directory.tsx', call: 'members.remove' }] },
@@ -203,12 +198,9 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
203
198
  { does: "a user's or service account's page › Activity", in: 'components/actions-log.tsx', call: 'audit.list' },
204
199
  ],
205
200
  },
206
- 'GET /audit/verification': { ui: [{ does: "Audit: the log's seal, verified with every visit", in: 'pages/audit.tsx', call: 'audit.verify' }] },
207
- 'GET /audit/trees': { ui: [{ does: "Audit: 0.15's log, its newest checkpoint and the entries since, verified with every visit", in: 'lib/queries.ts', call: 'audit.verifyTrees' }] },
208
- 'GET /audit/reads': { ui: [{ does: "Audit › Verify whole log: the reads listed, held to the uses 0.15's log sealed", in: 'lib/queries.ts', call: 'audit.verifyReads' }] },
209
201
  'GET /roles': {
210
202
  ui: [
211
- { does: 'Settings › Roles, project and global; every grant picker, for the roles it offers', in: 'lib/queries.ts', call: 'roles.list' },
203
+ { does: 'Settings › Roles and Instance roles; every grant picker, for the roles it offers', in: 'lib/queries.ts', call: 'roles.list' },
212
204
  ],
213
205
  },
214
206
  'PUT /roles/:role': {
@@ -225,18 +217,17 @@ export const UI_PARITY: { [K in RouteKey]: Reach } = {
225
217
  },
226
218
  'PUT /instance-roles/:role': {
227
219
  ui: [
228
- { does: 'Settings › Roles › Global roles › Edit… › Save', in: 'components/role-editor.tsx', call: 'roles.set', args: ['developer', {}, { instance: true }] },
220
+ { does: 'Settings › Instance roles › Edit… › Save', in: 'components/role-editor.tsx', call: 'roles.set', args: ['developer', {}, { instance: true }] },
229
221
  { does: 'the same dialog: what saving would do, before it is confirmed', in: 'components/role-editor.tsx', call: 'roles.preview', args: ['developer', {}, { instance: true }] },
230
222
  ],
231
223
  },
232
224
  'DELETE /instance-roles/:role': {
233
225
  ui: [
234
- { does: 'Settings › Roles › Global roles › Edit… › Reset to default', in: 'components/role-editor.tsx', call: 'roles.reset', args: ['developer', { instance: true }] },
226
+ { does: 'Settings › Instance roles › Edit… › Reset to default', in: 'components/role-editor.tsx', call: 'roles.reset', args: ['developer', { instance: true }] },
235
227
  { does: 'the same: what it would do, before it is confirmed', in: 'components/role-editor.tsx', call: 'roles.previewReset', args: ['developer', { instance: true }] },
236
228
  ],
237
229
  },
238
- 'GET /settings': { ui: [{ does: 'Settings › General › Service accounts: who creates them', in: 'pages/settings.tsx', call: 'settings.get' }] },
239
- 'PUT /settings': { ui: [{ does: 'Settings › General › Service accounts › Edit, beside who creates them', in: 'pages/settings.tsx', call: 'settings.set' }] },
230
+ 'GET /settings': { ui: [{ does: 'Settings › Service accounts: where people set them up', in: 'pages/settings.tsx', call: 'settings.get' }] },
231
+ 'PUT /settings': { ui: [{ does: 'Settings › Service accounts › Edit', in: 'pages/settings.tsx', call: 'settings.set' }] },
240
232
  'GET /audit/keys': { ui: [{ does: 'Settings › Keys: what the keys you keep are checked against', in: 'pages/settings.tsx', call: 'audit.keys' }] },
241
- 'POST /audit/loss': { not: "an Owner's acceptance of lost audit entries is rare and irreversible: `coffre audit accept-loss`, never a button" },
242
233
  };