Skip to content

fix(ai-trace): Minimize system prompts in trace input#114701

Merged
obostjancic merged 6 commits intomasterfrom
ognjenbostjancic/tet-2282-minimize-system-prompt-by-default-in-llm-trace-view
May 4, 2026
Merged

fix(ai-trace): Minimize system prompts in trace input#114701
obostjancic merged 6 commits intomasterfrom
ognjenbostjancic/tet-2282-minimize-system-prompt-by-default-in-llm-trace-view

Conversation

@obostjancic
Copy link
Copy Markdown
Member

@obostjancic obostjancic commented May 4, 2026

Render system prompt messages in the AI input section behind a collapsed disclosure by default. User messages remain visible, so trace details still show the active prompt context without forcing users to expand the whole Input section.

Structured system fields now normalize as system messages too, so object-shaped system prompts use the same collapsed rendering path as string prompts.

Before:
CleanShot 2026-05-04 at 13 54 57

After:
CleanShot 2026-05-04 at 13 56 52

Fixes TET-2282

Keep AI input sections open while rendering system prompt messages inside a collapsed disclosure by default. User messages remain visible so the trace drawer still shows the active prompt context without an extra click.\n\nRefs TET-2282\nCo-Authored-By: OpenAI Codex <noreply@openai.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 4, 2026

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 4, 2026
@obostjancic obostjancic changed the title fix(ai): Minimize system prompts in trace input fix(ai-trace): Minimize system prompts in trace input May 4, 2026
Normalize structured system fields as system messages so they use the same collapsed rendering path as string system prompts. This keeps user prompts visible while minimizing system prompt content by default.\n\nRefs TET-2282\nCo-Authored-By: OpenAI Codex <noreply@openai.com>
Cast the focused AI input test fixture through unknown before treating it as a trace node. The fixture intentionally includes only the fields exercised by AIInputSection.\n\nRefs TET-2282\nCo-Authored-By: OpenAI Codex <noreply@openai.com>
Remove the nested disclosure affordance for system messages and rely on the existing show-more clipping behavior for structured system prompt values. String system prompts keep rendering as normal message content.\n\nRefs TET-2282\nCo-Authored-By: OpenAI Codex <noreply@openai.com>
Wrap all rendered system prompt content in the show-more clipping container. This covers gen_ai.system_instructions values that are strings but render as JSON, where the JSON renderer expands keys by default.\n\nRefs TET-2282\nCo-Authored-By: OpenAI Codex <noreply@openai.com>
@obostjancic obostjancic marked this pull request as ready for review May 4, 2026 11:57
@obostjancic obostjancic requested review from a team as code owners May 4, 2026 11:57
@obostjancic obostjancic enabled auto-merge (squash) May 4, 2026 11:59
@obostjancic obostjancic merged commit 30cfd90 into master May 4, 2026
83 of 85 checks passed
@obostjancic obostjancic deleted the ognjenbostjancic/tet-2282-minimize-system-prompt-by-default-in-llm-trace-view branch May 4, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants