Skip to content

fix(app): keep long prompts folded during session creation - #64452

Merged
usrnk1 merged 1 commit into
devfrom
fold-pending-prompts
Nov 17, 2026
Merged

usrnk1 merged 1 commit into
devfrom
fold-pending-prompts

Conversation

@usrnk1

@usrnk1 usrnk1 commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Reported in a screen recording during worktree creation.

Type of change

  • Bug fix

What does this PR do?

With Fold long messages on, a long prompt now shows its eight-line preview as soon as “Creating worktree” appears. The preparing screen uses the same setting as the timeline, and the shared bubble measures wrapped text once its surrounding view has mounted, before the first paint.

How did you verify your code works?

  • The regression test checks the bubble’s first visible height, then samples its height through the handoff to the timeline. A single wrapped paragraph reproduced both jumps before the fix.
  • bun run check, changed-file lint, 122 focused unit tests, and five built Chromium tests passed.
  • The headless Strobe navigation check passed on both revisions. The standalone app E2E typecheck failed on both with the same 189 diagnostics.

Visual

Both screenshots show the same prompt during worktree creation at 1280 × 900 with the light theme and folding enabled.

Before (34d93d4cd5) — the preparing screen shows all 17 lines.

Full prompt during worktree creation

After (1a272cd29e) — the prompt opens with an eight-line preview and “Read more”.

Folded prompt during worktree creation

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Added by the opencode bot (AI-generated).

Related: #64276

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The fix works. With Fold long messages on, the preparing screen now shows the 8-line preview with Read more, and the message keeps the same height through the handoff to the timeline.

How I checked: I ran the new regression test in a built Chromium app.

  • It fails on the base: the prompt shows in full and there's no Read more.
  • It passes with this PR.
  • With only the fold prop and measure() called directly again, it still fails on the first-painted height (569px vs 238px). So both parts of the change are needed.

The session-ui message unit tests and tsc -b for both changed packages pass.

Public API: unchanged.

No blocking concerns. One small thing: a fold opened with Read more on the preparing screen isn't carried over, so it folds again when the timeline takes over. That's probably fine for a screen that only shows for a short time.

Related: #64276

Before

After

@usrnk1
usrnk1 merged commit b2fda77 into dev Nov 17, 2026
15 checks passed
@usrnk1
usrnk1 deleted the fold-pending-prompts branch November 17, 2026 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant