Repository navigation
fix(threads): show steer messages outside the work section - #639
Merged
Merged
Conversation
nixuuu
marked this pull request as ready for review
November 13, 2026 12:13
nixuuu
added a commit
that referenced
this pull request
Nov 13, 2026
Older turn summaries can arrive while their messages are outside the independent 128-item watch window. Web treated those turns as completed empty folds and only paged near the list's beginning, leaving work and answers blank across reloads. This change shows compact loading rows for missing or partial work, prefetches one bounded history page from virtual overscan, and preserves message anchors when earlier steers renumber segments. Fold coverage mismatches expose the source rows and emit diagnostics. Initial positioning has a two-second reveal fallback; diagnostics include earlier-page request-to-render timings. New running turns without their first item do not trigger a scan of older history. History metrics use fixed IDs 450–455, separate from the thread-watch metrics introduced by #673. Gateway responses classify client metrics by their registry group, keeping recovery timings in the Client section and preserving the existing watch-recovery behavior. Fixes: #541 Verified with git bisect: `0c655ca3ba72f2aea48487d7de62642a15a096f2` introduced the independent windows; its parent `e483f4274` passes the same three-turn/600-item reproduction. #639 and #668 steer/group parity tests pass. Shared mobile fold derivation is unchanged. Validation: - Nine focused history/fold regressions pass, including partial cached tails, steers, collapsed groups, nested tools, a running subagent and stable message identities. Real gateway/cache/checkpoint recovery integration passes. - Production browser checks cover desktop and 390px phone widths, light/dark and reduced motion. Prefetch starts up to 572px before missing work reaches the viewport; loading rows measure 44px; reading-anchor drift stays under 0.5px. - Held responses, actual thread switching, cached reload with a simulated desktop persistence bridge, cleared local storage, failed requests/Retry and blocked row measurement all recover visibly. A fresh running turn sends zero history requests; scrolling to older gaps sends one. Recovery and request-to-render diagnostics were captured. - Initial handover gates passed: install, `gen:check`, typecheck, lint, `format:check`, `check:tmp` and the web build. That full local run had 2,793 passed, 166 skipped and zero failures across 523 files; temporary-directory cleanup was clean. - Rebased onto current `dev` (`89f37fea6`), including #670 and #673. Post-rebase checks pass: 34 focused feed/fold tests, 10 diagnostics integration tests, six provider-account integration tests and the bounded-window/cache integration test (51 total), full typecheck, lint, format check and production web build. The provider refresh invalidation regression and forced-refresh race both pass. Diagnostics tests verify distinct watch/history metrics through authenticated ingestion, client-section rendering data and redacted export. Runs were detached with `nice`, with heavy test files run one at a time; each focused `check:tmp` run cleaned its temporary directory. Native Mac/Electron and native phone rendering were unavailable. The desktop renderer and cache contract were checked in Chromium; shared mobile/web steer and group logic tests pass. Copy audit (docs/copy.md §8): “Loading earlier work…” is a concise progress status; existing error and Retry copy is reused. Light/dark desktop and phone widths checked; no new motion or copy in tool/steer rows.
nixuuu
added a commit
that referenced
this pull request
Nov 17, 2026
## Change With “After the turn” set to Collapse, a delivered steer now collapses the preceding work immediately, including work before a context compaction boundary. Previously those segments continued using “While working” until a final answer or the turn ended. The new segment uses “While working”. Manually reopening an earlier segment after the steer survives subsequent steers and completion. Keep open remains respected, and compaction alone preserves the current fold choices. The shared rule applies to web, desktop and mobile; the folding documentation describes the new behavior. Fixes: #639 ## Verification - Passed domain source typecheck: `bunx --no-install tsc -p packages/domain/tsconfig.json --noEmit`. - Passed lint and formatting for `packages/domain/src/work-fold.ts`, and `git diff --check`. - Checked the actual fold controller and header in an isolated Chromium fixture: steer invalidates live manual choices, manual reopening survives a later steer, compaction alone preserves choices, a subsequent steer closes preceding segments, and Keep open works with Collapsed while working. - Inspected light/dark screenshots at desktop and phone widths with long steer text; no horizontal overflow or browser errors. - Updated the existing fold-logic expectations for the steer boundary, including all preference combinations, an immediate steer without subsequent work, mobile parity after compaction, and manual reopening through later steers and completion. Both affected files pass through `check:tmp`: 18 tests, 576 assertions, no temporary files left. Lint and formatting pass for the edited tests. - No UI copy changed; the copy audit is not applicable. Native mobile rendering and the full running application were not exercised. Full repository checks and builds remain with CI.
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.
Steered user messages could disappear inside the collapsed work section. Every delivered steer now starts a conversation segment: preceding work, the visible input, then following work. Consecutive inputs share the next fold. Web and mobile derive the same layout from persisted item data and transcript order, including catch-up, forks and virtual remounts.
A steer preserves earlier live fold choices. The next final answer or turn end applies the existing collapse preferences to all work since the previous answer; manual expansion after the end survives late items. Platform background-task steers retain their notice renderer and also remain visible outside hidden work.
Each segment has its own work summary. Steer item boundaries have no durable timestamp, so adjacent summaries use the existing “Work”/“Working” labels and counts without an invented duration. The turn footer retains its full duration. Existing feed anchoring, motion tokens and reduced-motion handling remain in use.
Validation:
nice: install,gen:check, typecheck, lint,format:check, fullcheck:tmp(including temporary-directory cleanup), and the web build. The review-machine web build also passed.BackgroundNoteRowon both clients and their existing item identity, now outside the fold.Scope of verification: the live path used an isolated synthetic worker with steer support; no provider inference or native iOS/Android session was run. Mobile derivation parity is covered by the pure logic tests.
Copy audit (§8): “Working for” without a known duration → “Working”, matching mobile and avoiding an incomplete label. Existing “Work” and summary counts describe untimed completed segments. Sentence case and text cues remain consistent. Short and long inputs reviewed at desktop and phone widths in light/dark.
No regression link: the hidden-mid-turn-steer behavior predates the recent collapse correction; no exact recent introducing PR has been established.