[PR #6642] [MERGED] fix: keep typing from dismissing agent write reviews #7268

Closed
opened 2026-10-23 04:18:06 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6642
Author: @SpicyMarinara
Created: 9/24/2026
Status: ✅ Merged
Merged: 9/24/2026
Merged by: @SpicyMarinara

Base: staging ← Head: codex/6638-review-focus


📝 Commits (7)

  • 4f8ef4b docs: track safe initial focus for agent reviews
  • 9763c6e fix: focus review context before agent approval actions
  • 82a2eb3 Merge remote-tracking branch 'origin/staging' into codex/6638-review-focus
  • 10af92b test: wait for the agent review commit request
  • 8b2f167 test: verify focus moves to the next review explanation
  • c7f1b9b Merge remote-tracking branch 'origin/staging' into codex/6638-review-focus
  • 7f1bfe4 Merge remote-tracking branch 'origin/staging' into codex/6638-review-focus

📊 Changes

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

View changed files

📝 CHANGELOG.md (+2 -0)
➕ e2e/agent-write-approval.e2e.ts (+102 -0)
📝 packages/client/src/components/modals/AgentWriteApprovalModal.tsx (+6 -2)

📄 Description

Linked issue

Closes #6638

Why this change

Lorebook and Chat Summary proposals can appear while the user is typing. The modal initially focuses Close, so the next Space press discards the proposed update.

What changed

Reuse the modal's existing initial-focus support to focus the review explanation. Reset focus when moving to another queued proposal. Deliberately focusing Accept or Discard still allows normal keyboard activation.

Validation

Completed: pnpm check on the final staging base, including the merged Game translation fix, plus 6 browser cases covering light/dark themes on desktop Chromium, mobile Chromium, and mobile WebKit. The regression reproduces accidental dismissal before the fix and checks preserved proposal text, the composer draft, queue advancement, and deliberate keyboard acceptance/discard afterward.

Local CodeRabbit completed a combined review and a follow-up review covering all 3 files in this PR. Its test-timing finding is addressed: the assertion polls for the observed commit request. All 6 browser cases and the final E2E type check pass. No unresolved local finding applies to this change. The hosted review suggestion is also covered: after Accept advances the queue, the browser test verifies focus on the next proposal explanation before pressing Space/Enter.

The required hosted container build is the container validation; no local container run is claimed.

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Manual verification notes

Manually verify proposals appearing during typing, advancing a queue, editing text, and deliberate keyboard activation of Accept and Discard on desktop and mobile.

Docs and release impact

Includes an Unreleased changelog entry. No copy, settings, data formats or versions change.

UI evidence (if applicable)

Before/after browser evidence: baseline dismissal, retained desktop proposal, and retained mobile proposal. All screenshots use synthetic test fixtures.

Summary by CodeRabbit

  • Bug Fixes
    • Lorebook and Chat Summary review dialogs now focus the review explanation when opened or when the queued proposal changes. Pressing Space or Enter while reviewing no longer dismisses a proposal unexpectedly.
  • Tests
    • Added coverage for keyboard behavior, editing and accepting a Lorebook proposal, discarding a summary proposal, and preserving composer text in light and dark themes.

🔄 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/6642 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 9/24/2026 **Status:** ✅ Merged **Merged:** 9/24/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `codex/6638-review-focus` --- ### 📝 Commits (7) - [`4f8ef4b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4f8ef4bded74f80b902693dd48309d135f8cd66c) docs: track safe initial focus for agent reviews - [`9763c6e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9763c6ecfe53a845bbdc0f3b4bfdcde5754e0a9c) fix: focus review context before agent approval actions - [`82a2eb3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/82a2eb327cb89aa9f654719d801c78c4df47f228) Merge remote-tracking branch 'origin/staging' into codex/6638-review-focus - [`10af92b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/10af92bfc07443b6c32196fbd5dd64a01ab99865) test: wait for the agent review commit request - [`8b2f167`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8b2f1678268ef6cfc264c1890d9533fcbbf2e87e) test: verify focus moves to the next review explanation - [`c7f1b9b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c7f1b9b235c5afffe5dfbbf0bb2987c971883774) Merge remote-tracking branch 'origin/staging' into codex/6638-review-focus - [`7f1bfe4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7f1bfe48a2f4dafb0de528a6e50ebf519e19cd93) Merge remote-tracking branch 'origin/staging' into codex/6638-review-focus ### 📊 Changes **3 files changed** (+110 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -0) ➕ `e2e/agent-write-approval.e2e.ts` (+102 -0) 📝 `packages/client/src/components/modals/AgentWriteApprovalModal.tsx` (+6 -2) </details> ### 📄 Description ## Linked issue Closes #6638 ## Why this change Lorebook and Chat Summary proposals can appear while the user is typing. The modal initially focuses Close, so the next Space press discards the proposed update. ## What changed Reuse the modal's existing initial-focus support to focus the review explanation. Reset focus when moving to another queued proposal. Deliberately focusing Accept or Discard still allows normal keyboard activation. ## Validation Completed: `pnpm check` on the final staging base, including the merged Game translation fix, plus 6 browser cases covering light/dark themes on desktop Chromium, mobile Chromium, and mobile WebKit. The regression reproduces accidental dismissal before the fix and checks preserved proposal text, the composer draft, queue advancement, and deliberate keyboard acceptance/discard afterward. Local CodeRabbit completed a combined review and a follow-up review covering all 3 files in this PR. Its test-timing finding is addressed: the assertion polls for the observed commit request. All 6 browser cases and the final E2E type check pass. No unresolved local finding applies to this change. The hosted review suggestion is also covered: after Accept advances the queue, the browser test verifies focus on the next proposal explanation before pressing Space/Enter. The required hosted container build is the container validation; no local container run is claimed. - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` ### Manual verification notes Manually verify proposals appearing during typing, advancing a queue, editing text, and deliberate keyboard activation of Accept and Discard on desktop and mobile. ## Docs and release impact Includes an Unreleased changelog entry. No copy, settings, data formats or versions change. ## UI evidence (if applicable) [Before/after browser evidence](https://gist.github.com/SpicyMarinara/1f5160c328dc9a8f9a64736f82b7d9b4): baseline dismissal, retained desktop proposal, and retained mobile proposal. All screenshots use synthetic test fixtures. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Lorebook and Chat Summary review dialogs now focus the review explanation when opened or when the queued proposal changes. Pressing Space or Enter while reviewing no longer dismisses a proposal unexpectedly. * **Tests** * Added coverage for keyboard behavior, editing and accepting a Lorebook proposal, discarding a summary proposal, and preserving composer text in light and dark themes. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:18:06 +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#7268
No description provided.