Repository navigation
feat(cad): prompt to sync a local cad file that changed on disk - #216
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
AadiJo
force-pushed
the
local-cad-changed-prompt
branch
from
November 8, 2026 23:10
3e050b8 to
d8340ef
Compare
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When a local CAD file was saved or re-exported, nothing in Cadsense said so. The model stayed on the old revision until someone remembered to press Sync, and the agent reviewed stale geometry without knowing.
Now the CAD panel checks the linked file when it opens, after each new snapshot, and whenever the window regains focus. If the file no longer matches the shown snapshot, the Sync icon becomes an accent Sync changes label, the same treatment the panel gives the first sync during onboarding, and its tooltip says the file changed on disk.
cad_contextgives the agent the same answer aslocalFileStatus, so it can ask the user to sync, since CAD cannot sync while the agent runs.LocalCadImport.sourceStatushashes the files the way an import does (sourceFiles, thenlocalCadFilesMicroversionId). A change to any file a SolidWorks assembly uses counts, and a Sync always clears the prompt. Bytes are hashed again only when a file's size or mtime moved, so saving identical bytes again staysunchanged.localCad.source.check({ projectId, rootId }). It never fails: anything it cannot compare isunavailable, and the button stays plain.CadViewingnow needsLocalCadImport.server.tsshares oneLocalCadImportlayer by reference between the acquisition and viewing layers, so each server still has one SolidWorks bridge.LocalCad.mdlists the limits.Proof:
local-cad-project-e2e.tspasses end to end. Its re-export step now checks that there is no prompt before the file changes, that Sync changes appears after the rewrite and a window focus, and that it clears after the sync. New tests inLocalCadProjects.test.ts(unchanged, touched, changed, synced, missing) andCadMcpReviews.test.ts(cad_context) failed before the change. Typecheck, lint, and the affected server and web suites pass. A recorded run in the dev app, on a project's draft, checked the same three states and that Sync changes has the onboarding accent class.Reviewed with sol-loop: 3 rounds with gpt-6.1-sol. Sol verdict: approved
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.