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
fix(ci): simplify culling, panel and brush predicates (#4897) - #4922
Main e4b673581 fails clippy::nonminimal_bool in three predicates. The culling failure was reproduced on unmodified main; correcting it exposed the two existing UI failures in full workspace Clippy.
This changes only those predicates:
Use is_none_or to skip missing or deleted photos during culling.
Apply De Morgan's law to the default Hide All Panels decision.
Factor the shared Alt modifier in the brush resize guard.
All three truth tables are equivalent. No lint suppression, dependency/workflow changes or test changes. No new unit test for these directly inspectable logical equivalences; existing culling, panel and brush tests remain intact.
Verification
cargo xtask ci --summary-md passed all nine gates on the exact tree committed as 200dae14: fmt, strict workspace Clippy/all targets, HEIF, workspace tests/doctests, parity, layers, assets, roots and WASM. macOS 27.2.1, Apple M2/Metal, Rust 1.95.0, default libtest, craft-fonts supplied.
The log reports 7,006 passes and 51 ignored cases across test invocations, including HEIF and parity-specific invocations. The report separately records 171 capability/data skips (151 corpus, 17 models, 2 fonts, 1 GPU); these returned without executing their checks and are included in libtest's pass counts. WASM retains unused/dead-code warnings. Linux and Windows were not run locally; hosted checks are pending.
The CI report identifies the parent plus uncommitted changes because validation preceded the commit; the committed tree is byte-identical to that validated tree.
Accessibility
No controls, labels, focus paths or gestures change. These are equivalent guards; existing keyboard, panel-restore and brush behavior tests passed in the full gate. No platform screen-reader test was performed.
This is a separate baseline dependency for #3757, not face-feature scope. No manual CodeRabbit review is requested.
AI assistance was used for the repair, verification and description.
Summary by CodeRabbit
Bug Fixes
Corrected the panel visibility action so it hides panels in the intended states when the visibility option is used without a specific action.
Fixed brush resizing with modifier keys: holding Alt with Ctrl or the secondary mouse button now starts a resize drag.
No actionable comments were generated in the recent review.
Walkthrough
Three boolean predicates change in photo culling, panel visibility, and brush resizing. The linked issue reports that these expressions fail strict Rust 1.95 Clippy validation.
The culling predicate uses is_none_or. The panel visibility and brush resize predicates use equivalent boolean expressions. The described decisions remain unchanged.
This change rewrites three boolean expressions to satisfy stricter Clippy rules without changing their behavior. No user-facing or production impact is expected, and it looks safe to merge once the hosted checks pass.
Pre-merge checks: 4
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title names three predicate simplifications (culling, panel, brush) that match the changeset. It also uses the "fix(ci)" prefix, which fits the stated goal of clearing Rust 1.95 strict Clippy fail…
Linked Issues check
[#4897] requires three equivalent predicate repairs. The diff from merge base e4b6735 to head 200dae1 implements each one:
1. crates/engine/src/cmd/cull.rs:118. Old skip condition: `contains_key |…
Out of Scope Changes check
The whole-PR diff changes three predicate lines in three files: cull.rs (+1/-1), run.rs (+1/-1), and brush.rs (+2/-1). Each change maps directly to one acceptance item in [#4897]. No unrelated code, t…
Full details: Title check
Explanation
The title names three predicate simplifications (culling, panel, brush) that match the changeset. It also uses the "fix(ci)" prefix, which fits the stated goal of clearing Rust 1.95 strict Clippy failures. The title is specific enough for a teammate to see the main change. The number #4897 refers to the linked issue, not the PR number (#4922), which is a minor mismatch. The title is 61 characters, slightly over typical length but within acceptable range.
Full details: Linked Issues check
Explanation
[#4897] requires three equivalent predicate repairs. The diff from merge base e4b6735 to head 200dae1 implements each one:
crates/engine/src/cmd/cull.rs:118. Old skip condition: contains_key || !(photo.is_some_and(|ph| !ph.deleted)). This skips when the photo is missing or deleted. New condition: contains_key || photo.is_none_or(|ph| ph.deleted). The two forms have the same truth table. Truth values for photo/group/ranking behavior are unchanged.
crates/ui-egui/src/menus/run.rs:735. Old: !A && !(B && C). New: !(A || B && C). Here A is all_panels_hidden(), B is no_panel_shown(), and C is hidden_panels.is_none(). Operator precedence binds && before ||, so the new form is !(A || (B && C)). De Morgan's law gives the same result. Panel restore state is unchanged.
crates/ui-egui/src/panels/detail/brush.rs:153-154. Old: (ctrl && alt) || (alt && secondary). New: alt && (ctrl || secondary). Factoring the shared Alt term gives the same truth table. The let-chain guard and press_origin path are unchanged, so brush resize gestures keep the same behavior.
No lint suppression, test, dependency, or workflow change appears in the diff. Reported CI results were not independently re-run. Those results do not affect this coding-requirement verdict, which rests on the source diff.
Full details: Out of Scope Changes check
Explanation
The whole-PR diff changes three predicate lines in three files: cull.rs (+1/-1), run.rs (+1/-1), and brush.rs (+2/-1). Each change maps directly to one acceptance item in [#4897]. No unrelated code, test, dependency, CI, or workflow file changed. The PR description states that no face-feature scope is included, and the diff contains no face-ignore code. The diff contains no out-of-scope change.
Finishing Touches
Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Reviewing files that changed from the base of the PR and between e4b6735 and 200dae1.
Files selected for processing: 3
crates/engine/src/cmd/cull.rs
crates/ui-egui/src/menus/run.rs
crates/ui-egui/src/panels/detail/brush.rs
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
lostwald
added a commit
to lostwald/lightcraft
that referenced
this pull request
Nov 29, 2026
Resolve locale, catalog and history integration conflicts while retaining upstream changes. Move ignored faces to catalog format 15 after culling ranks took 14; preserve prior ignores and culling data. Retain catalog-only policy through partial rollback recovery, and clarify sidecar-refresh reload guidance. The combined tree with the separate storytold#4922 lint dependency passed all nine CI gates before these normal merge commits.
lostwald
added a commit
to lostwald/lightcraft
that referenced
this pull request
Nov 29, 2026
Temporarily stack storytold#4922 as an explicit dependency. Its three equivalent predicates remain separately reviewable. This final tree is byte-identical to the combined tree that passed all nine cargo xtask ci gates.
@FredApps This standalone baseline dependency for #3757 is ready for review/merge at 200dae14. Hosted Linux CI, SonarCloud and CodeRabbit passed; no checks are failing or pending. Windows tests, instrumented coverage tests, nightly packaging and alternate matrix legs were skipped, not executed. All nine local gates also passed on the exact committed tree. The diff remains only the three equivalent boolean guards, with no workflow, dependency or test changes. #3757 already includes this commit by a normal merge, so landing this repair on main will remove its three guard edits from the feature diff.
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 200dae14. All three rewrites are exact logical equivalents. I checked each against the original on current main, where the nonminimal_bool lines are still present:
cull.rs:118: !photo.is_some_and(|ph| !ph.deleted) → photo.is_none_or(|ph| ph.deleted). Missing or deleted photos are still skipped.
menus/run.rs:735: !a && !(b && c) → !(a || b && c). That's De Morgan, and && binding tighter than || keeps the grouping the same.
There are no lint suppressions and no changes to tests, workflows or dependencies, and the hosted Linux gate is green. From my side this is good to land ahead of #3757. I read the source only and didn't run Clippy here.
The reason will be displayed to describe this comment to others. Learn more.
Checked the three rewrites against current main. Each has the same truth table, and is_none_or is fine on our 1.95 rust-version. There are no lint suppressions and no test, workflow or dependency changes, and the Ubuntu gate is green. Approving.
This branch has not been deployed
No deployments
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.
Strict Rust 1.95 validation runs again without changing culling, panel visibility or brush gestures.
Fixes #4897.
Main
e4b673581failsclippy::nonminimal_boolin three predicates. The culling failure was reproduced on unmodified main; correcting it exposed the two existing UI failures in full workspace Clippy.This changes only those predicates:
is_none_orto skip missing or deleted photos during culling.All three truth tables are equivalent. No lint suppression, dependency/workflow changes or test changes. No new unit test for these directly inspectable logical equivalences; existing culling, panel and brush tests remain intact.
Verification
cargo xtask ci --summary-mdpassed all nine gates on the exact tree committed as200dae14: fmt, strict workspace Clippy/all targets, HEIF, workspace tests/doctests, parity, layers, assets, roots and WASM. macOS 27.2.1, Apple M2/Metal, Rust 1.95.0, default libtest, craft-fonts supplied.The log reports 7,006 passes and 51 ignored cases across test invocations, including HEIF and parity-specific invocations. The report separately records 171 capability/data skips (151 corpus, 17 models, 2 fonts, 1 GPU); these returned without executing their checks and are included in libtest's pass counts. WASM retains unused/dead-code warnings. Linux and Windows were not run locally; hosted checks are pending.
The CI report identifies the parent plus uncommitted changes because validation preceded the commit; the committed tree is byte-identical to that validated tree.
Accessibility
No controls, labels, focus paths or gestures change. These are equivalent guards; existing keyboard, panel-restore and brush behavior tests passed in the full gate. No platform screen-reader test was performed.
This is a separate baseline dependency for #3757, not face-feature scope. No manual CodeRabbit review is requested.
AI assistance was used for the repair, verification and description.
Summary by CodeRabbit