[PR #7400] [MERGED] fix(omnibar): keep search responsive during quick Mari answers #7717

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

📋 Pull Request Information

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

Base: staging ← Head: quick-mari-in-slow-motion


📝 Commits (3)

  • 50df0de fix: keep omnibar responsive during quick Mari answers
  • 2752d86 docs: keep quick answer changelog user focused
  • 8d83f5c test: prove quick answer requests cancel when query changes

📊 Changes

5 files changed (+244 additions, -22 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 e2e/omnibar-quick-handoff.e2e.ts (+210 -4)
📝 packages/client/src/components/layout/GlobalOmnibar.tsx (+1 -1)
📝 packages/client/src/components/layout/omnibar/use-omnibar-screen-context.ts (+9 -11)
📝 packages/client/src/hooks/use-omnibar-aside.ts (+23 -6)

📄 Description

Linked issue

Closes #7399

Why this change

Typing a quick-answer question and clicking its Mari row made the omnibar lag. Every streamed token rebuilt search context and reranked the library; movement within the selected row also rendered the dialog unnecessarily.

What changed

  • Memoize screen context from stable data and aggregate source failures.
  • Coalesce streamed text with the existing frame throttle, preserving complete replies and cancelling buffered updates when a query changes.
  • Skip unchanged omnibar session values.
  • Add a browser regression for streaming render budget, context reuse, hover, row handoff, and cancellation.

Validation

Completed local verification:

  • heavy pnpm check passed after final review fixes (one existing HomeProfessorMariChat hook warning; existing Vite chunk warnings).

  • heavy pnpm regression:ui e2e/omnibar-quick-handoff.e2e.ts --project=desktop-chromium --workers=1: 2 passed.

  • heavy pnpm smoke:ui: 7 passed.

  • Independent read-only review found one medium instrumentation proof gap and four low findings; corrected, with browser proof rerun. Optional removal of the abort listener was declined because immediate frame cancellation is useful on query replacement.

  • GitHub review follow-up: fixture now directly proves early stream closure on query replacement. Focused Chromium suite rerun: 2 passed; heavy pnpm check:e2e-types passed; local follow-up review: zero findings.

  • Local CodeRabbit review rerun after substantive fixes: one minor changelog wording finding, corrected. No remaining substantive local findings.

  • 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

Automated Chromium exercises a slow fixture stream, clicks the quick-Mari row, verifies the full answer, returns to search, retries, and cancels with a new query. Screenshots at 390/768/1440 px were inspected.

  • Manually verify the original quick-Mari row interaction in the production browser/device. Production was inspected read-only and has not been changed.

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] 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)

Performance proof: baseline 184 dialog renders over 36 frames and 40 selected-row movement renders. Final fixed run: 54 renders over 28 frames (development StrictMode double invocation), zero context rebuilds and zero selected-row movement renders. No visual markup changes. CHANGELOG updated; no version or translated documentation changes.

Summary by CodeRabbit

  • Improvements
    • The omnibar stays responsive while quick answers stream, including when opening Professor Mari’s row or moving between search results.
    • Quick-answer updates appear more smoothly during streaming. Changing the query closes the answer panel and stops the previous response from continuing to stream.
    • The omnibar’s responsiveness and quick-answer behavior are also checked across different screen widths.

🔄 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/7400 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 10/10/2026 **Status:** ✅ Merged **Merged:** 10/10/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `quick-mari-in-slow-motion` --- ### 📝 Commits (3) - [`50df0de`](https://github.com/Pasta-Devs/Marinara-Engine/commit/50df0de33993e1082da137a252e700656755dc4c) fix: keep omnibar responsive during quick Mari answers - [`2752d86`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2752d86da1817e76ad9d1c20dd6ee9c202e3c956) docs: keep quick answer changelog user focused - [`8d83f5c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8d83f5c3c99908c72dedd079cd4112ae259b21e8) test: prove quick answer requests cancel when query changes ### 📊 Changes **5 files changed** (+244 additions, -22 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `e2e/omnibar-quick-handoff.e2e.ts` (+210 -4) 📝 `packages/client/src/components/layout/GlobalOmnibar.tsx` (+1 -1) 📝 `packages/client/src/components/layout/omnibar/use-omnibar-screen-context.ts` (+9 -11) 📝 `packages/client/src/hooks/use-omnibar-aside.ts` (+23 -6) </details> ### 📄 Description ## Linked issue <!-- Every PR should reference a feature request or issue report. If there isn't one yet, open one first to gather opinions: --> <!-- https://github.com/Pasta-Devs/Marinara-Engine/issues/new/choose --> Closes #7399 ## Why this change Typing a quick-answer question and clicking its Mari row made the omnibar lag. Every streamed token rebuilt search context and reranked the library; movement within the selected row also rendered the dialog unnecessarily. ## What changed - Memoize screen context from stable data and aggregate source failures. - Coalesce streamed text with the existing frame throttle, preserving complete replies and cancelling buffered updates when a query changes. - Skip unchanged omnibar session values. - Add a browser regression for streaming render budget, context reuse, hover, row handoff, and cancellation. ## Validation Completed local verification: - `heavy pnpm check` passed after final review fixes (one existing HomeProfessorMariChat hook warning; existing Vite chunk warnings). - `heavy pnpm regression:ui e2e/omnibar-quick-handoff.e2e.ts --project=desktop-chromium --workers=1`: 2 passed. - `heavy pnpm smoke:ui`: 7 passed. - Independent read-only review found one medium instrumentation proof gap and four low findings; corrected, with browser proof rerun. Optional removal of the abort listener was declined because immediate frame cancellation is useful on query replacement. - GitHub review follow-up: fixture now directly proves early stream closure on query replacement. Focused Chromium suite rerun: 2 passed; `heavy pnpm check:e2e-types` passed; local follow-up review: zero findings. - Local CodeRabbit review rerun after substantive fixes: one minor changelog wording finding, corrected. No remaining substantive local findings. - [ ] `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 Automated Chromium exercises a slow fixture stream, clicks the quick-Mari row, verifies the full answer, returns to search, retries, and cancels with a new query. Screenshots at 390/768/1440 px were inspected. <!-- ⚠️ If an AI agent filled out or ticked these boxes for you, treat them --> <!-- as a TO-DO LIST, not as proof the work is done. Verify each item yourself --> <!-- before submitting. If you haven't verified it, untick the box. --> - Manually verify the original quick-Mari row interaction in the production browser/device. Production was inspected read-only and has not been changed. ## 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]` 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) <!-- Add before/after screenshots or recordings for UI changes --> Performance proof: baseline 184 dialog renders over 36 frames and 40 selected-row movement renders. Final fixed run: 54 renders over 28 frames (development StrictMode double invocation), zero context rebuilds and zero selected-row movement renders. No visual markup changes. CHANGELOG updated; no version or translated documentation changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Improvements** * The omnibar stays responsive while quick answers stream, including when opening Professor Mari’s row or moving between search results. * Quick-answer updates appear more smoothly during streaming. Changing the query closes the answer panel and stops the previous response from continuing to stream. * The omnibar’s responsiveness and quick-answer behavior are also checked across different screen widths. <!-- 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-24 04:06:48 +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#7717
No description provided.