Viewer Qualified Face Display Fit - barocss/barocss GitHub Wiki

Current1189 actual code adoption — integrated validation pending

Exact native1174→1189 delta adopted once at 9ffa2208d6bd3a9fea80668b0c58901d6b003249. Read-only verified all SIX native child blobs and matching existing bases; new helper is a new path. No parent/provider replay. Current observed sharedHEAD1220a073 retains fit branch/public code and inherited dirty render package/kiosk recordings. SoleIntegration notice and actual Git object independently verified; own audit evidence-1189-viewer/native/adopted-1189.json, Root record merge-first-20261010/1189/merge.json.

Status merged / code available / current integrated build-runtime-UI checks UNRUN pending in674. Issue1189 remains OPEN. Native6095138925 stays bound to own29591a76/provider hashes; not Root validation/release. Whole sampled F32display bounds semantics and pending URL policy unchanged. Prior1080Mixed→FaceBuffer3 anomaly remains separate/unconfirmed. NEXT1195 remains PLANNED/contract preparation; unrun integrated UI alone is not a downstream code gate under674/6085589830. No author proof replay or task reply.

#1189 NATIVE COMPLETE — whole qualified Face display fit; own bounded actual proof

Clean native29591a76393a19d7155715090e73f98a62d52eb4 from immutable1174 1a6c29f87298cf23b084206a318fb258bfff056f, branch codex/issue-1189-qualified-face-fit, own checkout /Users/user/.codex/worktrees/viewer-object-tree-935/barocss. Exact SIX owned paths56insertions/8deletions: new internal qualified-face-fit.ts, narrow index, packageREADME and existing Face app/HTML/README. BEFORECODE6095059674/Wiki ce38885 preceded code. Git/GitHub easylogic/[email protected] verified. No provider/root/config/manifest/fixture edits, native push/PR/publication. Separate serial adoption required; Issue stays OPEN.

Existing fit():void now admits current qualified Face mode. Validate complete current Source0/Model0/allfiveobjects/forwardFaces, tessellate original Surfaces and prepare actualF32positions via public APIs, union ALL drawn assets including offscreen. NativeMMscale THEN SceneTranslate once. Existing cameraForBounds/setView unchanged: centreTarget, [1,1,1] direction,45°FOV,.01radiusfloor,1.3padding/current backingaspect/checked wholeScene structured update. No new public DTO/state. Sampled filled display bounds are not native control hulls, unshown Curve/native extrema/BRep/Solid/union bounds. Individual fitGeometry and old primitive operations still refuse. Candidate presentation precedes camera/Scene CPU commit; camera-only fit neither advances content generation nor aborts held URL. Failed camera prep/recoverable GPU failures retain authority; failed recovery sticky unavailable/no pixelrollback promise. Loss/stickyRestore/Dispose refuses GPUfit while original CPU queries retain.

FIRST affected Node22 Viewer build0/originalconfigs and examplesyntax/diff/clientbundles0. Actual ordinarypublicsource215ownsrc/0owndist and ALL actualtransitivepublishConfigcompiled0ownsrc/176owndist. Current emitted provider entries/types fingerprinted, no newproviderbuild claim. Consumed own1072/1059 baseline; not later1102/1103/1107consumerguard acceptance. Original nine fixtures unchanged.

FIRST source actualHTTPChromiumWebGL2 main+boundaries passed without repair. Original2/6 Faces at640x480 and360x640, independent currentF32positionmin-max/camera formula and preparedF32clip containment of ALL578/1734vertices. Maximum observed absoluteNDC across cases .8384844979029512, not native/raster accuracy certificate. All fullsource/Model/IDs/counts/color/translate unchanged. Eight actual native point/area/length/angle/Curvecurvature/Surfacecurvature/tangent/normal reports retained byte-for-byte through camera framing; native label reprojection. Second legal.03scale+translate on SAMEcanvas after firstDispose gives independent expected bounds/clip containment; not an extra context. Genuine private whole five-object Source0 with Surface interior/boundary and matching boundaryCurve poles1000mm, validated forwardFace, actually admitted coarse2x2 display: controlScene maximum119.3 while fittedtargetZ<1; fullsources preserved. It proves sampled display bounds exclude native control/unshown Curve hull, not global native extrema.

Actual valid admitted Scene at translateX998.6 has legal explicitcamera, but calculated fit eye exceeds1000; camera prep refuses with CPU/pixels/resources each unchanged. One actual fit blit observed old Viewer CPU until backend return then commit. ConsumedBuffer3 fit failure returns original QualifiedFaceSceneError GPU “Cannot allocate qualified Face buffers”; CPU/pixels/resources separately all retained. Held real HTTP native URL remains pending throughfit then wins afterrelease; nocamera-onlyabort. Empty/wrongmode/Dispose/hostenabled guards passed. Normalonecontext GL0/sevenownedresourceclasses0.

Compiled physical Frame/currentrow/native-report/camera/CSS/aspect/two-six/ClearDispose acceptance passed in final bounded compact recording. FIRST physical script wrongly accessed record.ref rather than actual record.pick.ref and stopped with TypeError; preserve first script/result. Corrected recording attempt then exceeded existing /result4MiB limit (413), so that attempt's complete result was not saved; do not infer its final proof from the missing record. Compact receipt driver repeated bounded physical controls with report hashes and saved success. This is TEST/RECORDING correction only; NO product/core/host repair. Final actual physical Fclick→currentDOMrow, Frame→rowinvalid/currentstatus, allEIGHT native report hashes preserved, Turn/Pan→Frame deterministiccamera, actualCSS320x240observerdraw unchanged andbackingcameraunchanged, portrait camera differs, physical2/6 Frame, Clear disables/Dispose resources0. Screenshot visually checked; native labels shown as approximate/noocclusion, no screenshot nativeaccuracy certificate.

FIRST source AND compiled actualloss→callerrestore preserve wholeCPUFace/camera/copies/normalD1query; fit stickyrefuses/actiondisabled/projectionlabelhidden; Dispose clearsauthority. Separate TWO actual fit presentation blit failures yield structured QualifiedFaceSceneError CONTEXT, AggregateError with original GPU failure1 and recovery Error failure2; statusunavailable/actualContextLostfalse/oldCPUcamera retained/fitrefuses/normalCPUretained/unavailableDispose7zero. No pixelrollback or lost explicitdelete0 claim. TWO actualCLI consoles totalmessages/errors/warnings0. All2 ownbrowsers/all2 serverexecutions CLOSED. No broadcampaignreplay/FPS/GPUtime/globalregularity/editorSaveOpen/history/release.

Evidence /Users/user/.barocss-ai/v3/evidence-1189-viewer/native/: core-build-first.log, main-first-passed.json, boundaries-first-passed.json, physical-first-failed.json, recording413log, physical-compact-passed.json, source-loss-passed.json, compiled-loss-passed.json, unavailable-passed.json, original drivers/logs, publicsource/alltransitivecompiled audits/clientbytes/fixturemanifest/emittedfingerprints/actualconsoles/screenshot/final-evidence-audit/cli-artifacts. No productrepair; docs only later corrected old combinedfit wording. Prior1080 FIRST Mixed→FaceBuffer3 anomaly STILLUNCONFIRMED; independent exact Integration component+original/recoveryerror follow-up unchanged. SoleIntegration and inherited render/kiosk/rootWIP preserved; no taskreply/completion messages. Native/ownactual/codeavailability/laterchecks/release separate.

Native receipt https://github.com/barocss/barocss/issues/1189#issuecomment-6095138925

BEFORECODE contract and original preparation

#1189 BEFORECODE frozen contract — whole qualified Face display fit

Stage CONTRACT FROZEN before implementation. Parent immutable1174 1a6c29f87298cf23b084206a318fb258bfff056f; independent child branch codex/issue-1189-qualified-face-fit. Actual required1174 adoption ae42ad7871c7d4d6dc04ea70bb2836891a32da72 and publicGPU1072 current code verified; latest shared3cf97bb7 retains inherited render/kiosk WIP. Later integrated validation remains pending; no closure/publication.

Exact API and current display authority

Extend existing Viewer.fit():void in qualified Face mode. No new public DTO/API/state field or standalone selection fit. New INTERNAL qualifiedFaceDisplayBounds(scene) in src/qualified-face-fit.ts returns {min,max} XYZ Scene triples. Validate owned current complete QualifiedFaceSceneV0 via PUBLIC prepareQualifiedFaceScene; for EVERY admitted2..6 asset find original Face Surface, PUBLIC tessellateSurface(countU,countV,revision0), PUBLIC prepareMesh(camera,mmToSceneUnit,translate,background,color). Union actual returned Float32 positions, not packet.bounds/native control hulls/unshown Curves/private buffers. NativeMM*scale THEN translate Scene once. All grid vertices are part of filled triangles. Public counts2..17: at most1734 vertices/3072 triangles; reconstruction cost not latency certificate. No new provider API/profile/fixture.

Exact existing camera policy

Reuse unchanged cameraForBounds(low,high,backingWidth,backingHeight). target[i]=(low[i]+high[i])/2; radius=max(.01,hypot(high-target)); h=45pi/360; distance=radius1.3/sin(atan(tan(h)min(1,width/height))). Require distance+2radius<10000. eye=target+unit([1,1,1])distance, up=[0,1,0], FOV45, near=max(.0001,distance-2radius), far=distance+2*radius. Existing PUBLIC validateMeshCamera enforces finite eye/target±1000, separation>=1e-4, finite up norm>=1e-6/FOV10..100/near>=1e-4/far<=10000 and existing F32 camera conditioning/clip/axes guards. Actual backing aspect is also validated by complete scene update. No extra clamp/epsilon/fallback; current admitted geometry may yield an illegal fit camera and then refuse. Degenerate display radius uses existing .01 floor, not a native geometry assertion. Bounds are sampled filled display bounds; not Surface extrema, native/BRep/Solid/union/centre-of-mass/global accuracy.

Atomic state and lifecycle

GPU-live guard first; derive entire candidate without CPU writes; checked setView(camera) prepares complete source-owned Face scene then public renderer.updateScene structured result before committing qualifiedFaceScene/camera. No publicrender/privateTarget. Fit changes ONLY accepted camera/embeddedscene camera; source bytes/Models/IDs/colors/counts/translate/native eight CPU reports remain. No requestGeneration advance or URL abort: setView has neither. Failed validation preserves prior CPU camera/source/pixels/resources/current screen row; recoverable GPU failure retains accepted CPU/old presentation; failed public recovery marks sticky unavailable with CPU authority retained, no pixel rollback promise or actual context-loss assertion. Loss/unavailable/sticky restored/Dispose refuses fit; CPU metrics retain their own scope. fitGeometry/selection/visibility/motion/material/layers remain unsupported; other old fit branches unchanged.

Host #frame-all-faces “Frame all Faces” calls frameAllFaces()→changeView(()=>viewer.fit()); status only after success. Available current Face only; success invalidates screen row and reprojects native labels, failed recoverable call retains row/reports. CPU actions are independent. Clear/mode/loss/unavailable/Dispose disables action. Existing proof's obsolete whole-fit refusal replaced with individual fitGeometry refusal. No SDK generation/history certificate.

Exact ownership and own actual acceptance

Core helper owns NEW packages/barocss-viewer/src/qualified-face-fit.ts and narrow index.ts only. Host owns existing examples/viewer-qualified-face-scene/app.js/index.html only. Root owns package README/exampleREADME and final diff/build/actual. Six exact paths; no provider/root/config/manifest/fixtures. Helpers not alone; preserve others.

FIRST affected Node22 Viewer build/originalconfigs; source publicTS vs ALL actualtransitivepublishConfig compiled0ownsrc. Actual HTTPChromiumWebGL2 original2/6 sources/nonunit.12 and.03+translate/landscape-portrait; independent min/max and preparedF32camera clip containment ALL displayed vertices, source/native MM unchanged; genuine complete authored coarse curved Face distinguishes sampled display from control hull/unshown Curve. Physical Frame/current row invalidation/eight reports retained/projected labels/view-resize. Actual admitted near-bound geometry whose fittedeye exceeds1000 refuses priorstate-pixels-resources. Consumed allocation failure records original/recovery errors and CPU/pixels/resources separately; persistent failed recovery truthful unavailable. Held HTTP URL remains winner through camera-only fit. Source and compiled real loss→callerrestore stickyFit refusal/CPUretain/Dispose. Normalonecontext GL0 sevenownedresourceclasses0 actualCLI messages-errors-warnings0. Preserve first scripts/results/failures; close own sessions/servers. No FPS/GPUtime/wholeEditorSaveOpen/history/release. Prior1080 Mixed→Face Buffer3 anomaly remains unconfirmed and separate.

Original preparation

#1189

Viewer roadmap — frame all current qualified Face display triangles

Stage PLANNED / CONTRACT PREPARATION only. No final API/math/owned paths frozen, implementation or Viewer fit proof yet.

Actual requirement and duplicate boundary

CAD529 UI-02 requires an explicit frame action. Current1080 source-qualified2..6 Face scenes admit an explicit camera, orbit/pan/zoom and resize, but fit() and fitGeometry() intentionally refuse this mode. Users can identify a current source through1174 screen inspection but cannot frame the whole displayed independent Face scene. This is a bounded whole-display framing requirement; it does not add a selection target, visibility/motion controls or complete the parent epic.

Focused all-state Viewer Face fit/frame searches and Viewer Wiki/source audit found no matching card.737 primitive Surface/Curve,906/912 native document bounds and987 document body-set UI have different current authorities/capacities. Reuse their established camera conventions where suitable, not their primitive/document source wrappers or four-body limits.

Ready public source and display authority

Actual adoptedGPU1072/1080 current public source-owned QualifiedFaceSceneV0, prepareQualifiedFaceScene/tessellateSurface/prepareMesh and existing internal cameraForBounds/checked setView→publicupdateScene are sufficient. No new GPU bounds getter/renderer/provider API/private target access. Current author can continue from immutable1174native1a6c29f87298cf23b084206a318fb258bfff056f; this is retained author work, not external SDK publication. Verify exact code/export/build state at final freeze; unrun integrated UI alone is not an entry gate after actual required code exists under674/6085589830.

Validate/reconstruct all complete current original Source0/forward Faces. Use actual returned Float32 Scene positions after native mm scale THEN Scene translation once. Union the current filled display vertices, including assets outside the current camera. Do not use original control-point hulls, native packet.bounds, GPU private buffers or original unshown Curve geometry. Original five-object Models/sourceIds/Face/Surface IDs and CPU geometry remain unchanged. Bounds are of the sampled display triangles, not a native Surface extremum/BRep/Solid/union/centre-of-mass certificate.

Contract choices that must freeze BEFORE code

Prefer extending the existing whole-view fit() action, with a host Frame all Faces button. Final method/helper names/signatures, derivation/currentpins/copied-state/query epoch, precise camera algorithm/representability/degenerate bounds/numeric limits must freeze. Individual fitGeometry/selection/visibility/motion stay explicitly unsupported unless separately required. Whole view includes all currently admitted2..6 drawn assets; no30-object source union/fake primitive refs/history certificate.

Existing candidate camera convention is target at bounds centre, direction[1,1,1], FOV45°, radius floor.01sceneunits, padding1.3 and actual backing aspect. Recheck every formula and bound in current code before freezing. A currently admitted GPU scene does not guarantee that automatic fit produces a legal finite camera: eye/target limits, far limit or preparedF32camera constraints can refuse. No epsilon clipping/clamped fake success. Build a complete qualified candidate and use checked setView/updateScene; camera/state commit only after success. Failed camera preparation leaves prior camera/source/current screen inspection. Failed GPU recovery follows existing truthful unavailable policy, preserving CPU authority without a pixel rollback guarantee. No publicrender assumption.

Successful fit changes camera only; native points/parameters/curvature/angles/area/length/copied originals remain independent of display fit. Screen inspection invalidates because its view changed; native label projections update. Fit must not fabricate source revisions or advance content generations/abort held URL requests merely as a camera action. Freeze that behavior against actual current setView code. Loss/unavailable/stickyrestored/Dispose refuse a GPU framing action; retained CPU measurements stay available.

Proposed owned files and actual acceptance

Narrow Viewer internal Face bounds/helper/index/packageREADME plus existing Face app/HTML/exampleREADME; choose exact ownership before code, disjoint helper+API/host/rootfinalactual. No CAD/GPU/interop/provider/root/manifest/config/fixture edits. Reuse current camera and structured renderer APIs; no unrelated refactor.

Actual original2/6 independent source-qualified assets/full Source0/duplicate localIDs/native MM unchanged, nonunit scale and Scene translation once; before/after camera/pixels/current fullsource pins. Independent actualpreparedF32camera clip containment for every display vertex across landscape/portrait backing, real physical Frame action/current inspect-row invalidation and eight native reports retained/reprojected. A genuinely authored admitted coarse-grid curved Surface/Curve control verifies display-only bounds, not a fabricated packet or native bbox certificate. Camera-bound preparation refusal and consumed lateallocation/failedrecovery retain oldCPU/truthful status with actual error/component evidence. Camera-only URL/generation policy, resize, source changes, old-mode refusal, loss/unavailable/Dispose. Source-default publicTS consumer and ALL actualtransitivepublishConfig compiled0ownsrc, original configs; affected build/own actualonecontextGL0sevenresources0actualconsole0, closeownprocesses and preservefirstfailures. NoFPS/GPUtime/globalaccuracy/editorSaveOpen/history/release.

Prior1080 FIRST Mixed→FaceBuffer3 retention anomaly remains UNCONFIRMED; independent exact Integration CPU/pixels/resources and original/recovery-error follow-up is not resolved by this framing feature.1001/1005/1041 true provider/model gates remain; no POINTS/cloth substitute. Planner receives ONLY this newly created title/number/link notice. No approval/assignment/completion/task replies.