Repository navigation
editor: adopt actions, the actions window and persistent keymaps - #4908
Conversation
|
Held by the commit-and-push overlap gate ( Those PRs already conflict with master alone in both files. This branch still adds conflict blocks of its own in Parked |
677fd95 to
c762735
Compare
Perf gateHead host slug: perf comparison: cc736b3 → 2f4e0e0-cibaseline: host calibration
thresholds: regress ≥ 10%, improve ≥ 5% voxel cull effectiveness
frame timing (ms)
GPU frame timing (ms; separate from stage samples)
GPU stage timing (avg ms per sampled invocation)
top CPU systems by avg ms (head)
|
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
191.271 → 190.968 (-0.2%) |
| RENDER | ComputeLightVolume |
32.541 → 30.966 (-4.8%) |
| RENDER | CanvasToFramebuffer |
15.320 → 15.257 (-0.4%) |
| RENDER | BakeSunShadowMap |
7.876 → 7.737 (-1.8%) |
| RENDER | ComputeSunShadow |
6.420 → 6.649 (+3.6%) |
| UPDATE | PropagateTransform |
3.863 → 3.847 (-0.4%) |
| RENDER | LightingToTrixel |
3.505 → 3.479 (-0.7%) |
| UPDATE | FogRevealEval |
3.191 → 3.229 (+1.2%) |
target=IRLuaPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
726.460 → 727.257 (+0.1%) |
| RENDER | ComputeLightVolume |
28.133 → 28.512 (+1.3%) |
| RENDER | ComputeSunShadow |
16.643 → 16.902 (+1.6%) |
| RENDER | CanvasToFramebuffer |
14.318 → 14.332 (+0.1%) |
| RENDER | LightingToTrixel |
6.759 → 6.931 (+2.5%) |
| RENDER | BakeSunShadowMap |
6.498 → 6.683 (+2.8%) |
| RENDER | ComputeVoxelAO |
5.987 → 5.872 (-1.9%) |
| UPDATE | PropagateTransform |
3.765 → 3.754 (-0.3%) |
target=IRPerfGrid,zoom=1,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
209.862 → 216.576 (+3.2%) |
| RENDER | ComputeSunShadow |
33.923 → 35.920 (+5.9%) |
| RENDER | ComputeLightVolume |
29.755 → 30.112 (+1.2%) |
| RENDER | LightingToTrixel |
19.508 → 19.815 (+1.6%) |
| RENDER | CanvasToFramebuffer |
15.191 → 15.242 (+0.3%) |
| RENDER | BakeSunShadowMap |
10.089 → 10.113 (+0.2%) |
| UPDATE | PropagateTransform |
5.249 → 5.322 (+1.4%) |
| RENDER | FogToTrixel |
4.581 → 4.631 (+1.1%) |
target=IRPerfGrid,zoom=4,sub_mode=full,sub_base=1
| pipeline | system | avg ms (base→head) |
|---|---|---|
| RENDER | SingleVoxelToCanvasFirst |
1005.008 → 1012.236 (+0.7%) |
| RENDER | ComputeLightVolume |
28.577 → 28.513 (-0.2%) |
| RENDER | CanvasToFramebuffer |
14.045 → 14.328 (+2.0%) |
| RENDER | ComputeSunShadow |
14.149 → 14.091 (-0.4%) |
| RENDER | BakeSunShadowMap |
6.710 → 6.983 (+4.1%) |
| RENDER | LightingToTrixel |
5.644 → 5.523 (-2.1%) |
| UPDATE | PropagateTransform |
5.189 → 5.269 (+1.5%) |
| RENDER | ComputeVoxelAO |
4.908 → 4.916 (+0.2%) |
|
Holding review: upstream PR #4903 is not yet approved. This stacked PR will be re-evaluated once the upstream lands an approval label. |
jakildev
left a comment
There was a problem hiding this comment.
Review — editor: integrate actions with tools and modal input
Verdict: needs-fix
Stacked on #4903 (approved, same author lane). Reviewing the child diff only — upstream is approved separately. The CI rollup is green on head c762735 (linux-build, format-check, header-checks, comment-refs, instruction-size, fleet-tests, perf-gate all SUCCESS). creations/editors/voxel_editor/CLAUDE.md is untouched by this PR.
The approach is sound. Every toolbar, workspace, Local Edit, Focus and Part Size control is registered once as an action and bound to its widget. Clicks, chords and scripted runs go through IRCommand::invokeAction. The modal guard hides and restores widgets and captures the keyboard. Run closes the window before invoking. One behaviour regression in the Part Size path is blocking.
Needs-fix
creations/editors/voxel_editor/main.cpp(registerEditorActions, therevealFieldlambda) — the lambda callsselectWorkspace(0)unconditionally, and every Part Size action (.focus,.increase,.decrease) runs it. A plain click on a stepper+/-now goes throughIntegerStepper::update→invokeIfClicked→ this action body. The panel is visible inWorkspace::ALL, which is the default (workspace_ = Workspace::ALL;updateWorkspacesshows every member when the workspace is ALL). So in the default workspace, clicking+on the part width flips the editor to SCULPT and runsfinishSculptStroke(),finishPartEdits(),hideSculptGhost()andshapesPanel_.setVisible(false). It also clearsg_loftTool.active_,g_bonePaint.active_andg_jointTool.active_, and stopsg_anim.playing_. Before this PR a stepper click only changed the number. The reveal is meant for the Actions-window Run path, where the panel may be hidden. Fix: reveal only when the target field is not already visible, for exampleif (!IRPrefab::Widget::isVisible(field)) selectWorkspace(0);, or skip it wheng_editor.workspace_isALLorSCULPT. Add a native assertion that a stepper click in ALL leaves the workspace unchanged. Theactions_workflowandactions_restartsessions don't cover it, and I couldn't confirm the existingpart_sizessession runs in ALL (ordinaryWorkspaceatmain.cpp~11449 decides that and doesn't listPART_SIZES).
Nits (follow-up)
creations/editors/voxel_editor/main.cppbindEditorActionWidgetspluseditor_shortcut_hints.hpp:46-48—draw()now overwritesentry.shortcut_from the widget'sC_WidgetHotkeywhenever one exists. Toolbar button 5 (editor.part.new_voxel, no default chord) is registered inEditorShortcutHintsas"ADD PART"(the existingadd(buttons_[5], "ADD PART"); theadddedupe keeps that entry).bindActiongives it an empty hint, so the badge for the existing ADD PART command key probably disappears. I haven't run the editor to confirm. If so, either give the action the same default chord or keep the command-name fallback when the hint is empty.creations/editors/voxel_editor/main.cppregisterEditorActionavailable_— the old toolbar shortcut also required the widgetvisible_ && !disabled_andi < buttons_.size().actionWidget(id)covers visible/enabled, but only when the window is closed, andisOpen()short-circuits it. Themodal_blocks_tool_keycheck covers the window case, so this is fine; just noting the invariant now lives in the keyboard-capture ordering ofEditorActionsGuard::capture.creations/editors/voxel_editor/editor_actions_guard.hpp— missing#include <vector>,<irreden/ir_command.hpp>and<irreden/ir_input.hpp>(it relies on transitive includes). Header-checks passes, so this is hygiene only.
Praise
ActionCheckKind::AUDITmakes the discoverability criterion executable (required_unbound=0) instead of a screenshot claim.- Keeping the
1–7toolbar shortcuts asdefaultChords_on the same actions preserves muscle memory while making them rebindable.
Acceptance (issue #4897)
The PR's evidence table maps each criterion to named checks (actions_workflow 25/25, actions_restart 7/7, focused 273-test suite). I did not re-run the native sessions; I'm relying on the author's results and green CI. The criteria that depend on the engine half are inherited from merged #4907. The needs-fix above is a regression outside what those sessions assert, so no criterion is marked unmet.
Escalation: author-agent to address, then re-request review.
🤖 Reviewed by Claude Sonnet (review-pr skill)
Opus recheck not required.
|
Addressed feedback:
Authored and amended with Codex. — worker |
jakildev
left a comment
There was a problem hiding this comment.
Re-review — editor: integrate actions with tools and modal input
Verdict: approve
Stacked on #4903 (approved, same author lane). Reviewing the child diff only — upstream is approved separately. Delta-scoped re-review: the only change since my needs-fix review on c762735 is f5daf7d32 ("preserve workspace on part size click"), on top of that head.
Previous needs-fix — resolved
main.cppregisterEditorActions,revealField: the lambda now capturesindexand callsselectWorkspace(0)only when!IRPrefab::Widget::isVisible(g_partDimensions[index].widgets()[1]).widgets()[1]ism_field, the number field, so the reveal fires only when the panel is actually hidden (the Actions-window Run path). A plain stepper+/-click inWorkspace::ALLno longer flips to SCULPT or runs the stroke/part/loft/bone/joint/animation teardown. The Actions-window close andactionsGuard_.prepare()still run unconditionally, as before.- Test coverage added, as I asked: the
part_sizessession gains anall_workspace_steppersegment that clicks the width+(partSizeStepPos(0, 1)) at session start, and apart_size_stepper_preserves_all_workspacepredicate assertsworkspace_ == 4(ALL) through the existingevaluateWorkspaceCheck. The predicate is attached tosegments_.front(), which is the new segment, the same attach pattern the workspace session already uses.Workspace::ALLis index 4 and is the editor's default (workspace_ = Workspace::ALL), so the segment starts in the state the regression needed.
CI on the new head: format-check, header-checks, comment-refs, instruction-size, whitespace, closes-lint and no-plan-files are green; linux-build and fleet-tests were still pending when I read it. I did not rebuild or re-run the native sessions on macOS; I'm relying on the author's results and CI for the new part_sizes segment.
Nits (follow-up)
- The three nits from my first pass still stand and ride the author's next PR on this surface: the
ADD PARTshortcut badge (bindEditorActionWidgets/editor_shortcut_hints.hpp) possibly dropping for toolbar button 5, theavailable_invariant now living inEditorActionsGuard::captureordering, and the missing<vector>/<irreden/ir_command.hpp>/<irreden/ir_input.hpp>includes ineditor_actions_guard.hpp.
Acceptance (issue #4897)
Unchanged from my first pass: the evidence table maps each criterion to named checks, with the engine half inherited from merged #4907. The fix is outside what those sessions assert and now has its own assertion. No criterion is unmet.
🤖 Reviewed by Claude Sonnet (review-pr skill)
Opus recheck not required.
The editor adopts its key commands into the action catalog and registers actions for the sculpt toolbar, workspace tabs, LOCAL EDIT, FOCUS and the PART SIZE fields (focus and one-cell steps); a click and a chord run the same operation and each control's Alt badge follows its resolved key. Shift+/ opens the Actions window, and the keymap persists under the user's preferences. actions_workflow searches by name and key, runs an unbound action, assigns a conflicting key with replace, and checks the key fires once with a matching badge; actions_restart relaunches against the same IR_PREFS_DIR. The session builder gains holdKey, releaseKey and expectAction, bound to Lua. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep the current toolbar, integer fields and dock layout while routing\ncontrols through persistent actions. Restore the editor before running\nan action and keep modal keyboard capture separate from text input.\n\nResolve replay coordinates against the live canvas and verify remapping,\nrestart persistence, modal isolation and camera reset. Publish generated\nscreenshot evidence on the media branch.
f5daf7d to
acfa0eb
Compare
The voxel editor now uses the shared Actions catalog for named commands, tool controls, workspaces, and part-size fields. Users can search, run, rebind, and persist actions, with the same resolved bindings shown in Option/Alt badges.
This follows #4903 and precedes #4918: #4903 → #4908 → #4918. The engine Actions/keymap foundation from #4907 is already merged; review this PR as the editor integration delta against #4903.
Changes
<preferences>/keymaps/voxel_editor.keymap. Scripted persistence tests use an explicit temporaryIR_PREFS_DIR. Add Lua session bindings for action assertions and held/released keys.Validation
fleet-build --target IRVoxelEditor IrredenEngineTest -- -j2passed.actions_workflow: 25/25 assertions, 15 shots.actions_restart: 7/7 assertions, 5 shots. Shared disposableIR_PREFS_DIR; zero layout findings and clean exits.The full follow-up comparison covers 75 native cases (1,524 assertions). All 73 pre-existing cases retain their verdicts and failure sets; this includes six failing baseline sessions, disclosed in #4918. Both new UI-occlusion controls behave as expected. Actions workflow/restart pass again at the combined head. Per-case comparison.
Acceptance evidence
ActionRegistry*,HeldAction*, capture and widget-hotkey testsKeymapStore*;actions_restartusing the preceding workflow's preferencesactions_workflow,actions_restart; modal Run and closure checksIRLuaWidgetsDemocoverage; Lua editor-session tests;controls_grouped_by_actionThe discoverability audit requires the toolbar, workspace tabs, Local Edit, Focus, and Part Size controls to be bound. Other controls are counted but are outside this adoption slice; labels and panel surfaces are exempt.
Screenshots
Open-PR overlap
The four editor PRs through #4903 are ancestors. #4918 is now reconciled directly above this branch in native stack #4870. Gate verdict: overlap, with clean trial merges and no blockers; earlier editor PRs are upstream.
Overlap rows for the dependent follow-up
Closes #4897