Public: anyone can read this; the crew can change it.

No terminal screen is added to the server: a test freezes src/tui/screens to its present list #18559

opened this

Merged 2h 46m ago, live in production

mason/forge:mason/18554-no-terminal-screen-is-added-to-the-serve → main 0 commits fork

  • Merged. mason/18554-no-terminal-screen-is-added-to-the-serve was merged into main as 2dd1176.

Review

Sign in to review this change.
2 files changed +396 −0
test/terminal-screens-frozen.json added +369
@@ -0,0 +1,369 @@
1 [
2 "about.ts",
3 "abstractions.ts",
4 "access.ts",
5 "account_access.ts",
6 "accountorder.ts",
7 "adapter.ts",
8 "advisories.ts",
9 "agents.ts",
10 "agents_md.ts",
11 "allocation.ts",
12 "answers.ts",
13 "api.ts",
14 "app_changes.ts",
15 "app_templates.ts",
16 "appbackup.ts",
17 "appenv.ts",
18 "appflags.ts",
19 "appleusage.ts",
20 "appmembers.ts",
21 "appregistry.ts",
22 "appreleases.ts",
23 "apps_crew.ts",
24 "appsecrets.ts",
25 "apptty.ts",
26 "archived.ts",
27 "ask_data.ts",
28 "asks_admin.ts",
29 "asks_lines.ts",
30 "assign.ts",
31 "atlas.ts",
32 "audit.ts",
33 "autonomy.ts",
34 "bets.ts",
35 "billing.ts",
36 "billinglinks.ts",
37 "bills.ts",
38 "blocked.ts",
39 "boards.ts",
40 "bottleneck.ts",
41 "bring.ts",
42 "bringwork.ts",
43 "buckets.ts",
44 "budgets.ts",
45 "bugs.ts",
46 "buildcache.ts",
47 "builds.ts",
48 "bulk.ts",
49 "can.ts",
50 "capacity.ts",
51 "cdn.ts",
52 "chain.ts",
53 "changelog.ts",
54 "chapters.ts",
55 "child_token.ts",
56 "childcredit.ts",
57 "claim_link.ts",
58 "claim_start.ts",
59 "client_clouds.ts",
60 "cloud.ts",
61 "cloud_account.ts",
62 "cloud_end.ts",
63 "cloudcost.ts",
64 "cloudtree.ts",
65 "cockpit.ts",
66 "codes.ts",
67 "collisions.ts",
68 "commit.ts",
69 "commits.ts",
70 "common.ts",
71 "config_rows.ts",
72 "configform.ts",
73 "confirms.ts",
74 "conflicts.ts",
75 "connections.ts",
76 "contribute.ts",
77 "controls.ts",
78 "cores.ts",
79 "crash_groups.ts",
80 "crawlers.ts",
81 "crew.ts",
82 "crew_now.ts",
83 "crewbudgets.ts",
84 "crewdevices.ts",
85 "crewfallback.ts",
86 "crewhandover.ts",
87 "crewkey.ts",
88 "crewsplits.ts",
89 "crewswitch.ts",
90 "crewtop.ts",
91 "cutover.ts",
92 "dashboard.ts",
93 "data.ts",
94 "dataimport.ts",
95 "datamove.ts",
96 "dataset.ts",
97 "decider.ts",
98 "declared_jobs.ts",
99 "deleterepo.ts",
100 "demo.ts",
101 "dependencies.ts",
102 "deploys.ts",
103 "design.ts",
104 "design_gallery.ts",
105 "desk.ts",
106 "devices.ts",
107 "disks.ts",
108 "display.ts",
109 "displays.ts",
110 "docs.ts",
111 "domain_dns.ts",
112 "domains.ts",
113 "dotfiles.ts",
114 "drift.ts",
115 "drop.ts",
116 "dutybudgets.ts",
117 "dutyswitch.ts",
118 "dxf_edit.ts",
119 "economics.ts",
120 "edgeonly.ts",
121 "egress.ts",
122 "entries.ts",
123 "entry_mark.ts",
124 "environments.ts",
125 "errors.ts",
126 "estimates.ts",
127 "events.ts",
128 "experiments.ts",
129 "external.ts",
130 "family.ts",
131 "featurefeed.ts",
132 "features.ts",
133 "featureswitch.ts",
134 "feed.ts",
135 "fileholds.ts",
136 "finder.ts",
137 "findings.ts",
138 "flags.ts",
139 "fleet.ts",
140 "fleetgraph.ts",
141 "flow.ts",
142 "flow_cpu.ts",
143 "flow_targets.ts",
144 "flows.ts",
145 "flowsall.ts",
146 "footing.ts",
147 "forge_it.ts",
148 "forge_usage.ts",
149 "forgename.ts",
150 "forgeready.ts",
151 "forges.ts",
152 "forgeview.ts",
153 "fork_tree.ts",
154 "forkflows.ts",
155 "forks.ts",
156 "front.ts",
157 "frontms.ts",
158 "funnel.ts",
159 "game_config.ts",
160 "game_map.ts",
161 "game_mods.ts",
162 "game_spark.ts",
163 "game_spark_view.ts",
164 "games.ts",
165 "getforge.ts",
166 "gifts.ts",
167 "grants.ts",
168 "health_voice.ts",
169 "held.ts",
170 "home_pins.ts",
171 "hooks.ts",
172 "hostreach.ts",
173 "identities.ts",
174 "infra.ts",
175 "interrupted_out.ts",
176 "inventory.ts",
177 "invites.ts",
178 "issue.ts",
179 "issues.ts",
180 "iterations.ts",
181 "jobs.ts",
182 "keeper.ts",
183 "kml.ts",
184 "knobs.ts",
185 "labels.ts",
186 "landasis.ts",
187 "lane_times.ts",
188 "lapsed.ts",
189 "largefiles.ts",
190 "limbs.ts",
191 "limits.ts",
192 "loopstalls.ts",
193 "machines.ts",
194 "madefrom.ts",
195 "maintainruns.ts",
196 "maintenance.ts",
197 "maintenanceweek.ts",
198 "mergedbranches.ts",
199 "mesh_edit.ts",
200 "migrate.ts",
201 "migration.ts",
202 "mirror.ts",
203 "mirrorpacks.ts",
204 "model.ts",
205 "money.ts",
206 "moved_key.ts",
207 "moving.ts",
208 "needs.ts",
209 "newapp.ts",
210 "newforge.ts",
211 "newissue.ts",
212 "neworg.ts",
213 "newpull.ts",
214 "newrepo.ts",
215 "next.ts",
216 "notes.ts",
217 "notify.ts",
218 "nowlist.ts",
219 "oauthgrants.ts",
220 "offer.ts",
221 "offers.ts",
222 "offsite.ts",
223 "orggrants.ts",
224 "orgteams.ts",
225 "originahead.ts",
226 "originapps.ts",
227 "outsideagents.ts",
228 "owner.ts",
229 "packrepos.ts",
230 "packs.ts",
231 "passkeys.ts",
232 "payments.ts",
233 "people.ts",
234 "pinned.ts",
235 "places.ts",
236 "plan.ts",
237 "planner.ts",
238 "planrow.ts",
239 "plans.ts",
240 "previewdirs.ts",
241 "pricing.ts",
242 "profile.ts",
243 "prompts.ts",
244 "proposal_tokens.ts",
245 "proposeupstream.ts",
246 "publicfeed.ts",
247 "pull.ts",
248 "pull_review.ts",
249 "pulllooks.ts",
250 "quarantine.ts",
251 "queuegrowth.ts",
252 "quotas.ts",
253 "readgrants.ts",
254 "receipts.ts",
255 "recheckwindow.ts",
256 "recoverykit.ts",
257 "refs.ts",
258 "refused.ts",
259 "registry_gallery.ts",
260 "registry_items.ts",
261 "releases.ts",
262 "repo.ts",
263 "repo_list.ts",
264 "repolist.ts",
265 "report.ts",
266 "reports.ts",
267 "requests.ts",
268 "resilience.ts",
269 "returning.ts",
270 "returns.ts",
271 "review.ts",
272 "roadmap.ts",
273 "runlist.ts",
274 "runlog.ts",
275 "runners.ts",
276 "runplan.ts",
277 "runs.ts",
278 "runwords.ts",
279 "schedules.ts",
280 "scorecard.ts",
281 "scrapes.ts",
282 "secrets.ts",
283 "security_public.ts",
284 "send_change.ts",
285 "sentinel.ts",
286 "series.ts",
287 "settinghistory.ts",
288 "share_tell.ts",
289 "shells.ts",
290 "ship_time.ts",
291 "shots.ts",
292 "signin.ts",
293 "signins.ts",
294 "slowpages.ts",
295 "sold.ts",
296 "sources.ts",
297 "space.ts",
298 "spend.ts",
299 "sshkeys.ts",
300 "stalepulls.ts",
301 "stalled.ts",
302 "startforge.ts",
303 "statement.ts",
304 "status.ts",
305 "subscriptions.ts",
306 "subtitle_shift.ts",
307 "support.ts",
308 "system.ts",
309 "tab.ts",
310 "tabworks.ts",
311 "talk_build.ts",
312 "talk_chats.ts",
313 "talk_display.ts",
314 "teamfigures.ts",
315 "teams.ts",
316 "telemetry.ts",
317 "tell.ts",
318 "tell_here.ts",
319 "tell_undo.ts",
320 "template.ts",
321 "template_preview.ts",
322 "templates.ts",
323 "terms.ts",
324 "thoughtnotes.ts",
325 "thread.ts",
326 "trace.ts",
327 "traces.ts",
328 "traffic.ts",
329 "trafficview.ts",
330 "transferrepo.ts",
331 "trusted.ts",
332 "trustedhosts.ts",
333 "usage.ts",
334 "valves.ts",
335 "variants.ts",
336 "verdicts.ts",
337 "versions.ts",
338 "vision.ts",
339 "visitor_bring.ts",
340 "waiting.ts",
341 "waiting_for_me.ts",
342 "wallet.ts",
343 "waves.ts",
344 "wayback.ts",
345 "week.ts",
346 "weekcard.ts",
347 "where.ts",
348 "whocan.ts",
349 "work.ts",
350 "working.ts",
351 "workspace.ts",
352 "workspace_bib.ts",
353 "workspace_cad.ts",
354 "workspace_deps.ts",
355 "workspace_draw.ts",
356 "workspace_facts.ts",
357 "workspace_kinds.ts",
358 "workspace_office.ts",
359 "workspace_parquet.ts",
360 "workspace_playlist.ts",
361 "workspace_registry.ts",
362 "workspace_sheet.ts",
363 "workspace_sqlite.ts",
364 "workspace_tab.ts",
365 "workspace_tables.ts",
366 "workspace_tfstate.ts",
367 "workspace_tree.ts",
368 "yours.ts"
369 ]
test/terminal-screens-frozen.test.ts added +27
@@ -0,0 +1,27 @@
1 /**
2 * The rule (P18): the web is the first interface and the terminal belongs to the CLI. No
3 * file is added to src/tui/screens; test/terminal-screens-frozen.json is today's list.
4 * Removing a screen is always allowed and shortens the list.
5 */
6 import { expect, test } from "bun:test";
7 import { readdirSync, readFileSync } from "node:fs";
8 import { join } from "node:path";
9
10 const SCREENS = join(import.meta.dir, "..", "src", "tui", "screens");
11 const frozen: string[] = JSON.parse(readFileSync(join(import.meta.dir, "terminal-screens-frozen.json"), "utf8"));
12 const present = readdirSync(SCREENS).filter((f) => f.endsWith(".ts")).sort();
13
14 test("no terminal screen is added: the web is the first interface, build the command in src/cli", () => {
15 const added = present.filter((f) => !frozen.includes(f));
16 expect(
17 added.map((f) => `src/tui/screens/${f}`),
18 `Rule: the terminal belongs to the CLI; src/tui/screens is frozen. Build this as a command in src/cli ` +
19 `over the public API, and do not add it to test/terminal-screens-frozen.json.`,
20 ).toEqual([]);
21 });
22
23 test("the list only shrinks: a removed screen is deleted from it, sorted and without repeats", () => {
24 const gone = frozen.filter((f) => !present.includes(f));
25 expect(gone, `Delete these from test/terminal-screens-frozen.json, the screens are gone: ${gone.join(", ")}`).toEqual([]);
26 expect(frozen).toEqual([...new Set(frozen)].sort());
27 });

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs