You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
LR-FILT-SORT: the header's Reshuffle reads as a button beside the Shuffled label (stacked on #3290) - #3306
Stacked on #3290. Its one commit here is 5a0eb38c3c; the two commits below it are #3290's own (afa25ebf56, 048546c08b).
Problem
In the grid header of a shuffled view (#3290) "Shuffled" (quiet text) and "Reshuffle" (a ghost button, which draws nothing until hovered) sit side by side as plain text: "Shuffled Reshuffle 24 photos". Nothing says the second word is a button, so the pair reads as one phrase instead of a state plus an action.
Change
LR-FILT-SORT: the header's Reshuffle is a Secondary small Button instead of a Ghost one, so it shows its fill and border at rest (the button kind the interface already uses for ordinary actions, in every theme); the label stays plain text.
The gap between "Shuffled" and the button grows from 4 to 8 pt (LABEL_GAP), so the state and the action read as two things. chip_width and shuffle_chip use the same constant. The button's width is unchanged (Secondary and Ghost share the font and padding), so the compact and drop rules of chip_plan are unchanged: the full chip is 4 pt wider, so a header switches to the button alone 4 pt sooner, and the narrowest header that keeps a chip is the same.
Docs: the existing 2026-10-28 What's New entry and the LR-FILT-SORT row mention the bordered button; one revision row.
No new string, icon or asset. I looked at a shuffle glyph on the button and left it out: it would need a new vector icon and widen the chip, and the border already gives the affordance.
Not in this PR: the sort menus' note styling (#3288), menus, the engine, scrolling, and any change to chip_plan's rules.
How it was checked
cargo xtask ci passes on this branch: all 8 steps (fmt, clippy, heif, test with 5,253 tests passed, parity, layers, assets, wasm) at 5a0eb38c3c. It ran with MENU-BAR: clippy passes on macOS again (Quit, About and Settings share one branch) #2973's one-file clippy fix for native_menu.rs applied uncommitted (main fails clippy there), since reverted. 147 tests skipped for missing corpus, model and font files, none in code this PR touches.
A test that fails without this change: reshuffle_reads_as_a_button_beside_the_label (crates/ui-egui/src/tests/shuffle_chip.rs) checks in all four themes that Reshuffle paints a bordered rectangle on its own rectangle at rest, that the label does not, and that the gap between them is at least 8 pt. It was run against LR-FILT-SORT: a shuffled grid says so in its header, with Reshuffle beside it #3290's code (before the fix was applied) and fails by assertion: "midnight: Reshuffle shows its border at rest", 0 bordered rectangles, expected 1 (the run stops at the first failing assertion). The six LR-FILT-SORT: a shuffled grid says so in its header, with Reshuffle beside it #3290 tests, including the narrow-window and long-count ones, and local_folder_header_text_and_controls_do_not_overlap still pass.
macOS evidence: the screenshots and headless tests ran on this Mac (Apple M1 Max, Metal). Hosted checks don't build macOS-only paths, and this change has none.
Existing edits and libraries: unchanged. No saved setting, sort order, default or photo's render changes.
Shared numbers taken: none (no catalog, cache, look or process version change; no field added to anything the catalog stores).
New dependencies, unsafe, build scripts, network access, spawned processes, deleted files, CI or xtask gate changes: none.
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)
New text on screen goes through tr() and has its key in crates/ui-egui/locales/*.json; a new shortcut is free in docs/library-shortcuts.md (no new text, no new shortcut)
The feature's rows in docs/parity-checklist.md and its entry in docs/gaps.md are updated, honestly (🟡 when it is partial), in the same commit (LR-FILT-SORT; docs/whats-new.md too)
New code has a caller, or is a tested core whose caller comes in the next pull request, named here
Every new image, icon or other asset has its entry in assets/ATTRIBUTION.md; no font or media files added (none added)
Ready to merge (otherwise open it as a draft)
Summary by CodeRabbit
New Features
Randomly sorted photo grids now show a “Shuffled” indicator and a one-click Reshuffle button, including in local folders. The controls adapt to narrow layouts, and the indicator is hidden when needed to keep the photo count visible.
Sort-button tooltips and screen-reader labels now identify the active sort and direction.
Documentation
Updated the “What’s New” and feature checklist to describe shuffled-grid controls and sort labels.
Localization
Added translations for shuffle guidance, status labels, and sort summaries across supported languages.
…eside it
A view sorted at random shows a quiet "Shuffled" chip beside the photo count (and a Reshuffle button that runs library.shuffle), except in Recently Added and Recently Deleted, which keep their own order. In a narrow header the button stands alone so the count stays in view. The sort button's tooltip and accessible name now name the sort.
Reviewing files that changed from the base of the PR and between 77c0a6a and 5a0eb38.
Files selected for processing: 41
crates/ui-egui/locales/cs-formats.json
crates/ui-egui/locales/cs.json
crates/ui-egui/locales/de-formats.json
crates/ui-egui/locales/de.json
crates/ui-egui/locales/es-formats.json
crates/ui-egui/locales/es.json
crates/ui-egui/locales/fi-formats.json
crates/ui-egui/locales/fi.json
crates/ui-egui/locales/fr-formats.json
crates/ui-egui/locales/fr.json
crates/ui-egui/locales/id-formats.json
crates/ui-egui/locales/id.json
crates/ui-egui/locales/it-formats.json
crates/ui-egui/locales/it.json
crates/ui-egui/locales/ja-formats.json
crates/ui-egui/locales/ja.json
crates/ui-egui/locales/ka-formats.json
crates/ui-egui/locales/ka.json
crates/ui-egui/locales/pl-formats.json
crates/ui-egui/locales/pl.json
crates/ui-egui/locales/pt-br-formats.json
crates/ui-egui/locales/pt-br.json
crates/ui-egui/locales/ru-formats.json
crates/ui-egui/locales/ru.json
crates/ui-egui/locales/sv-formats.json
crates/ui-egui/locales/sv.json
crates/ui-egui/locales/uk-formats.json
crates/ui-egui/locales/uk.json
crates/ui-egui/locales/vi-formats.json
crates/ui-egui/locales/vi.json
crates/ui-egui/locales/zh-hans-formats.json
crates/ui-egui/locales/zh-hans.json
crates/ui-egui/locales/zh-hant-formats.json
crates/ui-egui/locales/zh-hant.json
crates/ui-egui/src/panels/bottombar.rs
crates/ui-egui/src/panels/grid.rs
crates/ui-egui/src/panels/grid/header_tests.rs
crates/ui-egui/src/tests.rs
crates/ui-egui/src/tests/shuffle_chip.rs
docs/parity-checklist.md
docs/whats-new.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Walkthrough
The grid now identifies eligible random-sorted views with a shuffled status and Reshuffle control. The sort button tooltip identifies the active sort. Translations, UI tests, and documentation cover these additions.
Eligible randomly sorted views show a “Shuffled” label and a Reshuffle button. Clicking the button calls library.shuffle. The chip is omitted or reduced to a button when header width is limited. Local folder headers also support the control. Tests cover visibility, layout, styling, and reshuffling; documentation records the controls.
The sort button tooltip shows the active sort key and, except for Random, its direction. Translations retain the {key} and {direction} placeholders. Tests cover capture-date, file-name, and random sorts.
sequenceDiagram
participant User
participant GridHeader
participant Library
GridHeader->>Library: Read sort and view state
GridHeader-->>User: Show shuffle controls when applicable
User->>GridHeader: Click Reshuffle
GridHeader->>Library: Call library.shuffle
Loading
Suggested reviewers:emmertex, claude
Merge Risk: Minimal · up to 5a0eb
The shuffled controls and sort labels are ready to merge after normal checks.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documenta…
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly describes the main change: presenting Reshuffle as a button beside the Shuffled label in the header. It also identifies the related stacked pull request.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage
Explanation
Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 12 functions across 5 files. (36 skipped: 36 unsupported.)
Resolution
Write docstrings for the functions missing them to satisfy the coverage threshold.
Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Some tools did not complete. Review the errors below.
Clippy (1.99.0)
Clippy execution timed out
Comment @coderabbitai help to get the list of available commands.
Folded into #3290 as one commit, c06e0d3c25 (fast-forward on top of 048546c08b): the same code and test, with its docs merged into #3290's What's New entry and revision row. The description of #3290 now has this change, its test and its screenshots. Closing in favor of #3290.
Every open PR above the #3306 boundary, the merged PRs since 2026-10-29 and the
closed ones updated since now have a row. Three were ported in this round
(#3470, #3443, #3574); the small shared fixes that an earlier port batch had
already landed are recorded as duplicates with the fork commit, and the rest are
PENDING with what is missing.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
nledford
added a commit
to nledford/lightcraft
that referenced
this pull request
Nov 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #3290. Its one commit here is
5a0eb38c3c; the two commits below it are #3290's own (afa25ebf56,048546c08b).Problem
In the grid header of a shuffled view (#3290) "Shuffled" (quiet text) and "Reshuffle" (a ghost button, which draws nothing until hovered) sit side by side as plain text: "Shuffled Reshuffle 24 photos". Nothing says the second word is a button, so the pair reads as one phrase instead of a state plus an action.
Change
Buttoninstead of a Ghost one, so it shows its fill and border at rest (the button kind the interface already uses for ordinary actions, in every theme); the label stays plain text.LABEL_GAP), so the state and the action read as two things.chip_widthandshuffle_chipuse the same constant. The button's width is unchanged (Secondary and Ghost share the font and padding), so the compact and drop rules ofchip_planare unchanged: the full chip is 4 pt wider, so a header switches to the button alone 4 pt sooner, and the narrowest header that keeps a chip is the same.Not in this PR: the sort menus' note styling (#3288), menus, the engine, scrolling, and any change to
chip_plan's rules.How it was checked
cargo xtask cipasses on this branch: all 8 steps (fmt, clippy, heif, test with 5,253 tests passed, parity, layers, assets, wasm) at5a0eb38c3c. It ran with MENU-BAR: clippy passes on macOS again (Quit, About and Settings share one branch) #2973's one-file clippy fix fornative_menu.rsapplied uncommitted (mainfails clippy there), since reverted. 147 tests skipped for missing corpus, model and font files, none in code this PR touches.reshuffle_reads_as_a_button_beside_the_label(crates/ui-egui/src/tests/shuffle_chip.rs) checks in all four themes that Reshuffle paints a bordered rectangle on its own rectangle at rest, that the label does not, and that the gap between them is at least 8 pt. It was run against LR-FILT-SORT: a shuffled grid says so in its header, with Reshuffle beside it #3290's code (before the fix was applied) and fails by assertion: "midnight: Reshuffle shows its border at rest", 0 bordered rectangles, expected 1 (the run stops at the first failing assertion). The six LR-FILT-SORT: a shuffled grid says so in its header, with Reshuffle beside it #3290 tests, including the narrow-window and long-count ones, andlocal_folder_header_text_and_controls_do_not_overlapstill pass.--memory) at LR-FILT-SORT: a shuffled grid says so in its header, with Reshuffle beside it #3290's head and at this branch through the control channel and read the screenshots below, in the dark Midnight and the light Paper theme, at 1400 pt and 520 pt wide.Screenshots
Demo photos only, scratch settings, cropped to the header. The 520 pt window shows the button alone, as before.
Merging
panels/grid.rs, at the same header count lines as LR-FILT-SORT: a shuffled grid says so in its header, with Reshuffle beside it #3290 does (this PR changes the button kind and the label gap, not those lines); MENU-VIEW-SORT: the Sort menus offer only what the view uses #3288, LR-FILT-SORT: a new sort order or reshuffle keeps the active photo in view #3289 and LR-FILT-SORT: Previous Shuffle and a Reshuffle shortcut (stacked on #3288) #3294 conflict only indocs/whats-new.mdanddocs/parity-checklist.md, as LR-FILT-SORT: a shuffled grid says so in its header, with Reshuffle beside it #3290 does. Whichever lands second resolves them.unsafe, build scripts, network access, spawned processes, deleted files, CI orxtaskgate changes: none.Checklist
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)tr()and has its key incrates/ui-egui/locales/*.json; a new shortcut is free indocs/library-shortcuts.md(no new text, no new shortcut)docs/parity-checklist.mdand its entry indocs/gaps.mdare updated, honestly (🟡 when it is partial), in the same commit (LR-FILT-SORT;docs/whats-new.mdtoo)assets/ATTRIBUTION.md; no font or media files added (none added)Summary by CodeRabbit