Skip to content

feat(web): new threads show their project's cad, and the first message keeps the view - #214

Merged
AadiJo merged 1 commit into
mainfrom
draft-cad-viewer
Nov 7, 2026
Merged

AadiJo merged 1 commit into
mainfrom
draft-cad-viewer

Conversation

@AadiJo

@AadiJo AadiJo commented Nov 7, 2026 •

Copy link
Copy Markdown
Member

A new thread's right panel said "Start a thread to open its CAD view." Opening CAD on a draft created an empty thread just to show the model.

Now a draft has its own CAD viewer for its project. View changes on the draft (hidden parts, explode, camera) stay with the draft. The first message carries that view, and the server saves it as the new thread's view right after creating the thread and before the turn starts, so the agent sees what the user was looking at.

  • The cad panel watch and scene RPCs take an optional projectId, so a thread with no server row yet can load its project's CAD. An existing thread's own project still wins, and a mismatch is refused.
  • The turn-start bootstrap takes an optional cadUserView. If the save is refused (for example after a sync), the turn still runs.
  • A draft view whose snapshot is no longer current is dropped, both on screen and in the bootstrap.
  • The three CAD e2e scripts no longer wait for the old placeholder. They wait for the CAD panel on the draft, then for the URL to leave /draft/.

Proof: local-cad-project-e2e.ts now loads the model on the /draft/ URL, explodes it there, sends the first message, and checks that the new thread's saved view has explosion: 1 and the panel still shows it exploded. Typecheck, lint, and CadPanel.test.tsx pass. The Onshape and remote-load scripts were updated but not run, since they need Onshape credentials and a LAN setup.

Reviewed with sol-loop: 2 rounds with gpt-6.1-sol. Sol verdict: approved


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@vercel

vercel Bot commented Nov 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cadsense Ready Ready Preview Nov 7, 2026 11:13pm UTC

@AadiJo
AadiJo merged commit a9c1d84 into main Nov 7, 2026
8 checks passed
@AadiJo
AadiJo deleted the draft-cad-viewer branch November 26, 2026 19:49

This branch was successfully deployed

1 active deployment
Preview — 45913107 Deployed Nov 7, 2026 by vercel[bot]
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