You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> **Design principle:** Keep Phase 6c tightly scoped to avoid expanding the phase. Ship the simplest useful version first; richer detail can be added incrementally in later phases.
205
+
206
+
#### MVP Scope
207
+
208
+
The minimal viable version streams only:
209
+
-**Tool name + status** (started / completed / errored) -- not full parameters or output
210
+
-**Last N updates** (rolling window of ~20 items) -- older entries are discarded client-side
toolName?:string// e.g. "read_file", "execute_command"
232
+
status?:string// e.g. "started", "completed", "errored"
233
+
errorMessage?:string// Only for kind === "error"
218
234
}
219
235
```
220
236
237
+
Note: `assistant_text` is excluded from the MVP. The update interface uses typed optional fields instead of `data: any` to keep the contract narrow and safe.
238
+
221
239
#### Task.ts Changes
222
240
223
241
Add a method that emits progress regardless of whether the task is "current":
The hook points in Task.ts should be minimal -- emit at tool call start and tool call end only. Avoid adding hooks inside the LLM streaming loop for the MVP.
├── State: updates (BackgroundTaskUpdate[]), status
274
+
├── State: updates (BackgroundTaskUpdate[], capped at last 20), status
255
275
├── Subscribes to backgroundTaskProgress messages filtered by taskId
256
-
├── Renders: streaming list of tool calls and results
276
+
├── Renders: compact list of recent tool calls with status icons
257
277
├── Auto-scrolls to latest update
258
278
└── Shows task status badge (running, paused, completed, errored)
259
279
```
260
280
281
+
The live view intentionally shows a compact summary, not a full chat transcript. Users who want full detail can wait for the task to complete and use the replay view (6a).
282
+
261
283
## 7. Testing Strategy
262
284
263
285
| Area | Test Type | Key Scenarios |
@@ -270,8 +292,69 @@ BackgroundTaskLiveView
270
292
271
293
## 8. Open Questions
272
294
273
-
1.**Should the background task list be a sidebar panel or a tab?** A sidebar panel (like the existing Phase 5 panel) keeps the foreground task visible. A tab replaces the view entirely but is simpler.
295
+
The following questions need alignment before implementation begins. They are grouped by area and ordered by impact.
296
+
297
+
### UI Layout
298
+
299
+
1.**Should the background task list be a sidebar panel or a tab?**
300
+
301
+
| Option | Pros | Cons |
302
+
|--------|------|------|
303
+
|**Sidebar panel** (like Phase 5 panel) | Foreground task stays visible; quick glance at background status without context-switching | More complex layout; may feel cramped in narrow viewports |
304
+
|**Full tab** (`tab === "bgTask"`) | Simpler implementation; full width for task details | Replaces the current view entirely; user loses sight of foreground task |
305
+
|**Hybrid** (collapsible sidebar that can expand to full view) | Best of both worlds | Highest implementation effort |
306
+
307
+
**Recommendation:** Start with a full tab for simplicity. If user feedback indicates they need to monitor background tasks while interacting with the foreground task, add a sidebar mode in a follow-up.
308
+
309
+
**Decision needed:** Which option should we ship first?
310
+
311
+
2.**Where does the "background tasks" entry point live?**
312
+
313
+
Options:
314
+
- A new icon in the existing tab bar (alongside chat, history, settings)
315
+
- A badge/button on the status area of the chat view
316
+
- An entry in the history view with a filter for background tasks
317
+
318
+
**Decision needed:** Which placement feels most discoverable without adding clutter?
319
+
320
+
3.**Should the replay view share the ChatView component or be a separate component?**
321
+
322
+
Reusing `ChatView` with a read-only prop reduces duplication but may introduce coupling. A dedicated `BackgroundTaskReplayView` is more isolated but duplicates rendering logic.
323
+
324
+
**Recommendation:** Create a thin wrapper around `ChatRow` components rather than reusing the full `ChatView`. This avoids inheriting input controls, scroll management, and approval button logic that don't apply.
325
+
326
+
### Progress Streaming Granularity
327
+
328
+
4.**What level of detail should the MVP stream?**
329
+
330
+
| Level | What's shown | Bandwidth / perf cost |
331
+
|-------|-------------|----------------------|
332
+
|**Minimal** (recommended for MVP) | Tool name + status (started/completed/errored) | Very low |
333
+
|**Medium**| Tool name + truncated first argument (e.g., file path) | Low |
**Recommendation:** Ship with minimal level. The tool name and status provide enough signal to know "what the background task is doing right now" without performance risk. Medium level can be added as a fast follow if users want more context.
337
+
338
+
**Decision needed:** Is the minimal level sufficient, or should we target medium from the start?
339
+
340
+
5.**Should streaming updates be opt-in?**
341
+
342
+
If multiple background tasks are running, streaming all of them simultaneously could be noisy. Options:
343
+
- Stream all tasks by default, throttle aggressively
344
+
- Only stream updates for the currently-viewed background task
345
+
- Let users toggle streaming per task
346
+
347
+
**Recommendation:** Only stream updates for the currently-viewed background task (the one selected in the background task list). This keeps the implementation simple and avoids unnecessary message traffic.
348
+
349
+
**Decision needed:** Confirm this approach or choose an alternative.
350
+
351
+
6.**How should errors in background tasks be surfaced?**
352
+
353
+
When a background task hits an error, the user may not notice if they're focused on the foreground task. Options:
354
+
- Badge/notification on the background tasks tab icon
355
+
- Toast notification
356
+
- Both
274
357
275
-
2.**Message size limits for replay:**Completed tasks can have thousands of messages. Should we paginate or lazy-load? Initial recommendation: load all at once (same as current ChatView behavior), optimize if performance becomes an issue.
358
+
**Recommendation:**Badge on the tab icon (low disruption). Toast notifications can be added later if users miss errors.
276
359
277
-
3.**Progress streaming granularity:**Should we stream every tool call parameter, or just tool names + status? Start with names + status, add detail incrementally.
360
+
**Decision needed:**Is a badge sufficient, or do we need more prominent notification?
0 commit comments