Skip to content

rich message component#13777

Open
harryalbert wants to merge 4 commits into
harry/code-1822-tui-local-childrenfrom
harry/code-1822-rich-child-message-rendering
Open

rich message component#13777
harryalbert wants to merge 4 commits into
harry/code-1822-tui-local-childrenfrom
harry/code-1822-rich-child-message-rendering

Conversation

@harryalbert

@harryalbert harryalbert commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Description

Renders MessagesReceivedFromAgents in the Warp TUI as rich, collapsed-by-default participant rows. Each row shows the sender's conversation-status glyph, deterministic orchestration identity, and display name; expanding it reveals the message body with hanging indentation and falls back to the subject when the body is blank. Opaque EventsFromAgents ids no longer produce placeholder transcript rows, and exchanges containing only intentionally hidden orchestration output now render at zero height instead of leaving blank transcript blocks.

Why participant resolution lives in history/topology

An incoming ReceivedMessageDisplay contains a server-side sender_agent_id, but not the sender's display name, status, or local conversation id. The current transcript block supplies a local AIConversationId, so rendering needs two small semantic lookups:

  1. Current conversation → immediate parent/orchestrator agent id.
  2. Sender agent id → loaded sender conversation through the history model's reverse index.

This is not a second graph traversal. BlocklistAIHistoryModel is already the canonical owner of run-id indexing, loaded conversations, immediate-parent links, sibling ordering, names, and ConversationStatus. The shared helpers in app/src/ai/blocklist/orchestration_topology.rs expose that identity discovery to both GUI and TUI.

TuiOrchestrationModel intentionally remains an ephemeral session materializer. It owns only child-conversation → background-session and session → event-consumer mappings. Mirroring participant metadata there would create a second source of truth and would not cover restored, remote, or otherwise pre-existing conversations that did not pass through the current TUI coordinator.

After semantic resolution, each frontend owns presentation: the GUI chooses avatars/navigation behavior, while the TUI chooses terminal glyph/color identities. The TUI reads ConversationStatus directly for participant rows; tool calls retain a separate ToolCallDisplayState because constructing and pending are tool-call states, not conversation lifecycle states.

Testing

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch from 10098dd to 6c51ab5 Compare July 15, 2026 18:55
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-local-children branch from 665b765 to 5511f60 Compare July 15, 2026 18:55
@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch from 6c51ab5 to 5a63033 Compare July 15, 2026 22:12
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-local-children branch from 5511f60 to 589ec22 Compare July 15, 2026 22:12
@harryalbert
harryalbert changed the base branch from harry/code-1822-tui-local-children to graphite-base/13777 July 16, 2026 02:44
@harryalbert harryalbert mentioned this pull request Jul 16, 2026
4 tasks
@harryalbert
harryalbert force-pushed the graphite-base/13777 branch from 589ec22 to c4eb571 Compare July 16, 2026 11:58
@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch from 5a63033 to 417292b Compare July 16, 2026 11:58
@harryalbert
harryalbert changed the base branch from graphite-base/13777 to harry/code-1822-tui-local-children July 16, 2026 11:58
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-local-children branch from c4eb571 to e1b93b0 Compare July 16, 2026 12:44
@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch 2 times, most recently from 522bbcd to f92bfe3 Compare July 16, 2026 12:49
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-local-children branch from e1b93b0 to 94f69eb Compare July 16, 2026 12:49
@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch from f92bfe3 to 1e4f5c6 Compare July 16, 2026 12:53
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-local-children branch from 94f69eb to 626fa04 Compare July 16, 2026 12:53
@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch from 1e4f5c6 to ca64994 Compare July 16, 2026 14:00
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-local-children branch 2 times, most recently from 90c65aa to a548617 Compare July 16, 2026 14:17
@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch 2 times, most recently from 9d9504c to b66beaa Compare July 16, 2026 14:19
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-local-children branch from a548617 to e38c4a2 Compare July 16, 2026 14:19
@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch from b66beaa to b054916 Compare July 16, 2026 15:59
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-local-children branch from e38c4a2 to 1519f99 Compare July 16, 2026 15:59
@harryalbert
harryalbert changed the base branch from harry/code-1822-tui-local-children to graphite-base/13777 July 16, 2026 17:44
@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch from b054916 to 7480600 Compare July 16, 2026 18:24
@harryalbert
harryalbert changed the base branch from graphite-base/13777 to harry/code-1822-tui-local-children July 16, 2026 18:24
@harryalbert
harryalbert marked this pull request as ready for review July 16, 2026 19:26
@harryalbert
harryalbert requested a review from kevinyang372 July 16, 2026 19:26
@oz-for-oss

oz-for-oss Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

@harryalbert

I'm starting a first review of this pull request.

You can view the conversation on Warp.

I completed the review and no human review was requested for this pull request.

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch 2 times, most recently from 48871bc to 4835202 Compare July 16, 2026 19:32

@oz-for-oss oz-for-oss Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overview

This PR updates the TUI orchestration transcript to render received agent messages as rich collapsed participant rows, factors participant resolution into shared history/topology helpers, removes placeholder lifecycle-event transcript rows, and consolidates TUI tool-call state styling helpers. It includes TUI render tests, topology tests, and linked visual evidence for the user-facing behavior.

Concerns

  • No blocking correctness, security, or spec-alignment concerns found in the reviewed diff.

Verdict

Found: 0 critical, 0 important, 0 suggestions

Approve

Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).

Powered by Oz

@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch from 4835202 to fced1e8 Compare July 16, 2026 22:12
@harryalbert harryalbert mentioned this pull request Jul 16, 2026
4 tasks
pub struct ResolvedOrchestrationParticipant {
pub kind: OrchestrationParticipantKind,
pub conversation_id: Option<AIConversationId>,
pub display_name: String,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should display_name be a method on OrchestrationParticipantKind?

It could be

pub enum OrchestrationParticipantKind {
    Orchestrator { name: String },
    Agent,
    Unknown,
}

impl OrchestrationParticipantKind {
    fn display_name() { ... }
}

@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch from fced1e8 to 87dd32b Compare July 16, 2026 23:09
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-local-children branch from 34e7925 to 8179fca Compare July 16, 2026 23:09
@harryalbert
harryalbert force-pushed the harry/code-1822-rich-child-message-rendering branch from 87dd32b to 3b7f113 Compare July 17, 2026 02:57
@harryalbert
harryalbert force-pushed the harry/code-1822-tui-local-children branch from 8179fca to 1e409af Compare July 17, 2026 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants