Skip to content

Fix(spotlight): improve file search query restoration and mode switching - #2887

Merged
bbedward merged 5 commits into
duxlabs-dev:masterfrom
Legend-017:fix(spotlight)
Jul 20, 2026
Merged

bbedward merged 5 commits into
duxlabs-dev:masterfrom
Legend-017:fix(spotlight)

Conversation

@Legend-017

Copy link
Copy Markdown
Contributor

Description

  • Fix empty results on query restore: fix(spotlight): fix empty results on restoring last file search query.
  • Proper mode restoration: Ensures the last selected mode (tab) is correctly restored upon launch when the setting is enabled.
  • File trigger in plugins mode: Allows the / file search trigger in the plugins tab.
  • Clear / prefix behavior: Prevents the launcher from getting stuck in "files" mode when the / prefix is deleted, now correctly reverting to the "All" tab or remembered mode(tab).

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • Refactor / internal cleanup

Related issues

Checklist

  • My code follows the conventions in CONTRIBUTING.md
  • I have tested my changes locally
  • QML changes: ran make lint-qml with no new warnings

@bbedward bbedward left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This creates a regression with queries like this dms ipc call launcher toggleQuery "vim" , vim is pre-selected instead of having the cursor at the end as we want. The main use case for that is plugins, so we don't want to pre-select text when its launched with an explicit query

- When "remember last query" is enabled and the last query is file search, it shows "no results" until the query is manually modified in full launcher mode.
if (explicitType !== null && SessionData.launcherLastFileSearchType !== explicitType) {
SessionData.setLauncherLastFileSearchType(explicitType);
}
} else {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just style wise, this should be an else if. In general I prefer guard statement patterns though.

…refix

When the '/' prefix is removed from the query, the controller now correctly reverts to the previous mode instead of remaining stuck in "files" mode.
@bbedward
bbedward merged commit 367ad5f into duxlabs-dev:master Jul 20, 2026
1 check passed
@Legend-017
Legend-017 deleted the fix(spotlight) branch July 20, 2026 14:33
bbedward pushed a commit that referenced this pull request Jul 24, 2026
…ing (#2887)

* fix(spotlight): fix empty results on restoring last file search query

- When "remember last query" is enabled and the last query is file search, it shows "no results" until the query is manually modified in full launcher mode.

* fix(spotlight): properly restore last selected mode(tab) when enabled in full launcher mode

* fix(spotlight): allow file trigger in plugins mode(tab)

* fix(spotlight): restore previous mode when clearing '/' file search prefix

When the '/' prefix is removed from the query, the controller now correctly reverts to the previous mode instead of remaining stuck in "files" mode.

* fix(spotlight): code review fix

(cherry picked from commit 367ad5f)
marcusramberg pushed a commit to marcusramberg/DankMaterialShell that referenced this pull request Sep 2, 2026
…ing (duxlabs-dev#2887)

* fix(spotlight): fix empty results on restoring last file search query

- When "remember last query" is enabled and the last query is file search, it shows "no results" until the query is manually modified in full launcher mode.

* fix(spotlight): properly restore last selected mode(tab) when enabled in full launcher mode

* fix(spotlight): allow file trigger in plugins mode(tab)

* fix(spotlight): restore previous mode when clearing '/' file search prefix

When the '/' prefix is removed from the query, the controller now correctly reverts to the previous mode instead of remaining stuck in "files" mode.

* fix(spotlight): code review fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants