[PR #1216] [MERGED] Fix Ctrl+Enter composer send shortcut #4987

Closed
opened 2026-10-22 04:12:16 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1216
Author: @cha1latte
Created: 5/25/2026
Status: ✅ Merged
Merged: 5/26/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/ctrl-enter-send


📝 Commits (3)

  • 8daadf2 Fix Ctrl Enter send shortcut
  • d9e2260 Use mode-specific enter-to-send setting
  • 1bfe86d Guard send shortcut during IME composition

📊 Changes

3 files changed (+7 additions, -2 deletions)

View changed files

➕ .agents/evidence/issue-1215/ctrl-enter-after.png (+0 -0)
➕ .agents/evidence/issue-1215/ctrl-enter-before.png (+0 -0)
📝 src/features/modes/shared/chat-ui/components/ChatInput.tsx (+7 -2)

📄 Description

Linked issue

Closes #1215

Why this change

  • Ctrl+Enter was expected to send a message from the shared chat composer, but in roleplay/shared mode it left the draft unsent when Enter-to-send was disabled.

What changed

  • Updated the shared chat input key handler so Ctrl+Enter and Cmd/Meta+Enter submit when Enter-to-send is disabled.
  • Updated the shared chat input to read the conversation Enter-to-send setting when it is rendered for conversation mode, and the roleplay setting otherwise.
  • Guarded the send shortcut during IME composition so Enter/Ctrl+Enter does not submit while text is still being composed.
  • Added scoped before/after UI evidence for the repro under .agents/evidence/issue-1215/.

Refactor impact

Primary owner:

Shared mode UI

Impact areas reviewed:

  • Shared chat composer keyboard handling
  • Existing conversation/game composer shortcut behavior for parity
  • Mode-specific Enter-to-send settings used by the shared composer

Boundary notes:

  • React UI-only change in src/features.
  • No engine, shared API, Rust, storage schema, auth, remote runtime, dependency, or prompt-pipeline changes.

Pressure points touched:

  • src/features/modes/shared/chat-ui/components/ChatInput.tsx is shared mode UI. The change is limited to the existing textarea key handler.

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Codex-run proof:

  • Reproduced before fix with node scratch/repro-ctrl-enter.mjs: Ctrl+Enter left the draft unsent.
  • Verified after fix with node scratch/repro-ctrl-enter.mjs --mode after-rebase --key Control+Enter --expect true: Ctrl+Enter created the user message and cleared the textarea.
  • Edge check: node scratch/repro-ctrl-enter.mjs --mode edge-plain-enter --key Enter --expect false: plain Enter still inserted a newline with Enter-to-send disabled.
  • Edge check: node scratch/repro-ctrl-enter.mjs --mode edge-meta-enter --key Meta+Enter --expect true: Cmd/Meta+Enter also sent.
  • CodeRabbit follow-up: fixed shared ChatInput mode-specific Enter-to-send setting selection.
  • Follow-up check: node scratch/repro-ctrl-enter.mjs --mode after-coderabbit --key Control+Enter --expect true passed.
  • Follow-up edge check: node scratch/repro-ctrl-enter.mjs --mode edge-plain-enter-after-coderabbit --key Enter --expect false passed.
  • CodeRabbit follow-up: added an IME composition guard for the send shortcut.
  • Follow-up check: node scratch/repro-ctrl-enter.mjs --mode after-ime-guard --key Control+Enter --expect true passed.
  • Follow-up edge check: node scratch/repro-ctrl-enter.mjs --mode edge-ime-composing --key Control+Enter --composing true --expect false passed.
  • pnpm check passed after rebasing onto current upstream/refactor, after the mode-setting follow-up, and after the IME guard follow-up.
  • node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json passed.

Manual verification notes

  • Human contributor should verify the Ctrl+Enter shortcut in a real Tauri app profile before ticking template checkboxes.
  • No known blocking manual verification remains for the core UI key-handler claim; Codex proof used a Playwright web-shell harness with mocked Tauri storage to exercise the actual shared composer DOM path.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

No docs or release metadata changes were needed.

UI evidence

Before:

Ctrl+Enter before fix

After:

Ctrl+Enter after fix


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1216 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/25/2026 **Status:** ✅ Merged **Merged:** 5/26/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/ctrl-enter-send` --- ### 📝 Commits (3) - [`8daadf2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8daadf265b5703302ddf74994afecd7fde0fd675) Fix Ctrl Enter send shortcut - [`d9e2260`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d9e2260e13b23913618a1d993f5af2c6a44a01cc) Use mode-specific enter-to-send setting - [`1bfe86d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1bfe86dd8e1bdac082cbd350a5421b6129acec62) Guard send shortcut during IME composition ### 📊 Changes **3 files changed** (+7 additions, -2 deletions) <details> <summary>View changed files</summary> ➕ `.agents/evidence/issue-1215/ctrl-enter-after.png` (+0 -0) ➕ `.agents/evidence/issue-1215/ctrl-enter-before.png` (+0 -0) 📝 `src/features/modes/shared/chat-ui/components/ChatInput.tsx` (+7 -2) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #1215 ## Why this change - Ctrl+Enter was expected to send a message from the shared chat composer, but in roleplay/shared mode it left the draft unsent when Enter-to-send was disabled. ## What changed - Updated the shared chat input key handler so Ctrl+Enter and Cmd/Meta+Enter submit when Enter-to-send is disabled. - Updated the shared chat input to read the conversation Enter-to-send setting when it is rendered for conversation mode, and the roleplay setting otherwise. - Guarded the send shortcut during IME composition so Enter/Ctrl+Enter does not submit while text is still being composed. - Added scoped before/after UI evidence for the repro under `.agents/evidence/issue-1215/`. ## Refactor impact Primary owner: Shared mode UI Impact areas reviewed: - Shared chat composer keyboard handling - Existing conversation/game composer shortcut behavior for parity - Mode-specific Enter-to-send settings used by the shared composer Boundary notes: - React UI-only change in `src/features`. - No engine, shared API, Rust, storage schema, auth, remote runtime, dependency, or prompt-pipeline changes. Pressure points touched: - `src/features/modes/shared/chat-ui/components/ChatInput.tsx` is shared mode UI. The change is limited to the existing textarea key handler. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant Codex-run proof: - Reproduced before fix with `node scratch/repro-ctrl-enter.mjs`: Ctrl+Enter left the draft unsent. - Verified after fix with `node scratch/repro-ctrl-enter.mjs --mode after-rebase --key Control+Enter --expect true`: Ctrl+Enter created the user message and cleared the textarea. - Edge check: `node scratch/repro-ctrl-enter.mjs --mode edge-plain-enter --key Enter --expect false`: plain Enter still inserted a newline with Enter-to-send disabled. - Edge check: `node scratch/repro-ctrl-enter.mjs --mode edge-meta-enter --key Meta+Enter --expect true`: Cmd/Meta+Enter also sent. - CodeRabbit follow-up: fixed shared `ChatInput` mode-specific Enter-to-send setting selection. - Follow-up check: `node scratch/repro-ctrl-enter.mjs --mode after-coderabbit --key Control+Enter --expect true` passed. - Follow-up edge check: `node scratch/repro-ctrl-enter.mjs --mode edge-plain-enter-after-coderabbit --key Enter --expect false` passed. - CodeRabbit follow-up: added an IME composition guard for the send shortcut. - Follow-up check: `node scratch/repro-ctrl-enter.mjs --mode after-ime-guard --key Control+Enter --expect true` passed. - Follow-up edge check: `node scratch/repro-ctrl-enter.mjs --mode edge-ime-composing --key Control+Enter --composing true --expect false` passed. - `pnpm check` passed after rebasing onto current `upstream/refactor`, after the mode-setting follow-up, and after the IME guard follow-up. - `node C:\Users\celia\.codex\tools\marinara-proof-gate.mjs scratch\bugfix-verification.json` passed. ### Manual verification notes - Human contributor should verify the Ctrl+Enter shortcut in a real Tauri app profile before ticking template checkboxes. - No known blocking manual verification remains for the core UI key-handler claim; Codex proof used a Playwright web-shell harness with mocked Tauri storage to exercise the actual shared composer DOM path. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims No docs or release metadata changes were needed. ## UI evidence Before: ![Ctrl+Enter before fix](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/fix/ctrl-enter-send/.agents/evidence/issue-1215/ctrl-enter-before.png) After: ![Ctrl+Enter after fix](https://raw.githubusercontent.com/cha1latte/Marinara-Engine/fix/ctrl-enter-send/.agents/evidence/issue-1215/ctrl-enter-after.png) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:12:16 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#4987
No description provided.