[PR #5755] [MERGED] fix(mari): panel polish batch before the beta ping - header, new chat, chips, bookmarks, verification tone #6916

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/5755
Author: @kolacheee
Created: 9/2/2026
Status: ✅ Merged
Merged: 9/2/2026
Merged by: @kolacheee

Base: staging ← Head: fix/5752-5754-mari-polish


📝 Commits (10+)

  • 4439aed fix(mari): panel polish batch before the beta ping (#5741-#5743, #5752-#5754)
  • e0d56e7 fix(mari): address adversarial review round 1 on the polish batch
  • 8f7fee2 fix(mari): give the New chat button an exact accessible name
  • fdd9af6 fix(mari): address CodeRabbit round on the polish batch
  • 6d43292 fix(mari): hide the header name text at phone widths (maintainer feedback)
  • facf8de fix(mari): keep a screen-reader Mari label at phone widths
  • 20653d7 fix(mari): name the combined library button explicitly
  • 8fdcb81 fix(regression): read the newest Anthropic request body, not a stale index
  • 30eeeae fix(mari): close the Library menu from competing keyboard actions
  • 3688b37 fix(mari): harden the Library menu closes (CodeRabbit round)

📊 Changes

17 files changed (+704 additions, -271 deletions)

View changed files

📝 CHANGELOG.md (+6 -0)
📝 e2e/core-flows.e2e.ts (+18 -12)
📝 packages/client/src/components/chat/ChatInput.tsx (+0 -6)
📝 packages/client/src/components/chat/ConversationInput.tsx (+0 -7)
📝 packages/client/src/components/chat/HomeBrowserHub.tsx (+131 -140)
📝 packages/client/src/components/chat/HomeProfessorMariChat.tsx (+161 -81)
📝 packages/client/src/components/chat/MariSuggestionChips.tsx (+140 -0)
📝 packages/client/src/hooks/use-generate.ts (+7 -2)
📝 packages/client/src/localization/locales/de.json (+0 -1)
📝 packages/client/src/localization/locales/en.json (+6 -4)
📝 packages/client/src/localization/locales/ko.json (+0 -4)
📝 packages/client/src/localization/locales/pl.json (+0 -1)
📝 packages/client/src/localization/locales/zh-Hans.json (+0 -4)
📝 packages/client/src/styles/globals.css (+63 -2)
📝 packages/server/src/services/professor-mari/workspace-agent.service.ts (+6 -5)
➕ scripts/regressions/mari-polish.regression.ts (+162 -0)
📝 scripts/regressions/provider-compat.regression.ts (+4 -2)

📄 Description

Linked issue

Closes #5741. Closes #5742. Closes #5743. Closes #5752. Closes #5753. Closes #5754.

Why this change

Beta testers are about to get the updated Professor Mari (post-#5751), and the maintainer's own playtests surfaced a batch of polish blockers first: the panel header overflows into Mari's avatar at phone widths, there is no discoverable way to start a fresh chat, suggestion chips vanish from unrelated activity and clip with no way to reach them by mouse, the mobile Home browser burns a full line on the Bookmarks bar, and Mari apologizes for verifying her own successful edits. Six small fixes, one panel-polish PR, so the beta ping lands on a panel that doesn't fight its testers.

What changed

#5741 — header overflow. Skills and Memories share one "Skills & Memories" button (the maintainer's suggested shape): a two-row anchored menu (same outside-click pattern as the Permissions shield) with per-row icons and badges, a summed badge on the button, and the combined label hidden below 430px so the crowded 400–430px band gets icon+badge only. Two buttons' worth of padding, label, and badge leave the row; the avatar is safe.

#5752 — new chat discoverability. The header button is now "New chat" with a plus icon (it always archived the current conversation and started fresh — the "Restart" label said the opposite, which is why a maintainer hunting for "new chat" could not find it), its tooltip leads with the non-destructive fact, and the Chats popover header gained a "+ New chat" button — the place people actually look. Orphaned restart locale keys removed from every language pack.

#5753 — chips slot hygiene. A regular chat starting a generation now clears the Mari chips/plan slots only when they belong to that same chat (previously any active-chat generation wiped them app-wide — the observed vanishing-Accept-chip path). The three suggestions-disabled mount sweeps are deleted outright: rendering already gates ordinary chips on the setting, and the sweeps lacked the authorization-accept exemption the delivery path has, so their only unique effect was wiping a pending approval affordance. The dead clearSuggestions load option (no call site) is gone too.

#5754 — verification without the apology. Mari is now taught to stage the confirmatory read in the SAME response as the write — commands run in order, and resolveWorkspaceMutationVerification already counts a same-batch read, so verification costs zero extra rounds; the direct-request few-shot models it. Both coaching surfaces (the apply result text and the completion-claim interception) now say to verify matter-of-factly and never present the check as fixing a mistake. The verification guard itself is untouched — it still refuses unverified completion claims.

#5742 — chip row reachability. The shared MariSuggestionChips component (all three render sites) gains mouse drag-to-scroll — pointerdown/move translated into scrollLeft, a 5px threshold so plain clicks still pick chips, pointer capture during the drag, and exactly one suppressed click on release so letting go over a chip scrolls instead of firing it. Touch and pen pointers are untouched (native panning and the scroll-snap carousel keep working; no preventDefault ever reaches a touch stream). Overflow gets a visible affordance: per-side edge fades driven from the live scroll position (data-fade-left/data-fade-right, RTL-normalized), applied as a CSS mask rather than the gradient overlays the issue sketched — deliberate: the row renders over chat background images, the floating panel, and semi-transparent dark-theme surfaces, so no single base color exists for an overlay, and the mask idiom is already established in this stylesheet. scroll-padding-inline keeps a Tab-focused chip from resting under its own fade. Note for review: the affordance only engages below 768px, because at desktop widths the row wraps and never overflows — a desktop-width look will show no change by design.

#5743 — compact mobile bookmarks. At phone widths (sm: split, the file's established mobile/desktop boundary) the full-line Bookmarks bar is gone entirely — the <nav> is desktop-only now, no empty row remains — replaced by a bookmark-icon button in the tab strip between Home and the first tab, styled as inactive tab chrome with aria-label/aria-expanded/aria-controls. Tapping it toggles the pre-existing mobile bookmarks dropdown (same entries, same navigate behavior, reparented from the nav to the header so the tab strip's overflow-hidden can't clip it; outside-click and Escape close still work). The per-surface visibility settings gate both the button and the dropdown — no new toggle. Desktop is byte-for-byte unchanged. The old home.browser.bookmarks label key became unreferenced and was removed from every locale pack.

Regression — new mari-polish lane: functional pins that resolveWorkspaceMutationVerification counts a same-batch read after the write (and not a read before it), pins on the same-frame few-shot and both no-apology coaching texts, the use-generate chat-scoped clear gates, the absence of all three mount sweeps, the New-chat/combined-button locale keys, and the popover New-chat affordance.

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

Manual verification notes

  • pnpm lint, the full pnpm build, pnpm check:e2e-types, the locale checker, and the JSX-localization audit are green locally; format:check fails repo-wide on this Windows checkout (pre-existing autocrlf CRLF; touched files were run through Prettier directly).
  • Lanes: new mari-polish plus mari-ask-latch, mari-permissions-mode, mari-understood-request, mari-edit-flow-revert, prompt.regression, and open-issues all pass.
  • A two-lens adversarial review (interaction correctness; state/server/teeth — 23 agents, every finding refuted or confirmed by a dedicated verifier) ran over the first commit: 10 findings confirmed, 11 refuted. All confirmed findings are addressed in the second commit. The most important: five mobile Playwright specs still targeted the bookmarks trigger #5743 deleted (the shared openHomeBookmark helper, the mobile bookmarks spec with its removed data-bookmark-dot pips, and the Music-DJ-overlap check) — helper and specs are rewritten against the compact trigger, and the mobile regression matrix in CI is the proof for them. Also fixed: a phantom-drag state leak in the chip row (release outside the row before the 5px threshold left armed state with a stale start position), RTL edge fades inverted at the resting scroll position (both lenses caught it independently), verification coaching that scolded Mari "next time stage the read" even when she just had (now state-agnostic), a missing note that bash never counts as a verifying read, and the New-chat aria-label now starts with its visible text (WCAG 2.5.3 label-in-name). Two low-severity findings are documented rather than changed, deliberately: the compact bookmarks trigger is a non-tab child of role="tablist" (mirrors real browser tab strips; moving it outside the tablist is the alternative if an a11y linter objects), and one non-default settings combination (desktop bookmarks off + mobile bookmarks on, non-Home tab) no longer renders a strip on desktop that was empty — treated as an improvement, flagged here for the browser pass.
  • Please verify manually (this PR is UI-heavy and needs the browser pass):
    • Narrow the window to ~400px: the header row (Chats / Skills & Memories / shield / New chat) must not touch the avatar; the combined menu opens with both rows and badges.
    • "New chat" (header and Chats popover) starts a fresh chat with the old one saved in Chats.
    • With Mari suggestion chips visible, switch to a regular chat, send a message there, come back: the chips survive.
    • Chip row at narrow width: drag-scroll with the mouse; edge fade appears only while chips overflow; a plain click still activates a chip.
    • Mobile-width Home browser: Bookmarks collapses to the 🔖 button between Home and the tab strip, opens on tap, respects the bookmarks visibility settings; desktop keeps the full bar.
    • Ask Mari for a direct edit: one response applies AND verifies (watch the tool calls — update then get in the same round), no "Oops, my bad" round.

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)

CHANGELOG updated under [Unreleased] (Fixed for #5741/#5752/#5753/#5754, Added for #5742/#5743). No user-facing docs under docs/ touched (docs-i18n debt stays batched per the standing call); removed locale keys were mirrored out of every language pack in this PR.

UI evidence (if applicable)

All visible: the combined Skills & Memories button and menu, the New chat button (header + popover), chip drag-scroll with edge fades, and the compact mobile bookmarks button.

Summary by CodeRabbit

  • New Features

    • Professor Mari suggestion chips support mouse dragging with edge fades.
    • Mobile Home bookmarks are available through a compact tab-bar button.
    • Professor Mari includes a combined “Skills & Memories” menu and “New chat” controls.
  • Bug Fixes

    • Prevented unrelated chats from clearing pending suggestions.
    • Suggestion chips and plans remain available when suggestions are disabled.
    • Improved panel-header overflow handling and edit verification feedback.
  • Tests

    • Added regression coverage for chat, bookmark, and suggestion behaviors.

🔄 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/5755 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 9/2/2026 **Status:** ✅ Merged **Merged:** 9/2/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `fix/5752-5754-mari-polish` --- ### 📝 Commits (10+) - [`4439aed`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4439aed57b997f8358e831873fda1aa552cf2ceb) fix(mari): panel polish batch before the beta ping (#5741-#5743, #5752-#5754) - [`e0d56e7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e0d56e76529f48827f5875975218ba890938fc00) fix(mari): address adversarial review round 1 on the polish batch - [`8f7fee2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8f7fee2b2f491f59728107e4fc38dcac624e24a5) fix(mari): give the New chat button an exact accessible name - [`fdd9af6`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fdd9af600c35039616ea297755703a66eabeb695) fix(mari): address CodeRabbit round on the polish batch - [`6d43292`](https://github.com/Pasta-Devs/Marinara-Engine/commit/6d43292b71a0b6e4ba9c6ccfdb636a9711214802) fix(mari): hide the header name text at phone widths (maintainer feedback) - [`facf8de`](https://github.com/Pasta-Devs/Marinara-Engine/commit/facf8deb77cad0178ca7eb813bb327ad0823d815) fix(mari): keep a screen-reader Mari label at phone widths - [`20653d7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/20653d7eebb42f2931fde759b05af02fc54f60a7) fix(mari): name the combined library button explicitly - [`8fdcb81`](https://github.com/Pasta-Devs/Marinara-Engine/commit/8fdcb81e0696e9da3658af4cb518e65549736db1) fix(regression): read the newest Anthropic request body, not a stale index - [`30eeeae`](https://github.com/Pasta-Devs/Marinara-Engine/commit/30eeeae5528125b55a094565d09a6fae11c34cce) fix(mari): close the Library menu from competing keyboard actions - [`3688b37`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3688b370ce85e5f97bc9b0d62b75be9a88410857) fix(mari): harden the Library menu closes (CodeRabbit round) ### 📊 Changes **17 files changed** (+704 additions, -271 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+6 -0) 📝 `e2e/core-flows.e2e.ts` (+18 -12) 📝 `packages/client/src/components/chat/ChatInput.tsx` (+0 -6) 📝 `packages/client/src/components/chat/ConversationInput.tsx` (+0 -7) 📝 `packages/client/src/components/chat/HomeBrowserHub.tsx` (+131 -140) 📝 `packages/client/src/components/chat/HomeProfessorMariChat.tsx` (+161 -81) 📝 `packages/client/src/components/chat/MariSuggestionChips.tsx` (+140 -0) 📝 `packages/client/src/hooks/use-generate.ts` (+7 -2) 📝 `packages/client/src/localization/locales/de.json` (+0 -1) 📝 `packages/client/src/localization/locales/en.json` (+6 -4) 📝 `packages/client/src/localization/locales/ko.json` (+0 -4) 📝 `packages/client/src/localization/locales/pl.json` (+0 -1) 📝 `packages/client/src/localization/locales/zh-Hans.json` (+0 -4) 📝 `packages/client/src/styles/globals.css` (+63 -2) 📝 `packages/server/src/services/professor-mari/workspace-agent.service.ts` (+6 -5) ➕ `scripts/regressions/mari-polish.regression.ts` (+162 -0) 📝 `scripts/regressions/provider-compat.regression.ts` (+4 -2) </details> ### 📄 Description ## Linked issue Closes #5741. Closes #5742. Closes #5743. Closes #5752. Closes #5753. Closes #5754. ## Why this change Beta testers are about to get the updated Professor Mari (post-#5751), and the maintainer's own playtests surfaced a batch of polish blockers first: the panel header overflows into Mari's avatar at phone widths, there is no discoverable way to start a fresh chat, suggestion chips vanish from unrelated activity and clip with no way to reach them by mouse, the mobile Home browser burns a full line on the Bookmarks bar, and Mari apologizes for verifying her own successful edits. Six small fixes, one panel-polish PR, so the beta ping lands on a panel that doesn't fight its testers. ## What changed **#5741 — header overflow.** Skills and Memories share one "Skills & Memories" button (the maintainer's suggested shape): a two-row anchored menu (same outside-click pattern as the Permissions shield) with per-row icons and badges, a summed badge on the button, and the combined label hidden below 430px so the crowded 400–430px band gets icon+badge only. Two buttons' worth of padding, label, and badge leave the row; the avatar is safe. **#5752 — new chat discoverability.** The header button is now "New chat" with a plus icon (it always archived the current conversation and started fresh — the "Restart" label said the opposite, which is why a maintainer hunting for "new chat" could not find it), its tooltip leads with the non-destructive fact, and the Chats popover header gained a "+ New chat" button — the place people actually look. Orphaned `restart` locale keys removed from every language pack. **#5753 — chips slot hygiene.** A regular chat starting a generation now clears the Mari chips/plan slots only when they belong to that same chat (previously any active-chat generation wiped them app-wide — the observed vanishing-Accept-chip path). The three suggestions-disabled mount sweeps are deleted outright: rendering already gates ordinary chips on the setting, and the sweeps lacked the `authorization-accept` exemption the delivery path has, so their only unique effect was wiping a pending approval affordance. The dead `clearSuggestions` load option (no call site) is gone too. **#5754 — verification without the apology.** Mari is now taught to stage the confirmatory read in the SAME response as the write — commands run in order, and `resolveWorkspaceMutationVerification` already counts a same-batch read, so verification costs zero extra rounds; the direct-request few-shot models it. Both coaching surfaces (the apply result text and the completion-claim interception) now say to verify matter-of-factly and never present the check as fixing a mistake. The verification guard itself is untouched — it still refuses unverified completion claims. **#5742 — chip row reachability.** The shared `MariSuggestionChips` component (all three render sites) gains mouse drag-to-scroll — pointerdown/move translated into `scrollLeft`, a 5px threshold so plain clicks still pick chips, pointer capture during the drag, and exactly one suppressed click on release so letting go over a chip scrolls instead of firing it. Touch and pen pointers are untouched (native panning and the scroll-snap carousel keep working; no `preventDefault` ever reaches a touch stream). Overflow gets a visible affordance: per-side edge fades driven from the live scroll position (`data-fade-left`/`data-fade-right`, RTL-normalized), applied as a **CSS mask rather than the gradient overlays the issue sketched** — deliberate: the row renders over chat background images, the floating panel, and semi-transparent dark-theme surfaces, so no single base color exists for an overlay, and the mask idiom is already established in this stylesheet. `scroll-padding-inline` keeps a Tab-focused chip from resting under its own fade. Note for review: the affordance only engages below 768px, because at desktop widths the row wraps and never overflows — a desktop-width look will show no change by design. **#5743 — compact mobile bookmarks.** At phone widths (`sm:` split, the file's established mobile/desktop boundary) the full-line Bookmarks bar is gone entirely — the `<nav>` is desktop-only now, no empty row remains — replaced by a bookmark-icon button in the tab strip between Home and the first tab, styled as inactive tab chrome with `aria-label`/`aria-expanded`/`aria-controls`. Tapping it toggles the pre-existing mobile bookmarks dropdown (same entries, same navigate behavior, reparented from the nav to the header so the tab strip's `overflow-hidden` can't clip it; outside-click and Escape close still work). The per-surface visibility settings gate both the button and the dropdown — no new toggle. Desktop is byte-for-byte unchanged. The old `home.browser.bookmarks` label key became unreferenced and was removed from every locale pack. **Regression** — new `mari-polish` lane: functional pins that `resolveWorkspaceMutationVerification` counts a same-batch read after the write (and not a read before it), pins on the same-frame few-shot and both no-apology coaching texts, the use-generate chat-scoped clear gates, the absence of all three mount sweeps, the New-chat/combined-button locale keys, and the popover New-chat affordance. ## 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` ### Manual verification notes - `pnpm lint`, the full `pnpm build`, `pnpm check:e2e-types`, the locale checker, and the JSX-localization audit are green locally; `format:check` fails repo-wide on this Windows checkout (pre-existing autocrlf CRLF; touched files were run through Prettier directly). - Lanes: new `mari-polish` plus `mari-ask-latch`, `mari-permissions-mode`, `mari-understood-request`, `mari-edit-flow-revert`, `prompt.regression`, and `open-issues` all pass. - A two-lens adversarial review (interaction correctness; state/server/teeth — 23 agents, every finding refuted or confirmed by a dedicated verifier) ran over the first commit: 10 findings confirmed, 11 refuted. All confirmed findings are addressed in the second commit. The most important: **five mobile Playwright specs still targeted the bookmarks trigger #5743 deleted** (the shared `openHomeBookmark` helper, the mobile bookmarks spec with its removed `data-bookmark-dot` pips, and the Music-DJ-overlap check) — helper and specs are rewritten against the compact trigger, and the mobile regression matrix in CI is the proof for them. Also fixed: a phantom-drag state leak in the chip row (release outside the row before the 5px threshold left armed state with a stale start position), RTL edge fades inverted at the resting scroll position (both lenses caught it independently), verification coaching that scolded Mari "next time stage the read" even when she just had (now state-agnostic), a missing note that `bash` never counts as a verifying read, and the New-chat `aria-label` now starts with its visible text (WCAG 2.5.3 label-in-name). Two low-severity findings are documented rather than changed, deliberately: the compact bookmarks trigger is a non-tab child of `role="tablist"` (mirrors real browser tab strips; moving it outside the tablist is the alternative if an a11y linter objects), and one non-default settings combination (desktop bookmarks off + mobile bookmarks on, non-Home tab) no longer renders a strip on desktop that was **empty** — treated as an improvement, flagged here for the browser pass. - **Please verify manually (this PR is UI-heavy and needs the browser pass):** - Narrow the window to ~400px: the header row (Chats / Skills & Memories / shield / New chat) must not touch the avatar; the combined menu opens with both rows and badges. - "New chat" (header and Chats popover) starts a fresh chat with the old one saved in Chats. - With Mari suggestion chips visible, switch to a regular chat, send a message there, come back: the chips survive. - Chip row at narrow width: drag-scroll with the mouse; edge fade appears only while chips overflow; a plain click still activates a chip. - Mobile-width Home browser: Bookmarks collapses to the 🔖 button between Home and the tab strip, opens on tap, respects the bookmarks visibility settings; desktop keeps the full bar. - Ask Mari for a direct edit: one response applies AND verifies (watch the tool calls — update then get in the same round), no "Oops, my bad" round. ## 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) CHANGELOG updated under **[Unreleased]** (Fixed for #5741/#5752/#5753/#5754, Added for #5742/#5743). No user-facing docs under `docs/` touched (docs-i18n debt stays batched per the standing call); removed locale keys were mirrored out of every language pack in this PR. ## UI evidence (if applicable) All visible: the combined Skills & Memories button and menu, the New chat button (header + popover), chip drag-scroll with edge fades, and the compact mobile bookmarks button. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Professor Mari suggestion chips support mouse dragging with edge fades. - Mobile Home bookmarks are available through a compact tab-bar button. - Professor Mari includes a combined “Skills & Memories” menu and “New chat” controls. - **Bug Fixes** - Prevented unrelated chats from clearing pending suggestions. - Suggestion chips and plans remain available when suggestions are disabled. - Improved panel-header overflow handling and edit verification feedback. - **Tests** - Added regression coverage for chat, bookmark, and suggestion behaviors. <!-- 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:14:52 +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#6916
No description provided.