Skip to content

feat(fork): merge the whiteboard into the fork - #31

Merged
orbitingflea merged 9 commits into
mainfrom
fork/whiteboard-merge
Oct 30, 2026
Merged

orbitingflea merged 9 commits into
mainfrom
fork/whiteboard-merge

Conversation

@orbitingflea

Copy link
Copy Markdown
Owner

Problem

The whiteboard lived in a separate private repo that pinned this fork's wb branch as its chat-t3 submodule. Every routine update had to merge upstream into main, rebase wb, move the submodule, and only then rebuild.

Fix

One commit of this fork now carries everything:

  • fork/whiteboard/: the whiteboard (canvas, sync server, wb CLI, skill, probes), copied from whiteboard main 482a40bdf without history. It keeps its own package.json and package-lock.json, outside the pnpm workspace. Its code was reformatted and fixed to pass this repo's vp fmt, vp lint, and knip with equivalent rewrites only (no disable comments). run-t3.sh and run-t3.md moved here.
  • The wb embedding changes, ported from origin/wb (f430934):
    • Server changes stay behind their environment variables (T3CODE_UNSAFE_NO_AUTH, T3CODE_CLAUDE_PLUGIN_ROOT, T3CODE_CODEX_SKILL_ROOT), unchanged.
    • Web changes that were hard-coded (/chat/ base and router basepath, manifest colours, no mobile composer, sidebar start state) now apply only to a build made with VITE_T3_WHITEBOARD=1. A normal build behaves as before.
    • Whiteboard client code lives in apps/web/src/fork/whiteboard/ and apps/web/vite/fork/; upstream files keep a call or import. The board:// handling in markdown, the sanitize schema, the composer token parser, and the mention chip stays inline as in wb, ungated.
  • The routine-update skill drops the wb rebase and submodule stages.

No visible change: a whiteboard build matches the old wb build, a normal build matches main, so there are no before/after captures.

Verification

  • vp run check:changed passes (five browser test files needed a rerun after Vite dep optimisation, then passed); touched server, shared, and web tests pass; typecheck of apps/web, apps/server, packages/shared passes.
  • Whiteboard npm test and npm run build pass before and after the reformat.
  • Normal build serves /assets/ with #161616; whiteboard build serves /chat/assets/ with #0a0a0a.
  • End-to-end smoke on a pruned copy of real data with spare ports: board page loads, the chat iframe opens and binds the board to its project room, /api/auth/session and the websocket work, and the whiteboard probes pass.

Done by Claude Opus 5.5 and Claude Fable 5.1 in Claude Code, inside T3 Code.

🤖 Generated with Claude Code

orbitingflea and others added 8 commits October 30, 2026 21:18
Copies the tracked files of the private whiteboard repository at commit
482a40bdf verbatim, without history. The chat-t3 submodule and .gitmodules
are left out: the T3 Code copy the whiteboard embedded now lives in this
repository.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pure formatting of the imported whiteboard files so they pass the
repository's format check. The built board bundle (JS and CSS) is
byte-identical before and after this commit.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Equivalent rewrites only, no lint-disable comments:

- node built-ins are imported as namespaces (NodeFS, NodeFSP, NodeOS,
  NodePath, NodeHttp, NodeCrypto, NodeChildProcess, NodeUtil,
  NodeStreamConsumers, NodeAssert)
- region mark overlays are keyed by presence id (and "self" for the
  local mark) instead of the array index
- the cursor chip measurement reads `name`, the only dependency it
  reacts to, instead of listing it as an unused extra dependency
- the WB_CHAT_PID walk returns early when the variable is unset instead
  of testing the loop-invariant inside the loop condition

The hand-written check scripts are renamed from `*.test.ts` to
`*.check.ts` so the repository's vitest runs do not collect them (they
have no suite and fail under vitest); `npm test` still runs them.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Brings the `wb` branch's T3 Code changes into fork main so one commit
carries both the whiteboard and the chat it embeds.

Server (env-gated, as on `wb`): a no-auth session behind
`T3CODE_UNSAFE_NO_AUTH=1`, a Claude plugin root from
`T3CODE_CLAUDE_PLUGIN_ROOT`, and a Codex skill root from
`T3CODE_CODEX_SKILL_ROOT`.

Web: `VITE_T3_WHITEBOARD=1` selects the whiteboard build. The Vite
plugin in `apps/web/vite/whiteboardBuild.ts` sets the `/chat/` base and
recolours the manifest; `apps/web/src/fork/whiteboard/build.ts` exposes
the switch to client code, which uses it for the router basepath, the
composer's mobile layout, and the sidebar start state. The parent-window
message hooks live in `apps/web/src/fork/whiteboard/` and run only in
that build inside the board's iframe. A normal build keeps upstream
behaviour, except that `board://` links and mention chips are always
recognised and the manifest icon paths are relative.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
`run-t3.sh` now sits beside the whiteboard it serves: the whiteboard
directory is the script's own directory and the T3 Code root is two
levels up. The web build gains the `VITE_T3_WHITEBOARD=1` switch, and
the `core.hooksPath` workaround is gone with the submodule. `run-t3.md`
and the README describe the layout and keep the embedding checklist
pointing at the moved files.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… fork

The `wb` branch and the chat-t3 submodule are gone, so stage 2 (rebase
`wb`) goes away and the whiteboard refresh becomes deploying a fork
main commit. The safety steps (micromark patch check, pruned-DB smoke
test, websocket check, port-owner check, WB_CHAT_PID self-restart
check, sandbox rebuilds, rollback) stay. The host deployment layout is
stated as an assumption to check on the first run.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
run-t3.sh passes T3_PROJECT to T3 as the server's working directory.
It used to be the whiteboard repo root, the git root that held the
chat; the repository root is its counterpart now. With auto-bootstrap
off it opens no project and does not choose a board.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings October 30, 2026 23:09

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@github-actions github-actions Bot added vouch:trusted Author is trusted by repo permissions or the VOUCHED list. size:XXL labels Oct 30, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@orbitingflea
orbitingflea merged commit c59f492 into main Oct 30, 2026
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL vouch:trusted Author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants