Skip to content
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

trunk-merge/pr-3731/5165515c-9b59-4c58-b21d-313d3ac46cc0 - #3734

Closed
trunk-io[bot] wants to merge 5 commits into
mainfrom
trunk-merge/pr-3731/5165515c-9b59-4c58-b21d-313d3ac46cc0
Closed

trunk-io[bot] wants to merge 5 commits into
mainfrom
trunk-merge/pr-3731/5165515c-9b59-4c58-b21d-313d3ac46cc0

Conversation

@trunk-io

@trunk-io trunk-io Bot commented Jul 22, 2026

Copy link
Copy Markdown
Trunk Merge Pull Request Banner

This pull request was created and is being managed by Trunk Merge.

This pull request is based on the main branch at SHA f377ae9663594a657b127c6e47282477522c26de.

See more details here.

When CI completes, this pull request will be closed automatically.

Pull Requests Being Tested

This pull request is testing the changes from pull request 3731.

adboio and others added 5 commits July 22, 2026 18:04
The channel feed's ExpandablePrompt rendered the more/less toggle as a
sibling below the clamped body, so it always landed on its own line, and
whitespace-pre-wrap left the -webkit-line-clamp ellipsis with a leading
space (or on a blank line) for multi-line prompts.

Move the toggle inside the clamped body, pinned to the bottom-right with a
solid background so it sits beside the ellipsis on the last visible line,
and switch whitespace to pre-line so trailing spaces collapse against the
ellipsis while newlines still break.

Generated-By: PostHog Code
Task-Id: 21f31a04-8014-4b94-bc8d-2cbc012a70ef
The previous attempt pinned the toggle to the bottom-right corner of the
clamped block, so it sat at the right edge even when the last line was
short, not inline with the ellipsis.

Truncate the prompt by hand (no -webkit-line-clamp): measure a hidden copy
of the full text and binary-search the longest prefix that still fits in N
lines once "...more" is appended, then render that prefix + an inline
"more" toggle. The toggle now flows right after the ellipsis on the last
visible line, like "...prompt...more".

Generated-By: PostHog Code
Task-Id: 21f31a04-8014-4b94-bc8d-2cbc012a70ef
2 updated
Run: ccb06f1b-36a4-4dcb-9603-16b7bde1b17f

Co-authored-by: adboio <23323033+adboio@users.noreply.github.com>
…n overflowing

Address Greptile review comments on ExpandablePrompt:

- "Prompt Updates Keep Stale Cut": use `children` (the prop) as the source
  of truth for the measure text and add it to the callback-ref deps, so a
  polled prompt update re-runs the measure even when the rendered size is
  unchanged (ResizeObserver alone would miss same-size text swaps).
- "Zero-Fit State Hides Toggle": always cut when the prompt overflows, even
  when no full character fits alongside "...more" (extreme narrow widths),
  so the toggle still renders and the prompt stays expandable instead of
  being silently clipped with no way to expand.

The third comment ("Probe Omits Real Button Width") is a false positive: the
text-xs button renders narrower than the body-font probe text, so the probe
conservatively over-reserves room and the button never wraps.

Generated-By: PostHog Code
Task-Id: 21f31a04-8014-4b94-bc8d-2cbc012a70ef
@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 5cc6749.

@trunk-io trunk-io Bot closed this Jul 22, 2026
@trunk-io
trunk-io Bot deleted the trunk-merge/pr-3731/5165515c-9b59-4c58-b21d-313d3ac46cc0 branch July 22, 2026 23:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant