Skip to content

CAD Editor Conserved Split Workflow Plan

easylogic edited this page Oct 11, 2026 · 5 revisions

Conserved Solid Split in the CAD Editor

Proposed dependency-needed consumer child of #536 DETAIL-07/#1029/#503. CAD Editor owns its reusable Solid session/components and apps/cad-editor task/file UI. Viewer/GPU own whole-output display and identity admission. This page precedes the child Issue. Preserve active #1438 and native #1437; authors choose their own ready order.

Native and display prerequisites

#1437 implements a qualified original Body plus original constant-Y cut → two freshly qualified closed Solids, conserved material/volume, opposite cut orientations and source-qualified lineage. The frozen product includes serializeTranslatedStripPlaneSplit and parseTranslatedStripPlaneSplit; native code and restricted native proof are now complete and actually adopted at c361993b from 3505af21. This is not Editor/GL acceptance.

Existing #1348 native mesher, #1325 neutral projection and #1351 six-Face GPU CPU preparation are real reusable providers. They do not supply a qualified Split result Viewer loader. Whole presentation of both Bodies requires twelve complete Face chunks, Body/Face/source identity and actual material/frame/scale/selection/lifetime/atomic replacement. Name the missing GPU/Viewer subtask and its real API in this Issue before implementation; do not recreate existing producers or infer rendering from CPU data. #1183 actual GL and #1119 separate denied Solid gates stay preserved.

Solid session, staged cut and files

Current Direct CadDocumentV1 has Curve/Surface references and empty feature arrays. Use an explicit Solid session/file profile for complete original Body/cut/outputs/certificates/lineage, not fake Surface bodies. Stage an admitted cut through actual public native source-authoring and Split APIs, preserving all X/Z/basis/domain/weight bits; freeze a genuine whole-cut edit route before promising a handle. Do not invent four individual pole writes as an accepted planar edit or clamp unsupported cuts.

Controller revisions/history are separate from native schema. One Split/cut edit commits exactly one history operation after complete display success. Undo restores one original Solid and Redo both outputs. Copy/refuse/stale/token/error rules retain native data, source, raw cut, history and prior frame; failed recovery marks unavailable presentation honestly. Save the public canonical authored Split recipe; fresh Open invokes actual parse/reconstruction and restores both certified outputs and references. Do not save mesh-only data or derived megabytes inside Direct document limits.

One actual editor flow

Open one qualified original Solid → choose an admitted constant-Y Canvas cut handle or exact field → Split → display/select both freshly qualified children → Undo to original → Redo to both → Download → physical fresh Open → edit the cut → Split again → second Download. Verify exact conserved native material/volume, common cut/opposite orientations and full original source/sibling/lineage retention. Observe actual two-body presentation, current references/history and genuine token-bound stale/native/display refusal without fabricated renderer events.

Freeze exact module/app paths, APIs/profile/budgets and prerequisite native/adopted SHAs before code. Affected library/app build and one short real UI/native-file flow suffice for the prototype; preserve first failures and exact adoption. This card remains dependency-needed until native1437 and whole-output renderer/Viewer are genuinely available. Visibility isolation1412, Curve1438 and removed-material Boolean1328 do not close it. Arbitrary plane/curved/general Split remains under #1437/#535/#536; no completed native or commercial Editor claim follows from this plan.

Resumed checkpoint: 2026-10-11

Fixed integration c93ede744525753b32a608e63ed20b25aedef394 preserves dirty Render and recordings. Native #1437 is available. GPU #1455 example 8f4377ae has actual CPU pair composition: 12 draws, 1152 corners, 384 triangles, 39168 execution buffer bytes, four admissions and six focused refusals. Original volume 1040 = 390 + 650 and cutY4 gives 520 + 520. This is example composition, not a public Viewer loader, GL execution or Editor completion. Native authored codec is already available; planned #1450 whole-result reader is a different optional ingestion profile, not a prerequisite to authored Save/Open.

Actual missing consumer seam: GPU/Viewer full two-Body admission, twelve trimmed Faces in one common depth/camera frame, source/component/Body/Face qualified bindings, selection, atomic replacement and rollback, Fit and lifetime. Current loadQualifiedFaceScene admits at most six Face assets and refuses selectGeometry; mountMeshScene takes another PreviewPacket and loadShellGraph another feature graph. No casts, omitted Faces or bypass of #1119/#1183.

Editor will freeze and implement an independent native-backed Solid session code stage next. Initial authoring retains the complete native Split recipe and its original certified Body, stageCutY uses ONE real editSourceSurfaceControlNetWide request with four Y edits, then actual whole validator/Split/codec. Session histories use native authored strings and separate generation/display generation. The code stage will not claim actual presentation approval, GL or the whole editor flow. Exact API/path/history contract will be appended before product writes.

Before-code freeze: independent native-backed Solid session stage

Issue1446 remains OPEN/dependency-needed for actual Canvas/Viewer/GL. Clean accepted parent c93ede744525753b32a608e63ed20b25aedef394, branch codex/cad-editor-split-session, reused clean owned managed checkout. Actual1437/adoptc361993b and authored codec are dependencies;1455 CPU example is evidence, not imported as public API or simulated renderer. Original1183/1119denial unchanged.

Exactly FIVE Editor-owned paths: src/split-session.ts, src/split-types.ts, src/index.ts additiveexports, README.md boundedstage, apps/cad-editor/flows/split-session-flow.mjs. All other trackedEditor/app/CAD/GPU/Interop/Viewer/sharedroot/lock/policy paths protected in immutable local contract.json. No React/host/CSS/Canvas fakeimplementation. Root ownsbarrel/README/build/evidence; workerowns newSession+types; independentworkerownsnewflow; auditread-only.

Public factory createCadEditorSplitSession(authoredText, options?:{initialPresentation:'original'|'split'}), defaultsplit. Genuine native parse retains whole originalBody/completecut/twoBodies/proof/sourcequalifiedlineage. Presentation is explicit original orsplit; accepted nativeauthority includesboth originalandoutputs. Internalhistory{nativeauthoredText,presentation} only. Nativefile has NOoriginal/splitstate marker; Openalwayssplit. serializeAccepted refuses original UNSUPPORTED ratherthan silentlypromoting it. Original-only save is future nativefileprofile, not inventedextension.

Methods getSnapshot/subscribe/stageCutYField/discardPending/prepareApply/prepareOpen/prepareUndo/prepareRedo/acceptCandidate/cancelCandidate/serializeAccepted/markDownloaded/dispose. Candidate token,kind,baseGeneration,baseDisplayGeneration,wholeNativeResult,presentation. CPU acceptCandidate is exclusivelysessioncommit; docsrequirefutureconsumercommitafter actualwhole displayapproval. No GL successreceipt, mockViewer, native revision, topology ID reconstruction or callback producer. GenerationanddisplayGeneration incrementonepercommit; originalfirstprepareApply transitions1Body→2 outputs andUndo restoresoriginalpresentation. Cut editsuse ONEreal editSourceSurfaceControlNetWide with fouryMMfields, actualwholevalidator, realSplit/wholevalidator/canonicalcodec; nativewriter noOp authority. Source/body/recipes/options/IDs/XZ/domain/weight/siblings retained.

Raw128chars finite decimal/exponent parser; no clamping. Reject lifecycle,unresolveddraft,unavailablehistory,staleoldtoken atomically; staging invalidatesonly currentcandidate and retains accepted/history. Candidate/snapshot copies preserve signedzero and cannotmutateprivate authority. Subscribe notifications catchlistenererrors likeexisting sessions? exact behavior documented inimplementation. Nativecause retained throughCadEditorError NATIVE; exactOwnoptions/getter refusal. NativeinputSource256KiB/Model16/result12MiB/authored2MiB caps unchanged. History20states/64MiB UTF8ANDUTF16payload; evictoldestonlyafteradmittedcommit, count actualtextbytes. HistoryparseandOpengenuinecodec, no fabricated reconstruction. Downloadtokennativegenerationbound, commitinvalidatescapture.

ONE short real CPU/session/file flow with two disclosed variants ordinarysourceEditor/sourceCAD and actualpublicemittedEditor/sourceCAD (not CADemitted/GL). Genuine untouched1437authored8240B donor main-cut-y3.authored.json, recordedSHA b558f2f4bb29d97080032e74c1839e75558c3a04bd28c8966ecad5d5b0910a56. Initialoriginal→prepareApply→CPUcommit→Undooriginal→Redosplit; raw4onefourpoleedit→actual520/520 andonehistory; cut3Undo/cut4Redo/native noOp; snapshots/candidatereturnmutationprivateisolation; realnativecut0/8refusal/cause/rawretention; staleAstage/B oldaccept/cancel preserveB; invalidraw/truncatedOpen/getteroptions/lifecycle; canonicalfilewrite/freshprocessparse/newsession/editcut/secondfile andstaledownloadtoken. Explicit no browser/actualfilepicker/Canvas/pixels/Viewer/GL claim. AffectedEditorTSC/librarybuild, flowexit and publicconsumerDTS import; no repeatedprovider/nativecampaign or appbuildwithoutappchanges. Preserve firstfailure and exact finalhead/blob/parent/stage handoff. Native-stage readyhandoff only; do not close1446.

Before first build/flow, clarify session history accounting: 64MiB UTF8 bytes AND64MiB UTF16 payload bytes (2*text.length), not64Mi UTF16 codeunits. This only makes the frozen session memory budget stricter; native authored2MiB UTF8/UTF16codeunit cap unchanged. Exacthistory fieldsbytesUTF8/bytesUTF16. FirstSplit runtimeoriginal/split state is not serialized; originalSave refusesUNSUPPORTED. Productownershipfivepathsunchanged.

Native Solid session code stage completion; #1446 remains OPEN

Clean c93ede744525753b32a608e63ed20b25aedef394 -> bea542e71e4d2e38dc74f7f0f49e2742c94caf10, branch codex/cad-editor-split-session, reused owned managed checkout. Two commits/five frozen Editor paths; 1901 protected Editor/app/CAD/GPU/Viewer/Interop/shared paths unchanged. Before-code freeze6105275663/Wiki88d9cad and stricter actual history-byte clarification6105301482/Wikibf21f62 precede firstgate. Three helpers: disjointsession/types, flow, readonlyreview.

Actual public Native1437/adoptc361993b wholeauthoredcodec, one real four-Y wideSourceedit/validator, real conservedSplit/wholevalidator retained. Dedicated original/split runtimepresentation, private dualgeneration/token boundary, 20states/64MiB eachUTF8+UTF16payload history, native authored files. No native revision/Body cast/newkernel/Viewer callback or fabricatedGLapproval. FirstSplit CPUcommit->Undooriginal->Redotwo certifiedBodies; cut3->4 actual390+650->520+520 with original1040 conserved, Source/IDs/XZ/weights/knots/domain/siblings/parent/options retained. Native noOp doesnotgrowhistory.

FirstEditorTSC/librarybuild/publicemittedDTSconsumer exit0. Product source bytes committed unchanged; secondcommit repairs only flow Git inspection. FIRSTflow001 c82d38c9 failed gitENOBUFS before Native execution, preserved; scopednine-root tree and16MiB processoutput repair. ONE finalflow002 exit0, samecleanbea542e71e4d2e38dc74f7f0f49e2742c94caf10: sourceEditor/sourceCAD and actualpublicemittedEditor/sourceCAD eachfive actualstages/noEditorSourcefallback. Bothphysicalfilewrites/freshchildprocessOpen/cut5reedit/secondSave; Native650+390/1040, source cut4fileSHAf9607e0f355f73bbf60f0aed942d94926580e9d9553add8f915e32dc55c7fa6a. NativeCUT/endpoints and huge finite writerrefusal retainedcause/raw/source/history; actualA/B staleoldaccept/cancel retainsB; getter0; actualsnapshot/candidate mutationisolation, generationbounddownload/lifecycle/subscriber boundary. Postemitforeigncandidate guard is staticreview, not an executed reentrantprobe.

Preserved68Editor emittedfiles998042B with original maps, copiedbyte/hash andsecondreadallmatch. Current source/publiccompiled evidence consumes CAD SOURCE, not emittedCAD SDK. No app/React/Canvas changes or appbuild. No actualbrowser/downloadpicker/GL/Viewer/frame/selection/recovery/resource/Solidgeneralcut/commercialparity/publication claim. Complete native reconstruction is expensive; no interactive-latency acceptance follows from this aggregateflow. Native2MiB authored/12MiBresult/16Model/256KiBSource caps unchanged. Runtimeoriginal state is not in nativefile: originalSave UNSUPPORTED; genuineOpen alwayssplit. Original-only nativefile profile remains futurework.

Whole Editorflow remainsdependency-needed: qualified twelveFace/twoBody display andselection/commoncamera/depth/atomicreplace/rollback/Fit/lifetime via existingGPU1183+Viewerownercontract; preserveoriginal1183/1119 browserdenial. ActualGPU1455CPUexample is now adopted6b86e45e (two exactnativeexampleblobs checked), no GL promotion or examplehelper publicAPI invention. #1450 rawresultreader is separatefromnative authoredSave/Open. Degree4/5 documentdisplay depends on existingNative1440 samplerANDcurve-split degreeguard; no fakeFocus/strippedSourceworkaround. Ready native code stage can be adopted without waiting integratedRootUI, which remains separatelypending1254/674. No sharedroot/lock/policy edits, selfmerge/productpush/PR/npm/release or passedproviderreplay.

Immutable native stage handoff: evidence-cad-editor-split-session/handoff-1446-bea542e7.json SHA256 522d9b7db7d27f43dc950a4589b7a00a69a390c6efd943b2374881be1da4c16a. Final actual flow002 SHA256 0cbee9d6e01fca8c88bf7480f4f0148f52303d0173ffaf9df6a818914cdf89f9. Independent readonly receipt checks passed, with no additional execution.

Clone this wiki locally