Skip to content

Ward Flow: two Movement screens in the third edition - #2759

Open
BigSimmo wants to merge 3 commits into
mainfrom
claude/trusting-thompson-cr5q3m
Open

Ward Flow: two Movement screens in the third edition#2759
BigSimmo wants to merge 3 commits into
mainfrom
claude/trusting-thompson-cr5q3m

Conversation

@BigSimmo

@BigSimmo BigSimmo commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds both candidate designs for the Ward Flow Movement rail item, each in its own file so neither can overwrite the other. A single filename previously held both, and the second build replaced the first.
  • docs/ward-flow/mockups/movement-third-edition.html — the Movements source mockup rebuilt on the third edition shell and design system. Network worklist: the day in five figures, Worth your attention, Today's traffic (corridor diagram with tooltip, keyboard-reachable corridors, legend drawn by the same thickness function, hide/show, click-to-filter), the open list with its three-way grouping switch, stage/transport/waiting beside it rather than behind a tab, the handover pair, the reconciliation line, the honest foot, and the movement detail drawer.
  • docs/ward-flow/mockups/movement-detail-third-edition.html — the six-panel single-movement screen built from the design system's own screens index (§14.2): identity and clocks, timeline, referral and assessment record, destination and bed, declines and reasons, escalation.
  • Reconciled with Command throughout: same day (Saturday 15 August, 10:42), same network, same people, WF-0xx identifiers rather than the source's WF-1xx, so one person cannot hold two identifiers across two screens. Two facts Command does not record are declared in one place and named in the foot: the three booked transport legs, and the seven movements that left the pathway earlier today. The wards those journeys reached are checked against Command's own confirmedToday figures.
  • Improvements over the source: the cause of each delay and the need for a transport leg are derived from the data rather than typed; a cause group nobody is in is named at the foot instead of silently dropped; the unowned-movement check became real (two movements have nobody named); corridor counts are written on the picture where the thickness range is too flat to carry them; the diagram is never scaled below 1:1 and all its text was raised to the 10.5px floor (the source had 9.5px); arrows are replaced by words; one Escape order owned by the shell; a 21-point self-check runs on load and reports empty.

Both files are documentation-only mockups. No application source, schema, migration, retrieval or answer-path code is touched.

Verification

  • Third-edition kit harness on both files — node docs/ward-flow/mockups/third-edition-kit/check.mjs <file> platinum:
    • movement-third-edition.html52 PASS, 0 FAIL, ALL GREEN
    • movement-detail-third-edition.html52 PASS, 0 FAIL, ALL GREEN
    • Decisive lines: PASS typefloor light 1920x1080 min 10.5px html, 10.5px svg · PASS contrast light 1920x1080 0 low of 303 · PASS overflow dark 390x844 0px · PASS reconcile light 1440x900 not a Command page (absent)
  • Page self-check: window.__movementCheck is []. Console reads "Movement self-check passed: 14 open reconcile across all three groupings; 5 completed journeys across 4 corridors, 1 to 2; 21 movements raised today."
  • Width and theme sweep: 23 widths from 360 to 2560, two heights, light and dark, loaded faces and fallback stacks — 184 runs, no sideways overflow, self-check empty in every one.
  • Interaction pass by hand: all three groupings, refused and carried corridor filters, clear by button and by Escape, drawer from a row, an action, a toggle, close by Escape and by button, the "No units recorded" escalation, stage jump, hide and show the diagram, service scoped to North Metropolitan (14 to 4, filter bar and diagram scope note both correct), a Tasks filter (14 to 1), and search picking a person. No page errors.
  • npx prettier --check on both files — All matched files use Prettier code style!
  • Verification not run: npm run verify:pr-local, npm run verify:ui, npm run verify:release — the change is two standalone documentation mockups under docs/, with no imported source, route, component or test touched, and the kit harness above is the gate these files have. CI's own risk routing is the check on that judgement.
  • Verification not run: npm run eval:retrieval:quality, npm run eval:rag, npm run eval:quality — no retrieval, ranking, selection, chunking, scoring or answer-generation surface is touched, and these are provider-backed.
  • Verification not run: npm run check:production-readiness, npm run check:deployment-readiness — no clinical workflow, privacy, environment, Supabase, source-governance or deployment behaviour changed.

