Skip to content

fix(desktop): preserve empty composer caret height - #5276

Open
sunrioa wants to merge 1 commit into
apache:mainfrom
sunrioa:codex/fix-5264-composer-caret
Open

sunrioa wants to merge 1 commit into
apache:mainfrom
sunrioa:codex/fix-5264-composer-caret

Conversation

@sunrioa

@sunrioa sunrioa commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Fix the clipped insertion caret in an empty composer after switching between WorkHub and sidebar conversations.

Keep the scrolling editable at least one line tall, including its vertical padding. Share the padding value with compact WorkHub so both layouts retain enough space for the caret.

Preserve the existing interaction gate, editor DOM, draft restoration and multiline scrolling. Add regression coverage to the existing EmptyHome and ProgressModelPicker stories.

Fixes #5264

Verification

  • Regression checks fail without the fix on baseline 6bff26b42: EmptyHome collapses to 8px instead of at least 30px; compact WorkHub measures 22px instead of at least 34px. All three focused browser cases pass with the fix.
  • Covered repeated inert/hide/show transitions, draft restoration, empty disabled/enabled states, multiline scrolling and send-clear.
  • Storybook typecheck and build passed. Full Storybook smoke passed: 359 stories / 388 theme renders.
  • With Node 24.19.0 and npm 11.19.0, lint, format:check, build, typecheck and Knip for apps/desktop and packages/ui passed.
  • Additional broad validation exercised all 11 workspaces. Desktop (2593/2593), UI, Core, Storage, MCP, Computer Use, Website and Eval passed. Runtime and CLI passed complete workspace reruns after failing in the concurrent run. Runtime Host still had three process-lifecycle failures in its complete isolated rerun; the three involved files subsequently passed separately (95/95). This is not a clean full-suite result. No assertions or timeouts were relaxed, and this patch does not change those packages.
  • Not run on this branch: Windows native navigation, real OS IME candidate-window validation, or Electron E2E. Browser geometry tests do not establish a Chromium engine root cause or verify native caret pixels.

Before/after layout evidence (the browser assertions above verify the editable height; these screenshots are not native caret-pixel assertions):

Before:

Before: collapsed empty editor

After:

After: one-line minimum restored

AI use

  • No generative tool made a substantive contribution
  • Generative tooling made a substantive contribution

Tool(s) and scope: OpenAI Codex — implementation, regression tests, and validation; reviewed by the author.

Checklist

  • Tests cover the change and fail without it
  • Lint, format, typecheck and the affected suites pass locally

Does this PR entail a change in behavior?

  • Yes — described under Summary above
  • No

Keep the scrolling editable at least one line plus its block padding through inert session transitions. Cover draft restoration, empty disabled states, multiline scrolling, send-clear, and compact WorkHub geometry.

Refs apache#5264

Generated-by: Codex
@github-actions github-actions Bot added the effort/M Under 500 readable lines label Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/M Under 500 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(desktop): composer caret appears as a tiny mark after switching conversations from WorkHub

1 participant