Skip to content

chore : render answered user question outside agent steps - #1394

Open
harshil-2096 wants to merge 4 commits into
mainfrom
chore/hv/keep-user-questions-visible-outside
Open

harshil-2096 wants to merge 4 commits into
mainfrom
chore/hv/keep-user-questions-visible-outside

Conversation

@harshil-2096

@harshil-2096 harshil-2096 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

image image

Closes AGE-2830

Changes

How was this tested?

Checklist

  • I have read the contributing guidelines
  • pnpm build, pnpm test, pnpm typecheck, pnpm lint:ci, and pnpm format:check pass locally
  • Tests added/updated where it makes sense
  • No hand-edits to generated code (packages/trueforge-sdk, python/trueforge_sdk, .github/fern/openapi/openapi.json, docs/openapi.json) — fork PRs omit SDK regen; maintainers regenerate after merge
  • Docs / .env.example updated if configuration or behavior changed

Note

Low Risk
UI-only message layout and step counting; no auth, API, or data-path changes.

Overview
Answered user questions now render outside the collapsible Agent steps accordion instead of being buried inside it, with a small margin on the read-only prompt card.

Implementation treats completed ask_user tool calls as hidden for agent-step logic: they are skipped in groupBy (leaf render), excluded from the trailing-text 500-char holdback, and omitted from step counts. Tool/thinking counts are computed per accordion via new countAgentSteps rather than message-wide totals from computeAgentStepsSplit, so split groups do not show inflated step numbers.

Unit tests cover hidden-only-tool flows and per-group counting.

Reviewed by Cursor Bugbot for commit 4820108. Bugbot is set up for automated code reviews on this repo. Configure here.

@changeset-bot

changeset-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 4820108

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@truefoundry/trueforge-ui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@veria-ai

veria-ai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

PR overview

No security issues were found in this pull request.

Reviews

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4820108. Configure here.


if (index < cutIndex) {
// Answered user questions stay visible: render them outside the collapsible Agent steps.
if (isAnsweredAskUser(part)) return null;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Held-back reply splits into empty accordion

Medium Severity

Ungrouping an answered question splits Agent steps, so while the 500-character holdback is still active the trailing reply is grouped into a new accordion after the question. Earlier tools still count as steps before the cut, so cutIndex stays at the end of the message and that second accordion can show 0 tool calls with the streaming text muted inside it until 500 characters arrive or the turn finishes.

Additional Locations (1)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 4820108. Configure here.

This branch has not been deployed

No deployments
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