Skip to content

Collapse long user messages - #35

Closed
vipmax wants to merge 2 commits into
mainfrom
codex/add-message-collapse-feature
Closed

Collapse long user messages#35
vipmax wants to merge 2 commits into
mainfrom
codex/add-message-collapse-feature

Conversation

@vipmax

@vipmax vipmax commented Aug 15, 2026

Copy link
Copy Markdown
Member

Motivation

  • User messages with large logs could flood the conversation UI and make it hard to navigate, so long user messages should be collapsed by default.

Description

  • Add collapse/expand behavior to user message bodies in anycode/components/agent/AcpMessage.tsx using a ref that detects overflow and a local isExpanded state to toggle view.
  • Add an accessible Show more / Show less button with aria-expanded and a CSS-limited collapsed height in anycode/components/agent/AcpMessage.css (max-height: 180px).
  • Ensure attachments and existing actions (Undo) continue to render correctly when messages are collapsed.
  • Add an E2E test in anycode/tests/demo.spec.ts to verify the collapsed default state and the expand/collapse interaction.

Testing

  • Ran pnpm build:demo which completed successfully (build warnings noted but build finished).
  • Ran the targeted Playwright test with pnpm exec playwright test --grep "collapse and expand long user messages" and the test passed (1 passed).
  • Verified git diff --check and committed changes as Collapse long user messages.

Codex Task

@vipmax vipmax closed this Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant