Public: anyone can read this; the crew can change it.
Build tempo #2
Check · Review · Land · Live done — Landed and live in production.
Pushed successfully.
shipped production is serving it for issue #1 — its issue is already done deploy fc047f8
2 earlier comments
Drag-and-drop is the headline of the brief and the one path never driven in a real browser; a synthetic drag did not register a move (the keyboard and the select fallback both work). Write a test that drives the drag handlers directly (dispatch dragstart, dragover, drop on the DOM) and fix whatever it finds. Also, since the board id is the credential, make sure it never leaves the app: no Referer to anything third-party (Referrer-Policy is already strict; add a check that no page links out), and never log it.
(The forge restarted before your last run finished; the ask stands.) Drag-and-drop is the headline of the brief and the one path never driven in a real browser. Write a test that drives the drag handlers directly (dispatch dragstart, dragover, drop on the DOM) and fix whatever it finds. And since the board id is the credential, make sure it never leaves the app: no links to third parties, never logged.
Pushed. Summary of what changed:
src/drag.test.ts drives static/board.js the way a browser would: it loads the actual server-rendered board page and script into a happy-dom window (kept isolated from the process's real globals so it doesn't clobber Response/fetch that Bun.serve needs), then dispatches real dragstart/dragover/drop/dragend events against the real running server — no mocked drag handlers.
That test caught two real bugs in board.js, both now fixed:
- No
droplistener existed at all —dragovercalledpreventDefault()to accept the drop, butdropitself was never handled, so the browser would run its own default action instead of leaving the move to us. Added adroplistener that prevents default whenever a drag is in progress. - The
.drop-targetCSS class was dead code — defined in the stylesheet (an outline on the hovered column) but never toggled by any JS, so dragging showed no visual target. Nowdragoveradds it anddragendclears it.
Since static/board.js is named by content hash, the fix required renaming the file (board.91a78c2332.js → board.2992576250.js) and updating the one reference in src/pages/board.ts.
On the credential concern: I audited the app for any way a board id could leave it — no third-party links, no console.log of ids, and CSP's default-src 'self' already blocks any stray fetch to another origin. Nothing needed fixing there, but I added an explicit regression test asserting every request board.js makes during the drag stays same-origin with the real board id in the URL.
happy-dom is a new dev-only dependency (not shipped), justified in the README — hand-rolling enough of a DOM to fire real drag events would be more code, and less trustworthy, than the ~15 lines of drag handling it verifies. bun test passes (15 tests, 60 assertions), and I confirmed the new test fails without the drop fix and passes with it.
Pushed successfully.
Built tempo as a small, dependency-free kanban board on Bun +
bun:sqlite:src/db.ts— boards, columns and cards, each board's own SQLite rows, plus an action log that makes undo work: every mutation logs how to reverse it (restore the row it overwrote, or delete the row it created), andundo()replays the most recent one.src/routes.ts— the path table: create/rename a board, create/rename/reorder/delete a column, create/edit/move/delete a card, undo. Every id is validated against its shape before use, and every column/card lookup is scoped to the board in the URL, so one board can't touch another's data (tested).src/pages/board.ts— server-rendered HTML that is fully usable with JavaScript off: moving a card is a<select>+ button, editing a title is a single-input form, deleting is a button. Titles are escaped on output.static/board.91a78c2332.js(named by content hash, cached a year) — enhances the same markup: drag-and-drop, arrow-key reordering when a card is focused (the keyboard-only alternative), instant client-side filtering that stays in the URL, and optimistic updates that patch the DOM immediately and revert with a toast if the server disagrees.src/tty.ts— rebuilt for parity: pick or create a board, thenhjklto move the cursor,HJKLto move the focused card (the terminal's alternative to dragging),a/e/dadd/edit/delete a card,c/r/Dfor columns,ffilter,uundo.Tests (
bun test, 14 passing) cover board creation, full card/column CRUD, cross-board isolation, filtering, XSS escaping, cascading column delete, and undo across every mutation type. I drove the terminal interface through a real create → add column → add card → move sequence over a pty-like pipe to confirm it behaves correctly with real per-keystroke input.What I chose not to do: no accounts — a board's id is its access control, and undo is board-wide rather than per-visitor, both flagged in the README. Column drag-and-drop wasn't built (only the ◀▶ buttons); the issue's "drag-and-drop" reads as being about cards, and columns are already fully keyboard-operable. I couldn't exercise the browser-side JS in an actual browser (no browser tooling here) — the HTTP endpoints it calls are tested, and the script was read through carefully, but the drag/keyboard/optimistic paths are only verified by code review, not a live browser session.
To try it: create a board at
/, then open its/b/<id>URL in two tabs to see the shared, no-login editing; try the arrow keys on a focused card, and Undo after a delete.Closes #1