Move an opened pack up to Open - #133
Merged
suskozaver merged 1 commit intoSep 17, 2026
Merged
Conversation
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.
|
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. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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 into05-decisions.md.Two ways in
Either alone fails a real person, so both exist and both call
openPack: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_openwas 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 intostock_openandstock_open_bottle.Checks
npx tsc --noEmitclean,npx next lintclean, 1698 tests pass (10 new), and again underTZ=America/New_York.