Skip to content

Repeat Last Command in the command palette, with a key you can change (#7077) - #7353

Merged
bherbruck merged 4 commits into
tangency-labs:mainfrom
semmelrinde:feat/repeat-last-command
Oct 27, 2026
Merged

bherbruck merged 4 commits into
tangency-labs:mainfrom
semmelrinde:feat/repeat-last-command

Conversation

@semmelrinde

@semmelrinde semmelrinde commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #7077

Change

SolidCraft can already start the last tool or dialog again: Shift+R, or Repeat in the canvas and radial menus (#3045). It starts the tool with its defaults, the way a toolbar click does. It does not replay the last values. But Shift+R was a key the app kept for itself (keymap::RESERVED), handled in toolbar::shortcuts, and not a command. So command search could not find it, Keyboard Shortcuts did not list it, and nobody could give it another key.

Now it is a command, as "Everything is a command" asks:

  • edit.repeat "Repeat Last Command" in crates/engine/src/cmd/edit.rs. Its default key is Shift+R, which is the same key as before. It has no toolbar place, so its key works everywhere, in a sketch and in the model. It has a contract and an output type (crates/engine/src/schema/edit.rs). A call through engine.execute is refused with a clear message and changes nothing. Only the app has a tool to start, and programmatic calls never open dialogs.
  • SolveApp::start (in start_with_variant_memory) catches edit.repeat and calls repeat_last. Repeat itself is never recorded as the last command. With nothing started yet, the status line says "Nothing to repeat yet".
  • Shift+R left RESERVED, and the hard-coded Key::R branch left toolbar::shortcuts. The key now goes through keymap::press like every other command key. So it follows the same rules: nothing happens while a text field takes the keyboard, while a popup is open, or while a Report a bug draft is open. While a feature dialog is open, it starts the last tool the way other tool keys do.
  • The Repeat items in the canvas and radial menus show the key that is set now (keymap::display_for), not a fixed "Shift+R".
  • New strings are in assets/locales/pending/repeat-last-command.json (en, ar, de, he, ja, ko, zh). ar and he are complete catalogs on main now (docs: a new label needs Arabic and Hebrew too (#3457) #3458); with right-to-left pending strings, pending_messages_are_in_the_catalogs fails on current main until i18n test: compare pending right-to-left messages in display order (#7527) #7532 fixes it (i18n test: pending Arabic and Hebrew messages fail pending_messages_are_in_the_catalogs #7527).

The issue asks for the space bar. I didn't use it. That key is another product's binding, and Shift+R has been SolidCraft's Repeat key since #3045. Anyone who wants a different key can now set it in Keyboard Shortcuts.

Changes a default: no

Validation

  • cmd::edit::tests::repeat_is_refused_outside_the_app_and_changes_nothing (engine): edit.repeat is registered with Shift+R, no tab and no undo step. Through the engine it is refused, and the design and undo history stay as they were.
  • schema::edit::tests::schemas_and_the_key_check_agree (engine): the contract takes no keys and refuses unknown ones.
  • keymap::tests::repeat_last_command_is_a_command_with_a_key_that_can_change (UI), which checks these cases:
    • Shift+R is Repeat's default, and no other default uses it.
    • Another command takes Shift+R only on request.
    • With nothing started yet, Repeat says so.
    • After Box was started and cancelled, Repeat can get Alt+Shift+R. Then Shift+R does nothing, Alt+Shift+R opens Box again, and the radial menu shows the new key.
    • Command search finds "repeat last". Choosing it opens Box again, and the last command stays Box.
    • Shift+R typed into the command search field doesn't repeat.
  • keymap::tests::shift_r_repeats_the_last_tool (Latest command repeat #3045) still passes. Only its last assert changed: Shift+R is now a command's key, not a reserved one.
  • Fails without the change: I put the base commit's sources back while keeping the new tests. The engine test fails with "unknown command edit.repeat". The UI test fails at its first assert, because Repeat has no command key.
  • cargo test -p solidcraft-engine --lib and cargo test -p solidcraft-ui-egui --lib: engine 2502 passed, UI 2705 passed. The only failures (3 in the engine, 13 in the UI) also fail on main on the machine used: robustness_goldens::seed_36 and seed_71, the prism-local ring cut, and UI theme, clipboard and layout tests that have nothing to do with keys or commands.
  • cargo fmt, cargo clippy -p solidcraft-engine -p solidcraft-ui-egui --all-targets -- -D warnings and cargo xtask lists: clean.

Screenshots of the behavior (when observable)

Command search, query "repeat". Before: no Repeat entry.
before-palette

After: "Repeat Last Command" (edit.repeat) with its key, Shift+R.
after-palette

Preferences › Keyboard Shortcuts, filtered by "repeat". Before: "No matching commands".
before-shortcuts

After: Repeat Last Command with Shift+R, which you can change, clear or reset.
after-shortcuts

Box was started and cancelled, then Shift+R was pressed: the Box dialog opens again with its default sizes.
after-shift-r

Integration status

🤖 Generated with Claude Code

@semmelrinde
semmelrinde force-pushed the feat/repeat-last-command branch from f00bd25 to 1e43498 Compare October 27, 2026 07:43
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
semmelrinde added a commit to semmelrinde/solidcraft that referenced this pull request Oct 27, 2026
@semmelrinde
semmelrinde marked this pull request as ready for review October 27, 2026 07:45
@bherbruck bherbruck added ready to merge reviewed, every ask addressed; merge once CI is green approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) and removed approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) labels Oct 27, 2026
@bherbruck
bherbruck enabled auto-merge October 27, 2026 12:37
semmelrinde and others added 4 commits October 27, 2026 15:03
…gency-labs#7077)

Shift+R already started the last tool or dialog again (tangency-labs#3045), but it was a
key the app kept for itself: command search could not find it and Keyboard
Shortcuts could not change it. It is now the command edit.repeat, with
Shift+R as its default key. A call through the engine is refused, because
only the app has a tool to start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ar and he are complete catalogs on main now (tangency-labs#3458): every new message
needs them. The pending-messages test compares right-to-left messages in
display order once tangency-labs#7532 lands (tangency-labs#7527).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Vietnamese became a complete catalog on main (tangency-labs#5823), so every new English
message needs it too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
auto-merge was automatically disabled October 27, 2026 14:03

Head branch was pushed to by a user without write access

@semmelrinde
semmelrinde force-pushed the feat/repeat-last-command branch from 1e43498 to cf2ba57 Compare October 27, 2026 14:03
@bherbruck
bherbruck added this pull request to the merge queue Oct 27, 2026
@semmelrinde

Copy link
Copy Markdown
Contributor Author

@bherbruck Rebased onto main after #7532 landed, with the Vietnamese strings main now requires (#5823). All checks pass again. My push turned auto-merge off, and I can't turn it back on myself: could you put it back in the queue? Thanks!

Merged via the queue into tangency-labs:main with commit 5bd8387 Oct 27, 2026
24 checks passed
@semmelrinde
semmelrinde deleted the feat/repeat-last-command branch October 27, 2026 19:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved-for-ci Reviewed: run the full PR CI (build, tests, goldens, Clippy) ready to merge reviewed, every ask addressed; merge once CI is green

Projects

None yet

Development

Successfully merging this pull request may close these issues.

repeat last command shortcut

2 participants