Skip to content

feat(threads): add turn activity fold preferences - #195

Merged
nixuuu merged 1 commit into
devfrom
feat/work-fold-modes
Nov 5, 2026
Merged

nixuuu merged 1 commit into
devfrom
feat/work-fold-modes

Conversation

@nixuuu

@nixuuu nixuuu commented Nov 5, 2026

Copy link
Copy Markdown
Member

The turn's "Working for …" fold no longer hides what the agent is doing by default. Two settings under Settings → Threads control it. Both are per device and have a reset button.

While working After the turn Behaviour
Expanded (default) Collapse (default) Open while the agent works, so interim messages, reasoning and tools stay readable. Collapses when the final answer starts.
Expanded Keep open Open while working and after the turn ends.
Collapsed Collapse Closed throughout (the previous behaviour).
Collapsed Keep open Closed while working; opens when the answer starts or the turn ends.

Behaviour

  • Manual choice: opening or closing the fold by hand overrides both settings for that turn.
  • Setting changes: turns you have not touched follow the new value.
  • Answer start: Codex marks it with a non-empty final_answer phase, so its fold collapses as the answer begins streaming. Claude and Grok have no reliable marker, so their fold collapses when the turn ends.
  • Scroll position: auto-collapse keeps the reader's place through the existing anchoring. In the check, a measured row stayed 48 px from the top before, during and after the answer.

Code

  • New: WorkFoldSettings.svelte and work-fold-state.ts.
  • work-folds.svelte.ts holds the defaults and manual overrides, and work-groups.ts marks where the answer starts.
  • apps/web/test/work-fold-state.test.ts covers the pure state rules.

Docs: docs/timeline-folding.md, docs/settings-map.md and docs/ui-api.md.

Checked in a browser with a scripted turn (interim message, tools, reasoning, answer). Every combination, plus a manual toggle during a run, was tried in light and dark, at desktop and phone width, including side threads and forks. check:tmp: 1295 passed, 0 failed.

Copy audit (§8): the labels are the requested "While working" (Expanded or Collapsed) and "After the turn" (Collapse or Keep open), in sentence case with short descriptions.

Not verified: live providers, and reduced motion emulated in a browser. The existing reduced-motion handling is unchanged.

@nixuuu
nixuuu merged commit 1eefb93 into dev Nov 5, 2026
9 checks passed
@nixuuu
nixuuu deleted the feat/work-fold-modes branch November 5, 2026 15:56
nixuuu added a commit that referenced this pull request Nov 5, 2026
…231)

Stage 5 of 5, mobile UX: catch up with recent web features in the thread
view.

**Done**
- Full access with confirmation.
- The work group is open while the agent works and collapsed after the
turn (the default fold behaviour from #195).
- Tighter work rows in the `work` scale; commands in monospace.
- The shell command card and `!` mode in the composer (#194).
- "Starting" for a dispatched queued turn (#197).
- File badges in the message bubble.
- Finished subagents collapse into one count that opens the lineage
panel (#182).
- The type scale for overlays, chrome, work rows and the context row
(#174/#193).
- Rejected messages show their reason, instead of a generic retry note.

**Deferred**
- The work fold settings (per device on the web).
- Badges placed inline in the text and queue editing (#200/#201); files
stay as chips.
- Linked computers in pickers (needs `LinkedComputerSnapshot` merging).
- Worktree and ref in a new thread.
- Approval countdown and expiry cards.
- Connector errors.
- Mentions, side threads and goal editing.

**Checked** on the Android emulator, light and dark. `check:tmp`: 1425
passed, 0 failed. `expo lint` and `tsc` are clean.

**Copy audit (§8):**
- "Runs as a shell command when delivered."
- "Starting"
- "N finished subagents"
- "Set and manage goals in Canopy on the web."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant