Skip to content

Open the log form with every site when "All sites" was chosen - #146

Merged
suskozaver merged 1 commit into
ArunNGun:betafrom
suskozaver:all-sites-means-all-sites
Oct 5, 2026
Merged

suskozaver merged 1 commit into
ArunNGun:betafrom
suskozaver:all-sites-means-all-sites

Conversation

@suskozaver

Copy link
Copy Markdown
Collaborator

Reported as an unnecessary second step, and it is a bug.

The All sites row at the foot of the site panel on the overview exists for one reason, written into its own comment when it was built in #119: to hand the full body map over to the form, for the sites a protocol has not pinned. It opened the form restricted to the pinned ones, so the next thing anybody did was press Inject somewhere else to undo it.

Why

The row did exactly what the Details button does: set the compound and open the form. The form resets to the pinned list every time it opens. It had no way to know why it was opened, and nothing told it.

The fix

LogDoseSheet takes anySite, which switches the pinned restriction off once the form has filled itself in. It runs after applyProtocol rather than before, since that is the call that puts the pinned list back.

The overview sets it only from the All sites row and clears it on close, so no other way in ever inherits it. Details and every other entry point keep the pinned list, which is where rotation by plan belongs.

Checks

npx tsc --noEmit clean, npx next lint clean, 1745 tests pass.

Reported as an unnecessary second step, and it is a bug. The "All
sites" row at the foot of the site panel on the overview exists for one
reason, written into its own comment when it was built in ArunNGun#119: to hand
the full body map over to the form, for the sites a protocol has not
pinned. It opened the form restricted to the pinned ones, so the next
thing anybody did was press "Inject somewhere else" to undo it.

The row did what the Details button does, set the compound and open the
form, and the form resets to the pinned list every time it opens. It
had no way to know why it was opened, and nothing told it.

So it is told. LogDoseSheet takes anySite, which switches the pinned
restriction off once the form has filled itself in, after
applyProtocol rather than before, since that is what puts the pinned
list back. The overview sets it only from the "All sites" row and clears
it on close, so no other way in ever inherits it. Details and every
other entry point keep the pinned list, which is where rotation by plan
belongs.
@vercel

vercel Bot commented Oct 5, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the Arun's projects Team on Vercel.

A member of the Team first needs to authorize it.

@suskozaver
suskozaver merged commit a6966b7 into ArunNGun:beta Oct 5, 2026
1 of 2 checks passed
@suskozaver
suskozaver deleted the all-sites-means-all-sites branch October 5, 2026 07:10
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.

1 participant