[PR #8315] [MERGED] fix(shortcuts): preserve typing inside package shadow roots #8269

Closed
opened 2026-10-26 04:04:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/8315
Author: @SpicyMarinara
Created: 10/25/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/8314-shadow-typing-shortcuts


📝 Commits (4)

  • 1179e56 test(shortcuts): cover typing punctuation across package shadow roots
  • 9daed53 test(shortcuts): use the canonical help dialog name
  • ad331de fix(shortcuts): keep punctuation in shadow-root text editors
  • b3d90b2 test(shortcuts): settle modal focus before typing punctuation

📊 Changes

2 files changed (+140 additions, -1 deletions)

View changed files

➕ e2e/keyboard-shortcuts-typing.e2e.ts (+138 -0)
📝 packages/client/src/components/layout/GlobalOmnibarHost.tsx (+2 -1)

📄 Description

Linked issue

Closes #8314

Owner: @SpicyMarinara / Codex.

Why this change

Typing ? in Gacha Forge's character-message field opens Engine's keyboard-shortcuts dialog and drops the punctuation. Package text fields live in a shadow root, so the global listener receives the package host as event.target rather than the editor.

What changed

  • Check the keyboard event's composed path with Engine's existing editable-field predicate, letting punctuation reach input, textarea and content-editable fields inside package shadow roots.
  • Keep the ? help shortcut outside editable fields and preserve the existing modifier, composition, repeat and modal guards.

This is an Engine host fix; no package patch or new UI copy is required.

Validation

Production source: ad331de19e4eabbdad847c2b7f9a1d9ae8a9bbe2. Final fixture-only commit: b3d90b25b; production files are unchanged by that commit.

  • PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm check passed, including localization, formatting, lint/types and server/client production builds. Workspace dependencies and all five manifest/lockfile bytes were verified before the check; the environment flag disables automatic reinstallation. The existing HomeProfessorMariChat.tsx:380 hook warning remains outside this diff.
  • Unchanged compiled staging b62d89f: both mobile Chromium and WebKit reproduced the failure. The shadow textarea stayed empty, help opened, the event target was the custom host, its composed path began with TEXTAREA, and the event was prevented. Document input/textarea/content-editable controls accepted punctuation.
  • Fixed compiled source: 6/6 desktop Chromium/mobile Chromium/mobile WebKit cases passed in dark/light, with mobile landscape at 844×390. All 36 editable-field checks inserted ? without opening help; the outside-field shortcut still opened it.
  • Required desktop Chromium UI smoke: 7/7 passed with one worker on a fresh Vite host started after the production build.
  • Command Center regression: 1/1 passed. Final fixture e2e types and focused formatting passed.
  • Initial fixture runs exposed modal focus-restoration and Safari button-click focus behavior. The fixture now waits for the real dialog/opener focus lifecycle and explicitly verifies each editor is focused; the punctuation and help assertions are retained. Original failure logs/traces remain available.
  • Fresh committed local CodeRabbit review completed on the final head with 0 findings and explicit coverage of both changed files.
  • Before the final push, staging advanced independently to f36a427c6 through the ruleset-combat-only #8317. Its two server/regression paths are disjoint from this patch. The local proof above is scoped to the named keyboard candidate; hosted checks validate the current PR merge candidate.

The browser cases emulate keyboard input and package shadow roots; they do not establish physical-device keyboard behavior.

  • Manually verify typing ? in Gacha Forge character messages using a real phone keyboard in landscape.
  • Manually verify ? opens shortcut help when focus is outside a text field.

UI evidence

Before/after browser screenshots and captured event-path proof.

Docs and release impact

No documentation, localization keys, dependencies or release metadata change. This restores the existing documented behavior that shortcut help is ignored while typing.


🔄 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/8315 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/8314-shadow-typing-shortcuts` --- ### 📝 Commits (4) - [`1179e56`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1179e56c36b903eecfa7184900b1bb3b6ea1bce1) test(shortcuts): cover typing punctuation across package shadow roots - [`9daed53`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9daed53f6369d57bff893a5fc0350c434e1df56f) test(shortcuts): use the canonical help dialog name - [`ad331de`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ad331de19e4eabbdad847c2b7f9a1d9ae8a9bbe2) fix(shortcuts): keep punctuation in shadow-root text editors - [`b3d90b2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b3d90b25b53ac65362c2c3df69cab257fa966e99) test(shortcuts): settle modal focus before typing punctuation ### 📊 Changes **2 files changed** (+140 additions, -1 deletions) <details> <summary>View changed files</summary> ➕ `e2e/keyboard-shortcuts-typing.e2e.ts` (+138 -0) 📝 `packages/client/src/components/layout/GlobalOmnibarHost.tsx` (+2 -1) </details> ### 📄 Description ## Linked issue Closes #8314 Owner: @SpicyMarinara / Codex. ## Why this change Typing `?` in Gacha Forge's character-message field opens Engine's keyboard-shortcuts dialog and drops the punctuation. Package text fields live in a shadow root, so the global listener receives the package host as `event.target` rather than the editor. ## What changed - Check the keyboard event's composed path with Engine's existing editable-field predicate, letting punctuation reach input, textarea and content-editable fields inside package shadow roots. - Keep the `?` help shortcut outside editable fields and preserve the existing modifier, composition, repeat and modal guards. This is an Engine host fix; no package patch or new UI copy is required. ## Validation Production source: `ad331de19e4eabbdad847c2b7f9a1d9ae8a9bbe2`. Final fixture-only commit: `b3d90b25b`; production files are unchanged by that commit. - `PNPM_CONFIG_VERIFY_DEPS_BEFORE_RUN=false pnpm check` passed, including localization, formatting, lint/types and server/client production builds. Workspace dependencies and all five manifest/lockfile bytes were verified before the check; the environment flag disables automatic reinstallation. The existing `HomeProfessorMariChat.tsx:380` hook warning remains outside this diff. - Unchanged compiled staging `b62d89f`: both mobile Chromium and WebKit reproduced the failure. The shadow textarea stayed empty, help opened, the event target was the custom host, its composed path began with `TEXTAREA`, and the event was prevented. Document input/textarea/content-editable controls accepted punctuation. - Fixed compiled source: 6/6 desktop Chromium/mobile Chromium/mobile WebKit cases passed in dark/light, with mobile landscape at 844×390. All 36 editable-field checks inserted `?` without opening help; the outside-field shortcut still opened it. - Required desktop Chromium UI smoke: 7/7 passed with one worker on a fresh Vite host started after the production build. - Command Center regression: 1/1 passed. Final fixture e2e types and focused formatting passed. - Initial fixture runs exposed modal focus-restoration and Safari button-click focus behavior. The fixture now waits for the real dialog/opener focus lifecycle and explicitly verifies each editor is focused; the punctuation and help assertions are retained. Original failure logs/traces remain available. - Fresh committed local CodeRabbit review completed on the final head with 0 findings and explicit coverage of both changed files. - Before the final push, staging advanced independently to `f36a427c6` through the ruleset-combat-only #8317. Its two server/regression paths are disjoint from this patch. The local proof above is scoped to the named keyboard candidate; hosted checks validate the current PR merge candidate. The browser cases emulate keyboard input and package shadow roots; they do not establish physical-device keyboard behavior. - [ ] Manually verify typing `?` in Gacha Forge character messages using a real phone keyboard in landscape. - [ ] Manually verify `?` opens shortcut help when focus is outside a text field. ## UI evidence [Before/after browser screenshots and captured event-path proof](https://github.com/Pasta-Devs/Marinara-Engine/pull/8315#issuecomment-6398873360). ## Docs and release impact No documentation, localization keys, dependencies or release metadata change. This restores the existing documented behavior that shortcut help is ignored while typing. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 04:04:15 +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#8269
No description provided.