[PR #7891] [MERGED] fix(release): prevent duplicate speech saves and wait for browser readiness #7990

Closed
opened 2026-10-24 04:09:27 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: fix/release-matrix-final-20261020


📝 Commits (3)

  • 52ac1ea fix(release): prevent duplicate speech saves and wait for browser readiness
  • 802828d test(e2e): verify the held speech save persists before reopening
  • 0b50a3e Merge branch 'staging' into fix/release-matrix-final-20261020

📊 Changes

5 files changed (+85 additions, -3 deletions)

View changed files

📝 e2e/game-inventory-stacks.e2e.ts (+3 -0)
📝 e2e/gpt6-models.e2e.ts (+1 -1)
📝 e2e/mari-context-chip-remove.e2e.ts (+2 -0)
📝 e2e/speech-to-text-card.e2e.ts (+76 -1)
📝 packages/client/src/components/panels/settings/SpeechToTextCard.tsx (+3 -1)

📄 Description

Linked issue

Closes #7887

Why this change

The complete staging matrix at a3c07c3f1 found four remaining failures. One exposed an application race: when a phone finishes closing Connections after autosave has started, unmount queues the same Speech to Text edit again. The others read or act before the intended browser state is ready.

What changed

  • Speech to Text cleanup checks its captured pending edit after the existing serial save queue settles. An already successful autosave is sent once; a failed first save still gets the cleanup retry, and a newer edit remains ordered after the older request.
  • Extended the real browser regression with held responses: one successful in-flight save, a failed save retried during phone unmount, and a newer edit while the older request is held. Verify the saved fixture value before reopening, exact request counts/order, and reopened values. Await the TTS card's actual Expand control before comparing its original blue surface in light and dark mode.
  • The model-defaults poll treats an old nullable defaults row as an unmet condition, allowing the existing poll to retry. undefined remains different from Off's required null; model, context and Off/Maximum persistence checks remain exact.
  • The Mari context-chip control waits for automatic Search focus before Escape and verifies the omnibar actually closes. Both removed/retained chat-context payload checks remain.
  • Inventory-stack merge waits for the normal success toast to dismiss before measuring the slots and performing the real drag. Quantity, stack identity, persistence and deletion-confirmation assertions remain.

All four failures have trace evidence in the completed full matrix. Its Node lane passed 946/946; browser shards finished 44/48 with exactly these four failing cases. A fresh complete staging matrix remains the post-merge verification step.

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

Commands and checks actually completed:

The maintainer subsequently merged staging 2b2b83773 into this branch, producing 0b50a3e43ee3bd179dc9fb409893c2e8e85c946a. All five patch files are byte-identical across that merge; it adds the separately landed mesh-width and profile-import fixes. A frozen install, full pnpm check, and the complete Speech to Text case in all three browsers (3/3) passed on that combined head. Hosted checks and incremental CodeRabbit review are tracked separately; the earlier broader results below retain their tested revisions.

  • Frozen offline install and implementation pnpm check passed at 52ac1ea6f1b7580ab0bb9bd2db5636b0b094b5be, rebased onto staging 6659b80. The only lint warning is the unchanged HomeProfessorMariChat hook dependency warning.
  • The new held-response STT case fails against the old cleanup: expected two saves, received three, with the last URL repeated.
  • Focused GPT/Mari/STT browser run: 13 passed, 2 existing mobile skips, across all three projects. It includes the failed-save retry and newer-edit controls. This ran before the base-only rebase onto #7886; the five changed files were unchanged by that rebase. The combined focused set was not repeated afterward.
  • On the rebased implementation head: inventory stack merge passed 3/3 projects; pnpm smoke:ui passed 7/7.
  • The one-line review correction at 802828d5ec2248ea42f7d72e4c7ab8611a401017 adds only the direct persisted-value assertion. E2E types/format and the complete Speech to Text case passed 3/3 browsers again. At that correction commit, runtime source is identical to the full-check/container/smoke head above.
  • Linux arm64 container built and ran with disposable tmpfs data. Health and app page returned HTTP200; container stopped and removed afterward.
  • Independent review of the complete five-file diff found no concrete defect. git diff --check passed. All owned local browser/server processes are stopped.

Manual verification notes

  • Manually edit Speech to Text, close Connections while a slow save is running, reopen it and confirm the latest value. Repeat with a failed request and a newer edit made during the first save.
  • Manually verify Context removal and retention after reopening Mari from a chat, and inventory stack merge after a success notification.
  • Browser phone projects are emulation, not physical-device proof. Hosted required checks, substantive final-head CodeRabbit review and the fresh post-merge full matrix are separate gates.

Docs and release impact

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

Docs for translation: none. No user-facing copy, dependency, release version or storage-format change.

UI evidence (if applicable)

The failing matrix jobs retain screenshots and traces for the four original failures: model defaults, Mari context, Speech to Text, inventory merge. The regression continues to capture the original Connections-blue card in both themes. This patch changes save logic and test readiness, with no layout or styling edits.


🔄 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/7891 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/20/2026 **Status:** ✅ Merged **Merged:** 10/20/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/release-matrix-final-20261020` --- ### 📝 Commits (3) - [`52ac1ea`](https://github.com/Pasta-Devs/Marinara-Engine/commit/52ac1ea6f1b7580ab0bb9bd2db5636b0b094b5be) fix(release): prevent duplicate speech saves and wait for browser readiness - [`802828d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/802828d5ec2248ea42f7d72e4c7ab8611a401017) test(e2e): verify the held speech save persists before reopening - [`0b50a3e`](https://github.com/Pasta-Devs/Marinara-Engine/commit/0b50a3e43ee3bd179dc9fb409893c2e8e85c946a) Merge branch 'staging' into fix/release-matrix-final-20261020 ### 📊 Changes **5 files changed** (+85 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `e2e/game-inventory-stacks.e2e.ts` (+3 -0) 📝 `e2e/gpt6-models.e2e.ts` (+1 -1) 📝 `e2e/mari-context-chip-remove.e2e.ts` (+2 -0) 📝 `e2e/speech-to-text-card.e2e.ts` (+76 -1) 📝 `packages/client/src/components/panels/settings/SpeechToTextCard.tsx` (+3 -1) </details> ### 📄 Description ## Linked issue Closes #7887 ## Why this change The complete staging matrix at `a3c07c3f1` found four remaining failures. One exposed an application race: when a phone finishes closing Connections after autosave has started, unmount queues the same Speech to Text edit again. The others read or act before the intended browser state is ready. ## What changed - Speech to Text cleanup checks its captured pending edit after the existing serial save queue settles. An already successful autosave is sent once; a failed first save still gets the cleanup retry, and a newer edit remains ordered after the older request. - Extended the real browser regression with held responses: one successful in-flight save, a failed save retried during phone unmount, and a newer edit while the older request is held. Verify the saved fixture value before reopening, exact request counts/order, and reopened values. Await the TTS card's actual Expand control before comparing its original blue surface in light and dark mode. - The model-defaults poll treats an old nullable defaults row as an unmet condition, allowing the existing poll to retry. `undefined` remains different from Off's required `null`; model, context and Off/Maximum persistence checks remain exact. - The Mari context-chip control waits for automatic Search focus before Escape and verifies the omnibar actually closes. Both removed/retained chat-context payload checks remain. - Inventory-stack merge waits for the normal success toast to dismiss before measuring the slots and performing the real drag. Quantity, stack identity, persistence and deletion-confirmation assertions remain. All four failures have trace evidence in [the completed full matrix](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/39443188644). Its Node lane passed **946/946**; browser shards finished **44/48** with exactly these four failing cases. A fresh complete staging matrix remains the post-merge verification step. ## 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` Commands and checks actually completed: The maintainer subsequently merged staging `2b2b83773` into this branch, producing `0b50a3e43ee3bd179dc9fb409893c2e8e85c946a`. All five patch files are byte-identical across that merge; it adds the separately landed mesh-width and profile-import fixes. A frozen install, full `pnpm check`, and the complete Speech to Text case in all three browsers (**3/3**) passed on that combined head. Hosted checks and incremental CodeRabbit review are tracked separately; the earlier broader results below retain their tested revisions. - Frozen offline install and implementation `pnpm check` passed at `52ac1ea6f1b7580ab0bb9bd2db5636b0b094b5be`, rebased onto staging `6659b80`. The only lint warning is the unchanged HomeProfessorMariChat hook dependency warning. - The new held-response STT case **fails against the old cleanup**: expected two saves, received three, with the last URL repeated. - Focused GPT/Mari/STT browser run: **13 passed, 2 existing mobile skips**, across all three projects. It includes the failed-save retry and newer-edit controls. This ran before the base-only rebase onto #7886; the five changed files were unchanged by that rebase. The combined focused set was not repeated afterward. - On the rebased implementation head: inventory stack merge passed **3/3** projects; `pnpm smoke:ui` passed **7/7**. - The one-line review correction at `802828d5ec2248ea42f7d72e4c7ab8611a401017` adds only the direct persisted-value assertion. E2E types/format and the complete Speech to Text case passed **3/3** browsers again. At that correction commit, runtime source is identical to the full-check/container/smoke head above. - Linux arm64 container built and ran with disposable tmpfs data. Health and app page returned HTTP200; container stopped and removed afterward. - Independent review of the complete five-file diff found no concrete defect. `git diff --check` passed. All owned local browser/server processes are stopped. ### Manual verification notes - Manually edit Speech to Text, close Connections while a slow save is running, reopen it and confirm the latest value. Repeat with a failed request and a newer edit made during the first save. - Manually verify Context removal and retention after reopening Mari from a chat, and inventory stack merge after a success notification. - Browser phone projects are emulation, not physical-device proof. Hosted required checks, substantive final-head CodeRabbit review and the fresh post-merge full matrix are separate gates. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) Docs for translation: none. No user-facing copy, dependency, release version or storage-format change. ## UI evidence (if applicable) The failing matrix jobs retain screenshots and traces for the four original failures: [model defaults](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/39443188644/job/118698191878), [Mari context](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/39443188644/job/118698192634), [Speech to Text](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/39443188644/job/118698192604), [inventory merge](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/39443188644/job/118698192152). The regression continues to capture the original Connections-blue card in both themes. This patch changes save logic and test readiness, with no layout or styling edits. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:09:27 +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#7990
No description provided.