fix(chat): keep assistant text visible across tool calls#14698

draft9
main
maria/fix-11353-assistant-text-visibility
openedOct 2, 2026byMmaria
View on GitHubTwo-way sync enabledPR last imported 1h ago

Completed turns can hide substantive assistant text inside “Worked for” when that text precedes the final response. Keep every assistant message outside the work fold on web/desktop and mobile, while preserving tool/reasoning folding and timing.

Rebuilt on current architecture from @maria-rcks’s original contribution, retaining the contributor’s history. The obsolete first-assistant bookkeeping is removed; no new helper or component is needed.

Verification

  • Existing suites: 267 → 267 tests across two files (168 web, 99 mobile). Updated existing behavior cases; no new test files or cases. The current-main implementation fails eight updated assertions; the rebuilt implementation passes all 267.
  • Scoped lint, web/mobile typechecks, formatting and diff checks passed.
  • Linux headless web: identical synthetic completed turn, viewport and scroll on actual main and rebuilt code. Opening and middle assistant text stay visible; expanding/collapsing “Worked for” still reveals/hides tool activity.
  • This fixture verifies client rendering, not provider execution. A temporary local font was used because the headless environment lacked working system font rendering; it is absent from the change.
  • macOS, Windows, Electron desktop, iOS and Android were not exercised. Native device access is disabled here. Mobile rendering, keyboard/safe-area behavior and native screenshots remain for a human.
  • Two parallel adversarial review rounds completed. Round one found a lost resource-summary test branch; the existing fixture was corrected. Round two returned no findings.
  • Draft retained: human approval is still required.

Before — main

Before: only the final Done response remains visible

After — rebuilt head

After: opening and intermediate assistant text remain visible

Models/harness: T3 Code with Codex gpt-6-astra (tests), Codex gpt-6.1-sol (implementation), Claude claude-opus-5-5 and Codex gpt-6-sol (independent review).

Checks

20 successful · 6 skipped
All checks passed
8fd403c

Added 1 commit

  • fix(chat): keep assistant text visible across tool calls42b20ae
Synced from GitHub

Thread transfer impact

⚠️ The latest CI run did not produce a thread transfer result for 8fd403c.

This comment will update automatically after the next completed run.

Added 6 commits

  • fix: preserve PR 14698 behavior on current main5be4d2e
  • fix: retain current service references for PR 1469872b0437
  • test(chat): preserve visible assistant text in folded history954513d
  • test(web): preserve visible commentary in timeline renderingb32165f
  • test(chat): drop matrix loops from assistant visibility tests39de4b9
  • Merge remote-tracking branch 'origin/main' into maria/fix-11353-assistant-text-visibilitye219186

Taking over this one. I’ll rebuild the assistant-text visibility fix against current main, keep work and reasoning folds intact on web and mobile, and leave the PR in draft pending approval.

Added 2 commits

  • Merge main before rebuilding assistant text visibility4581855
  • fix(chat): keep assistant text visible across tool calls8fd403c
Synced from GitHub

Hello, in my t3 code when AI sends me a message during work and then finishes and sends last message, the previous disappear. This could be a fix. Can we merge it or include a setting to not fold into work for or to at least not auto collapse it?

I cannot tell you how many times I asked an agent something and then I am left confused they didn't answer, but they did and it is hidden in a Worked for block. Thanks.

Synced from GitHub

Verified the assistant-visibility change from this PR in T3 Code's Browser panel on macOS, applied as the same two visibility guards on current main 78f1ba8.

This covers the Codex steering display case reported in #8879. The persisted rendering fixture has one completed run containing prompt → steer → optimization answer → tradeoffs answer, with no tools or reasoning.

  • On main, only the tradeoffs answer stays visible. Expanding “Worked for 56s” reveals the intact optimization table.
  • With this change, both answers remain visible after a full reload. The empty work fold disappears.

I also ran the free Replay (dev) showcase through the real adapter and orchestration, including its approval. Tools still expand and collapse under “Worked for”; the earlier assistant message and final answer stay visible throughout. Progress prose stays visible too, as intended by this approach.

The two-answer case is a rendering fixture, not a fresh Codex execution. Native Electron, iOS and Android were not exercised, and I did not rerun this PR's full test suite. This supports the visibility fix; it is not a review of the entire PR.

Verified with GPT-6.1-Sol, high reasoning, through the Codex harness in T3 Code.