← Back to Pull requests

Chat: simplify subagent activity and open transcripts in place (design) #497

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Nov 24, 2026 17:27 UTC
Author

Merge order

Merge Tool activity #492 first. This draft targets its upstream mirror, stack/tools-timeline, so the comparison shows only the subagent changes. After Tools merges, this can be refreshed and retargeted to master.

What and why

Group each reply’s delegations under one disclosure with the actual count and a blue activity ring while work is running. Collapsed task rows are one line. Expanding a task reveals up to two activity lines and a document icon. For a running child, the activity ring becomes a Stop control when that row is expanded.

Why two lines and a document icon. Once a reply has more than two subagents, putting several transcript entries under each one quickly takes over the chat viewport. The two-line preview keeps the other tasks and the parent reply in view. The document icon gives every task a consistent way to open the full history, including short transcripts.

The transcript opens full page on Android and in the right-side panel at every desktop width. It includes the task instructions, upstream’s default tool cards, messages, and files. Stop remains in the transcript header while the child is active. Closing the viewer returns to the expanded row.

Gateway

The viewer uses Hermes session.transcript, scoped to the attached parent and selected child. It retries transient failures while the child is live, keeps polling from the last cursor if a live page omits the next cursor, merges replayed rows by ID, and falls back to task activity when the gateway lacks the method. Responses from older attachments are discarded.

How I tested it

  • On refreshed stacked head 8a144b73, 307 focused JVM tests passed, and desktop and Android UI compilation passed. The stack preserves saved commentary as visible transcript text even when Reasoning is hidden.

  • Earlier results and captures below are from before the refresh.
  • The full local suite passed on 83998add, including shared Android host and JVM tests, Android Debug and Dev builds, Android and Wear lint, Wear build and tests, and desktop compilation and tests.

  • FakeTransport tests cover a successful scoped page, older gateways, transient errors, and a runtime replacement. Polling tests cover missing and stalled cursors, duplicate rows, and retry. The Compose regression verifies that new rows follow the bottom without pulling the reader away from earlier content.

  • On a 360 dp Android emulator in light and dark I checked inline expansion, the Stop tap target, opening the full-screen transcript, expanding the default tool card, and returning with X and Back.

  • Desktop Compose tests covered both window sizes and verified that a file link opens the file rail and closing the file restores the transcript drawer.
  • Screenshots

    Actual captures of the built-in synthetic Subagents chat. Android comparisons are at 360 dp. Desktop captures are at the same 960 × 700 size.

    | Theme | Upstream before | Inline activity after | Full transcript after |
    | --- | --- | --- | --- |
    | Dark | <img width="230" alt="Upstream stacked subagent cards in dark mode" src="https://raw.githubusercontent.com/StavenCross/kyllene/f0542cd475759ac0b163407d6cbefca39f565639/android-before-dark.png"> | <img width="230" alt="Two-line activity and Stop ring in dark mode" src="https://raw.githubusercontent.com/StavenCross/kyllene/f0542cd475759ac0b163407d6cbefca39f565639/android-after-dark-inline.png"> | <img width="230" alt="Full-screen transcript with default tool cards in dark mode" src="https://raw.githubusercontent.com/StavenCross/kyllene/f0542cd475759ac0b163407d6cbefca39f565639/android-after-dark-transcript.png"> |
    | Light | <img width="230" alt="Upstream stacked subagent cards in light mode" src="https://raw.githubusercontent.com/StavenCross/kyllene/f0542cd475759ac0b163407d6cbefca39f565639/android-before-light.png"> | <img width="230" alt="Two-line activity and Stop ring in light mode" src="https://raw.githubusercontent.com/StavenCross/kyllene/f0542cd475759ac0b163407d6cbefca39f565639/android-after-light-inline.png"> | <img width="230" alt="Full-screen transcript with default tool cards in light mode" src="https://raw.githubusercontent.com/StavenCross/kyllene/f0542cd475759ac0b163407d6cbefca39f565639/android-after-light-transcript.png"> |

    Collapsed disclosure in dark mode · Collapsed disclosure in light mode

    | Desktop before | Desktop after |
    | --- | --- |
    | <img width="435" alt="Upstream desktop stacked subagent cards" src="https://raw.githubusercontent.com/StavenCross/kyllene/f0542cd475759ac0b163407d6cbefca39f565639/desktop-before.png"> | <img width="435" alt="Desktop transcript drawer with default tool cards and file preview entry" src="https://raw.githubusercontent.com/StavenCross/kyllene/f0542cd475759ac0b163407d6cbefca39f565639/desktop-after-transcript.png"> |

    Scope

    The current stacked diff is 25 files with 1,446 additions and 103 deletions.

    The changes include the transcript reader, desktop and Android layouts, and regression tests.

    Changed code

  • ChatScreen.kt and SubagentInspector.kt handle the inline rows, Stop controls, full-screen viewer, wide desktop rail, file handoff, and follow-at-bottom behavior.

  • ChatSession.kt and SubagentTranscript.kt handle attached-session reads, retries, cursor continuity, and duplicate IDs.

  • Localized strings, regression tests, synthetic previews, and the roadmap cover the revised behavior.
  • Checklist

  • Update the roadmap and run the full local regression suite.

  • Test the Android layout at 360 dp in both themes and verify wide and narrow desktop navigation.

  • Attach real before-and-after screenshots.

  • Cover older gateway fallback and runtime replacement with FakeTransport.

  • Recheck the updated head against a live Hermes gateway.
  • Diff: 650 lines (+487 / -163) across 8 files Reviewer: Giton22 Review duration: 9161m
    All Vouch review confidence checks passed
    Residual risk 0.28 = Change Risk (0.52) × (1 − Review Confidence (0.47)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    46%
    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.388
    Shallow Review Depth shallow_review_depth
    0.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #497"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 46.7% 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: 52% (MEDIUM) · Higher = larger blast radius
    52%
    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: 46.7% · Lower = rushed or shallow review
    46.7%
    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: 27.7% · Safe to merge
    27.7%