[PR #8646] [MERGED] fix(chat-profiles): keep sidebars accessible and simplify field pickers #8722

Closed
opened 2026-11-07 17:39:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: the-library-has-left-the-building


📝 Commits (7)

  • 10d6d34 fix(chat-profiles): allow sidebar drops and simplify field pickers
  • 5ccd88a Merge remote-tracking branch 'origin/staging' into the-library-has-left-the-building
  • 68d6925 fix(chat-profiles): close the editor when switching chats
  • a6e2a54 fix(chat-profiles): preserve existing settings-window dismissal exemptions
  • 815da78 fix(chat-profiles): pin edited profiles and isolate browser fixtures
  • 166cbcc fix(chat-profiles): scope Escape and close deleted-profile drafts
  • b3b36c0 fix(chat-profiles): preserve modal escape regression guard

📊 Changes

8 files changed (+415 additions, -199 deletions)

View changed files

📝 docs/chats/settings-profiles.md (+3 -2)
➕ e2e/profile-editor.e2e.ts (+192 -0)
📝 packages/client/src/components/chat/ChatProfileBuilder.tsx (+155 -176)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+12 -3)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+6 -3)
📝 packages/client/src/components/ui/Modal.tsx (+40 -13)
📝 packages/client/src/hooks/use-dialog-focus-scope.ts (+5 -2)
📝 packages/client/src/localization/locales/en.json (+2 -0)

📄 Description

Linked issue

Closes #8644.

Why this change

The Profile Editor invited users to drop resources into fields while its blocking dialog hid the sidebars those resources came from. Its separate bottom tray duplicated the library, and chip pickers made selecting settings awkward.

What changed

  • Replace the bottom library tray with access to the normal sidebars while editing. Accept their native and custom mouse resource drags without closing Chat Settings.
  • Keep the dotted empty drop zones, colored icons, and field groups. Use native selectors for resources and independent checkboxes for tools.
  • Validate drop kinds and available resource IDs, merge multi-item drops without deselecting existing items, and scope drafts to their source chat/profile.
  • Preserve dialog focus initialization/restoration while allowing keyboard access to surrounding libraries; ordinary modals retain their focus trap and backdrop.
  • Update the profile guide and add browser proof for sidebar dragging, tool toggles, and saved settings.

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

Local validation: pnpm check passed after merging current staging. After the final draft-safety fixes, pnpm check:e2e-types, client lint, and the focused e2e/profile-editor.e2e.ts passed on desktop and Android Chromium. The seven pnpm smoke:ui cases passed during implementation. Browser proof also verifies that changing the background profile dropdown preserves the open editor's draft, and that switching chats closes it.

Final reviewed source revision: 815da785a6. Independent final review found no blocking findings. iPhone WebKit was attempted but cannot launch because this host lacks its OS libraries; Docker, real-phone keyboard behavior, and light-theme screenshots are unverified.

Manual verification notes

  • Manually verify opening library sidebars, dragging matching resources into empty and populated fields, and saving/reopening the profile.
  • Manually verify the tools checkboxes, keyboard navigation, and clearing selections.
  • Manually verify both themes, phone layouts, and iPhone WebKit on a host with the required libraries.

Automated browser proof selects/deselects tools, drags a persona from the real sidebar on desktop, saves the profile, and checks the persisted persona and tool IDs. Screenshots were inspected at 390, 768, and 1440 px. No production data or deployment was used.

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)

English profile-guide instructions are updated; translated guides are tracked in #8645. No version, storage-format, or changelog changes.

UI evidence (if applicable)

Local screenshots of the running app cover desktop, tablet, and phone widths, with the dotted visual treatment preserved and the sidebar open on desktop. The focused browser regression records screenshots with its results.

Proof

Local CodeRabbit findings were traced and addressed: stable accessible labels, focus restoration between save steps, distinct field descriptions for Clear selection, browser fixture cleanup, fixed source-chat/profile ownership, and phone-appropriate hints. Existing settings-window portal/navigation exemptions are preserved. Both editor entry points capture the profile selected when Edit is opened.

Investigated and left unchanged: explicit Chat Settings Close can discard an open unsaved editor, consistent with the editor's existing Cancel/Close behavior. Incidental library presses are protected. This warning was not treated as a defect requiring a new discard-confirmation flow.

The last CodeRabbit rerun was attempted but refused because included reviews were exhausted and no assigned organization seat was available. Earlier local reviews completed; a separate independent final review traced the latest fixes and found no blocking findings. Required GitHub checks and Dottore Review must finish on the final PR head before merge.


🔄 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/8646 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `the-library-has-left-the-building` --- ### 📝 Commits (7) - [`10d6d34`](https://github.com/Pasta-Devs/Marinara-Engine/commit/10d6d34e085d93101d417d95de7771296e1a56dc) fix(chat-profiles): allow sidebar drops and simplify field pickers - [`5ccd88a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5ccd88ae084ebbd78538aad8f3a05f07bc030d9d) Merge remote-tracking branch 'origin/staging' into the-library-has-left-the-building - [`68d6925`](https://github.com/Pasta-Devs/Marinara-Engine/commit/68d6925e376f66b9955daec3a4912cdcdb18a8a0) fix(chat-profiles): close the editor when switching chats - [`a6e2a54`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a6e2a54756648ba89181e9b2e8be5c765ed8f9bb) fix(chat-profiles): preserve existing settings-window dismissal exemptions - [`815da78`](https://github.com/Pasta-Devs/Marinara-Engine/commit/815da785a6f3524154065c8994b1f7ae8681f058) fix(chat-profiles): pin edited profiles and isolate browser fixtures - [`166cbcc`](https://github.com/Pasta-Devs/Marinara-Engine/commit/166cbcc2251c42936f9416a37f1eadf04e9adc4e) fix(chat-profiles): scope Escape and close deleted-profile drafts - [`b3b36c0`](https://github.com/Pasta-Devs/Marinara-Engine/commit/b3b36c0852e666edc62b2f35284f0f09e436e152) fix(chat-profiles): preserve modal escape regression guard ### 📊 Changes **8 files changed** (+415 additions, -199 deletions) <details> <summary>View changed files</summary> 📝 `docs/chats/settings-profiles.md` (+3 -2) ➕ `e2e/profile-editor.e2e.ts` (+192 -0) 📝 `packages/client/src/components/chat/ChatProfileBuilder.tsx` (+155 -176) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+12 -3) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+6 -3) 📝 `packages/client/src/components/ui/Modal.tsx` (+40 -13) 📝 `packages/client/src/hooks/use-dialog-focus-scope.ts` (+5 -2) 📝 `packages/client/src/localization/locales/en.json` (+2 -0) </details> ### 📄 Description ## Linked issue Closes #8644. ## Why this change The Profile Editor invited users to drop resources into fields while its blocking dialog hid the sidebars those resources came from. Its separate bottom tray duplicated the library, and chip pickers made selecting settings awkward. ## What changed - Replace the bottom library tray with access to the normal sidebars while editing. Accept their native and custom mouse resource drags without closing Chat Settings. - Keep the dotted empty drop zones, colored icons, and field groups. Use native selectors for resources and independent checkboxes for tools. - Validate drop kinds and available resource IDs, merge multi-item drops without deselecting existing items, and scope drafts to their source chat/profile. - Preserve dialog focus initialization/restoration while allowing keyboard access to surrounding libraries; ordinary modals retain their focus trap and backdrop. - Update the profile guide and add browser proof for sidebar dragging, tool toggles, and saved settings. ## 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` Local validation: `pnpm check` passed after merging current staging. After the final draft-safety fixes, `pnpm check:e2e-types`, client lint, and the focused `e2e/profile-editor.e2e.ts` passed on desktop and Android Chromium. The seven `pnpm smoke:ui` cases passed during implementation. Browser proof also verifies that changing the background profile dropdown preserves the open editor's draft, and that switching chats closes it. Final reviewed source revision: `815da785a6`. Independent final review found no blocking findings. iPhone WebKit was attempted but cannot launch because this host lacks its OS libraries; Docker, real-phone keyboard behavior, and light-theme screenshots are unverified. ### Manual verification notes - Manually verify opening library sidebars, dragging matching resources into empty and populated fields, and saving/reopening the profile. - Manually verify the tools checkboxes, keyboard navigation, and clearing selections. - Manually verify both themes, phone layouts, and iPhone WebKit on a host with the required libraries. Automated browser proof selects/deselects tools, drags a persona from the real sidebar on desktop, saves the profile, and checks the persisted persona and tool IDs. Screenshots were inspected at 390, 768, and 1440 px. No production data or deployment was used. ## 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) English profile-guide instructions are updated; translated guides are tracked in #8645. No version, storage-format, or changelog changes. ## UI evidence (if applicable) Local screenshots of the running app cover desktop, tablet, and phone widths, with the dotted visual treatment preserved and the sidebar open on desktop. The focused browser regression records screenshots with its results. ## Proof Local CodeRabbit findings were traced and addressed: stable accessible labels, focus restoration between save steps, distinct field descriptions for Clear selection, browser fixture cleanup, fixed source-chat/profile ownership, and phone-appropriate hints. Existing settings-window portal/navigation exemptions are preserved. Both editor entry points capture the profile selected when Edit is opened. Investigated and left unchanged: explicit Chat Settings Close can discard an open unsaved editor, consistent with the editor's existing Cancel/Close behavior. Incidental library presses are protected. This warning was not treated as a defect requiring a new discard-confirmation flow. The last CodeRabbit rerun was attempted but refused because included reviews were exhausted and no assigned organization seat was available. Earlier local reviews completed; a separate independent final review traced the latest fixes and found no blocking findings. Required GitHub checks and Dottore Review must finish on the final PR head before merge. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 17:39:14 +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#8722
No description provided.