Repository navigation
fix(tokens): keep JSON export responsive when the file chooser stalls - #1178
Draft
Claudius-Maginificent wants to merge 2 commits into
Draft
Claudius-Maginificent wants to merge 2 commits into
Claudius-Maginificent wants to merge 2 commits into
Conversation
Capture the reviewed JSON in a path form with optional asynchronous native browsing. Retain one native chooser until it finishes, reject abandoned chooser replies, and allow direct path entry after cancelling interest. Write only after explicit Save and require confirmation before replacement. <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> Co-Authored-By: Codex GPT-6 <noreply@openai.com>
… files Keep filesystem discovery out of the export form's render path. Write and sync the reviewed JSON to a temporary file before publishing it, preserving existing contents on failure. Reuse protected-file checks and reject symbolic links, hard links and nonregular export destinations. <sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub> Co-Authored-By: Codex GPT-6 <noreply@openai.com>
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Collaborator
|
🕓 Review not started yet because this PR is a draft.
Commit 9c41644. Normal review starts when eligible; priority review starts as soon as a slot is available. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
TL;DR
Saving a token contract no longer freezes the application when the system file chooser does not respond. Users can cancel browsing and enter a destination directly, then explicitly save the reviewed JSON.
User story
As a token creator, I can save the contract I reviewed and recover from an unavailable file chooser without restarting the application or losing my export.
Scenario
Actual behavior
Choosing Save contract JSON opens a synchronous system dialog on the application thread. An unresponsive desktop portal freezes the application and prevents saving.
Expected behavior
The export form stays responsive. Browse chooses a destination; Save writes the reviewed snapshot. Cancelling browsing permits direct path entry, and a late chooser result cannot write a file. Replacing an existing file requires a separate confirmation.
Detailed discussion
Stacked on #1177 (
feat/app-design-system). Covers exports from both prepared review and confirmed receipts. Native browsing and file writes use backend tasks with request ownership; a process-wide single-flight guard bounds native chooser workers. Writes publish a completed temporary file atomically and refuse protected application files and file aliases.Testing
cargo fmt --all, scoped library Clippy with warnings denied, and GUI binary build pass.🤖 Co-authored by Claudius the Magnificent AI Agent