Repository navigation
CAD downloads, part pictures, and Control Kit's AI review through Control Point (link contract v1.2) - #340
Merged
Conversation
…ures, and AI review with Control Point's keys - Files uploaded after a send (raw bytes, SHA-256 checked, 64 MB) are stored as CAD docs of the import and fill its reference or placeholder entry. The robot page offers the newest STEP zip and workbook as downloads. - Part pictures by identity and Control Kit's revision key: listed, stored, replaced, shown in BOM rows and the drawer. - AI review for Control Kit: Gemini first, Anthropic once on a rate limit or server failure, 90-second calls, 20 an hour and 100 a day per workspace, strict request shape. - Migration 154 adds cad_parts.ck_picture_*; docs/control-kit-link.md is this repo's copy of the contract.
[Medium impact] The PR appears safe to merge; no new blocking issue was found. SummaryAdds CAD downloads, part pictures, and AI review through the Control Kit link.
|
…model bodies fail over, downloads across every send, picture reset and cleanup
Collaborator
Author
|
@greptile review |
…dy is read, so it never fails over
Collaborator
Author
|
@greptile review |
Collaborator
Author
|
Production verification (merge commit 096599c):
|
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.
What and why
The owner asked: "i should also be able to download all the parts in control point itself, also show the preview images in control point too", and for Control Kit's AI review, "when control point is linked it should work". This builds Control Point's side of contract v1.2 (
docs/control-kit-link.md, a copy of control-kit'sdocs/control-point-link.md). The Control Kit side is ZOGWORK/control-kit#61, and the two must merge together.Downloads (§6)
POST /api/integrations/control-kit/workspaces/:id/imports/:importId/files?name=:X-Content-SHA256;Part pictures (§6)
cad_parts.ck_picture_url,ck_picture_keyandck_picture_at. Imports never touch them.GET …/imports/:importId/pictureslists the keys Control Point holds, so Control Kit skips pictures that are already here.POST …/imports/:importId/picturestakes up to 40 PNGs per call (8 MB, 1 MB each), keyed by part identity and Control Kit's revision key:AI review for Control Kit (§7)
POST …/workspaces/:id/ai/review(server/controlKitAi.ts).responseSchema;Screenshots
Captured from a local server with a throwaway database. The bundle was built from the HORS scan saved on 2026-10-26 and matched against the published catalogs. The 11 part pictures are the Onshape pictures Control Kit had already cached, and nothing new was drawn. The STEP zip is Control Kit's committed sample zip, standing in for a real export.
Robot header: STEP and workbook downloads beside the robot picture.

BOM rows with part pictures, and STEP files on the Make group.

Part drawer with the Onshape picture.

Files tab: downloads and the latest send's files.

The robot page at 390 px.

Tests
server/__tests__/controlKitFiles.test.ts(new, real server, fake models on loopback) covers:cadRobotBom.test.tsxcovers the header, Make and Files downloads (including a zip from an older send) and the pictures in rows and the drawer.controlKitLink.test.ts,cadRobots.test.tsandcad.test.tsxpass unchanged.npm run lintis clean.Not verified