Skip to content

fix(v3,linux): set initial filename in save file dialog - #6217

Open
bearsh wants to merge 1 commit into
wailsapp:masterfrom
bearsh:feature/linux-save-dialog-filename
Open

bearsh wants to merge 1 commit into
wailsapp:masterfrom
bearsh:feature/linux-save-dialog-filename

Conversation

@bearsh

@bearsh bearsh commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Description

On linux, the current implementation of the save file dialog does not support setting the initial filename.
So extend runChooserDialog() to accept the current filename as argument and set it not empty.

Type of change

Please select the option that is relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • WEP (proposal only; no implementation)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Locally tested on linux. The save as dialog gets started from js.

  • Windows
  • macOS
  • Linux

If you checked Linux, please specify the distro and version.

KDE Neon 24.02

Summary by CodeRabbit

  • Bug Fixes
    • Save dialogs now display the requested filename when opened.

Signed-off-by: Martin Gysel <me@bearsh.org>
@github-actions github-actions Bot added Bug Something isn't working v3 labels Oct 3, 2026
@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: wailsapp/wails/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: ad7815f9-5878-4af1-8905-db6c407e13d2
📥 Commits

Reviewing files that changed from the base of the PR and between 90486a9 and f508e13.

📒 Files selected for processing (1)
  • v3/pkg/application/linux_cgo.go

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The Linux GTK file chooser now accepts an initial filename. The open dialog passes an empty filename, and the save dialog passes its requested filename.

Changes

Linux file chooser

Layer / File(s) Summary
Set the initial filename
v3/pkg/application/linux_cgo.go
runChooserDialog accepts an initial filename and applies it when non-empty. The open-dialog caller passes an empty filename, and the save-dialog caller passes dialog.filename.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix

Suggested reviewers: taliesin-ai

Merge Risk: ⚪ Minimal · up to f508e

The Linux save dialog can start with the requested filename, including for a new file. No material merge-blocking issue remains.

Architecture Summary

Architecture risk: 🟡 Medium · up to f508e

The change affects 1 system.

Changed systems: v3

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — v3 (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in v3/pkg/application/linux_cgo.go: runChooserDialog adds a currentFile parameter before currentFolder.
  • observed — Modified behavior in v3/pkg/application/linux_cgo.go: When currentFile is non-empty, the chooser sets it as the dialog’s initial filename; previously, no initial filename was configured.
  • observed — Modified behavior in v3/pkg/application/linux_cgo.go: The open-dialog caller supplies an empty initial filename, preserving its existing folder-based initialization.
  • observed — Modified behavior in v3/pkg/application/linux_cgo.go: The save-dialog caller passes dialog.filename as the initial filename.

Reliability and maintainability

  • inferred — Risk-relevant change factors for v3: blast_radius_2; direct_dependents_2
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely identifies the Linux save dialog change: setting an initial filename.
Description check ✅ Passed The description summarizes the bug fix, marks the change type, and reports Linux testing with the distribution. It does not provide an issue link or complete the remaining checklist items, but it is m…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

A rabbit peeks at the save dialog bright,
A filename waits, already in sight.
The open dialog keeps its folder in view,
The save dialog starts with its name ready too.
Soft paws tap once; the chooser is set,
Then off hops the rabbit, pleased as can get.

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

This branch has not been deployed

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

Labels

Bug Something isn't working v3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant