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
feat: Added search functionality to Audacity 4 Preferences - #12915
This adds a search field to the Preferences window. Search matches section names and settings labels (including partial matches). Opening a result goesto and highlights a matching label if available.
The preferences dialog adds search across preference-page titles and descendant title and text labels. Matching pages appear in a results list. Selecting a result switches to its page and scrolls to a visible match, highlighting it when it is a Text item. The sidebar includes keyboard navigation, a shortcut to focus the search field, Escape handling, and a no-results message. The preferences model now includes page titles in its available-page data.
sequenceDiagram
actor User
participant PreferencesDialog
participant PreferencesModel
participant PreferencePage
User->>PreferencesDialog: Enter search query
PreferencesDialog->>PreferencesModel: Read available page titles
PreferencesDialog->>PreferencePage: Index descendant title and text labels
PreferencesDialog-->>User: Show matching pages
User->>PreferencesDialog: Select a result
PreferencesDialog->>PreferencePage: Switch page and scroll to visible match
PreferencesDialog-->>User: Highlight matched Text item
Loading
Merge Risk: Low · up to e4d4d
Preferences search adds a search field that finds sections and labels. In edge cases, such as changing high contrast while the dialog is open, or a hidden label matching first, search results may be stale or may not highlight the visible match. The impact is minor and the page still opens, so this is mergeable with small follow-ups.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title states the main change: a search feature added to Audacity 4 Preferences. The raw summary confirms the PreferencesDialog.qml search field, results list, and navigation to matched items, and …
Description check
The description follows the repository template. It includes the Resolves line with a direct link to issue #12914 and a short explanation of the search feature and its matching behavior. All checklist…
Linked Issues check
Issue #12914 has three coding requirements. (1) Narrow the category list to categories with matching settings: PreferencesDialog.qml replaces the preferences menu with a results list while a query is …
Out of Scope Changes check
All changes support the search feature. The PreferencesDialog.qml changes add the search field, results list, keyboard navigation, no-results message, and sidebar layout needed to show results. The Ct…
Full details: Title check
Explanation
The title states the main change: a search feature added to Audacity 4 Preferences. The raw summary confirms the PreferencesDialog.qml search field, results list, and navigation to matched items, and the PR objectives describe the same feature. The title is specific and accurate, and it follows the conventional commit prefix style.
Full details: Description check
Explanation
The description follows the repository template. It includes the Resolves line with a direct link to issue #12914 and a short explanation of the search feature and its matching behavior. All checklist items from the template are present and marked. It is brief and does not describe the implementation details, such as the Ctrl+Shift+L shortcut, Escape handling, or the no-results message. It also does not report any testing. These gaps are non-critical, so the description is mostly complete.
Full details: Linked Issues check
Explanation
Issue #12914 has three coding requirements. (1) Narrow the category list to categories with matching settings: PreferencesDialog.qml replaces the preferences menu with a results list while a query is active. Results list matching pages whose title or descendant title/text labels contain the trimmed, lowercase query. (2) Opening a result navigates to its section and highlights the matching label when the item is visible and is a Text item. This matches the issue's 'if possible' wording. (3) Clearing the search restores the full list: Escape clears an active query, and the menu returns when the query is empty. PreferencesModel::availablePages() adds each page title, which the QML search needs. Partial matching is implemented by substring comparison, as the PR description states. The assessment relies on the AI-generated summary and the PR description. I did not inspect the QML hunks or run the dialog, so runtime behavior of the highlight and the clear path is not independently verified. No automated tests are part of the stated requirements, and none are reported.
Full details: Out of Scope Changes check
Explanation
All changes support the search feature. The PreferencesDialog.qml changes add the search field, results list, keyboard navigation, no-results message, and sidebar layout needed to show results. The Ctrl+Shift+L shortcut focuses the search field, so it belongs to the same feature. The PreferencesModel.cpp change exposes page titles for matching. No unrelated functional change appears in the summary. The summary reports no changes to exported or public declarations. The PR reports a moderate code size (+203/-6 in QML, +1 in C++). The reviewed evidence does not show unrelated changes.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Warning
Linked repositories: Public OSS repositories can only analyze public repositories installed in this organization. No linked repositories were analyzed; skipped musescore/musescore.
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Refresh cached text when setting labels change.
After the first search, enable high contrast without closing Preferences. ThemesSection.title changes from “Theme” to “High-contrast theme”. The index retains the earlier string because this branch never runs again. Searches for the new heading therefore use stale label text. (raw.githubusercontent.com)
Invalidate the index when labels change, or read current label properties during matching.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Select a visible match after opening the page.
With high contrast enabled, search for “Accent color”. The first matching label belongs to the hidden AccentColorsSection. A later matching label in UiColorsSection is visible. The visibility guard on Line 94 returns without scrolling or highlighting that available label. (raw.githubusercontent.com)
Keep the matching candidates and select a visible candidate after page activation. Do not exclude inactive pages during indexing.
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.
Assisted-by: OpenAI Codex
Resolves: #12914
This adds a search field to the Preferences window. Search matches section names and settings labels (including partial matches). Opening a result goesto and highlights a matching label if available.
Recommended: