Repository navigation
Conversation
ApprovabilityVerdict: Needs Human Approval Macroscope's review found this PR requires human approval — This production editor fix adds substantial cross-platform composition and dead-key state handling, including asynchronous reconciliation and undo integration. Its focused tests reduce risk, but the new runtime state machine is complex enough to merit human review. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Selection eligibility and pending state apps/web/src/components/ComposerPromptEditorTiptap.tsx |
The editor validates selections for wrapping and stores the selection, editor state, and composition transaction ID while dead-key input is pending. |
Dead-key capture, resolution, and validation apps/web/src/components/ComposerPromptEditorTiptap.tsx, apps/web/src/components/ComposerPromptEditorTiptap.input.browser.test.tsx |
The editor handles dead-key input during composition and text input. Browser tests cover wrapping, replacement, cancellation, selection cases, and undo and redo. |
Priority:
Estimated code review effort: 3 (Moderate) | ~25 minutes
Change: Bug fix
Sequence Diagram(s)
sequenceDiagram
participant Browser
participant ComposerPromptEditorTiptap
participant ProseMirror
Browser->>ComposerPromptEditorTiptap: Send Dead or Process keydown
ComposerPromptEditorTiptap->>ProseMirror: Save eligible selection and editor state
Browser->>ComposerPromptEditorTiptap: Send composition or committed text
ComposerPromptEditorTiptap->>ProseMirror: Wrap, replace, or restore selection
Suggested reviewers: juliusmarminge
Merge Risk: 
Minimal · up to 23f60
-
No confirmed issue blocks merging after normal checks.
Pre-merge checks: 
4
-
Full details: Description check
-
Explanation
PASS. The description explains the problem and change, links the related issue and maintainer request, and provides detailed verification results, commands, platform coverage, and UI evidence. It does not use the template headings for Problem, Change, or Scope and approval, but the required information is present.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Note Written by thanks @Gustav0ar. your latest implementation preserves the selection through native composition, supports direct Windows commits, and groups the result with undo. i kept that implementation and both of your commits. i merged current main, resolved the editor conflicts while preserving main's callback and history fixes, and migrated your tests to the current disposable render and timer setup. removed an unused editor ref. the diff against main remains limited to the editor and its existing input test file. verification on
before on main: after on this head: recording playback and seeking were checked directly in chrome; git.cafe displays the external video embeds as links. |
|
Thanks @maria-rcks , pls let me know what is missing for approval |
With US-International input, selecting
wordand pressing apostrophe then Space replaces the word with'on Linux and macOS. This restores the existing selection-surround behavior for dead keys after https://git.cafe/pingdotgg/t3code/pulls/20350. Related: the maintainer's request to verify selection wrapping.Keep eligible selected text in place while the dead key resolves, then surround it when a delimiter commits. Accented letters still replace the selection. Handle both native composition and Windows' direct text commits, preserve one-step undo, and discard stale selections.
Verification:
xdg_shellsurface. The reporter also verified the isolated desktop build on CachyOS/Wayland.Reproduce the focused browser checks with:
macOS before the fix: apostrophe + Space replaces the selected
wordwith'.macos-before.mp4
macOS after the fix: apostrophe + Space produces
'word'and keepswordselected.macos-after.mp4
Windows native verification
All 16 cases pass in rich and plain modes, including accents, selection wrapping, and undo/redo.
windows-after.mp4
Linux X11 and native Wayland verification
X11: all 16 native cases pass under Xvfb/Openbox.
linux-x11-after.mp4
Native Wayland: all 16 cases pass under Sway, with XWayland disabled. The selected word remains in every recorded transaction and frame.
linux-wayland-after.mp4
Passing Linux run, X11 environment and event traces, and Wayland environment, surface, and event traces.
The recordings include layout probes and native keyboard cases. Passing Windows and macOS native run, macOS event traces, and Windows event traces. The test code stays on the fork's test branch.
Implemented with GPT-6.1-sol in Codex.