Skip to content

feat: spike live cards, forge adapters and UI playground - #1

Merged
ascorbic merged 4 commits into
mainfrom
spike/live-cards
Oct 9, 2026
Merged

ascorbic merged 4 commits into
mainfrom
spike/live-cards

Conversation

@ascorbic

@ascorbic ascorbic commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Spike for Tack, a GitHub-native whiteboard. It proves the architecture before M1, adds a UI playground, and checks in the plan. See docs/spike.md for findings and docs/plan.md for the roadmap.

What's in it

  • Board Durable Object (one per board): Yjs via y-partyserver, snapshots chunked into 512 KB SQLite rows, live card data sent to clients as custom messages outside the document.
  • Repo Durable Object (one per repository): card cache, board subscriptions, webhook log with dedupe and out-of-order protection, fan-out to boards.
  • Forge adapters (src/server/forges/): item keys are {host}/{repo}{#|!}{n}, webhooks route via /webhooks/:forge, with GitHub plus a synthetic fake.tack forge for tests and stress boards.
  • Client: React Flow canvas with live cards and stickies, presence cursors and avatars, in-progress drags shared through awareness and committed on drop.
  • /play and /play/cards (dev only): a board running entirely in the browser with simulated people and forge events, slow-motion and reduced-motion toggles, and a gallery of every card state.
  • First polish pass: bundled Geist and Bricolage Grotesque, spring motion tokens, card pickup and settle, live-update animations, compact cards at low zoom.
  • docs/plan.md, MIT LICENSE, scripts/send-webhook.ts.

Findings

  • React Flow handles 500 DOM cards: culling works, about 8 ms per zoom step with ~460 cards visible.
  • Writing every drag frame to Yjs would add about 10 bytes of tombstone per frame, so drags now go through awareness and commit on drop.

Testing

  • pnpm test: 17 tests in workerd (webhook signatures, ingest, dedupe, ordering, fan-out, refs and keys).
  • pnpm check and pnpm build pass; the production build excludes the playground.
  • Checked by hand in the browser: live card from GitHub, a signed webhook updating an open board, cross-tab drags and stickies, and playground scenarios.

Board and Repo Durable Objects, signed webhook ingest with dedupe and
out-of-order protection, live card relay via y-partyserver custom
messages, React Flow canvas with cards and stickies, drag-end commits
with in-progress drags over awareness, and a stress mode.
Item keys are now {host}/{repo}{#|!}{n}, Repo objects are keyed by host
and repo and only see normalised cards, webhooks route via
/webhooks/:forge, and a synthetic fake.tack forge powers tests and the
stress board. Adds the delight design principle to AGENTS.md.
/play runs a board in the browser with simulated people and forge events,
plus slow-motion and reduced-motion toggles. /play/cards shows every card
state. Both are dev-only.

Polish: bundled Geist and Bricolage Grotesque, motion tokens with CSS
spring easings, card pickup and settle, live-update animations (ripple,
highlighter sweep, state pop, label and count ticks), presence cursors
and avatars, compact cards at low zoom, skeleton loading, tilted
stickies, and dropped shapes coming to the front.
@ascorbic
ascorbic added this pull request to stack #25 October 9, 2026 17:58
@ascorbic
ascorbic merged commit 44214bb into main Oct 9, 2026
2 checks passed
@ascorbic
ascorbic deleted the spike/live-cards branch October 9, 2026 17:59
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