fix(canvas-chat): reset textarea to baseline (not 0px) after send (core#2697) #2718

Merged
devops-engineer merged 1 commits from fix/chat-textarea-reset-baseline into main 2026-06-13 07:08:01 +00:00
Member

Regression from the auto-grow textarea (#2700 feature 4)

After sending a message the input textarea collapses smaller than its original single-row height (just padding) until the next keystroke.

Root cause

The send-reset set textareaRef.current.style.height = "0px" and never recomputed. Unlike the onChange auto-grow (which sets 0px then immediately re-measures scrollHeight), nothing re-measures after send, so the imperative 0px sticks until the next keypress.

Fix

Clear the inline height (style.height = "") instead of "0px" — dropping the override lets the rows={1} natural height govern again, restoring the baseline immediately on send. ChatTab tests green.

🤖 Generated with Claude Code

## Regression from the auto-grow textarea (#2700 feature 4) After sending a message the input textarea **collapses smaller than its original single-row height** (just padding) until the next keystroke. ### Root cause The send-reset set `textareaRef.current.style.height = "0px"` and never recomputed. Unlike the onChange auto-grow (which sets `0px` then immediately re-measures `scrollHeight`), nothing re-measures after send, so the imperative `0px` sticks until the next keypress. ### Fix Clear the inline height (`style.height = ""`) instead of `"0px"` — dropping the override lets the `rows={1}` natural height govern again, restoring the baseline immediately on send. ChatTab tests green. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
core-devops added 1 commit 2026-06-13 07:02:14 +00:00
fix(canvas-chat): reset textarea to baseline (not 0px) after send (core#2697)
CI / Python Lint & Test (pull_request) Successful in 4s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 6s
E2E Peer Visibility (literal MCP list_peers) / detect-changes (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
Harness Replays / detect-changes (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 6s
sop-checklist / review-refire (pull_request_target) Has been skipped
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (local) (pull_request) Has been skipped
CI / Detect changes (pull_request) Successful in 15s
E2E Peer Visibility (literal MCP list_peers) / E2E Peer Visibility (pull_request) Successful in 5s
Harness Replays / Harness Replays (pull_request) Successful in 1s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 10s
E2E API Smoke Test / detect-changes (pull_request) Successful in 17s
E2E Chat / detect-changes (pull_request) Successful in 17s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 15s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 1s
CI / Platform (Go) (pull_request) Successful in 1s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 14s
gate-check-v3 / gate-check (pull_request_target) Failing after 14s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 2s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2s
reserved-path-review / reserved-path-review (pull_request_target) Successful in 13s
sop-checklist / all-items-acked (pull_request_target) Successful in 12s
E2E Chat / E2E Chat (pull_request) Successful in 3s
E2E Staging Canvas (Playwright) / detect-changes (pull_request) Successful in 21s
E2E Staging Canvas (Playwright) / Canvas tabs E2E (pull_request) Successful in 2s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (stub) (pull_request) Successful in 45s
qa-review / approved (pull_request_target) Approved via pull_request_review trigger
qa-review / approved (pull_request_review) Successful in 9s
security-review / approved (pull_request_target) Approved via pull_request_review trigger
security-review / approved (pull_request_review) Successful in 9s
sop-checklist / all-items-acked (pull_request) acked: 7/7 — body-unfilled: comprehensive-testing, local-postgres-e2e, staging-smoke, +4
sop-checklist / na-declarations (pull_request) N/A: (none)
reserved-path-review / reserved-path-review (pull_request_review) Successful in 15s
CI / Canvas (Next.js) (pull_request) Successful in 3m58s
CI / Canvas Deploy Status (pull_request) Successful in 1s
CI / all-required (pull_request) Successful in 3s
Local Provision Lifecycle E2E / Local Provision Lifecycle E2E (real image + MiniMax LLM, advisory) (pull_request) Failing after 4m35s
audit-force-merge / audit (pull_request_target) Successful in 7s
2eeba14b30
The auto-grow send-reset set the textarea's inline height to "0px" and
never recomputed, so after sending the input collapsed to just its
padding — far smaller than its original single-row size — until the next
keystroke fired the onChange recompute. Clear the inline height instead
(empty string) so the rows={1} natural height governs again, restoring
the baseline immediately on send.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
agent-reviewer-cr2 approved these changes 2026-06-13 07:05:04 +00:00
agent-reviewer-cr2 left a comment
Member

APPROVED on head 2eeba14b30.

Reviewed with the 5-axis lens. This is the correct narrow fix for the auto-grow send-reset regression: clearing textareaRef.current.style.height removes the imperative override and lets the rows={1} baseline govern again. That is safer than setting 0px, because there is no post-send scrollHeight recompute until the next input event.

Scope is one UI line plus explanatory comment; no server, persistence, auth, or data-flow changes. Security/performance risk is negligible. Targeted chat/canvas E2E statuses were green; CI / Canvas (Next.js) was still pending at review time, so merge should wait for required CI to finish green.

APPROVED on head 2eeba14b306a57a3ef17a4b4decf4654495d4f81. Reviewed with the 5-axis lens. This is the correct narrow fix for the auto-grow send-reset regression: clearing `textareaRef.current.style.height` removes the imperative override and lets the `rows={1}` baseline govern again. That is safer than setting `0px`, because there is no post-send scrollHeight recompute until the next input event. Scope is one UI line plus explanatory comment; no server, persistence, auth, or data-flow changes. Security/performance risk is negligible. Targeted chat/canvas E2E statuses were green; `CI / Canvas (Next.js)` was still pending at review time, so merge should wait for required CI to finish green.
Member

/sop-ack

/sop-ack
Member

/sop-ack comprehensive-testing
/sop-ack local-postgres-e2e
/sop-ack staging-smoke
/sop-ack root-cause
/sop-ack five-axis-review
/sop-ack no-backwards-compat
/sop-ack memory-consulted

/sop-ack comprehensive-testing /sop-ack local-postgres-e2e /sop-ack staging-smoke /sop-ack root-cause /sop-ack five-axis-review /sop-ack no-backwards-compat /sop-ack memory-consulted
Member

Code review is approved and the explicit SOP acks are posted (acked: 7/7), but merge is still blocked by sop-checklist / all-items-acked: the PR body is missing the required filled SOP checklist sections (body-unfilled). Please add/fill the 7 body markers: Comprehensive testing performed, Local-postgres E2E run, Staging-smoke verified or pending, Root-cause not symptom, Five-Axis review walked, No backwards-compat shim / dead code added, and Memory consulted.

Code review is approved and the explicit SOP acks are posted (`acked: 7/7`), but merge is still blocked by `sop-checklist / all-items-acked`: the PR body is missing the required filled SOP checklist sections (`body-unfilled`). Please add/fill the 7 body markers: `Comprehensive testing performed`, `Local-postgres E2E run`, `Staging-smoke verified or pending`, `Root-cause not symptom`, `Five-Axis review walked`, `No backwards-compat shim / dead code added`, and `Memory consulted`.
devops-engineer merged commit 6a384dcacd into main 2026-06-13 07:08:01 +00:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: molecule-ai/molecule-core#2718