Risk and rollout

  • Risk: None to the running product. Both files are self-contained HTML mockups under docs/, imported by nothing and served by nothing. The only consumer is the third-edition kit harness, which is run by hand against a named file.
  • Rollback: revert the commit, or delete either file. Nothing depends on either path.
  • Provider or production effects: None.
  • RAG impact: none.

Clinical Governance Preflight

Not applicable in substance — no ingestion, answer generation, search or ranking, source rendering, document access, privacy, production environment or clinical output behaviour is touched. Recorded for completeness because the mockups depict a clinical workflow:

  • Source-backed claims still require linked source verification before clinical use — unchanged; these mockups make no clinical claim and cite no source.
  • No patient-identifiable document workflow was introduced or expanded. Every patient, ward, figure and time is invented, the foot of each page says so in full, and the bar carries a "Synthetic prototype" mark. The record holds an age band and no exact age, and the detail drawer states that rather than inventing one.
  • Supabase target remains Clinical KB Database (sjrfecxgysukkwxsowpy) — untouched.
  • Service-role keys and private document access remain server-only — untouched.
  • Demo/synthetic content remains clearly separated from real clinical sources. The one real content in either page is the network's own structure — eight emergency departments, hospital sites, sixteen ward names, four health services — and the foot names exactly that and says every extension and address is a placeholder.
  • Source metadata, review status, and outdated/unknown-source behaviour remain conservative — untouched.
  • Deployment classification / TGA SaMD impact checked. No decision-support behaviour changed. Both pages state "Ward Flow advises; the coordinator decides", say the screen decides nothing by itself, and carry "Not a medical device and not clinical decision support" on the bar.

Notes

  • Owner decision, unresolved: which of the two screens should own the Movement name. The design system's screens index (§14.2) describes the six-panel detail screen; the source mockup is the worklist. The worklist holds movement-third-edition.html because that is the artifact handed over as the source of truth. Say if they should be swapped, or the detail one dropped.
  • Owner decision: §6.7 and §8.3 of WARD-FLOW-DESIGN-SYSTEM.md say Movement uses WF-1xx. These pages use WF-0xx, matching Command. Either the standard is updated or the reconciliation is reversed. Not changed here, because the standard is not this PR's to edit.
  • Five of the ten ranked causes and four of the ten cause groups have nobody in them at 10:42 on a Saturday. That is what Command's fourteen open movements say, and the list's foot names the empty groups rather than hiding them. Populating them would mean changing Command's dataset, not this page.
  • The corridor diagram is thin because Command records five confirmed admissions for the whole morning. The page writes the counts on the lines and says in its foot that the range is too flat for thickness alone.

🤖 Generated with Claude Code

https://claude.ai/code/session_011UVQakd4PHEaa6BBanpvNS


Generated by Claude Code


Note

Low Risk
Documentation-only HTML mockups under docs/ with no runtime, data, or auth surface touched.

Overview
Adds two standalone third-edition Ward Flow Movement documentation mockups so the worklist and single-movement detail designs no longer share one file (where the second build could overwrite the first).

movement-third-edition.html rebuilds the Movements network worklist on the third-edition shell: day figures, attention rail, corridor diagram with filtering and accessibility fixes, three-way grouping, stage/transport/waiting alongside the list, handover, reconciliation foot, and a movement detail drawer. movement-detail-third-edition.html is the six-panel movement detail screen from the design system screens index.

Both pages align synthetic data with Command (same Saturday snapshot, network, people, and WF-0xx IDs) and document two facts Command does not hold (booked transport legs, earlier pathway exits). Behavioural polish includes data-derived delay/transport causes, empty cause groups named in the foot, real unowned-movement checks, diagram count labels and 10.5px type floor, word-based flow labels, unified Escape handling, and a load-time self-check.

No application routes, components, schema, or retrieval code is changed—only docs/ HTML consumed by the third-edition kit harness.

Reviewed by Cursor Bugbot for commit a28b3c8. Configure here.

Adds both candidate designs for the Movement rail item, each in its own
file so neither can overwrite the other.

