Repository navigation
Live audit fixes (11 Nov): UI, hardening and decisions D-148 to D-151 #1626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
4244fbd
Show a calm Saving… pill first; warn only after 8 s, offline or on fa…
BigSimmo 28e9268
Keep the Midland demo team off the signed-in shared workspace (live a…
BigSimmo 0aaa7f5
Hide the demo Ready to leave checklist on the shared workspace (live …
BigSimmo 1e54240
List a bed's closures and reopenings in its drawer History (live audi…
BigSimmo 1074a05
Add Leave the demo to the account menu, phone menu and Settings (live…
BigSimmo b40d18c
Drop the retired network screen, fix the ED guide's New menu and '1 o…
BigSimmo 055481f
Tests: shared workspace hides the Midland demo and the demo checklist…
BigSimmo d318cf1
Live audit decisions D-148 to D-151: bed close reason, archive rule, …
BigSimmo 37668c2
Item 8/6/13 follow-up: keep the warning through a retry after a failu…
BigSimmo 1b56666
Guard: list the save warning pause as screen timing, not an invented …
BigSimmo b1f24e2
Leave the demo: replace the page with sign-in, so Back does not retur…
BigSimmo 352c00a
D-149: unlink withdrawn referrals on archive so the stored workspace …
BigSimmo 2387696
Trim to fit the phone budgets: share the History toggle and list, reu…
BigSimmo 9256f3b
D-150: keep global search within its line cap
BigSimmo 5a60aa8
Restore the recovery host and bar height hooks dropped by the previou…
BigSimmo b523143
Merge remote-tracking branch 'origin/main' into fix/live-audit-decisions
BigSimmo 8366206
Live audit hardening: token wait deadline, security.txt, backend head…
BigSimmo c13674b
Merge remote-tracking branch 'origin/fix/live-audit-hardening-2026111…
BigSimmo ef34aef
Merge remote-tracking branch 'origin/fix/live-audit-ui-20261111' into…
BigSimmo aca4d2a
Merge remote-tracking branch 'origin/main' into fix/live-audit-decisions
BigSimmo e60937e
Keep TV_BOARD_ROLES module-private so knip sees no new unused export …
BigSimmo 1e6d548
Combined live audit PR: Leave the demo ends the pass through the fron…
BigSimmo 94e0264
Keep the toast's reason menu off every first load: load it only when …
BigSimmo 356e9ca
Merge remote-tracking branch 'origin/main' into fix/live-audit-decisions
BigSimmo d5a8fd8
Leave the demo loads the front door's pass call on use, so the shell …
BigSimmo bbd3a4c
D-148: say the audit trail keeps both steps; the bed's History shows …
BigSimmo 3b33f41
Merge remote-tracking branch 'origin/fix/live-audit-hardening-2026111…
BigSimmo e664ef8
Journey review records for the live audit fixes (D-149 archive guard,…
BigSimmo 2373eb9
Phone budget trim: front door holders carry four class names, not the…
BigSimmo fb3cb9f
Format the journey README note
BigSimmo e593c6f
Merge remote-tracking branch 'origin/main' into fix/live-audit-decisions
BigSimmo af2372d
Journey: re-review community-screen citations after merging main; for…
BigSimmo a2eaac0
Phone budget trim: the front door holders compose their four classes …
BigSimmo c3817e6
Keep the guards green: Leave the demo lives in the shell, the bed His…
BigSimmo 5a9e2e4
Merge remote-tracking branch 'origin/main' into fix/live-audit-decisions
BigSimmo cb1d1b9
Phone budget trim: the front door holders compose their four classes …
BigSimmo 0b652ed
Format the journey records
BigSimmo 269b744
Allow the D-149 archive reducer in the D-14 patient-link guard
BigSimmo ac0fc37
Merge origin/main (51a47453) into fix/live-audit-decisions
claude fbf4d03
Allow the D-149 archive step to read referral.patientId (D-14 60 to 61)
claude b226708
Merge Josh's D-14 allowlist commit 269b7443 from origin
claude dfa5547
Merge origin/main into fix/live-audit-decisions
BigSimmo 09cd8ed
Address review round on #1626 (archive Undo boundary, Leave the demo,…
claude 5066fe5
Merge dfa554768 (the same origin/main merge, made on the remote) into…
claude 0341e5d
Fix the backend Postgres proof for D-150 and re-record the archive re…
claude 03b1189
Bed board: keep "Waiting to save" beside a fit reason while picking
claude 2c4d873
Keep leaveDemo private to leave-demo.ts (knip: new unused export)
claude 7ab9c6e
Fix three unit-gate reds from the live audit fixes
claude acdde4d
Record D-155: check the live clock offset before clearing it
claude b54a402
Bring in PR #1631's mirror-free browser setup to unblock CI
claude 557a3cf
Address CodeRabbit review 5863010106 on #1626
claude 5d7fbaf
Toast choices fall back to plain buttons; a confirmed Undo still redo…
claude fb6eb33
Record D-156: reset the synthetic live world after the clock fix
claude 50f8ff9
Review fixes on #1626: calm Saving… after an old refusal; archive ign…
claude e3c9771
Merge main (#1631 browser setup, Home layout-shift and transfer budge…
claude b894cae
Merge main into fix/live-audit-decisions (D-153, governance review hi…
claude 79bd554
Review fixes on #1626: archive drops spent Undo records; shared journ…
claude 257e2f0
Merge main (#1608) into fix/live-audit-decisions
claude aeefa1b
Keep screen-to-screen imports at 564 after the #1608 merge
claude 67df9ca
Keep the review time when a reason is added to a bed closure
claude 8a05117
Merge main (#1606) into fix/live-audit-decisions
claude 4daa8a3
D-155's gap note: D-154 is claimed by open PR #1632
claude 733ef02
Raise three phone size limits after merging #1606
claude 8c047c0
Merge main (#1632) into fix/live-audit-decisions
claude 0fd2a04
Raise four phone size limits to CI's measurement plus 0.5 KB
claude ad79675
Trim the first-load so the live-audit pages fit their phone limits
BigSimmo b52ff76
Withdraw the D-156 live-world reset, and break an import cycle
BigSimmo 99c3bc8
Merge origin/main (0f2ce4d6e, #1623) into fix/live-audit-decisions
BigSimmo a4cb058
Take main's phone size limits after the #1623 merge; keep only the ED…
claude File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,29 @@ | ||
| import assert from "node:assert/strict"; | ||
| import { request as httpRequest } from "node:http"; | ||
| import { test } from "node:test"; | ||
| import { listen } from "./server.mjs"; | ||
|
|
||
| test("live audit item 17: every backend reply sends no referrer, offers no feature and refuses no-cors embedding", async () => { | ||
| const server = listen(async () => Response.json({ ok: true }), { port: 0, host: "127.0.0.1" }); | ||
| try { | ||
| await new Promise((resolve) => server.once("listening", resolve)); | ||
| const port = /** @type {import("node:net").AddressInfo} */ (server.address()).port; | ||
| for (const method of ["GET", "DELETE"]) { | ||
| const headers = await new Promise((resolve, reject) => { | ||
| const req = httpRequest({ host: "127.0.0.1", port, path: "/healthz", method }, (res) => { | ||
| res.resume(); | ||
| resolve(res.headers); | ||
| }); | ||
| req.on("error", reject); | ||
| req.end(); | ||
| }); | ||
| assert.equal(headers["referrer-policy"], "no-referrer", method); | ||
| assert.equal(headers["permissions-policy"], "camera=(), microphone=(), geolocation=(), payment=()", method); | ||
| assert.equal(headers["cross-origin-resource-policy"], "same-origin", method); | ||
| // The existing P174 pair is still there. | ||
| assert.equal(headers["content-security-policy"], "default-src 'none'; frame-ancestors 'none'", method); | ||
| } | ||
| } finally { | ||
| await new Promise((resolve) => server.close(resolve)); | ||
| } | ||
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
docs/script-budget-history/2026-11-11-pr1626-live-audit-fixes.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # 11 Nov 2026, Live audit fixes (PR #1626) | ||
|
|
||
| Changed on top of `main` at `0b657ad` (after #1606 and #1608 merged). Each raise is under 5 KB, within the per-screen allowance in HOW-WE-WORK section 6: | ||
|
|
||
| - Home `/ward-flow`: 587.7 to 588.2 | ||
| - Movement `/ward-flow/movements/WF-001`: 618.7 to 619.2 | ||
| - ED site `/ward-flow/ed/arm-ed`: 678.1 to 681.5 | ||
|
|
||
| Every other screen keeps `main`'s limit. | ||
|
|
||
| Measured by hosted CI on head `4daa8a3` (job 130830721425), in KB: Home 587.9, Movement 618.9 and ED site 681.2. Each new limit is the measurement plus 0.3. `main` alone could not be built for comparison, so the whole overage counts against this PR. Before #1606 merged, this PR with `main` measured Home 585.1, Movement 617.2 and ED site 675.0 (job 130823967817), all inside the limits at the time. | ||
|
|
||
| Why it changed: this PR adds the calm "Saving…" pill and its delayed warning, "Leave the demo" in the account and phone menus, the "Waiting to save" bed tile, the bed's closure History, the archive card's reason line and the Undo choices on the toast (D-148, D-149, D-151). Most of that is in the shared shell or the bed drawer, which the ED site page also loads. Merging #1606's ED referral flow on top grew the ED site page by a further 6.2 KB in the combined build, against 1.6 KB in #1606's own measurement. | ||
|
|
||
| Trim tried: the toast's reason menu (`wf/toast-choices.tsx`) and the front-door holders were already moved out of the first load in this PR. No further trim was found without a measurement of `main` alone. The ED site raise is 3.4 KB over `main`'s limit, so any further growth there leaves 1.6 KB of the allowance. | ||
|
|
||
| ## After merging `main` at `02817bb` (#1632) | ||
|
|
||
| `main` raised six of its own limits. This PR now keeps `main`'s value for every route and adds only its own raise over the old `main` at `0b657ad`, in KB: Home 588.3 to 588.8 (+0.5), Movement 619.0 to 619.5 (+0.5) and ED site 678.1 to 681.5 (+3.4). Every other route takes `main`'s limit unchanged. Hosted CI's measurement will show whether any can come down. | ||
|
|
||
| Hosted CI on that merge (job 130851096719) measured, in KB: Referrals 594.5, Ward 625.9, Movement 619.6 and ED site 681.8, and `main` alone could not be built. Builds vary by a few tenths, so these four limits are now the measurement plus 0.5: Referrals 595.0 (+0.7 over `main`), Ward 626.4 (+1.0), Movement 620.1 (+1.1) and ED site 682.3 (+4.2), each within the 5 KB allowance. Home stays at 588.8 (+0.5) and every other route keeps `main`'s limit. | ||
|
|
||
| ## After the first-load trim (12 Nov 2026) | ||
|
|
||
| The toast's fallback buttons and the ward bed drawer left the first load (the drawer was already | ||
| closed at first paint; its inner sheet was already lazy). Local production measurement after that | ||
| trim, in KB: Home 588.2, Referrals 594.3, Ward 623.6, Movement 619.4 and ED site 681.6. All nine | ||
| budgeted routes sit inside the limits already on this branch. Ward is 1.8 KB inside `main`'s 625.4. | ||
| The other limits can come down later (Home 588.8, Referrals 595.0, Movement 620.1, ED site 682.3). | ||
|
|
||
| ## After merging `main` at `0f2ce4d` (#1623) | ||
|
|
||
| The merge with #1623 kept this PR's older values and so lowered four of `main`'s limits below what #1623 needed (Home, ED, Movement and Capacity), and hosted CI then failed Home (589.0 against 588.8) and Capacity (666.0 against 665.9). After the trim, hosted CI measured, in KB: Home 589.0, Referrals 593.5, ED 543.1, Ward 622.5, Movement 619.6, Capacity 666.0, ED site 678.1, Bed meeting 599.5 and Statistics 640.6, so every route but ED site fits `main`'s limits. This PR now takes `main`'s limit for every route and keeps one raise: ED site 678.1 to 678.6 (+0.5), because it measured exactly at `main`'s limit and builds vary by a few tenths. The earlier raises (Home, Referrals, Ward, Movement and ED site to 682.3) are no longer needed and are dropped. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.