Skip to content

fix: Export works on desktop -- native save dialog; browser download kept for server mode - #220

Merged
alicoding merged 1 commit into
mainfrom
export-native-save
Aug 18, 2026
Merged

fix: Export works on desktop -- native save dialog; browser download kept for server mode#220
alicoding merged 1 commit into
mainfrom
export-native-save

Conversation

@alicoding

Copy link
Copy Markdown
Owner

Owner-hit on the installed build: every Export button silently no-op'd — the Wails webview has no download handler for a synthetic anchor click (the helper's own comment claimed otherwise; corrected). New SettingsService.SaveTextFile opens the native save panel and writes the chosen path; downloadJSON routes by the build's Server flag, so server-mode e2e (24 tests) keeps the browser path unchanged. CompositionView's inline copy retrofitted onto the shared helper. Desktop dialog is the registered manual check. Rider: lefthook's golangci-lint job gains --build-tags=server to match CI's own flags (pre-existing drift).

🤖 Generated with Claude Code

https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd

…view

Every Export button's Blob + synthetic-anchor-click download was
silently inert on the installed desktop build: the Wails webview
supplies no download handler for a synthetic anchor click, despite
downloadJSON.ts's own header comment claiming webview parity. Server
mode (a real browser tab) was never affected.

downloadJSON now routes by runtime: desktop calls the new
SettingsService.SaveTextFile binding (a native OS save dialog, backed
by Wails3's own Dialog manager) and writes the chosen path directly;
server mode keeps the existing Blob + anchor path unchanged.
CompositionView's separate inline copy of the same broken mechanism
is retrofitted onto the shared helper instead of carrying its own
fix.

Also fixes lefthook.yml's golangci-lint job to pass --build-tags=server,
matching ci.yml's own args -- without it the local hook lints a wider
(desktop-tag) file set than CI's job ever compiles, so it can fail on
pre-existing findings CI's real gate never sees.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01FW5GkkAG8du7tNdYLk2zSd
@alicoding
alicoding enabled auto-merge (squash) August 18, 2026 03:24
@alicoding
alicoding merged commit 78afb56 into main Aug 18, 2026
59 of 63 checks passed
@alicoding
alicoding deleted the export-native-save branch August 18, 2026 04:43
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.

1 participant