You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by "me2seeks (via GitHub)" <gi...@apache.org> on 2026/10/01 10:30:21 UTC
[I] feat(desktop): offer authoritative turn resume from the composer send slot [maka]
me2seeks opened a new issue, #5903:
URL: https://github.com/apache/maka/issues/5903
### Problem
After an interrupted turn (app restart, provider timeout, or a manual Stop), the only way to resume is the banner button on the interrupted turn itself ("Continue this turn", `safeResumeAction` in `chat-turn.tsx`). The composer send button always starts a new turn — there is no way to continue the interrupted run from the composer, which is where the user's attention is when they come back to type.
The renderer also cannot show resume availability proactively: `interrupted-resume.ts` (`latestInterruptedResumeTurnId`) decides eligibility with a local heuristic over the last turn's surface state (`errorClass === 'app_restarted'`, timeout with all tools completed, renderer-stop abort). The authoritative decision only happens after the user clicks, so the UI cannot offer resume anywhere else without risking a wrong affordance.
### Desired outcome
When the latest interrupted turn of the active session is authoritatively resumable and the composer input is empty, the composer send button is replaced by a Resume affordance that continues the interrupted run. Typing anything switches the button back to the normal "send new message" behavior.
The availability signal comes from the authoritative planner, not the renderer heuristic:
- Runtime Host already exposes the read-only `turn.resume.query` operation (`queryTurnResume` → `planTurnResume` in `root-turn-coordinator.ts`), returning a `TurnResumePlan` — `disposition: 'ready'` (with `sourceRunId` / `sourceTurnId` / high-water) or `'parked'` with a closed set of reasons (`session_busy`, `safety_check_failed`, `resume_feature_disabled`, workspace mismatch, …). It runs through `previewCapabilityBinding`, so it previews without committing and has no side effects.
- Desktop main already has `queryTurnResume` on `runtime-host-client.ts`, but it is only called inside `sessions:resumeLatest` (query → start in one shot); the query is not exposed to the renderer on its own.
This stays fail-closed: the query only produces a plan, and `startTurnResume` re-validates every boundary (workspace identity, high-water, tool catalog) before running — so if state changes between the button rendering and the click, the click either resumes correctly or returns the park reason. It never resumes the wrong thing.
### Alternatives or workarounds
- Keep the status quo: resume only from the interrupted turn's banner. Works, but the user has to find the banner in the transcript instead of acting from the composer.
- Gate a composer Resume button on the existing renderer heuristic (`latestInterruptedResumeTurnId`). Cheaper (no IPC), but it would surface Resume for turns the authoritative planner would park — a misleading affordance for exactly the cases the safe boundary exists to catch.
- Add a separate Resume button next to Send instead of replacing Send. Rejected: two primary actions in one slot invites misclicks; swapping only while the input is empty keeps one unambiguous action per state.
### Proposed implementation (small, follows existing seams)
1. **Main IPC**: new read-only handler `sessions:queryResumeLatest` that calls `client.queryTurnResume({ sessionId })` and passes the plan through to the renderer (preload + `bridge-contract.d.ts` gain the matching method).
2. **Renderer**: on `sessions:changed` status-change / session switch, query once for the active session whose latest turn is an interruption candidate; `disposition === 'ready'` sets a per-session `resumeAvailable` flag.
3. **UI**: when `resumeAvailable` and the composer input is empty, the send button slot renders Resume instead; the click reuses the existing `useShellResume.resumeInterruptedSession` (already handles pending re-entrancy, park toast, failure toast). The turn banner button stays as is.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [I] feat(desktop): offer authoritative turn resume from the composer send slot [maka]
Posted by "me2seeks (via GitHub)" <gi...@apache.org>.
me2seeks closed issue #5903: feat(desktop): offer authoritative turn resume from the composer send slot
URL: https://github.com/apache/maka/issues/5903
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org
Re: [I] feat(desktop): offer authoritative turn resume from the composer send slot [maka]
Posted by "me2seeks (via GitHub)" <gi...@apache.org>.
me2seeks commented on issue #5903:
URL: https://github.com/apache/maka/issues/5903#issuecomment-5929551620
take
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org