Skip to content

editor: add fill, color picking and dimensioned voxel shapes - #4895

Merged
jakildev merged 2 commits into
masterfrom
codex/editor-review-followups
Nov 10, 2026
Merged

jakildev merged 2 commits into
masterfrom
codex/editor-review-followups

Conversation

@jakildev

@jakildev jakildev commented Nov 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Sculpt now exposes Brush, Bucket, Picker, and Recolor. Bucket fills a closed empty outline on one local axis plane and rejects open boundaries before editing. It creates one undo record. Picker samples unlit voxel RGB and switches to Recolor, which changes occupied cells without adding geometry. Unsaved sampled colors remain available as the foreground color even when the palette is full; Add saves one as a swatch.

Shapes opens a dropdown for Cube, Sphere, Cone, Cylinder, and Pyramid, with length, width, and height fields in whole voxels from 1 to 64. Spawn creates a separate editable part in the active color and focuses it. Existing part creation handles Undo/Redo and persistence. Nonuniform dimensions stretch round primitives. Cell-solid intersection preserves the requested occupied bounds for even and thin extents.

Original implementation validation

  • 28 focused grid, palette, source-color sampling and primitive tests passed.

  • Native material_tools passed 12/12 at alternating 30° and 67°, with zero layout findings. The workflow checks open-outline rejection, Brush closing the outline, nine-cell fill, Undo/Redo, custom RGB picking, recolor and empty-floor no-op using every authored cell's actual color and occupancy.

  • Native shapes_workflow passed 9/9 with zero layout findings. Typed dimensions, all five shapes, nonuniform Cube, thin Sphere, selected editable part, colors, and Undo/Redo matched exact counts and occupied bounds.

  • Native palette_workflow passed 8/8 with zero layout findings, including GPL round trips and color persistence.

  • Native region_tools passed 25/25 and camera_gestures passed 44/44, both with zero layout findings. Header, comment-reference, and whitespace checks passed.

  • Built IRVoxelEditor in the isolated macOS worktree.

Screenshots

Shapes Bucket fill Picked color
Shapes Bucket fill Sampled color

Limits

Picker supports dense and transformed GRID voxels. Detached/private-canvas and skinned sources need Local Edit before sampling. Bucket deliberately confines edits to the chosen enclosure instead of applying symmetry copies.

Stack validation — 2026-11-06

Replayed the owned editor commits onto merged master f7b1dbfa2, preserving the four-PR chain. Range-diff inspection found no lost runtime hunks. Moved detailed validation/session contracts into docs/design/editor-validation.md to fix instruction-size CI. Corrected the newly inherited document-transition fixture's stale File/Discard click centers and made composite Save As repeatable.

Validated the combined stack at 683a6017c8a7be6964c5872282cba5d982c839a3 on macOS/Metal:

  • IRVoxelEditor and IrredenEngineTest builds pass.
  • 273 focused editor, camera, input, command, keymap and Lua tests pass.
  • 265 native assertions pass across viewport_scroll (15), material_tools (12), shapes_workflow (22), region_tools (35), workspace_controls (19), workspace_restore (2), camera_gestures (44), screen_alignment (70), document_workflow (28), motion_preview (11), and test_dock_rails (7); zero layout findings and clean shutdowns.
  • Independent PNG alignment grading passes all seven poses, including 30 and 67 degrees: no preview leakage through solids, no grid over solid interiors, exact floor-to-cell silhouettes. Its 18 unit controls pass.
  • Header conventions, instruction-size, comment references, changed fixture formatting and whitespace pass.

Follow-up integration — 2026-11-07

The two parked follow-ups are reconciled in dependency order: #4903 → #4908 → #4918. #4908 maps Actions to the current tools and integer fields, isolates modal input, and keeps remapped badges synchronized. #4918 preserves the Shapes/dock UI gate and diagnoses replay clicks swallowed by UI.

Current evidence: 273 focused unit tests pass. The combined native registry covers 75 cases and 1,524 assertions; all 73 pre-existing case verdicts and failure sets are unchanged, and both new click-occlusion controls behave as expected. Six baseline failures remain: fill_ghost, click_orbit, mode_preview, component_field_key (layout findings), text_input_command_capture, and test_recipe_reapply. These are disclosed with exact results in #4918; this is not an all-green editor suite. Per-case comparison. The overlap gate is overlap with clean trial merges and no blockers. This PR is ready for review in stack order; no merge or fleet approval is claimed.

Overlap gate

fleet-pr-overlap --self-pr 4895: VERDICT: overlap (exit 1). All shared-path trial merges are clean; no blocking or base-conflict rows.

Upstream rows: #4893 (4 paths).

#4896, #4903, #4908, #4918: identical clean grades on 15 shared paths

The gate reports the following rows for #4896; the same paths are graded clean for #4903, #4908, #4918.

#4896 creations/editors/voxel_editor/CLAUDE.md clean
#4896 creations/editors/voxel_editor/editor_picking.hpp clean
#4896 creations/editors/voxel_editor/main.cpp clean
#4896 creations/editors/voxel_editor/material_tools_workflow.hpp clean
#4896 creations/editors/voxel_editor/palette_model.hpp clean
#4896 creations/editors/voxel_editor/palette_panel.hpp clean
#4896 creations/editors/voxel_editor/primitive_shapes.hpp clean
#4896 creations/editors/voxel_editor/sculpt_grid.hpp clean
#4896 creations/editors/voxel_editor/sculpt_panel.hpp clean
#4896 creations/editors/voxel_editor/sessions.hpp clean
#4896 creations/editors/voxel_editor/shapes_panel.hpp clean
#4896 creations/editors/voxel_editor/shapes_workflow.hpp clean
#4896 docs/design/editor-validation.md clean
#4896 test/render/voxel_editor_palette_test.cpp clean
#4896 test/render/voxel_editor_sculpt_grid_test.cpp clean

@jakildev

jakildev commented Nov 6, 2026

Copy link
Copy Markdown
Owner Author

Rebased onto the rewritten parent: the stack below was replayed onto master after #4882 merged, so this layer's owned commits (editor: add enclosed fill, color picking and dimensioned voxel shapes) were replayed with git rebase --onto <new parent head> <old parent head>; the inherited pre-rework commits are gone and the diff against the parent is the original PR-owned scope. The rebase applied cleanly. Evidence moved off the branch to media commit 3c1070896bfe64ca1eb0d687367694a3328f7915 and the body's image links repointed, so the no-plan-files check passes. The reviewer hold stays until the upstream is approved. — opus-architect

@jakildev
jakildev force-pushed the codex/editor-review-followups branch from ecf26c0 to b466f11 Compare November 6, 2026 17:40
@jakildev
jakildev force-pushed the codex/editor-review-followups branch from b466f11 to 8ff746c Compare November 6, 2026 17:51
@jakildev jakildev removed the fleet:wip Work in progress — not ready for review label Nov 7, 2026
@jakildev
jakildev marked this pull request as ready for review November 7, 2026 19:05
@jakildev jakildev added the fleet:awaiting-upstream-review Stacked PR; reviewer is holding verdict until upstream PR is approved label Nov 8, 2026
@jakildev

jakildev commented Nov 8, 2026

Copy link
Copy Markdown
Owner Author

Holding review: upstream PR #4893 is not yet approved. This stacked PR will be re-evaluated once the upstream lands an approval label.

@jakildev jakildev removed the fleet:awaiting-upstream-review Stacked PR; reviewer is holding verdict until upstream PR is approved label Nov 8, 2026

@jakildev jakildev left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review — editor: add fill, color picking and dimensioned voxel shapes

Verdict: approve

Stacked on #4893 (cross-author). Reviewing the child diff only — upstream is approved separately. Approval assumes #4893 lands first; the new toolbar code depends on kSculptButtons / sculptButtonPos indexing and the picking helpers in editor_picking.hpp, so a change to those upstream between approval and merge needs a rebase here.

Big picture: the change does what the title and body say, and the approach is sound. Bucket is a pure enclosedPlaneCells helper that collects the region before any edit, so an open outline can never leave a partial fill. It commits through the existing applyEditRaw + commitStroke path, so Undo/Redo is one record. Picker returns a transient kSampled (-1) foreground that never touches the saved swatches. Shapes reuses addVoxelPart + commitPartCreation, so Undo/Redo and persistence come for free.

Checks on head 8ff746c33: every statusCheckRollup entry is SUCCESS or SKIPPED (comment-refs, linux-build, format-check, header-checks, instruction-size, no-plan-files, closes-lint, whitespace, fleet-tests). The swap-approval-label SKIPPED entries are the expected labeler no-op.

What I verified in the tree:

  • activeSwatchIdx_ == -1 is safe at every consumer. palette_.color() handles kSampled. The class-paint paths at main.cpp:4170-4194 and the status label guard >= 0. EditorPalette::edit(-1, …) returns false, and Edit is also disabled for the sampled selection. Add parses the hex field, which refresh fills from the sampled color, so Add persists it.
  • enclosedPlaneCells: the straight-ray prefilter only ever probes cells that are in-bounds, because it stops at the first occupied or edge cell. The BFS never steps out of bounds because only non-edge cells are enqueued. Diagonal contact does not leak (covered by a test), and a hidden-layer cell counts as a wall and skips that candidate.
  • Toolbar remap: kSculptButtons indices 0–8 keep their old gesture IDs, so existing sessions are unaffected. New IDs are 9 (Bucket), 10 (Picker), 11 (Shapes). The i < 5 tool branch maps exactly onto the table's tool_ entries.
  • updateSculptToolbar() now runs ahead of the loft early return, so clicking a tool exits loft mode. This is intentional and g_loftTool.active_ = false is set in the tool branch.
  • The shapes panel's widgets are exempt from the workspace visibility sweep and are closed on workspace change. containsCursor is part of overWidget, so clicks on the panel do not reach the scene.
  • No comment carries an issue or PR number, and no glm::/std:: math is added outside the allowed set.

Evidence caveat (not blocking): the native workflows were run on macOS/Metal only. The PR body discloses the six baseline editor failures it did not introduce, so the editor suite is not all-green. Windows and Linux render smoke is outside this review.

Nits (follow-up)

  • creations/editors/voxel_editor/sculpt_panel.hpp:1119 — the Shapes button position {1072, 60} is a magic literal separate from kSculptToolbarPos / stride. A named constant would keep the layout checks readable when the toolbar is next touched.
  • creations/editors/voxel_editor/editor_picking.hpp:9 — the new include is out of the existing irreden/render/... ordering, and std::span is used without <span>. It builds today through a transitive include; add <span> while here.
  • creations/editors/voxel_editor/editor_picking.hpp:119-145 — the pooled (non-dense) path runs castGridRay once per active voxel of every such set on each Picker click. Fine for click-rate use, but a scene with a large rotated set will hitch on the click. A bounding-box early-out per set would bound it.

Praise

  • The Bucket helper's linear straight-ray prefilter rejects blank candidate slices without allocating a plane-sized visit map. EmptyFillSliceRejectsWithALinearProbe pins the 129-probe bound.
  • Cell/solid closed intersection with a boundary epsilon keeps the requested occupied bounds for thin and even extents, and the 7³ counts are pinned in both the unit test and the native workflow.

Test plan the author should run before merge

  • Re-run material_tools and shapes_workflow on the merge result after #4893 lands.
  • Windows/Linux GL editor smoke is covered by the existing fleet:needs-*-smoke lanes.

Escalation: none. Safe for merge.

🤖 Reviewed by Claude Sonnet 5.5 (review-pr skill)

Opus recheck not required.

@jakildev jakildev added fleet:approved Fleet reviewer approved — ready for human merge and removed fleet:reviewing-mac-pool-1 labels Nov 8, 2026
Base automatically changed from codex/editor-plane-navigation to master November 10, 2026 05:56
jakildev and others added 2 commits November 9, 2026 21:56
The evidence directories now live at media commit 3c10708; master keeps no
committed PR screenshots.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@jakildev
jakildev force-pushed the codex/editor-review-followups branch from 8ff746c to b8a4c94 Compare November 10, 2026 05:56
@jakildev
jakildev merged commit f983e54 into master Nov 10, 2026
11 checks passed
@evin-mac-claude-app evin-mac-claude-app Bot added the fleet:needs-human Fleet can't complete autonomously; human must act. Keeps human:approved. Clears when human resolves. label Nov 10, 2026
@evin-mac-claude-app

Copy link
Copy Markdown
Contributor

Orphaned from merged PR #4893, but its rewritten history has no safe boundary off master. No branch mutation was made. Repair manually with git rebase --onto origin/master 176ac21, push, then gh pr edit --base master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fleet:approved Fleet reviewer approved — ready for human merge fleet:author-codex Implementation last authored by Codex; route review to Claude fleet:authored-on-macos PR was authored and smoke-tested on macOS Metal backend fleet:needs-human Fleet can't complete autonomously; human must act. Keeps human:approved. Clears when human resolves.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant