Skip to content

🦔 fix: Keep System Messages Stable During Collapse - #16780

Merged
danny-avila merged 1 commit into
devfrom
lia/system-message-collapse
Oct 5, 2026
Merged

danny-avila merged 1 commit into
devfrom
lia/system-message-collapse

Conversation

@lia-by-librechat

@lia-by-librechat lia-by-librechat Bot commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Collapsing a system background-task message briefly stretched its bubble to the full available width before returning to its compact header. Keep the expanded width while the result body animates closed, then restore the compact width when that body unmounts. Subagent wake-up cards use the same sizing rule.

How it works

-isExpanded && 'w-[36rem]'
+shouldRenderBody && 'w-[36rem]'

Width and result-body lifetime now change together instead of releasing width at the start of the closing transition.

Type of change

  • Bug fix

Testing

  • Focused client tests: 41 passed across wake-up cards, message rows, and shared transcripts.
  • Client tsc --noEmit: passed.
  • Regression coverage checks closing width, lazy unmount, inert content, nested transition events, and reopening before collapse completes.
  • npm run static-checks -- --against origin/dev: passed.
  • Real shared-transcript UI in Chromium: desktop, mobile, reduced motion, lazy unmount, and interrupted reopening passed.
  • Local runtime: Node 24.16.0 for npm/Jest/TypeScript; Bun 1.4.2 for the browser driver.
  • Full end-to-end suite and Lighthouse were not run locally. CI Lighthouse passed.
  • Independent source review of ce3dd9f13a9e7a5b46b305ddfc8160342c2311fb: complete, no findings.

Screenshots / recordings

Before/after recordings were captured from the running app at the same desktop viewport. Uploading with gh --attach returned unsupported authentication type, so the recordings could not be attached.

Collapse width Before After
Expanded 602 px 602 px
Peak while closing 639.1875 px 602 px
Collapsed 298 px 298 px

Risk / compatibility

No API, preference, theme, or animation-duration changes.

Checklist

  • I reviewed my own changes
  • Relevant tests have been added or updated
  • Existing relevant tests pass
  • The change does not introduce new warnings or errors
  • Required dependency changes have been merged/published: N/A
  • Required documentation PR: N/A

@lia-by-librechat

Copy link
Copy Markdown
Contributor Author

Head: ce3dd9f. Keeps wake-up card width until the closing result body unmounts. Adds collapse and interrupted-reopen regressions for background-tool and subagent cards. Focused client tests: 41 passed. Client typecheck passed.

@codegraph-librechat codegraph-librechat Bot added the 🗺️ Chat Frontend codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9) label Oct 5, 2026
@danny-avila
danny-avila merged commit cd4ae0f into dev Oct 5, 2026
30 checks passed
@danny-avila
danny-avila deleted the lia/system-message-collapse branch October 5, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🗺️ Chat Frontend codegraph: the taxonomy area this belongs to (classifier, confidence ≥ 0.9)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants