Skip to content

Conversation

Jack251970
Copy link
Member

Add {get; } to fix AllEverythingSortOptions issue

@prlabeler prlabeler bot added the bug Something isn't working label Sep 17, 2025
@github-actions github-actions bot added this to the 2.1.0 milestone Sep 17, 2025
@Jack251970 Jack251970 linked an issue Sep 17, 2025 that may be closed by this pull request
3 tasks
@Jack251970 Jack251970 added the kind/ui related to UI, icons, themes, etc label Sep 17, 2025
Copy link

gitstream-cm bot commented Sep 17, 2025

🥷 Code experts: VictoriousRaptor, Yusyuriv

Jack251970, VictoriousRaptor have most 👩‍💻 activity in the files.
Yusyuriv, Jack251970 have most 🧠 knowledge in the files.

See details

Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs

Activity based on git-commit:

Jack251970 VictoriousRaptor
SEP
AUG
JUL 17 additions & 13 deletions 33 additions & 6 deletions
JUN 51 additions & 27 deletions
MAY
APR 21 additions & 36 deletions

Knowledge based on git-blame:
Yusyuriv: 20%
Jack251970: 13%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

Copy link

gitstream-cm bot commented Sep 17, 2025

Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX.

Copy link
Contributor

coderabbitai bot commented Sep 17, 2025

📝 Walkthrough

Walkthrough

Converted expression-bodied constants and a public field in SettingsViewModel to get-only auto-properties with initializers, preserving values and external access patterns.

Changes

Cohort / File(s) Summary of Changes
SettingsViewModel property refactor
Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs
- MaxResultLowerLimit changed from expression-bodied getter to get-only auto-property initialized to 1
- MaxResultUpperLimit changed from expression-bodied getter to get-only auto-property initialized to 100000
- AllEverythingSortOptions changed from public field to public get-only auto-property initialized via EverythingSortOptionLocalized.GetValues()

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested reviewers

  • onesounds

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Fix AllEverythingSortOptions issue" directly references a concrete change in the diff—converting AllEverythingSortOptions from a mutable field to a get-only property—so it accurately summarizes a primary fix in the changeset. It is concise and clear, although it does not call out the additional minor property signature changes to MaxResultLowerLimit and MaxResultUpperLimit.
Description Check ✅ Passed The description "Add {get; } to fix AllEverythingSortOptions issue" is directly related to the changeset and correctly describes the primary fix (adding get-only accessors), satisfying the lenient description check despite being brief.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch everything_sort_option

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (2)
Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs (2)

595-595: Optional: expose as IReadOnlyList to prevent external mutation

Safer surface while remaining fine for ItemsSource bindings.

Apply:

-        public List<EverythingSortOptionLocalized> AllEverythingSortOptions { get; } = EverythingSortOptionLocalized.GetValues();
+        public IReadOnlyList<EverythingSortOptionLocalized> AllEverythingSortOptions { get; } =
+            EverythingSortOptionLocalized.GetValues();

Or to harden further:

-        public List<EverythingSortOptionLocalized> AllEverythingSortOptions { get; } = EverythingSortOptionLocalized.GetValues();
+        public IReadOnlyList<EverythingSortOptionLocalized> AllEverythingSortOptions { get; } =
+            EverythingSortOptionLocalized.GetValues().AsReadOnly();

580-581: Optional: convert Min/Max to const/static

Repo search shows no XAML bindings; occurrences only in Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs (lines 580–581; used at 588), so safe to convert to avoid per-instance backing fields.

Option A — const fields:

-        public int MaxResultLowerLimit { get; } = 1;
-        public int MaxResultUpperLimit { get; } = 100000;
+        public const int MaxResultLowerLimit = 1;
+        public const int MaxResultUpperLimit = 100000;

Option B — static expression‑bodied props:

-        public int MaxResultLowerLimit { get; } = 1;
-        public int MaxResultUpperLimit { get; } = 100000;
+        public static int MaxResultLowerLimit => 1;
+        public static int MaxResultUpperLimit => 100000;
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8bac530 and 23d0b73.

📒 Files selected for processing (1)
  • Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: gitStream.cm
  • GitHub Check: gitStream.cm
  • GitHub Check: build
🔇 Additional comments (1)
Plugins/Flow.Launcher.Plugin.Explorer/ViewModels/SettingsViewModel.cs (1)

595-595: LGTM: converting the field to a get‑only property fixes WPF binding

Fields aren’t bindable; this resolves the AllEverythingSortOptions binding issue without changing semantics.

@Jack251970
Copy link
Member Author

Tested and good to go, please approve. Thanks!

@Jack251970 Jack251970 merged commit 3f0f118 into dev Sep 18, 2025
14 checks passed
@Jack251970 Jack251970 deleted the everything_sort_option branch September 18, 2025 01:07
@jjw24 jjw24 changed the title Fix AllEverythingSortOptions issue Fix missing Everything sorting options caused by AllEverythingSortOptions issue Sep 18, 2025
@jjw24 jjw24 modified the milestones: 2.1.0, 2.0.1 Sep 21, 2025
jjw24 pushed a commit that referenced this pull request Sep 21, 2025
@jjw24 jjw24 mentioned this pull request Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working kind/ui related to UI, icons, themes, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Unable to switch Everything's sorting options
3 participants