[PR #5354] [MERGED] fix(maintenance): bound runtime state and restore Playwright #6737

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5354
Author: @SpicyMarinara
Created: 8/21/2026
Status: ✅ Merged
Merged: 8/21/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/5353-maintenance-lifecycle-playwright


📝 Commits (6)

  • ed887b8 fix(maintenance): bound runtime state and refresh Playwright
  • b878a17 test(maintenance): refresh lifecycle browser coverage
  • 6bbed70 fix(chat): stop late keyboard scroll restores
  • 9f69370 test(playwright): dismiss owned install toast
  • 2fccb67 fix(generation): scope reasoning state to requests
  • 27872c8 fix(generation): restore reasoning on every provider path

📊 Changes

9 files changed (+181 additions, -186 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 e2e/core-flows.e2e.ts (+73 -136)
📝 packages/client/src/components/chat/ChatArea.tsx (+1 -1)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+8 -2)
📝 packages/client/src/components/chat/ConversationView.tsx (+9 -3)
➕ packages/client/src/lib/bounded-set.ts (+9 -0)
📝 packages/server/src/routes/generate.routes.ts (+36 -44)
📝 playwright.config.ts (+1 -0)
➕ scripts/regressions/maintenance-lifecycle.regression.ts (+43 -0)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.

Linked issue

Closes #5353

Why this change

  • Long-running tabs and servers retained small pieces of per-message or per-chat state indefinitely.
  • Playwright teardown force-killed its launcher before detached development-server descendants could stop, leaving ports occupied and slowing or hanging later runs.
  • Mobile keyboard restoration could leave delayed scroll-to-bottom frames that overrode an immediate user scroll.
  • Current UI and migration behavior had drifted from several smoke-test assumptions, masking lifecycle checks behind unrelated failures.

What changed

  • Bound Conversation and Roleplay notification-history keys to the 5,000 most recent values.
  • Scope encrypted-reasoning continuity to each generation request and persist it on both visible and hidden assistant messages.
  • Let the keyboard-anchor hook own its two-frame restore instead of nesting each restore inside another three-frame scheduler.
  • Give the Playwright launcher ten seconds of graceful SIGTERM cleanup.
  • Align smoke coverage with current release content, accessible names, Professor Mari navigation, Storyboard settings, migration version, merged-chat semantics, query URLs, animated geometry, collapsible mobile composers, and owned toast cleanup.

Validation

  • 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

Automated evidence

  • pnpm check
  • node ./scripts/run-regressions.mjs --filter scripts/regressions/maintenance-lifecycle.regression.ts — 1/1 passed
  • Full pnpm smoke:ui — 252 passed, 107 intentionally skipped, and one test-owned toast obstruction found; after its fix, that desktop/mobile flow passed 10/10 repeated runs
  • Noodle animation settling and mobile keyboard/history paths passed 10/10 combined repeated runs
  • Ports 5178, 5179, 7971, and 7972 were free after every post-fix Playwright run

Manual verification notes

  • Manually verify old chat messages do not replay notification sounds after normal navigation.
  • Manually verify mobile Conversation and Roleplay history stays at the user's position when the software keyboard opens.
  • Manually verify Conversation, Roleplay, Home, Characters Library, Professor Mari, and Storyboard flows in desktop and mobile Chromium.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] <paths> follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

UI evidence (if applicable)

No visual design change; this PR updates lifecycle behavior and automated smoke contracts.

Summary by CodeRabbit

  • Bug Fixes

    • Improved notification-history stability during long-running sessions.
    • Prevented stale reasoning state from persisting after chat generation completes or fails.
    • Improved mobile keyboard behavior and chat scrolling.
    • Limited retained notification history to support performance over time.
    • Improved graceful shutdown for test environments.
  • Tests

    • Expanded coverage for announcements, navigation, onboarding, Storyboard workflows, mobile behavior, achievements, and installation feedback.
    • Added regression checks for session-history limits, reasoning recovery, and reliable test-server shutdown.

🔄 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/5354 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 8/21/2026 **Status:** ✅ Merged **Merged:** 8/21/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/5353-maintenance-lifecycle-playwright` --- ### 📝 Commits (6) - [`ed887b8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ed887b86498b073f6448bedbf58278ac1e9a11c6) fix(maintenance): bound runtime state and refresh Playwright - [`b878a17`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b878a179626547874b8dce8ff788d00754de82a5) test(maintenance): refresh lifecycle browser coverage - [`6bbed70`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6bbed70fbfe334d9c8a74df495b4f3ddfa92c27a) fix(chat): stop late keyboard scroll restores - [`9f69370`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9f69370d24855ed764f4e94ec6971c53702f7e87) test(playwright): dismiss owned install toast - [`2fccb67`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2fccb67b6fcf16f5449e771c8708b909ff300193) fix(generation): scope reasoning state to requests - [`27872c8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/27872c8d20ac619a7da12138cbfc110ea21a537b) fix(generation): restore reasoning on every provider path ### 📊 Changes **9 files changed** (+181 additions, -186 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `e2e/core-flows.e2e.ts` (+73 -136) 📝 `packages/client/src/components/chat/ChatArea.tsx` (+1 -1) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+8 -2) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+9 -3) ➕ `packages/client/src/lib/bounded-set.ts` (+9 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+36 -44) 📝 `playwright.config.ts` (+1 -0) ➕ `scripts/regressions/maintenance-lifecycle.regression.ts` (+43 -0) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. ## Linked issue Closes #5353 ## Why this change - Long-running tabs and servers retained small pieces of per-message or per-chat state indefinitely. - Playwright teardown force-killed its launcher before detached development-server descendants could stop, leaving ports occupied and slowing or hanging later runs. - Mobile keyboard restoration could leave delayed scroll-to-bottom frames that overrode an immediate user scroll. - Current UI and migration behavior had drifted from several smoke-test assumptions, masking lifecycle checks behind unrelated failures. ## What changed - Bound Conversation and Roleplay notification-history keys to the 5,000 most recent values. - Scope encrypted-reasoning continuity to each generation request and persist it on both visible and hidden assistant messages. - Let the keyboard-anchor hook own its two-frame restore instead of nesting each restore inside another three-frame scheduler. - Give the Playwright launcher ten seconds of graceful SIGTERM cleanup. - Align smoke coverage with current release content, accessible names, Professor Mari navigation, Storyboard settings, migration version, merged-chat semantics, query URLs, animated geometry, collapsible mobile composers, and owned toast cleanup. ## Validation - [ ] `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` ### Automated evidence - `pnpm check` - `node ./scripts/run-regressions.mjs --filter scripts/regressions/maintenance-lifecycle.regression.ts` — 1/1 passed - Full `pnpm smoke:ui` — 252 passed, 107 intentionally skipped, and one test-owned toast obstruction found; after its fix, that desktop/mobile flow passed 10/10 repeated runs - Noodle animation settling and mobile keyboard/history paths passed 10/10 combined repeated runs - Ports 5178, 5179, 7971, and 7972 were free after every post-fix Playwright run ### Manual verification notes - Manually verify old chat messages do not replay notification sounds after normal navigation. - Manually verify mobile Conversation and Roleplay history stays at the user's position when the software keyboard opens. - Manually verify Conversation, Roleplay, Home, Characters Library, Professor Mari, and Storyboard flows in desktop and mobile Chromium. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n] <paths>` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) ## UI evidence (if applicable) No visual design change; this PR updates lifecycle behavior and automated smoke contracts. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Improved notification-history stability during long-running sessions. * Prevented stale reasoning state from persisting after chat generation completes or fails. * Improved mobile keyboard behavior and chat scrolling. * Limited retained notification history to support performance over time. * Improved graceful shutdown for test environments. * **Tests** * Expanded coverage for announcements, navigation, onboarding, Storyboard workflows, mobile behavior, achievements, and installation feedback. * Added regression checks for session-history limits, reasoning recovery, and reliable test-server shutdown. <!-- 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:13:13 +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#6737
No description provided.