Skip to content

Conversation

@01Dri
Copy link
Contributor

@01Dri 01Dri commented Dec 14, 2025

Issue: #3984

Example:

2025-12-14.19-05-17.mp4

@prlabeler prlabeler bot added the enhancement New feature or request label Dec 14, 2025
@github-actions github-actions bot added this to the 2.1.0 milestone Dec 14, 2025
@gitstream-cm
Copy link

gitstream-cm bot commented Dec 14, 2025

🥷 Code experts: Jack251970, VictoriousRaptor

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

See details

Flow.Launcher.Infrastructure/UserSettings/Settings.cs

Activity based on git-commit:

Jack251970
DEC
NOV
OCT 31 additions & 52 deletions
SEP 2 additions & 3 deletions
AUG
JUL 45 additions & 4 deletions

Knowledge based on git-blame:
VictoriousRaptor: 81%
Jack251970: 13%

Flow.Launcher/Languages/en.xaml

Activity based on git-commit:

Jack251970
DEC
NOV
OCT 13 additions & 10 deletions
SEP 14 additions & 6 deletions
AUG 4 additions & 0 deletions
JUL 48 additions & 13 deletions

Knowledge based on git-blame:
Jack251970: 94%
VictoriousRaptor: 2%

Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml

Activity based on git-commit:

Jack251970
DEC
NOV
OCT 405 additions & 348 deletions
SEP 2 additions & 2 deletions
AUG
JUL 41 additions & 36 deletions

Knowledge based on git-blame:
Jack251970: 91%

Flow.Launcher/ViewModel/MainViewModel.cs

Activity based on git-commit:

Jack251970
DEC
NOV 106 additions & 94 deletions
OCT 125 additions & 88 deletions
SEP 13 additions & 15 deletions
AUG
JUL 76 additions & 51 deletions

Knowledge based on git-blame:
Jack251970: 85%

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

@gitstream-cm
Copy link

gitstream-cm bot commented Dec 14, 2025

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

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 14, 2025

📝 Walkthrough

Walkthrough

Adds a new boolean setting AutoTopmostLastOpenedResult with localization and a toggle in General settings, and updates MainViewModel to add/update a selected result in the topmost tracker when that setting is enabled and the selection comes from the results list.

Changes

Cohort / File(s) Summary
Settings model
Flow.Launcher.Infrastructure/UserSettings/Settings.cs
Added private field private bool _autoTopmostLastOpenedResults = false; and public property bool AutoTopmostLastOpenedResult with getter/setter and OnPropertyChanged notification.
Localization resources
Flow.Launcher/Languages/en.xaml
Added resource keys autoTopmostLastOpenedResult and autoTopmostLastOpenedResultToolTip with corresponding English text.
UI settings control
Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
Added a SettingsCard with a ToggleSwitch bound to Settings.AutoTopmostLastOpenedResult using the new localization keys.
Feature logic
Flow.Launcher/ViewModel/MainViewModel.cs
After adding a selected result to history (when selection is from results), conditionally add/update it in the topmost tracker if Settings.AutoTopmostLastOpenedResult is true.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Inspect the MainViewModel insertion to ensure it only triggers for interactive selections and maintains existing execution/error flows.
  • Verify the Settings property name, backing field, and OnPropertyChanged usage match project conventions and persistence.
  • Confirm ToggleSwitch binding and localization keys match neighboring settings and resource naming.

Possibly related PRs

Suggested reviewers

  • Jack251970
  • onesounds

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 2 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title check ❓ Inconclusive The title '[FEATURE] Topmost automatically' is vague and incomplete—it doesn't clearly describe what the feature does or what 'topmost automatically' means without additional context. Use a more descriptive title such as '[FEATURE] Auto-mark selected results as topmost for faster access' to clearly convey the feature's purpose.
Description check ❓ Inconclusive The description provides only a link to an issue and a video example, with no textual explanation of what the feature does or why it was implemented. Add a brief explanation of the feature's purpose and functionality alongside the issue link and example.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c808488 and e5414d9.

📒 Files selected for processing (4)
  • Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1 hunks)
  • Flow.Launcher/Languages/en.xaml (1 hunks)
  • Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml (1 hunks)
  • Flow.Launcher/ViewModel/MainViewModel.cs (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
  • Flow.Launcher/Languages/en.xaml
  • Flow.Launcher/ViewModel/MainViewModel.cs
  • Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml
  • Flow.Launcher.Infrastructure/UserSettings/Settings.cs
⏰ 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). (1)
  • GitHub Check: build

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: 1

🧹 Nitpick comments (1)
Flow.Launcher/ViewModel/MainViewModel.cs (1)

536-543: Consider the UX implications of automatically marking every selected result as topmost.

When AutoTopmost is enabled, every result a user selects from the query results will be automatically added to the topmost tracker for that query. This could lead to:

  1. Rapid accumulation of topmost records: If a user frequently explores different results, many items could be marked as topmost, potentially diminishing the value of the feature.

  2. Loss of intentional curation: The manual topmost feature (accessed via context menu, lines 1756-1797) allows users to deliberately mark important results. Auto-marking removes this intentionality.

  3. No way to undo easily: Unlike the manual feature which has "Cancel topmost in this query" option, auto-marked results would need to be removed through the context menu, which users might not discover.

Consider adding guidance in the tooltip or implementing one of these enhancements:

  • Add a frequency threshold (e.g., only mark as topmost if selected 2+ times)
  • Limit the number of auto-topmost results per query
  • Add a separate UI indicator or notification when a result is auto-marked as topmost
  • Document this behavior more clearly in the feature description
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9066913 and 693ca2b.

📒 Files selected for processing (4)
  • Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1 hunks)
  • Flow.Launcher/Languages/en.xaml (1 hunks)
  • Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml (1 hunks)
  • Flow.Launcher/ViewModel/MainViewModel.cs (2 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: Yusyuriv
Repo: Flow-Launcher/Flow.Launcher PR: 3057
File: Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs:0-0
Timestamp: 2024-11-03T07:40:11.014Z
Learning: In Flow Launcher, when using Windows Forms dialogs (e.g., in `JsonRPCPluginSettings.cs`), path validation is enabled by default in `OpenFileDialog` and `FolderBrowserDialog`, preventing users from selecting invalid paths, but it's possible to opt out of this validation on individual dialogs.
📚 Learning: 2025-05-01T05:38:25.673Z
Learnt from: Jack251970
Repo: Flow-Launcher/Flow.Launcher PR: 3500
File: Flow.Launcher/Storage/TopMostRecord.cs:145-149
Timestamp: 2025-05-01T05:38:25.673Z
Learning: For the MultipleTopMostRecord implementation in Flow.Launcher, sequence order of records in the ConcurrentBag does not need to be preserved, as confirmed by the developer. The unordered nature of ConcurrentBag is acceptable for this implementation.

Applied to files:

  • Flow.Launcher/ViewModel/MainViewModel.cs
📚 Learning: 2025-09-05T11:56:27.267Z
Learnt from: Jack251970
Repo: Flow-Launcher/Flow.Launcher PR: 3593
File: Flow.Launcher/HotkeyControlDialog.xaml:6-6
Timestamp: 2025-09-05T11:56:27.267Z
Learning: In Flow.Launcher's migration to iNKORE.UI.WPF.Modern UI framework, dialog resource keys like PopuBGColor, PopupButtonAreaBGColor, PopupButtonAreaBorderColor, and PopupTextColor are provided by the iNKORE.UI.WPF.Modern framework itself, not defined locally in the codebase theme files.

Applied to files:

  • Flow.Launcher/Languages/en.xaml
📚 Learning: 2024-10-08T15:52:58.573Z
Learnt from: taooceros
Repo: Flow-Launcher/Flow.Launcher PR: 2616
File: Flow.Launcher/Flow.Launcher.csproj:7-7
Timestamp: 2024-10-08T15:52:58.573Z
Learning: In the Flow Launcher project, the version number in the `Flow.Launcher.csproj` file is dynamically updated during the CI/CD process.

Applied to files:

  • Flow.Launcher/Languages/en.xaml
📚 Learning: 2025-06-08T14:12:21.348Z
Learnt from: Jack251970
Repo: Flow-Launcher/Flow.Launcher PR: 3672
File: Flow.Launcher/MainWindow.xaml.cs:244-247
Timestamp: 2025-06-08T14:12:21.348Z
Learning: In Flow.Launcher, App.NotifyIcon is created before MainWindow creation, so null checks for App.NotifyIcon are not necessary when accessing it from MainWindow code.

Applied to files:

  • Flow.Launcher/Languages/en.xaml
📚 Learning: 2024-11-03T07:40:11.014Z
Learnt from: Yusyuriv
Repo: Flow-Launcher/Flow.Launcher PR: 3057
File: Flow.Launcher.Core/Plugin/JsonRPCPluginSettings.cs:0-0
Timestamp: 2024-11-03T07:40:11.014Z
Learning: In Flow Launcher, when using Windows Forms dialogs (e.g., in `JsonRPCPluginSettings.cs`), path validation is enabled by default in `OpenFileDialog` and `FolderBrowserDialog`, preventing users from selecting invalid paths, but it's possible to opt out of this validation on individual dialogs.

Applied to files:

  • Flow.Launcher/Languages/en.xaml
📚 Learning: 2025-09-28T03:57:43.995Z
Learnt from: Jack251970
Repo: Flow-Launcher/Flow.Launcher PR: 3770
File: Flow.Launcher/Helper/HotKeyMapper.cs:0-0
Timestamp: 2025-09-28T03:57:43.995Z
Learning: In Flow.Launcher/Helper/HotKeyMapper.cs, the resource descriptions for arrow keys are intentionally swapped - Up/Down keys use "HotkeyLeftRightDesc" and Left/Right keys use "HotkeyUpDownDesc". This is documented with an inline comment and is intended behavior, not a bug.

Applied to files:

  • Flow.Launcher/Languages/en.xaml
🧬 Code graph analysis (1)
Flow.Launcher/ViewModel/MainViewModel.cs (3)
Flow.Launcher/Storage/QueryHistory.cs (1)
  • Add (36-65)
Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1)
  • Settings (16-646)
Flow.Launcher/Storage/TopMostRecord.cs (3)
  • AddOrUpdate (99-102)
  • AddOrUpdate (130-140)
  • AddOrUpdate (216-246)
⏰ 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). (2)
  • GitHub Check: gitStream.cm
  • GitHub Check: build
🔇 Additional comments (2)
Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1)

499-511: LGTM!

The property implementation follows the established pattern used throughout the Settings class, includes proper change notification, and has a safe default value of false.

Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml (1)

99-111: LGTM!

The SettingsCard implementation follows the established patterns in this file, uses appropriate spacing and styling, and is logically placed next to the related "Show At Topmost" setting. The icon reuse (glyph ) is appropriate since both features relate to topmost behavior.

Note: The misleading feature description flagged in en.xaml applies to this UI card as well, but the issue originates from the resource strings, not the XAML structure itself.

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 (1)
Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml (1)

99-111: Consider using a distinct icon for the AutoTopmostResults setting.

The new setting uses the same icon glyph () as the ShowAtTopmost setting (Line 90). While these features are related, they serve different purposes—ShowAtTopmost controls whether the launcher window stays on top, while AutoTopmostResults appears to automatically prioritize frequently selected results. Using distinct icons would help users differentiate between these features at a glance.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 693ca2b and 0c9bd7f.

📒 Files selected for processing (4)
  • Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1 hunks)
  • Flow.Launcher/Languages/en.xaml (1 hunks)
  • Flow.Launcher/SettingPages/Views/SettingsPaneGeneral.xaml (1 hunks)
  • Flow.Launcher/ViewModel/MainViewModel.cs (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
  • Flow.Launcher/ViewModel/MainViewModel.cs
  • Flow.Launcher/Languages/en.xaml
⏰ 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). (2)
  • GitHub Check: gitStream.cm
  • GitHub Check: build
🔇 Additional comments (1)
Flow.Launcher.Infrastructure/UserSettings/Settings.cs (1)

499-512: LGTM!

The AutoTopmostResults property implementation correctly follows the established pattern for boolean settings in this class, including proper INotifyPropertyChanged support and a sensible default value of false.

Jack251970
Jack251970 previously approved these changes Dec 15, 2025
@jjw24 jjw24 added the review in progress Indicates that a review is in progress for this PR label Dec 17, 2025
Copy link
Member

@jjw24 jjw24 left a comment

Choose a reason for hiding this comment

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

This leads to the MultipleTopMostRecord.json file growing indefinitely with unique queries when the option is on.

If the goal is to allow faster access to results by pushing frequently selected results to the top, I think the ideal change is to rebalance the 'selected record count' bump. The mechanism is there to allow frequently selected results to show up higher and seems like it is not as effective. We can rebalance it to have results show up better like this:

Image

@jjw24 jjw24 dismissed Jack251970’s stale review December 25, 2025 06:31

Need discussion first. See my comment about the 'selected count' bump

@01Dri
Copy link
Contributor Author

01Dri commented Dec 26, 2025

This leads to the MultipleTopMostRecord.json file growing indefinitely with unique queries when the option is on.

If the goal is to allow faster access to results by pushing frequently selected results to the top, I think the ideal change is to rebalance the 'selected record count' bump. The mechanism is there to allow frequently selected results to show up higher and seems like it is not as effective. We can rebalance it to have results show up better like this:

Image

Hmm, it works, but changing the current result balance may affect other users who are already satisfied with the existing behavior.

What do you think about using the new option I added in my PR? When enabled, it would prioritize the last selected result by placing it at the top of the ranking, rebalancing the selected result with a higher score.

The new option could be something like "Prioritize the last query as the top result". When this option is enabled, the query score could be set to 100, guaranteeing priority in the results. Otherwise, we can keep using the default value (5).

@jjw24
Copy link
Member

jjw24 commented Jan 2, 2026

@01Dri thank you for considering this option as well. I think currently I have seen some issues and comments that the current bump is not significant or obvious enough, users have had to select the result several times before they are satisfied with the placement. So I think the rebalancing is not going to be too negative on user experience.

What I propose, since this option is significantly less effort, how about we bump it appropriately and once we get some feedback then we can consider adding the toggle option if it is negatively impacting the users. What do you guys think?

@jjw24
Copy link
Member

jjw24 commented Jan 2, 2026

One thing I would recommend is also we need to be mindful of introducing new features unless they are highly requested, because the more we add the more complex flow becomes to maintain. This is not to say this feature is not good, just that we can solve the root cause with something significantly simpler, it would be better for the long term.

@01Dri
Copy link
Contributor Author

01Dri commented Jan 3, 2026

@01Dri thank you for considering this option as well. I think currently I have seen some issues and comments that the current bump is not significant or obvious enough, users have had to select the result several times before they are satisfied with the placement. So I think the rebalancing is not going to be too negative on user experience.

What I propose, since this option is significantly less effort, how about we bump it appropriately and once we get some feedback then we can consider adding the toggle option if it is negatively impacting the users. What do you guys think?

Ok for me.

My friend will take care of this feature because I’m traveling at the moment.

@egotting
Copy link

egotting commented Jan 5, 2026

@01Dri thank you for considering this option as well. I think currently I have seen some issues and comments that the current bump is not significant or obvious enough, users have had to select the result several times before they are satisfied with the placement. So I think the rebalancing is not going to be too negative on user experience.
What I propose, since this option is significantly less effort, how about we bump it appropriately and once we get some feedback then we can consider adding the toggle option if it is negatively impacting the users. What do you guys think?

Ok for me.

My friend will take care of this feature because I’m traveling at the moment.

Sorry for the delay, I’ll take care of it.

@egotting
Copy link

egotting commented Jan 7, 2026

This leads to the MultipleTopMostRecord.json file growing indefinitely with unique queries when the option is on.

If the goal is to allow faster access to results by pushing frequently selected results to the top, I think the ideal change is to rebalance the 'selected record count' bump. The mechanism is there to allow frequently selected results to show up higher and seems like it is not as effective. We can rebalance it to have results show up better like this:

Image Image

I’ve reviewed the code, and the actual value doesn’t matter. The logic is that if a user clicks, for example, Notepad four times and then clicks Sublime once, Sublime should not move up because it hasn’t surpassed the user’s favorite item. However, I think a better approach would be to always move an item to the top whenever the user clicks it.

202601062142.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1 min review enhancement New feature or request review in progress Indicates that a review is in progress for this PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants