Repository navigation
feat(cad): onshape syncs show each step and how many api calls are left - #220
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Onshape syncs gave no feedback beyond "Syncing…", even though each API request already reports where the import is. The app also had no idea how much of the account's yearly Onshape API limit a sync used.
Now an Onshape sync opens one toast that follows the import step by step: checking for changes, reading the model, Onshape's export with elapsed time, the download, building part geometry (N of M), and saving. When the sync ends, the same toast becomes the result and shows how many of the connection's yearly API calls remain.
cad.progress.watchsubscription. The call count and usage are saved on the sync's outcome.Onshape exposes no usage API, so the count covers only calls made by cadsense. Other apps on the same account are not included.
onshape-sync-progress.mp4
Proof:
apps/server/scripts/onshape-cad-sync-e2e.ts(extended here) synced a real Onshape assembly through the app. Server traces showed 13 Onshape requests, and the app counted 13. The toast's remaining count matched the saved usage after both a cold and an unchanged sync. A new transport test covers a billed response whose download then fails.Reviewed with sol-loop: 2 rounds with gpt-6.1-sol. Sol verdict: approved
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.