block / block/buzz

Focus-mode work block: a live block force-opens a reader's explicit fold with no way to undo it

Open
#6,750 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
32.7k
Forks
4.3k
Avg merge
1d 13h
Merged PRs (30d)
253

Description

Split out of PR #6536 (focus-mode work blocks, Slice C). Found by ss-dev-03 during a review pass; deliberately **not** fixed in that PR because the intended behaviour is a design call rather than a bug fix.

## Behaviour today

`useWorkBlockDisclosure` in `desktop/src/features/agents/ui/AgentSessionWorkBlock.tsx` takes `policyOpen = status.isActive || settling`, and the reader's recorded choice overrides it. But the rail is rendered from `isLive || disclosure.open`, and while the block is live the summary trigger is not rendered at all:

```tsx
{isLive ? null : (

)}

```

So when a reader has explicitly folded a block and that block goes live again, the fold is overridden by policy **and the control that would let them re-fold it disappears**. There is no trigger to undo it until the block finishes. The reader's stated intent is silently discarded for the duration.

This is the "live policy wins" rule working as written; the problem is that it wins over an *explicit* reader choice and leaves no affordance.

## Intended fix (sticky fold)

Discussed as the preferred behaviour but not yet confirmed by @baxen:

- A block the reader has explicitly folded **stays folded while live**.
- The summary line keeps carrying liveness: running glyph plus a step count, so the reader can see work is happening and how much, without the rail expanding under them.
- That implies rendering the summary trigger while live (at least when the reader has folded), which is the part that needs a design decision — today the trigger is unconditionally suppressed for live blocks because "the rail IS the status".

## Notes

- Distinct from the two bugs fixed in #6536 (`eeb2f702a`: reduced-motion pulse guard + a finished block going live again during the inter-turn gap; `91a5754ad`: reader expansion surviving block re-grouping).
- Whoever picks this up: the reader-choice plumbing now lives in `desktop/src/features/agents/ui/agentSessionWorkBlockDisclosure.tsx`, keyed by step id, so "has the reader explicitly folded this block" is already available via `readWorkBlockChoice`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.