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-PREF-GENERAL: the Settings tab bar, filter, choices and questions can be read in every theme (stacked on #2906) - #2949
Stacked on #2906, which is stacked on #2905, which is stacked on #2874 (all off main), and on #2525, #2523 and #2522 (each off main): waits for #2874, #2905 and #2906 (in that order) and for #2525, #2523 and #2522; what it adds after that: the filter box, the tab bar's line, a choice, and a question can be read in every theme. This PR's own commits are ea77f5a01e, a6e7b1b681 and 8542b1db26 (the last adjusts two tests that the merge of #2522 and #2525 made untrue), on top of a merge of those four heads (#29065ad9732ee3, #25250a4b86c9dc, #2523cd9978f45b, #25223d7fa853a1): the first is the change, the second removes the Photo ▸ Edit In ▸ Edit in PhotoCraft… catalog key from cs.json and it.json that the merge of #2525 had kept. Rebased after #2913 (egui 0.37).
Problem
#2525 made what Settings says readable in every theme (text 4.5:1, borders 3:1), and #2874 and #2906 added the filter and its results, and #2522 the tab bar and its line. The controls those PRs added are outside that pass: the line under the tabs (1.2 to 1.4:1 in the four themes), a choice that is not the chosen one, the panel a question opens (Clear Cache, removing a model, changing the smart previews folder) and its buttons stand 1.2 to 1.7:1 against the window.
Change
crates/ui-egui/src/panels/settings.rs (legible_controls is also called in the question panel; the line under the tabs is made legible), crates/ui-egui/src/widgets.rs (the border of a choice that is not chosen), the Settings tests, one docs/whats-new.md sentence.
Text stands 4.5:1 and lines 3:1 against what they are on, in Midnight, Charcoal, Silver and Paper.
The choice border is in widgets::choice_button_in, which View Options (the Info row) also draws, so those choices are outlined the same way; the What's New sentence says so. No other widget changes.
Not in this PR: the parents' own work; the Slideshow tab's text buttons and anchor grid, which keep the 1.6 to 1.7:1 border of text_button (as the PR #2525 sentence "buttons" already says too much for them); the question panel not getting the 2 pt focus ring the rest of Settings has (a popup starts from the app-wide style; a separate change).
A test that fails without this change: on the commit with the settings.rs and widgets.rs changes reverted, a_choice_a_radio_and_a_question_have_borders_that_stand_out_too fails ("Charcoal: only 0.00 of a choice's border stands 3:1") and the_lines_that_say_where_a_control_is_stand_out_in_every_theme fails ("Charcoal: only 0.00 of the line under the tabs stands 3:1"); both pass with it. what_the_filter_found_can_be_read_with_the_pointer_or_the_focus_on_it passes either way: it guards the result text. The question's caution text and the mark on a result's heading have no test of their own.
User-visible change: measured by painted pixels in the headless harness in all four themes, and looked at in release-build screenshots in Charcoal and Silver (below).
cargo check --workspace --all-targets, the format and clippy run, and cargo test -p lightcraft-ui-egui --lib dialog_settings (128 tests, with i18n) pass on this head. At 1cb0efe6d6 (the stack with #2522's new head 3d7fa853a1 and #2906's new head 29bdbd326d merged in): cargo check, clippy with -D warnings (with #2973's one-file clippy fix applied uncommitted) and cargo test -p lightcraft-ui-egui --lib settings (143 tests) pass.
Review: a fresh read-only reviewer at 8542b1d (30 Oct), reading the one test commit the merge needed (a tab has no border, and a choice's border is the one Settings makes legible): no blocking finding; and at a6e7b1b, reading the by-hand rebuild of the merge of #2906, #2525, #2523 and #2522 at their current heads (conflicts in settings.rs, widgets.rs and docs/whats-new.md; compared with the old tree line by line): no blocking finding. Earlier, at 1cb0efe (29 Oct), on this PR's two own commits: no blocking finding.
After the 30 Oct restack onto its parent's current head: cargo check --workspace --all-targets, the format and clippy run (-D warnings) and cargo test -p lightcraft-ui-egui --lib settings pass at 8542b1d (the lint run with #2973's one-file clippy fix applied uncommitted, then reverted); the full cargo xtask ci quoted above was run at the head before, and the hosted CI gate runs it at this one.
Screenshots
Release builds of this branch's head (1cb0efe6d6) and of the same head with the change b03bf80374 reverted (the stack of its parents), headless CPU renderer, 1100×820 points at 2×, the procedural demo library in a scratch settings folder, Settings on Performance with the Clear Cache question open, cropped to the Settings window. What changes: the line under the tabs, the border of a choice that is not the chosen one (View Options draws its choices the same way), and the question's border and buttons.
Before
After
Not pictured: Midnight and Paper (covered by the pixel tests), and the other Settings tabs.
The Settings interface adds cross-tab search and section navigation, keyboard and screen-reader support, contrast adjustments, and confirmation prompts for selected actions. Locale files and release notes add related translations and descriptions.
Settings searches rendered section text across tabs, ranks and highlights matches, and opens the selected section. Filtering tests cover matching, results, keyboard navigation, and text excluded from search.
Settings controls add keyboard focus handling and tab and radio semantics. Theme colors are adjusted for contrast in Settings and model displays. Tests check focus, contrast, and accessibility roles.
Cache clearing, model removal, and selected smart-preview folder changes now show confirmation prompts. Tests cover confirmation, cancellation, and prompt dismissal.
Translations and release notes crates/ui-egui/locales/*.json, docs/whats-new.md, docs/parity-checklist.md
Locale files add or update translations for Settings search, editing and profile options, smart previews, XMP writing, and model errors. Release notes and the parity checklist describe the filter, accessibility behavior, contrast changes, and confirmation prompts.
This PR makes Settings text, borders and tabs easier to read across themes. No merge-blocking issue remains after review; the only open item is an optional wording tweak in the release notes.
Security architecture risk: Low · up to 8542b
The changes remain within the desktop application and add safeguards before destructive actions. No expanded privilege or newly exploitable path was established. Search still invokes live application behavior, and unusual concurrent replacements and partial failures were not fully verified.
Retained concerns
No architecture-level concerns identified.
Security review details
Security Blast Radius
observed — The relevant destructive sinks operate on the current library's preview caches and smart-preview location, plus application-managed installed model directories. Model removal validates model IDs and requires the expected manifest before deleting the model directory.
Trust Boundaries and Controls
observed — Cache and model-removal prompts return acceptance only on the confirmation frame and initially focus Keep. Model callers include the model ID in action identity. Smart-preview deletion additionally checks the current library and source path. These are user-intent safeguards around existing commands, not new backend authorization controls.
Resilience and Maintainability Implications
observed — Source tests specify that unanswered smart-preview questions do not survive ordinary Settings reopening or library switching, changing away from deletion withdraws the question, initial Return keeps the cache, and a changed source folder prevents stale deletion. These assertions were inspected, not executed, and do not establish safety for same-path replacement or interruption during backend mutation.
Hardening Proposals
proposed — For future evolution, separate searchable Settings metadata from live page execution, or explicitly constrain discovery to side-effect-free queries. This would reduce control drift as page-rendering behavior grows; it is not an observed authorization bypass in this PR.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 49.47% 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: improved readability of the Settings tab bar, filter, choices, and question panels across themes. The stacked-PR note adds context but does not make the ti…
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: Title check
Explanation
The title clearly describes the main change: improved readability of the Settings tab bar, filter, choices, and question panels across themes. The stacked-PR note adds context but does not make the title misleading.
Full details: Docstring Coverage
Explanation
Docstring coverage is 49.47% 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 95 functions across 21 files. (1 skipped: 1 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.
Rebased after #2913 (egui 0.37) on the new heads of #2906, #2525, #2523 and #2522. The commit message is rewritten: it claimed that legible_controls moves and that the monitor file and smart previews folder colors change, which its parents already had. Two small commits sit on top of the merge: #2523's skip records, and removing the stale catalog key from cs.json and it.json that the merge of #2525 had kept.
Rebuilt on the new heads of #2906 and the other three parents after main moved (67f11a5); the parity checklist conflict is resolved in the parents. #2523's skip records are now part of its own head, so the separate commit is gone.
Rebuilt on #2906's new head c19632587e (after #2905's fix round) and the unchanged heads of #2525, #2523 and #2522, then its own commit and the catalog-key commit. The merges needed one hand resolution in settings.rs (the filter code from #2905's fix round beside the legible_controls call); the result differs from the previous head only by #2906's new change (10 lines in settings.rs and a 21-line test). Checked here: cargo check, the 142 Settings tests pass; clippy stops at the known native_menu.rs:492 finding. The head is now bd08f1de69.
… or has the focus shows
One widget drew the tab bar and every row of choices: on General the
languages read as a second tab bar. What was chosen differed from what was
not by its fill alone, 1.35 to 1.56:1 in the four themes, and a tab or choice
reached with Tab showed nothing (the frame with and without the focus was
the same, pixel for pixel).
- widgets::tab_button: a tab is its name on the window, a size up from the
headings inside a page, the open one in the text colour over a 2 pt line
of that colour; no border, no fill. Each line of tabs stands on a 1 pt
line the width of the window, so the open tab's line never hangs over the
names below when the tabs take two lines (a narrow window, or Russian at
full width).
- widgets::choice_button, used by settings::choices: the chosen option keeps
its fill and is outlined in the label colour (5.5:1 or more against its
fill, a button and the window in every theme), and is a radio button to a
screen reader. The Export dialog's own rows of choices are as they were.
- Both, and text_button wherever it is used, show a ring while they have the
keyboard focus: 2 pt in the text colour with a 1 pt line of the surface's
colour inside it, within their rect. A double line, where a chosen option
has a single thin one, so the two are told apart by shape. Tab, the arrow
keys, Space and Return already worked.
Widget ids are as they were (button:settingsTab-{id}, button:{id}-{index}).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n every language it has
- Tokens::legible gives a colour as it is where it stands the ratio asked
for against the surface it is on, and moves it toward the text colour until
it does where a theme's value is too close. Settings uses it for its
explanations (4.20:1 in Charcoal, 4.33:1 in Silver), "In Use" and the
outline of the theme card in use (2.9:1 in Charcoal), the reject colour as
text, and the dim text, cautions and accent of the AI Denoise page.
- settings::legible_controls does the same for what says where a control is:
the borders of text boxes, checkboxes, radio buttons and buttons (1.6 to
1.7:1), a text box in use, and placeholder text (under 4.3:1 in every
theme).
- A colour that read already is unchanged, and the tokens keep their values
for the rest of the app.
- The hint under External Editing had a menu path with an arrow the fonts
lack, which drew as empty boxes; it uses ">".
- 23 names and sentences of Settings (with the three menu items that hint
names) are in all 17 catalogs; "(library default)" and "starting…" go
through translation.
Co-Authored-By: Claude <noreply@anthropic.com>
…or the focus
Tab stops once at the tab bar and once at each row of choices, at the one that is open or
holds; the arrow keys, Home and End move inside (widgets::Roving). A checkbox, button, list,
radio button or text box that has the focus is ringed 2 pt in the text colour, as a tab or a
choice is. A theme's favourite star is a Tab stop whether or not the theme is a favourite.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… is written
Face names and boxes skip the automatic write and a failed write waits for a retry, so the hint says supported changes are written automatically when possible, in every catalog.
… the complexity limit
main denies cognitive complexity above 30 and the section, with its questions, was at 52: the location listing, the Folder rows and the folder-change toast are functions of their own. No behavior change.
VoiceOver read each Settings tab as a check box (a button with a toggled state). The strip is now a
TabList named "Settings sections", each tab a Tab that says whether it is selected, and the open tab
controls the TabPanel that holds its page (macOS reports a tab as a radio button with the tab subrole).
Force-pushed 32902672bf: the merges of #2525, #2523 (cd9978f45b, now split under the complexity limit of #3111) and #2522 redone onto #2906's new head 19557dc241, with #2525's performance.rs changes re-applied on #2523's split functions by hand, and a rustfmt import-order fix in settings.rs. This PR's own two commits are unchanged apart from that.
…border; the Faces tab reads in every theme
text_button and segmented draw the border their ui gives plain buttons (the theme's unless a window made it more legible). Faces' processor labels, hint, model marks, license and failure lines go through legible(), the download-failed fallback is translated, and the wasm test build no longer needs smart_folder_default.
…st, and shows why
- A word a section does not say finds it (settings::ALSO: "trash" for Culling, "scheme" for
Appearance, "catalog" for Library\u2026), from the start of the word; either spelling finds the
other (color / colour, gray / grey, catalog / catalogue\u2026), also while the word is being typed
and half typed.
- The best match comes first: a word in the name of the section or its tab, then in a label,
choice or button, then in an explanation. Return opens the first. Ties stay in tab order.
- The line under a result starts shortly before the word found, which is drawn stronger.
Folders and text typed into boxes are not looked through.
- The heading of the section opened is marked for a moment (settingsLanded:<section>).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…der it, and the word is drawn whole
The line under a result was cut into pieces at the letters found, each piece in
a format of its own (dimmer text, the letters found in the text color and a
heavier weight). epaint shapes each piece by itself, so a match inside a word
lost the kerning across the cuts, and in Arabic left the letters either side of
them unjoined.
The line is now one piece of text in one format. The letters found have a fill
behind them and a line under them, a rectangle per stretch per row, placed from
the galley's glyphs (egui 0.37 keeps them in the order of the chars, one for each,
whichever way the text runs). The line under them is
there because the heavier weight is gone: the fill alone would be told by its
color only. The line of text is in one color, legible on the fill too.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ead in every theme too
The controls storytold#2874, storytold#2906 and storytold#2522 added were outside storytold#2525's legibility pass.
Now the line under the tabs stands 3:1 against the window, where a theme's
divider is 1.2 to 1.4:1. The border of a choice that is not the chosen one, and
the outline that marks the heading of a section reached from the filter, stand 3:1
too (a button's own border is 1.6 to 1.7:1). The panel a question opens (Clear Cache, a model's
Remove, the smart previews folder) draws its controls through `legible_controls`
as the window does, and its caution text stands 4.5:1. The comment on
`legible_controls` in the window now says it covers the filter box as well.
The legibility tests follow the controls: General's empty-box check now reads the
filter box, there are tests for the tab bar's line, a choice and a question, and one
test the merge of the parents made untrue is adjusted (Settings opens with the
focus in the filter box, not nowhere). The What's New entry says that choices
in View Options' Info row are outlined the same way, since they are drawn by the
same function.
Built on a merge of storytold#2906 (f52b412), storytold#2525 (1a1381c), storytold#2523 (c787aac, then c75853a's skip records as their own commit)
and storytold#2522 (7ed0eab).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Files skipped from review as they are similar to previous changes: 2
crates/ui-egui/src/panels/denoise.rs
crates/ui-egui/src/dialogs/faces.rs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 1 remain after this review.
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 #2906, which is stacked on #2905, which is stacked on #2874 (all off
main), and on #2525, #2523 and #2522 (each offmain): waits for #2874, #2905 and #2906 (in that order) and for #2525, #2523 and #2522; what it adds after that: the filter box, the tab bar's line, a choice, and a question can be read in every theme. This PR's own commits areea77f5a01e,a6e7b1b681and8542b1db26(the last adjusts two tests that the merge of #2522 and #2525 made untrue), on top of a merge of those four heads (#29065ad9732ee3, #25250a4b86c9dc, #2523cd9978f45b, #25223d7fa853a1): the first is the change, the second removes thePhoto ▸ Edit In ▸ Edit in PhotoCraft…catalog key fromcs.jsonandit.jsonthat the merge of #2525 had kept. Rebased after #2913 (egui 0.37).Problem
#2525 made what Settings says readable in every theme (text 4.5:1, borders 3:1), and #2874 and #2906 added the filter and its results, and #2522 the tab bar and its line. The controls those PRs added are outside that pass: the line under the tabs (1.2 to 1.4:1 in the four themes), a choice that is not the chosen one, the panel a question opens (Clear Cache, removing a model, changing the smart previews folder) and its buttons stand 1.2 to 1.7:1 against the window.
Change
crates/ui-egui/src/panels/settings.rs(legible_controlsis also called in the question panel; the line under the tabs is made legible),crates/ui-egui/src/widgets.rs(the border of a choice that is not chosen), the Settings tests, onedocs/whats-new.mdsentence.widgets::choice_button_in, which View Options (the Info row) also draws, so those choices are outlined the same way; the What's New sentence says so. No other widget changes.Not in this PR: the parents' own work; the Slideshow tab's text buttons and anchor grid, which keep the 1.6 to 1.7:1 border of
text_button(as the PR #2525 sentence "buttons" already says too much for them); the question panel not getting the 2 pt focus ring the rest of Settings has (a popup starts from the app-wide style; a separate change).How it was checked
cargo xtask ciat1cb0efe6d6(run on this Mac with MENU-BAR: clippy passes on macOS again (Quit, About and Settings share one branch) #2973's one-file clippy fix applied uncommitted, then reverted): all 8 steps passed (fmt, clippy, heif, test, parity, layers, assets, wasm); the test step ran 5,332 tests, 0 failed, 42 ignored.settings.rsandwidgets.rschanges reverted,a_choice_a_radio_and_a_question_have_borders_that_stand_out_toofails ("Charcoal: only 0.00 of a choice's border stands 3:1") andthe_lines_that_say_where_a_control_is_stand_out_in_every_themefails ("Charcoal: only 0.00 of the line under the tabs stands 3:1"); both pass with it.what_the_filter_found_can_be_read_with_the_pointer_or_the_focus_on_itpasses either way: it guards the result text. The question's caution text and the mark on a result's heading have no test of their own.cargo check --workspace --all-targets, the format and clippy run, andcargo test -p lightcraft-ui-egui --lib dialog_settings(128 tests, with i18n) pass on this head. At1cb0efe6d6(the stack with #2522's new head3d7fa853a1and #2906's new head29bdbd326dmerged in):cargo check, clippy with-D warnings(with #2973's one-file clippy fix applied uncommitted) andcargo test -p lightcraft-ui-egui --lib settings(143 tests) pass.Review: a fresh read-only reviewer at 8542b1d (30 Oct), reading the one test commit the merge needed (a tab has no border, and a choice's border is the one Settings makes legible): no blocking finding; and at a6e7b1b, reading the by-hand rebuild of the merge of #2906, #2525, #2523 and #2522 at their current heads (conflicts in
settings.rs,widgets.rsanddocs/whats-new.md; compared with the old tree line by line): no blocking finding. Earlier, at 1cb0efe (29 Oct), on this PR's two own commits: no blocking finding.After the 30 Oct restack onto its parent's current head:
cargo check --workspace --all-targets, the format and clippy run (-D warnings) andcargo test -p lightcraft-ui-egui --lib settingspass at 8542b1d (the lint run with #2973's one-file clippy fix applied uncommitted, then reverted); the fullcargo xtask ciquoted above was run at the head before, and the hostedCIgate runs it at this one.Screenshots
Release builds of this branch's head (
1cb0efe6d6) and of the same head with the changeb03bf80374reverted (the stack of its parents), headless CPU renderer, 1100×820 points at 2×, the procedural demo library in a scratch settings folder, Settings on Performance with the Clear Cache question open, cropped to the Settings window. What changes: the line under the tabs, the border of a choice that is not the chosen one (View Options draws its choices the same way), and the question's border and buttons.Not pictured: Midnight and Paper (covered by the pixel tests), and the other Settings tabs.
Merging
window()insettings.rswhere LR-PREF-GENERAL: letters the Settings filter found are marked behind a word, not cut out of it (stacked on #2905) #2906 and LR-PREF-GENERAL: Settings tabs look like tabs, and the keyboard focus shows and moves in one short way #2522 also do, andchoice_button_ininwidgets.rs(where LR-PREF-GENERAL: Settings tabs look like tabs, and the keyboard focus shows and moves in one short way #2522 added it).unsafe, build scripts, network access, spawned processes, deleted files, CI orxtaskgate changes: none.Checklist
tr(): no new text on screen, so no catalog changesdocs/parity-checklist.mdanddocs/gaps.md: unchanged, the parents carry them; one sentence indocs/whats-new.mdSummary by CodeRabbit
New Features
Safety & Accessibility