Skip to content

Return extension from file dialog and use it on file save - #199

Open
embarc-gabriel wants to merge 1 commit into
musescore:mainfrom
embarc-gabriel:fix-file-picker-on-linux
Open

Return extension from file dialog and use it on file save#199
embarc-gabriel wants to merge 1 commit into
musescore:mainfrom
embarc-gabriel:fix-file-picker-on-linux

Conversation

@embarc-gabriel

Copy link
Copy Markdown
Contributor

Resolves: audacity/audacity#8166

Linux file picker on save does not add the selected extension to the filename.
This PR returns the extension from the dialog and append it to the filename.

  • I signed the CLA as username:
  • The title of the PR describes the problem it addresses.
  • Each commit's message describes its purpose and effects, and references the issue it resolves. If changes are extensive, there is a sequence of easily reviewable commits.
  • The code in the PR follows the coding rules.
  • I understand all aspects of the code I'm contributing and I'm able to explain it if requested.
  • The code compiles and runs on my machine, preferably after each commit individually. I have manually tested and verified that my changes fulfil their intended purpose.
  • No prior attempts to resolve this problem exist, or if they do, I listed them in my PR description and described how I avoided repeating past mistakes.
  • There are no unnecessary changes.
  • I created a unit test or vtest to verify the changes I made (if applicable).

Build configuration

audacity: audacity/audacity/master
audacity platforms: linux_x64
musescore: musescore/MuseScore/main
musescore platforms: linux_x64

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@embarc-gabriel, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 5c3afb24-4740-4fef-97ac-a877cd62339a

📥 Commits

Reviewing files that changed from the base of the PR and between bb220c0 and eb6dddd.

📒 Files selected for processing (1)
  • framework/interactive/qml/Muse/Interactive/FileDialog.qml
📝 Walkthrough

Walkthrough

The QML file dialog resets the selected name-filter index before opening. It adds an allFilesExtension property and an appendSuffixIfNeeded(filePath) helper. The helper appends the first selected filter extension unless the extension is empty, wildcard, or already present. Save-file acceptance uses the helper. Other acceptance modes retain their existing behavior.

🚥 Pre-merge checks | ✅ 2 | ❌ 3

❌ Failed checks (3 warnings)

Check name Status Explanation Resolution
Linked Issues check ⚠️ Warning The changes handle save-file suffixes but do not show that native import filters expose .txt preset files as required by issue #8166. Update the import name filter to include .txt preset files, or link this PR to the issue that tracks save-extension behavior.
Out of Scope Changes check ⚠️ Warning Save-file suffix handling is separate from issue #8166, which concerns visibility of .txt presets in the native import picker. Remove the unrelated save-path changes or provide evidence that they also implement the issue's import-filter requirement.
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes returning and applying the selected file extension during saving.
Description check ✅ Passed The description explains the problem, proposed fix, issue link, checklist status, and build configuration; the missing test is non-critical.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@framework/interactive/qml/Muse/Interactive/FileDialog.qml`:
- Around line 51-58: Update the extension lookup in the return construction to
index root.selectedNameFilter.extensions from zero, using the first extension
(or the contractually required representation of all alternatives) instead of
selectedNameFilter.index. Preserve the existing empty-string fallback and path
handling.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 1db4a5a0-f431-4f69-8689-f60bb48fc5f6

📥 Commits

Reviewing files that changed from the base of the PR and between d9878b9 and cdef143.

📒 Files selected for processing (2)
  • framework/interactive/internal/interactive.cpp
  • framework/interactive/qml/Muse/Interactive/FileDialog.qml

Comment thread framework/interactive/qml/Muse/Interactive/FileDialog.qml Outdated
Comment thread framework/interactive/internal/interactive.cpp Outdated
@embarc-gabriel
embarc-gabriel force-pushed the fix-file-picker-on-linux branch from 373fa1b to d8bdcad Compare August 6, 2026 12:33
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@framework/interactive/qml/Muse/Interactive/FileDialog.qml`:
- Around line 42-50: Update appendSuffixIfNeeded to check filePath against every
entry in root.selectedNameFilter.extensions, returning it unchanged when it
already ends with any valid suffix; only append the first non-special extension
when no listed suffix matches, while preserving the existing empty and all-files
behavior.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 3333aff1-cdc8-43ab-bd3b-acca41df6164

📥 Commits

Reviewing files that changed from the base of the PR and between bb220c0 and d8bdcad.

📒 Files selected for processing (1)
  • framework/interactive/qml/Muse/Interactive/FileDialog.qml

Comment thread framework/interactive/qml/Muse/Interactive/FileDialog.qml
@embarc-gabriel
embarc-gabriel force-pushed the fix-file-picker-on-linux branch from a54cb61 to 6d70b1d Compare August 6, 2026 12:50
@embarc-gabriel
embarc-gabriel force-pushed the fix-file-picker-on-linux branch from 6d70b1d to eb6dddd Compare August 6, 2026 12:50
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.

Native Ubuntu File Picker Does Not Show Exported Presets

2 participants