Skip to content

fix(tui): render tool activity before the final answer (chronological order) - #258

Merged
github-actions[bot] merged 1 commit into
mainfrom
fix/conversation-chronological-order
Aug 5, 2026
Merged

github-actions[bot] merged 1 commit into
mainfrom
fix/conversation-chronological-order

Conversation

@mohitranka

Copy link
Copy Markdown
Contributor

What

Completed turns rendered input → output → tool calls: the final answer was composed before the tool-call activity groups. The session stream is actually input → tool calls → output, so the transcript read out of order.

Fix

compose_turn_presentation (conversation.rs) now emits activity before answers/failures, restoring chronology: input → tool calls → output.

out.extend(activity);   // tool calls ran first
out.extend(answers);
out.extend(failures);

Updated three tests that pinned the old order (completed_turn_composes_activity_before_answer, semantic_blocks_keep_assistant_answer_separate_from_activity, failed_turn_renders_activity_before_failure).

Validation

  • cargo fmt --all -- --check clean
  • cargo clippy --workspace --all-targets --locked -- -D warnings clean
  • cargo test --package forge-tui --lib: 740 passed

Known: 3 forge-config permissions tests fail on this machine (environmental, read the developer's real user-level permissions.toml) — confirmed pre-existing on clean main, unrelated to this change.

…cal order

The final answer was composed before the tool-call activity groups, so a
completed turn read as input -> output -> tool calls even though the
session stream is input -> tool calls -> output. Emit activity first so
the transcript reads chronologically.
@github-actions
github-actions Bot enabled auto-merge (squash) August 5, 2026 10:48
@github-actions
github-actions Bot merged commit 4e02e40 into main Aug 5, 2026
7 checks passed
mohitranka added a commit that referenced this pull request Aug 21, 2026
…cal order (#258)

The final answer was composed before the tool-call activity groups, so a
completed turn read as input -> output -> tool calls even though the
session stream is input -> tool calls -> output. Emit activity first so
the transcript reads chronologically.
mohitranka added a commit that referenced this pull request Sep 11, 2026
…cal order (#258)

The final answer was composed before the tool-call activity groups, so a
completed turn read as input -> output -> tool calls even though the
session stream is input -> tool calls -> output. Emit activity first so
the transcript reads chronologically.
mohitranka added a commit that referenced this pull request Sep 11, 2026
…cal order (#258)

The final answer was composed before the tool-call activity groups, so a
completed turn read as input -> output -> tool calls even though the
session stream is input -> tool calls -> output. Emit activity first so
the transcript reads chronologically.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant