Put the dealer's own notes in the file they hand over #84

Closed
jheaps wants to merge 1 commits from fix/casino-holdem-export-the-notes into fix/casino-holdem-stacks-in-chips
Owner

The CSV export carries the hands, the standings and the settle-up. It carried neither of the two places a dealer types context. Stacked on #83.

Each seat can hold custom fields — "IOU: $20 to Ann", "Seat rent: paid to 2am", "Venmo: @ann" — and the table has a notes box for the rest: side bets, a high-hand promo, who owes the box from last week. Both are typed precisely because they matter to settling up, and both were visible only inside the tool. The one place the context was written down was the one place it couldn't leave.

Player,Paid In,Won,Net,Bought In,Chips Now,Up/Down,Notes
Ann,20.00,60.00,40.00,200.00,150.00,-50.00,Seat rent: paid to 2am; Venmo: @ann
Ben,20.00,0.00,-20.00,200.00,200.00,0.00,IOU: $20 to Ann
Cal,20.00,0.00,-20.00,200.00,250.00,50.00,

Table Notes
"High-hand promo until midnight.
Mo owes the box $15, from last week."

Notes go last so the money columns keep the shape a spreadsheet expects, and the multi-line note is quoted as one cell rather than becoming rows that read as more players.

An existing test caught this, correctly

"every money cell parses as a number" asserted that every column after the name was numeric, and a Notes column is text by definition. The invariant it protects is real — the file exists so somebody can total a column — so it now names the six money columns and checks those, rather than "everything after the first". That's the assertion it always meant.

Validation

9 tests (278 total): a seat's fields ride along, the money columns keep their order, a seat with nothing written gets an empty cell rather than the word undefined, a blank field doesn't leave a stray colon, a multi-line note survives as one cell, no notes means no section rather than an empty heading, and asking for the standings doesn't change the seats.

Driven through the real Export CSV button, not just the function: the downloaded file carries both seats' notes and the table's. Audit and contrast clean, no console errors.

Also checked, nothing to fix

The per-seat custom fields themselves: add, label, value, saved per seat, survive a reload, don't leak to a neighbouring seat. That part works.

The CSV export carries the hands, the standings and the settle-up. It carried **neither of the two places a dealer types context.** Stacked on #83. Each seat can hold custom fields — "IOU: $20 to Ann", "Seat rent: paid to 2am", "Venmo: @ann" — and the table has a notes box for the rest: side bets, a high-hand promo, who owes the box from last week. Both are typed precisely because they matter to settling up, and both were visible only inside the tool. The one place the context was written down was the one place it couldn't leave. ``` Player,Paid In,Won,Net,Bought In,Chips Now,Up/Down,Notes Ann,20.00,60.00,40.00,200.00,150.00,-50.00,Seat rent: paid to 2am; Venmo: @ann Ben,20.00,0.00,-20.00,200.00,200.00,0.00,IOU: $20 to Ann Cal,20.00,0.00,-20.00,200.00,250.00,50.00, Table Notes "High-hand promo until midnight. Mo owes the box $15, from last week." ``` Notes go last so the money columns keep the shape a spreadsheet expects, and the multi-line note is quoted as one cell rather than becoming rows that read as more players. ## An existing test caught this, correctly "every money cell parses as a number" asserted that **every** column after the name was numeric, and a Notes column is text by definition. The invariant it protects is real — the file exists so somebody can total a column — so it now names the six money columns and checks those, rather than "everything after the first". That's the assertion it always meant. ## Validation **9 tests (278 total)**: a seat's fields ride along, the money columns keep their order, a seat with nothing written gets an empty cell rather than the word `undefined`, a blank field doesn't leave a stray colon, a multi-line note survives as one cell, no notes means no section rather than an empty heading, and asking for the standings doesn't change the seats. Driven through the **real Export CSV button**, not just the function: the downloaded file carries both seats' notes and the table's. Audit and contrast clean, no console errors. ## Also checked, nothing to fix The per-seat custom fields themselves: add, label, value, saved per seat, survive a reload, don't leak to a neighbouring seat. That part works.
jheaps added 1 commit 2026-09-01 19:52:47 -06:00
The CSV export carries the hands, the standings and the settle-up. It carried neither
of the two places a dealer types context.

Each seat can hold custom fields -- "IOU: $20 to Ann", "Seat rent: paid to 2am",
"Venmo: @ann" -- and the table has a notes box for the rest: side bets, a high-hand
promo, who owes the box from last week. Both are typed precisely because they matter to
settling up, and both were visible only inside the tool. The one place the context was
written down was the one place it could not leave.

Now the standings rows end with a Notes column carrying that seat's fields, and the
table's notes go in a section of their own at the end.

  Player,Paid In,Won,Net,Bought In,Chips Now,Up/Down,Notes
  Ann,20.00,60.00,40.00,200.00,150.00,-50.00,Seat rent: paid to 2am; Venmo: @ann
  Ben,20.00,0.00,-20.00,200.00,200.00,0.00,IOU: $20 to Ann
  Cal,20.00,0.00,-20.00,200.00,250.00,50.00,

  Table Notes
  "High-hand promo until midnight.
  Mo owes the box $15, from last week."

Notes go last so the money columns keep the shape a spreadsheet expects, and the
multi-line note is quoted as one cell rather than becoming rows that read as more
players.

An existing test caught this, correctly

"every money cell parses as a number" asserted that every column after the name was
numeric, and a Notes column is text by definition. The invariant it protects is real --
the file exists so somebody can total a column -- so it now names the six money columns
and checks those, rather than "everything after the first". That is the assertion it
always meant.

9 tests (278 total): a seat's fields ride along, the money columns keep their order, a
seat with nothing written gets an empty cell rather than the word undefined, a blank
field does not leave a stray colon, a multi-line note survives as one cell, no notes
means no section rather than an empty heading, and asking for the standings does not
change the seats.

Driven through the real Export CSV button, not just the function: the downloaded file
carries both seats' notes and the table's. Audit and contrast clean, no console errors.

Co-Authored-By: Claude Opus 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_015bnp7xKUPFFSpwkYNFaPgb
jheaps closed this pull request 2026-09-02 09:57:57 -06:00

Pull request closed

Please reopen this pull request to perform a merge.
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jheaps/JoshHeaps.Net#84