Skip to content

feat(server): each cad file in a folder gets its own project - #243

Merged
AadiJo merged 1 commit into
mainfrom
one-project-per-cad-file
Nov 9, 2026
Merged

AadiJo merged 1 commit into
mainfrom
one-project-per-cad-file

Conversation

@AadiJo

@AadiJo AadiJo commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Adding a CAD file from a folder that already had a project didn't create a second project. The server reused the folder's project and quietly relinked it to the new file, and the agent's cad_open tool did the same. Two assemblies in one folder could never be two projects, and the first project's sidebar row and new chats silently switched files.

A local CAD project now belongs to its CAD file, so a folder holds one project per file:

  • One rule (findConflictingProject) decides conflicts. The decider checks it on create, the new project.local-cad.create command, relink, restore, and folder changes. Projects share a folder only when both have a CAD file and the files differ.
  • Adding a file that already has a project opens that project. Nothing relinks another project, and concurrent creates for one file return the same project.
  • Plain folder projects and Onshape projects still keep their folder to themselves. The add dialog no longer upgrades a plain project. The CAD panel's Pick a file still does.
  • Relinking to a file another project reviews fails with "Another project already reviews that file."
  • When the folder already has a project, a new project's name defaults to its file's name, so the two sidebar rows differ.

Known limits: file names compare with case outside Windows drive and UNC paths (including /mnt/c), and a file reached through a symlink counts as a different file. Both match how folders compare today.

Proved with local-cad-project-e2e.ts on a real dev server and Chromium: every step passes, including a second file getting its own project, re-adding the first file opening its chat, and a restore while the second project shares the folder. Server tests pass (1735).

Reviewed with sol-loop: 1 round 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 9, 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 9, 2026 8:04pm UTC

@AadiJo
AadiJo merged commit 0ea0fac into main Nov 9, 2026
13 of 14 checks passed
@AadiJo
AadiJo deleted the one-project-per-cad-file branch November 26, 2026 19:51

This branch was successfully deployed

1 active deployment
Preview — 8b9862f2 Deployed Nov 9, 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