movement-third-edition.html rebuilds the Movements source mockup on the
third edition shell and design system: the day in five figures, what is
severe, the corridor diagram for today's traffic, the open list with its
three-way grouping switch, stage/transport/waiting beside it, the
handover pair, the reconciliation line, the honest foot and the detail
drawer. Reconciled with Command throughout - same day, same network, same
people, WF-0xx identifiers - with the cause of each delay and the need
for a transport leg now derived from the data rather than typed, empty
groups named rather than dropped, the unowned-movement check made real,
corridor counts written on the picture where thickness cannot carry the
range, all diagram text raised to the 10.5px floor, arrows replaced by
words, one Escape order owned by the shell, and a 21-point self-check
that reports empty on load.

movement-detail-third-edition.html is the six-panel single-movement
screen built from the design system's own screens index: identity and
clocks, timeline, referral and assessment record, destination and bed,
declines and reasons, escalation.

Both files pass the third-edition kit harness at 52 PASS, 0 FAIL, ALL
GREEN, and are Prettier clean. The rebuild was additionally swept across
23 widths, two heights, both themes and both font-loading states with no
sideways overflow, and every control was exercised by hand.

Which of the two should own the Movement name is an owner decision: the
screens index describes the detail screen, the source mockup is the
worklist.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011UVQakd4PHEaa6BBanpvNS
@coderabbitai

coderabbitai Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 42b9a526-2346-4b58-b1c9-9024402b48fe


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_367c65db-bfc7-400e-8442-e531341b6e24)

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 9, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-09T10:51:31.589510Z 986f7b0 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@supabase

supabase Bot commented Sep 9, 2026

Copy link
Copy Markdown

This pull request has been ignored for the connected project sjrfecxgysukkwxsowpy because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

@chatgpt-codex-connector

Copy link
Copy Markdown

💡 Codex Review

m.escalation = { at: 618, contact: "State bed coordination desk", tried: 0 };

P2 Badge Keep the WF-026 escalation consistent across screens

Remove this mutation or add the escalation to the shared Command/detail dataset. When the same synthetic day is compared across the three artifacts, this worklist reports WF-026 as escalated and counts two escalations, while command-third-edition.html and movement-detail-third-edition.html report only WF-009. This also makes the footer's claim that only transport legs and completed movements differ from Command false; a cross-file equality check over MOVEMENTS would catch the drift.


requestAnimationFrame(renderDrawer);

P2 Badge Restore focus after redrawing the movement drawer

Preserve or restore focus when an action is keyboard-activated inside the open detail drawer. renderDrawer() replaces the entire panel containing the focused action button, so after pressing Enter or Space the browser moves focus to the document body; the user loses their position and cannot continue through the drawer controls predictably. Refocus the corresponding newly rendered control, or update its pressed state without replacing the panel.



P2 Badge Retain queue focus when selecting another movement

Restore focus to the newly rendered selected row after a keyboard user activates a movement. This renderAll() call rebuilds #qpane-patients, detaching the focused row and leaving focus on the document body on every selection, so moving between movements with the keyboard repeatedly loses the user's queue position. Refocusing the replacement row after rendering would preserve the interaction.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

…place

Three findings from the Codex review on #2759, all confirmed and all fixed.

Stop mutating Command's movements. The worklist added an escalation to WF-026
so the "escalated before any ward answered" wording would have somebody to
render. It worked, and it silently made this screen disagree with Command and
with the detail screen about how many movements are escalated, while the foot
went on claiming that only the transport legs and the closed movements differ.
The mutation is gone, the wording is now proved on escalationLine() in the
self-check exactly as the missing-legal-form wording already was, and a new
guard fails if any field is ever added to a movement here again. The foot no
longer counts two escalations.

Keep the keyboard's place when the detail drawer redraws. renderDrawer()
replaces the panel holding the control that was pressed, so pressing Enter on
an action dropped focus to the document body and a keyboard user had to Tab in
from the top of the page. The redraw now restores focus to the control that
replaced it, only when focus was inside the drawer, falling back to Close.

Keep the keyboard's place in the detail screen's queue. renderAll() rebuilds
#qpane-patients on every selection, with the same effect. Focus returns to the
newly rendered row, only when it was in the queue to begin with.

Verified: kit harness 52 PASS 0 FAIL ALL GREEN on both files; both self-checks
report empty; only WF-009 is escalated, matching Command; focus lands on the
pressed control after Enter in the drawer and on the selected row in the queue,
where it previously landed on body. Prettier clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011UVQakd4PHEaa6BBanpvNS

BigSimmo commented Sep 9, 2026

Copy link
Copy Markdown
Owner Author

All three Codex findings confirmed and fixed in 6a5c0c8.

P2 — Keep the WF-026 escalation consistent across screens. Correct, and the more serious of the three. The mutation is removed: MOVEMENTS is now read and never written, so only WF-009 is escalated on this screen, matching command-third-edition.html and movement-detail-third-edition.html. The foot's claim is true again, and it no longer counts two escalations.

The mutation existed to give the "escalated before any ward answered" wording somebody to render. That wording is now proved on escalationLine() in the self-check, the same way the missing-legal-form wording already was — a better test, because it holds on a day with no such movement, which is most days. Rather than the cross-file check you suggested (which would be new repo test infrastructure for two standalone mockups), the page now carries the in-file equivalent: a guard that fails if any field outside Command's own set is ever found on a movement here again. It is the drift detector at the point where the drift would happen.

P2 — Restore focus after redrawing the movement drawer. Correct. renderDrawer() replaced the panel holding the pressed control, so Enter on an action dropped focus to the document body. redrawDrawerKeeping() now restores focus to the control that replaced it, only when focus was inside the drawer, falling back to Close. Measured before and after: focus went chase then BODY, now chase then chase with aria-pressed="true".

P2 — Retain queue focus when selecting another movement. Correct, same class of bug in the detail screen. Focus now returns to the newly rendered row, only when it was in the queue to begin with, so a mouse click is not affected. Measured: focus went WF-002 then BODY, now WF-002 then WF-002.

Verification on the fixed files:

  • Kit harness — movement-third-edition.html 52 PASS, 0 FAIL, ALL GREEN; movement-detail-third-edition.html 52 PASS, 0 FAIL, ALL GREEN
  • Both pages' self-checks report empty, including the new no-mutation guard and the new escalation-wording probe
  • npx prettier --check clean on both

Generated by Claude Code

The diagram stays as it is. Everything around it is tighter, and one thing is
added beside it.

A register beside the picture. The diagram is good at shape and poor at exact
quantity, and this morning's range is one journey to two, so a narrow strip on
the right of the diagram panel lists every corridor it draws, ranked, in the
three kinds it draws, with the count each line is trying to convey. A switcher
moves between Carried, Refused and Unused, each carrying its own count. A row is
the same control as its line: one setFilter, one highlight, and pressing the row
that is already filtering clears it. Choosing a line now also moves the strip to
that line's kind, so the two faces cannot fall out of step. A new self-check
fails if the strip ever lists a corridor the picture does not draw, or drops one
it does.

Worth your attention is a strip, not a panel. It was a panel of three-line rows
saying no more than a line of chips says, and it cost a whole band of the page.
It now sits under the five figures in the same header panel, as one row of chips
naming the movement, why it is severe and how long it has waited. Same predicate
as the Severe figure, still one function read twice.

Five shapes, one panel. Stage, Transport, Waiting, Resolved today and No owner
share one tabbed panel and one scroll region, replacing three stacked cards and
a two-panel handover row. Each tab carries its own figure so the shape of the
day stays glanceable without pressing anything, and only the detail is behind a
tab. The figure is a bare number with no room to name a population, so each pane
names its own population in the words on screen, and the two checks that
enforced that on the old panel headings now read the panes. The last two tabs
count the closed population and say so. Arrow keys, Home and End walk the
tablist. Every pane prints, since a printed record has no tabs to press.

The foot discloses. The reconciliation sentence stays visible because it is the
line that says the figures add up; what is invented and what is real sits under
a disclosure beneath it.

Measured: page height at 1600x1000 falls from 3316px to 2165px, and the panel
count from seven to five, with nothing hidden at any width. Below 1250px the
strip drops under the diagram and runs as a wide row instead.

Verified: kit harness 52 PASS 0 FAIL ALL GREEN; self-check empty, now 23 checks
including the strip/picture equality and the tab/pane contract; 184-run sweep
across 23 widths, two heights, light and dark, loaded and fallback faces, no
sideways overflow anywhere; every new control exercised, and the earlier focus
and no-mutation fixes re-confirmed. Prettier clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011UVQakd4PHEaa6BBanpvNS
@cursor

cursor Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Bugbot couldn't run - usage limit reached

Bugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit.

A user or team admin can review and increase usage limits in the Cursor dashboard.

(requestId: serverGenReqId_4309461d-75d0-40b1-b90a-364f791e353f)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants