Skip to content

Issue #1759: Cmd+D (Select None) deselects every photo, the active one too - #1760

Merged
emmertex merged 6 commits into
emmertex:stagingfrom
clydecbrown:classic/fix/cmd-d-select-none
Dec 1, 2026
Merged

emmertex merged 6 commits into
emmertex:stagingfrom
clydecbrown:classic/fix/cmd-d-select-none

Conversation

@clydecbrown

Copy link
Copy Markdown
Collaborator

Fixes #1759

Problem

Cmd+D (Select None in the Edit menu) left the active photo selected, so it did the same as Cmd+Shift+D (Select Only Active
Photo). After it, the arrow keys still stepped from that photo instead of starting again from the first or last photo of
the view.

Cause: library.selectNone in crates/engine/src/cmd/library.rs set the selection to the active photo
(a.into_iter().collect()).

Change

  • library.selectNone clears the selection, the active photo, the active mask and spot, and all_selected. Nothing is
    selected and no photo is active afterwards, so ↑ and ↓ start again from the first and last photo of the view.
  • library.deselectUnflagged does what its name says: with no flagged photo in the selection it also deselects the active
    photo (before, it kept it). Its description says so.
  • Loupedeck: the action DeselectOtherPhotos (Select Only Active Photo) no longer maps to library.selectNone. It is
    listed as dropped when a profile is imported, like other actions with no counterpart.
  • A test pins that the Classic set lists Select None as Cmd+D.
  • Changelog entry added.

Not in this PR: the Modern layout keeps its own label and key for the command (Deselect All, Cmd+Shift+A). Select
Only Active Photo is a UI-only command, so surfaces can't reach it; the Loupedeck action stays unmapped.

Acceptance criteria

  • AC-1: With several photos selected, Cmd+D leaves no photo selected in the grid, the filmstrip or the selection count. — shortcuts::tests::select_none_clears_every_selected_photo_and_the_active_photo (seen failing before the fix)
  • AC-2: With one photo selected, Cmd+D leaves no photo selected. — shortcuts::tests::select_none_with_one_photo_selected_leaves_nothing_selected (seen failing before the fix)
  • AC-3: With no photo selected, Cmd+D does nothing and raises no error. — shortcuts::tests::select_none_with_nothing_selected_does_nothing_and_raises_no_error (guard: passes before and after the fix)
  • AC-4: Cmd+Shift+D still selects only the active photo. — shortcuts::tests::select_only_active_still_keeps_only_the_active_photo (guard: passes before and after the fix)
  • AC-5: After Cmd+D no photo is active. The arrow keys then start again from the first or last photo. — shortcuts::tests::after_select_none_the_up_arrow_takes_the_first_photo_of_the_view and …_the_down_arrow_takes_the_last_photo_of_the_view (both seen failing with the engine fix reverted)
  • AC-6: The Edit menu's Select None item (Classic layout) does the same as Cmd+D, and its shortcut label shows Cmd+D. — shortcuts::tests::select_none_is_listed_as_cmd_d_in_the_classic_set (guard: the Classic set already bound Cmd+D)
  • AC-7: Tests cover AC-1 to AC-4. AC-1 and AC-2 are seen failing before the fix; AC-3 and AC-4 are guards that pass before and after, because that behaviour already worked. — the tests above

How it was checked

  • cargo xtask ci --quick, cargo xtask sil and cargo test -p for the touched crates pass on this branch, up to
    date with staging (merged in, not rebased)
    • The gate passed (ci --quick, parity, layers, assets, deny, wasm, android); the branch is 5 commits behind staging
      (one of them touches shortcuts.rs, elsewhere in the file) and merges cleanly. Two engine tests (device_sync, tests_export) fail on this Mac only, as already
      recorded.
  • A test that fails without this change (the AC-1, AC-2 and AC-5 tests above fail with the engine fix reverted)
  • The change was checked by the headless UI tests above, not by running the app by hand.

Merging

  • Overlap: none found (the only open PR touching library.rs is the staging → main batch PR Nightly: staging → main 2026-12-01 #1733).
  • Existing edits and libraries: no saved setting, preset or default changes; only what the command leaves selected.
  • Shared numbers taken: none.
  • Where it came from: own design.
  • New dependencies, unsafe, build scripts, network access, spawned processes, deleted files, CI or xtask gate
    changes:
    none (see Runs on CI).

Runs on CI

Nothing beyond the touched crates' own tests (lcc-engine, lcc-ui-egui, lcc-surface); no workflow, build-script,
packaging or dependency changes.

Checklist

  • No new panic path in non-test code: no unwrap / expect / panic!, no indexing or unchecked arithmetic on a
    number from a file, a person or an agent (get, checked_mul, NaN and char boundaries handled)
  • User-visible change: the manual is updated in the same commit — no manual page describes Select None's
    active-photo behaviour, Deselect Unflagged Photos or the Loupedeck action
  • Ready to merge (otherwise open it as a draft)

Manual: none, no page describes these commands or the Loupedeck action.

Sources: own design.

🤖 Generated with Claude Code

Select None kept the active photo selected, so Cmd+D did the same as
Select Only Active Photo. It now leaves nothing selected and no active
photo, so the arrow keys start again from the view's ends.

Manual: reference/shortcuts (no edit: the Deselect All row already describes it)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
The Edit menu's Select None item shows the key that works, Cmd+D, and not the
engine's declared Cmd+Shift+A (which only the Alternative set uses).

Manual: reference/shortcuts (no edit: the Deselect All row already lists Ctrl+D)

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
…oupedeck DeselectOtherPhotos mapping

With no flagged photo in the selection, library.deselectUnflagged now leaves
nothing selected and no active photo, as Select None does. The Loupedeck
DeselectOtherPhotos action (Select Only Active Photo) no longer maps to
library.selectNone, which now clears the active photo.

Cold grader: pass, no Must fix.
Manual: none, no page describes either command or the Loupedeck action

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… the view

Manual: none, test only

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@emmertex emmertex left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks — the fix and tests look right to me (engine change is small, no panic paths, Loupedeck mapping change and changelog entry make sense).

One thing missing before it can merge:

  • What's New entry: AGENTS.md (Release notes) asks for one file per change in docs/whats-new/<YYYY-MM-DD>-<slug>.md (one ### Title + bullets, see docs/whats-new/README.md), in addition to the changelog entry. Something like docs/whats-new/2026-12-01-cmd-d-select-none.md with a user-facing line about Select None now clearing the active photo too.

Once that's pushed and CI is green this is good to merge.

Manual: none, no page describes these commands

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@emmertex emmertex left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks — the What's New entry is in, and the fix and tests look good. Merging.

Nit for a later change (not blocking): the Loupedeck DeselectOtherPhotos action could map to library.selectOnlyActive rather than being dropped, since that is now the matching command.

@emmertex
emmertex merged commit 4066f0c into emmertex:staging Dec 1, 2026
3 checks passed
@clydecbrown
clydecbrown deleted the classic/fix/cmd-d-select-none branch December 1, 2026 03:10
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.

Cmd+D (Select None) keeps the active photo selected, so it behaves like Select Only Active Photo

2 participants