Repository navigation
feat(chat): open background tasks as live tabs in the conversation view (#63) - #64
Merged
Merged
Conversation
Author
|
Rebased onto v0.2.0 ( |
mguttmann
force-pushed
the
feat/conversation-task-view
branch
3 times, most recently
from
September 13, 2026 16:28
19e1ed3 to
87f41ce
Compare
…ew (vlinx-io#63) The Tasks chip of the conversation view listed a running background task as one truncated line with a Stop button. Claude Code's task protocol delivers far more: a live "phase: agent" description, usage, and for workflows the complete phase and agent tree that the TUI shows under /workflows. The Rust engine now merges every task_* frame and the background_tasks_changed inventory per task_id into the extras snapshot and keeps finished tasks with their final state until the next turn starts. Each chip row shows the live description and opens a client-local task tab (parallel to document and browser tabs) that renders elapsed time, tokens, tool uses, the current agent and, for workflows, every phase with its agents: model, state, duration, tokens, prompt and result preview. Several tasks open as several tabs. Refs vlinx-io#63 Co-Authored-By: Claude Fable 5.1 <[email protected]>
…irror echo - TaskView treats `exited` and `reset` as the end of its task: status Ended, clock stopped, no Stop button, instead of showing a running task until the next process happens to list it. - In mirror mode a client whose active tab is a task tab publishes the session tab the peer would land on anyway, with its session and pane, so the peer never shows an empty stage and its reconcile does not push a repair back. - The Tasks chip row is a container with two sibling buttons (open, stop): no nested interactive content, both reachable by keyboard. Refs vlinx-io#63 Co-Authored-By: Claude Fable 5.1 <[email protected]>
… mode - Release-when-idle now waits for the task_notification of tasks the inventory just dropped, bounded by TASK_SETTLE_GRACE, so a task tab that outlives its conversation pane still receives status, summary and output file instead of ending on a killed process - applyMirrorLayout keeps the locally active task tab across the reconcile echo and ordinary peer pushes, for publisher and follower alike - TaskView requests a paged chat_snapshot instead of the whole transcript, since it only reads the flattened extras Follow-up to vlinx-io#63 from a fresh-eyes review of the branch. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…tab TabBar test Co-Authored-By: Claude Fable 5.1 <[email protected]>
mguttmann
force-pushed
the
feat/conversation-task-view
branch
from
September 15, 2026 14:43
87f41ce to
460d315
Compare
Author
|
Rebased onto v0.2.2 (7874081). One conflict, the chat import line in termStore.ts (v0.2.2 added chatSend and chatStart for auto-continue, this branch adds the ChatBackgroundTask type); both kept. pnpm test 120 files / 1070 tests, build and lint green on the rebased branch. |
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.
Closes #63
What
In the experimental conversation view, a running background task (a Claude Code workflow with many agents, a subagent, a backgrounded shell command) was one truncated line in the Tasks chip with a Stop button. Nothing could be opened. This PR makes each task openable as a tab of its own and renders the state that Claude Code already streams.
Phase: agentfor workflows), the task type, and its status once finished. The badge counts running tasks only. Finished tasks stay listed with their final state until the next turn starts, so their result can still be opened.task_notification, bounded by a short grace (TASK_SETTLE_GRACE) so a task whose frames never come cannot keep the process alive. In mirror mode a client that sits in a task tab publishes a session tab in its place (with that tab's session and first pane), so the peer never sees an empty stage; and the client itself stays in its task tab whatever an incoming frame names as active, on both sides (publisher receiving the reconcile echo or an ordinary peer push, follower receiving the publisher's pushes) until the user leaves the task tab.ClaudeExtras.background_tasksbecomes a typed, merged view pertask_idoverbackground_tasks_changed,task_started,task_progress,task_updatedandtask_notification(livedescription,last_tool_name,usage,workflow_progress,started_at,ended_at,status,summary,output_file). A task the inventory drops before its terminal frame arrives (the real wire order, see below) is markedendedinstead of vanishing. Finished tasks are pruned when the next user turn starts, capped at 20. No new command, no transport change: the existingextrassnapshot and event carry it on Tauri IPC and WebSocket alike.Why the data is there
Verified on Claude Code 2.1.267 with a three-agent probe workflow in
--output-format stream-json: everytask_progressframe of alocal_workflowtask carries the livedescription,last_tool_name,usageand, about every second frame,workflow_progress, the same phase and agent tree the TUI renders under/workflows. The Rust tests replay those frames in wire order (inventory empties beforetask_updatedandtask_notificationarrive).Scope and non-goals
protocol.rs,command_core.rs,commands.rsorweb/dispatch.rs.log()narrator lines are not part of the protocol and are not shown.chat.tasks.*) in all 11 locales; German translated, the others carry the repo's// TODO translatemarker.Known minor points left open
endedbecause the inventory dropped it is not revived if the inventory lists it again without a status.started_atwith the client clock; on a remote browser with clock skew the figure can be off until the task ends.indexas React key; the TS types declare it required, the Rust side forwardsworkflow_progressunvalidated, so a frame without it would warn in dev.debug.tstab invariants do not know task tabs (pre-existing class: they do not know browser tabs either).task_startedor atask_updatedback to running for an already finished task id keepsended_at, summary and output file from the previous life of that id (frozen elapsed time next to a Running badge); task ids are random per process, so this is not reachable in practice.Tests
engine.rsreplaying the probe frames (merge, inventory drop before terminal frame, detached release waiting for the terminal frames of a dropped task, release after the grace when no frames come, pruning and cap, unlisted foreground subagents, lenient frames).cargo test: 837 passed, 0 failed.taskTabs.test.ts,TaskView.test.tsx,TabBar.taskTab.test.tsx; extendedextras.test.tsx,mirrorLayout.test.ts,mirrorSync.test.ts(reconcile round trip through the real store; a client in a task tab stays there as publisher and as follower).pnpm test: 651 passed.pnpm buildandpnpm lintgreen.🤖 Generated with Claude Code