Repository navigation
test(composer): pin list continuation across send modes and selections - #16071
Conversation
…every send mode and the default textarea Adds five cases to ChatInput.listContinuation.test.tsx that kirodotdev#15911's suite left to a local probe: a new line over a selection keeps the native break, Shift+Enter continues the list in ctrl-enter and enter-ctrl-newline modes, plain Enter still sends in enter-ctrl-newline, and the default composer renders the textarea rather than the Lexical editor.
|
Intent: Add regression tests that pin the textarea list continuation shipped in #15911 for a selection, Shift+Enter in every send mode, plain Enter sending in enter-ctrl-newline mode, and the default composer being the textarea. |
UX Review (Fable 5, fork) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing to check. [UX-REVIEWED] 12c021e Description read[DESCRIPTION-READ] 9f7f6a013adeca4050c8f6ddbe0a4798161134dd4127ef957e914dce2837ec97 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Default-composer pin guards ChatInput's prop default only; a ChatPage-level [DESIGN-REVIEWED] 12c021e Description read[DESCRIPTION-READ] 976839dffbc09755bad808861552152f3d6501f44a3e4bbef968d3de3473b8b9 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed |
iamwhatever
left a comment
There was a problem hiding this comment.
Reviewed: test-only. Pins textarea as the default composer, Shift+Enter list continuation in both ctrl modes, plain Enter still sending in enter-ctrl-newline, and a selection newline adding no marker. CI green.
Problem / Motivation
Goal: Lock in the list continuation from #15911 for the composer cases its test file does not cover yet.
#15911 made the textarea composer continue markdown lists on a new line. An audit of that PR against its acceptance list showed the behaviour is right in every case. Five of those cases were checked only by a local probe, not by the committed suite: a new line over a selection, Shift+Enter in the two non-default send modes, plain Enter sending in
enter-ctrl-newlinemode, and the default composer being the textarea.Why it matters
Each of these is a way the feature could regress quietly. One example is the Lexical editor becoming the default before it has list-continuation parity. Another is a send-mode change making Shift+Enter send a list draft. The current suite would stay green through either one.
Not a goal
What changed (motivation → approach → change)
Nothing changes for users. This PR adds regression tests so that the list continuation #15911 shipped cannot break without CI going red. Five cases go into
website/src/test/ChatInput.listContinuation.test.tsx. They use the file's existingmountandnewLinehelpers, which drive the realChatInputand the nativebeforeinputevent.Message inputelement is aTEXTAREAand nocontenteditableis mountedctrl-enterandenter-ctrl-newline1. testbecomes1. test\n2.and nothing is sententer-ctrl-newlineBackwards compatibility
Compatible: test-only change.
Tests
The five cases above. The file passes 23/23, and the neighbouring helper suite
composerListContinuation.test.tsstill passes. The selection and send-mode cases pass because of theselectionStart !== selectionEndearly return inchat-input/listContinuation.tsand the send-key branch inkeyboard.ts.Manual verification
N/A. The change is test-only. The behaviour itself was checked in a browser on #15911's head (desktop 1400px, 600px and mobile 390px viewports).
Screenshots / video
Why no screenshot: test-only diff; no component, style or string changes.
Related Issues
no linked issue: follow-up coverage for #15911, which merged as e858043.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)