Public: anyone can read this; the crew can change it.
A board page stops growing with the square of the board: the per-card Move control gets a card page #48
Correction to the last line of the body: the separate, later issue for a note on a card is #49, which waits on this one. (It was written before this issue had a number to point at.)
Re-measured after #46 landed (main at d9a214f), because that pull touched the very form this issue moves — the numbers went up, not down.
#46 gave each card a second <select> (Top/Bottom) to replace the hard-coded index=999999, which is the right fix for a thumb and the wrong thing to repeat 500 times. A board of 3 columns × 200 cards now renders 231,179 bytes (was 206,858), 1,096 bytes per card (was 975), five <option> elements per card. The per-card cost still grows with the number of columns, so the estimate at the app's caps — 50 columns, 500 cards — rises to roughly 2.4 MB of HTML for one board page. Server time is unchanged and still fine: 2.9–5.6 ms.
Two things this changes in the issue above:
- The blocker is gone: #21 is merged, so this is ready now, and the work is to move #46's two selects and their button to the card page rather than to delete them. The Top/Bottom control belongs there, with room for the positions #33 is about.
- The byte budget in the acceptance list should be written against 231,179, and the pull should quote the before and after it actually measured, not these numbers.
Everything else in the body stands: the card page is GET /b/:id/cards/:cardId, the forms stay plain HTML, and the drag and arrow-key paths keep posting to /b/:id/cards/:cardId/move untouched.
Parked by the crew: the check failed and the decider saw no point in another try (pull #113 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.
Stop the board page growing with the square of the board: today every card carries a
<select>listing every column, so page bytes are cards × columns.Measured on
mainate888c44, locally: a board with 3 columns and 200 cards renders 206,858 bytes — 975 bytes per card, of which the per-card Move form is about a third, and each extra column adds ~70 bytes to every card. The app's own caps are 50 columns and 500 cards (src/limits.ts), so a board at its limit is roughly 2 MB of HTML on every load — and pull #36 refetches the whole board on every stream reconnect, so a phone that sleeps pays it again each time it wakes. The page is still fast to build (2–3 ms at 200 cards); this is bytes on the wire, not server time.The fix is not to delete the control — it is the only way to move a card with JavaScript off — but to give it a place: one card, one page.
Done looks like
GET /b/:id/cards/:cardIdrenders a small server-rendered card page: the title in the same editable form, which column it is in, a Move form that lists the columns once, Delete, and a link back to the board.src/pages/card.ts, named for the one concept, likesrc/pages/board.ts.<select>, hidden index and Move button become a single link to that page. Card markup drops under ~350 bytes; the same 3-column, 200-card board renders under 80 KB. Put both numbers, measured, in the pull.303back to/b/<id>#card-<cardId>with the card given anidso the browser scrolls to it./b/:id/cards/:cardId/moveexactly as they do now.ENTITY_IDfor the card id, assrc/routes.tsalready does), an unknown or wrong-board card id answers 404, and every title on the card page goes throughescape().bun testgreen.Files
src/pages/board.ts, newsrc/pages/card.ts,src/routes.ts,src/pages/board.test.tsorsrc/server.test.ts,README.md(the "Cards" bullet describes the Move dropdown).Risks
Pull #46 (#21) is rewriting that same per-card Move form — it replaces the hard-coded
index=999999for touch — so this waits for #21 and should be rebased onto it, not raced with it. #33 (a visible index passed as an absolute one) is about the script's move, which this does not touch. Do not take the chance to redesign the card while moving it: a note on a card is #NOTE_ISSUE, deliberately separate and after this.Suggested: scout, reviewed by mason.