← Back to Pull requests

Chat: "New reply" only for reply text, not thinking or tools (fixes #425) #464

Closed
unknown closed this pull request without merging on Nov 20, 2026 21:59 UTC
View on GitHub
unknown unknown commented on Nov 20, 2026 19:12 UTC
Author

Scrolled up while the agent thinks or runs tools, the jump arrow turned accent and said "New reply", though there was nothing new to read. It compared the last row's key and a size that counted reasoning and tool calls, and the first thinking event opens a new reply row, so any activity lit it.

Now the pill compares how much reply text the chat's end holds: the latest prompt's length plus the answer and command output written after it. Thinking, tools, notices and other events add nothing.

  • A turn that fails or ends with a warning counts, also when it has no answer text or no message.

  • Keys aren't compared and a reply's blank space isn't counted, so the live reply giving way to its stored row(s) doesn't light it. The stream and the stored rows space a reply's steps differently.

  • An older page loading above doesn't light it, also when it merges into the first reply shown.

  • Once lit it stays lit until the reader is back at the end, so a later turn of the same lengths can't clear it.
  • Fixes #425

    Tests

  • ReplyMarkTest (commonTest): thinking and tools aren't news; reply text, a new prompt, command output and a failed or warned turn are; the stored row(s) taking over, blank space, notices and older pages aren't; a reply that comes as the chat's own local prompt is stored is; new stays new until the reader is back at the end.

  • NewReplyPillTest (jvmTest): scrolled up, reasoning and then a tool stream in with no "New reply", and answer text makes it show (fails on master). An older page loading above shows only the arrow, and a failed turn then says "New reply".

  • Ran the host tests of shared:core and shared:ui, the two test classes above on the JVM, :desktopApp:compileKotlinJvm and :androidApp:assembleDebug on the rebased branch: all pass.
  • Proof on a device: on an emulator against a local test gateway whose fake model streams reasoning for 20 s and then the answer. Scrolled up, the pill stayed a plain arrow while it thought, and turned to "New reply" when answer text came. With a turn that fails after 15 s, it stayed a plain arrow while waiting and said "New reply" once the failure was shown. There's no layout change, so no screenshots.

    Known, not fixed here

  • Reply text that grows above a prompt queued behind the running turn doesn't light the pill. It didn't before either.

  • While a turn with more stored rows than one history page (60) is still running, the older page loading above it can light the pill. It did before too.
  • Reviewed with a Gemini 4 Neon loop: 3 rounds with gemini-4-neon-high. Verdict: approved

    Diff: 323 lines (+242 / -81) across 4 files Reviewer: Giton22 Review duration: 166m
    All Vouch review confidence checks passed
    Residual risk 0.17 = Change Risk (0.42) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.42 · 323 lines diff across 4 files
    0.42
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.346
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #464"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 42.0% (MEDIUM) · Higher = larger blast radius
    42.0%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 16.6% · Safe to merge
    16.6%