Repository navigation
Rename dialog shows one failure toast when a save cannot be sent - #1283
Merged
Merged
Conversation
…eue changes show one toast Follow-up to #1269 for the four remaining write paths whose own state machines emit a failure toast when a write cannot be sent: rename dialog (features/session-menu/src/rename_dialog.rs), permission and question form replies (features/timeline-extras/src/permission/mod.rs), and queued prompt changes (features/inbox/src/queue/{mod,run}.rs). Each now offers its write quietly via App::write_quiet so the machine emits a single toast: official's Request failed (or queue changeFailed) with the cause Not connected to an OpenCode server when no writer is attached, and our single read-only toast in a read-only window.
…and split queue Reading permission/mod.rs:150-154 and :168-172 shows reply_permission and send_form already return early through host.write when !writes_open(), and App::write emits no toast on Ok(false) (dead channel), so permission and question form replies never showed a double toast. Queued prompt changes require a live --read-only server to exercise (fixture mutates locally) and move to their own draft PR.
Hona
marked this pull request as ready for review
November 26, 2026 01:16
Hona
added a commit
that referenced
this pull request
Nov 26, 2026
…hen read-only (#1284) Split out from #1283 because offline fixture runs mutate the queue locally and proving this requires a live --read-only server. Uses QueueHost::write_quiet (backed by App::write_quiet) in run_queue_op so step_queue emits one toast instead of two, and checks QueueHost::is_read_only() in Effect::Failed(None) so read-only windows show our read-only toast instead of Not connected.
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.
Follow-up to #1269 for the Rename dialog (
features/session-menu/src/rename_dialog.rs), which showed two failure toasts when a rename could not be sent (no writer or read-only window). Ours-only fault: no official commit, so no ledger row.(Earlier commit
539eda374also touched permission/question replies and queued prompt changes. Readingfeatures/timeline-extras/src/permission/mod.rs:150-154and:168-172confirmedreply_permissionandsend_formalready return early on!writes_open()andApp::writeshows no toast onOk(false), so those replies never had a double toast; those edits were dropped. Queued prompt changes need a live--read-onlyserver to exercise and are split into their own draft PR.)What changes
"Request failed", description =error.message(packages/app/src/shell/titlebar/project-session-row.tsx:276-280)"Not connected to an OpenCode server"/"Nothing was sent."and"Request failed"/"Not connected to an OpenCode server""Request failed"/"Not connected to an OpenCode server""Nothing was sent"/ read-only and"Request failed"/"Not connected to an OpenCode server""Nothing was sent"/"This window is read-only. Relaunch without --read-only to act.""Request failed"/"Request failed"(project-session-row.tsx:279)"Request failed"+ server wordssession_write_replied, #1269)How
features/session-menu/src/rename_dialog.rs:Effect::SavecallsSessionMenuHost::write_server_quiet(added in A failed in-place rename says so once, in official's words #1269) instead ofwrite_server, anddispatchtakescrate::rename::Why::{Unsaid, NotSent, ReadOnly, Refused}instead of comparing a translated string.features/session-menu/src/lib.rs: passessaid(rename::Why) intorename_dialog::dispatch.2 files; no manifest, lock, profile or plugin contract change.
Run
A PR build is of the PR's own head. Before = opencode-rune #1271's own PR build, head
278f9aaf38, run45709668204:deva5c55ecf42with the Rune pin5342f14dand nothing of this change.539eda3745(Windows x64 CI build, run45728438752; headless, the app's own fixture file, no server; samerename_dialog.rs+lib.rscode aseb691d78c):"By the dialog", Return: dialog stays open in editing (inputfocused with"By the dialog"), one toast"Request failed"/"Not connected to an OpenCode server". Before (278f9aaf38): two toasts ("Not connected to an OpenCode server"/"Nothing was sent."and"Request failed"/"Not connected to an OpenCode server")./rename New words, Return: one generic toast"Not connected to an OpenCode server"/"Nothing was sent.".eb691d78cc, the head that merges (Windows x64 CI build, run45731749564; headless, the app's own fixture file, no server; 2 launches exit 0; before = chore(pgo): the profiles re-keyed to Rune 5342f14d's symbol names #1271278f9aaf38run45709668204):"By the dialog", Return: dialog stays open in editing (inputfocused with"By the dialog"), one toast"Request failed"/"Not connected to an OpenCode server". Before (278f9aaf38): two toasts ("Not connected to an OpenCode server"/"Nothing was sent."and"Request failed"/"Not connected to an OpenCode server")./rename New words, Return: one generic toast"Not connected to an OpenCode server"/"Nothing was sent.".45731749564green oneb691d78cc(guardrails, macOS, Windows x64, Windows arm64, Linux x64; Linux arm64 skipped).devtook no file of this change since its base.Not run (each needs a live server): a
--read-onlylive window, a server refusal, and a 15 s timeout.