Skip to content

Add Sculpt-style Slice editing and precise camera parity - #93

Merged
0xLeif merged 43 commits into
mainfrom
leif/viewer-draft-navigation
Oct 10, 2026
Merged

0xLeif merged 43 commits into
mainfrom
leif/viewer-draft-navigation

Conversation

@0xLeif

@0xLeif 0xLeif commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Switching files discarded drafts, and the cube camera stopped at the poles. Preserve each file and linked-entry draft, caret and selected plane. Search, packing, sharing and downloads use the current source; filtering, keyboard navigation and phone document reveal follow the active draft.

Add a Sculpt-style Slice workspace beside Edit, Preview and Cubes. Select a thumbnail, Draw/Erase/Fill with Sculpt’s palette and 1/3/5 brushes, move the selected cell with arrows, apply with Space or exact X/Y, zoom the grid and show the previous slice. Fast strokes have no gaps, a drag is one undo step, and undo/redo also covers source edits. The live 3D reference shares the existing WebGL canvas; Expand returns to Cubes with the same camera and slice.

Slice edits replace only targeted grid characters and preserve surrounding source, CRLF, labels, plane coordinates and other slices. Unsupported documents retain source editing with guidance. The edit profile is complete rectangular grids up to 64×64, 256 planes, 4000 occupied cells and 1.5 MiB source. History is bounded to 100 snapshots per draft and 8 MiB across the collection; rejected over-budget strokes roll back completely. Structural slice actions, resizing and browser 3D painting remain future work.

Match Sculpt and browser camera movement: full-turn orbit through the poles, screen-space pan, proportional zoom, Fit, colored X/Y/Z rotation rings, Free/axis-constrained dragging, degree nudges (default 15°) and pan nudges (default 0.25 cells). Native ASCII, scalar and live GPU projections and nearest picking use the same rotated basis. Camera-only changes retain geometry and document history. Shared asymmetric fixtures use independent expected rows and rotation matrices to verify native/browser editing, projection and picking.

Repair the blurry Cubes regression caused by freezing the shared canvas bitmap at its initial small size. In the actual in-app browser, a 368×322 bitmap stretched across a 1099×911 stage. The drawable now follows the pane size and display density, preserving the same WebGL context, program, geometry, source, camera and selection. Resize only changed dimensions, retain the proportional 2048-edge/2x bounds, and rearm the density media query for display changes without CSS resizing. Actual repaired bitmap and display both measured 1099×911.

Validation:

  • Blur repair: complete post-resize macOS Chromium/WebKit UI 230 passed. Final viewer suite including display-density listeners 130 passed. Final density media-query/window-resize regressions 4 passed. No skips or retries. Context/program identity, actual drawable size, zero losses/geometry uploads, pose/source/selection and existing projection/nearest picking passed.
  • Existing Slice/camera implementation 8e9a0c4: complete macOS UI 226 passed; Linux CI UI 218 passed with eight existing platform-snapshot skips; configured native selection 637 passed and final parity selection 11 passed. Shared fixtures compare actual native edits and browser gestures with independent expected rows and camera matrices. Native source is unchanged by the blur repair.
  • Root strict specs and Hi passed for the repair. Pinned Trust result and exact implementation head are recorded below. Remote checks for the newly published head are separately pending.

Actual screenshots, measurements, test logs and implementation digests: drawable repair evidence and Slice/camera evidence. The original user draft/history stays in its original browser tab; the corrected preview copied its current source.

Leif directly approved Slice/camera scope and verified closure. The narrow blur repair applies Leif’s standing direct request to improve browser quality and fix this PR; its approval/review records identify the executing agent:codex and do not claim a fresh human definition approval, Leif diff review, independent review or permitted signature. Actual unsigned Codex provenance remains separate from the unchanged strict permitted-signature/reviewer policy. Trust’s configured soft provenance policy remains intact. Leif retains merge authority.

Pinned Trust passed at blur implementation 95c1213886b853a7b945fd833a5af02fa0f8128d, with Augur review at risk 36 and progressive provenance degradation. Final archive head 78a94d05da1d21fdbf397cb976546e5d4cc67c2b has byte-identical HTML and browser tests; only synchronized specifications, verification evidence and lifecycle metadata follow the tested implementation. Final strict specs passed with zero warnings and complete configured coverage. This does not claim a second full Trust run on the archive head.

The blur repair passed supported scoped check/review/finalize and is archived with the previous approved Slice/camera changes. Its receipts identify agent:codex. Actual unsigned attestations for the blur implementation and archive head are published in the normal Attest notes ref; the unchanged strict permitted-signature/reviewer policy rejects them. Remote checks for this newly published head are pending.

0xLeif added 25 commits October 10, 2026 07:30
…-panel-and-toggle-them-like-github-files-stay-on-the-left-edit-shows-first-below
…l-and-toggle-them-like-github-files-stay-on-the-left-edit-shows-first-below verification
…ity-with-unrestricted-orbit-and-screen-space-pan
…ith-unrestricted-orbit-and-screen-space-pan verification
…-panel-and-toggle-them-like-github-files-stay-on-the-left-edit-shows-first-below
…l-and-toggle-them-like-github-files-stay-on-the-left-edit-shows-first-below verification
…ity-with-unrestricted-orbit-and-screen-space-pan
…ith-unrestricted-orbit-and-screen-space-pan verification
…-panel-and-toggle-them-like-github-files-stay-on-the-left-edit-shows-first-below
…l-and-toggle-them-like-github-files-stay-on-the-left-edit-shows-first-below verification
@0xLeif 0xLeif changed the title Fix: preserve viewer edits across file navigation Preserve viewer drafts and match Sculpt camera controls Oct 10, 2026
@0xLeif 0xLeif changed the title Preserve viewer drafts and match Sculpt camera controls Add Sculpt-style Slice editing and precise camera parity Oct 10, 2026
@0xLeif
0xLeif merged commit e1beb09 into main Oct 10, 2026
10 checks passed
@0xLeif
0xLeif deleted the leif/viewer-draft-navigation branch October 10, 2026 19:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant