Skip to content

Move an opened pack up to Open - #133

Merged
suskozaver merged 1 commit into
ArunNGun:betafrom
suskozaver:opened-pack-belongs-with-the-open
Sep 17, 2026
Merged

suskozaver merged 1 commit into
ArunNGun:betafrom
suskozaver:opened-pack-belongs-with-the-open

Conversation

@suskozaver

Copy link
Copy Markdown
Collaborator

A box of tablets being taken from every day sat at the bottom of the Stock page under Sealed. It is not sealed. Reconstitution is what moves a row out of that section, a pack has nothing to reconstitute, so nothing ever moved it.

The state

A pack now takes the same state every container in use takes. No fourth value in the union: the name stopped being literal when spray bottles arrived, since a bottle is filled rather than made up and takes it too. What the state records is a position in a sequence, sealed then in use then finished, and all three containers pass through it. Adding "open" would mean teaching eleven call sites, a migration, and a window where data written by one build reads wrong in another, all to make one identifier honest. Reasoning written into 05-decisions.md.

Two ways in

Either alone fails a real person, so both exist and both call openPack:

  • Open the pack, a button on a sealed pack row, for a box opened before its first dose is due.
  • The first logged dose opens it anyway, for the box opened three days ago by somebody who never pressed anything.

It takes the dose's own time rather than the clock, so a dose logged for yesterday opens the pack yesterday. A sealed vial is deliberately left alone: a vial becomes open by being made up, which is a step with its own data, and a dose drawn from one that never had that step is an oddity worth leaving visible.

No beyond-use date. A BUD runs from first puncture because what starts then is a sterile solution sitting at room temperature. Nothing about a foil strip changes on the day you press the first tablet out, so the only date a pack carries is the manufacturer's.

Undoing the dose that emptied a pack reopens it rather than resealing it. The tablets do not go back in the foil.

Around it

Add diluent and To spray stand down for a pack among the open rows, for the same reason Reconstitute does among the sealed ones. Set tablet size is offered in both sections now, since a box already in use is exactly where a missing size gets noticed.

One key doing two jobs

stock_open was both the button on a sealed water bottle and the heading over the list of opened things. English gets away with it, German cannot: the heading is Geöffnet, the button is Öffnen. Slovenian and Polish had both taken the button reading, so the section heading read as an imperative. Split into stock_open and stock_open_bottle.

Checks

npx tsc --noEmit clean, npx next lint clean, 1698 tests pass (10 new), and again under TZ=America/New_York.

A box of tablets being taken from every day sat at the bottom of the
Stock page under Sealed. It is not sealed. Reconstitution is what moves
a row out of that section and a pack has nothing to reconstitute, so
nothing ever moved it.

A pack now takes the same state every container in use takes. No fourth
state: the name stopped being literal when spray bottles arrived, since
a bottle is filled rather than made up and takes it too. What the state
records is a position in a sequence, sealed then in use then finished,
and all three containers pass through it. A new value would mean
teaching eleven call sites and a migration to make one identifier
honest.

Two ways in, because either alone fails a real person. Open the pack is
the button, for a box opened before its first dose is due. The first
logged dose opens it anyway, for the box opened three days ago by
somebody who never pressed anything. One function, openPack, and both
paths call it. It takes the dose's own time rather than the clock, so a
dose logged for yesterday opens the pack yesterday.

No beyond-use date. A BUD runs from first puncture because what starts
then is a sterile solution at room temperature, and nothing about a
foil strip changes on the day you press the first tablet out.

Undoing the dose that emptied a pack reopens it rather than resealing
it. The tablets do not go back in the foil.

Two offers stand down for a pack among the open rows, Add diluent and
To spray, for the same reason Reconstitute does among the sealed ones.
Setting the tablet size is offered in both sections now, since a box
already in use is exactly where a missing size gets noticed.

Also splits stock_open, which was one key doing two jobs. In English
one word serves both the button on a water bottle and the heading over
a list of opened things. In German it cannot: the heading is Geöffnet
and the button is Öffnen. Slovenian and Polish had taken the button
reading, so the section heading read as an imperative.
@vercel

vercel Bot commented Sep 17, 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 2b75e87 into ArunNGun:beta Sep 17, 2026
1 of 2 checks passed
@suskozaver
suskozaver deleted the opened-pack-belongs-with-the-open branch September 17, 2026 18:21
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