[PR #8763] [MERGED] feat(client): CharacterSelect, one picker for characters and personas #8787

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

📋 Pull Request Information

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

Base: staging ← Head: shared-character-picker


📝 Commits (10+)

  • 1381f0b feat(client): one shared identity picker for personas and characters
  • 3b42daa feat(client): use the identity picker for the drawer add-character list
  • 9e8906c feat(client): CharacterSelect, one picker for characters and personas
  • ab98d33 feat(client): setup wizards and other pickers use CharacterSelect
  • c5f28ef Merge remote-tracking branch 'origin/staging' into shared-character-picker
  • d36e7b3 fix(client): CharacterSelect review fixes
  • 5997b2a fix(client): focus the CharacterSelect popover once it is placed
  • deb12ba fix(client): CharacterSelect small gaps
  • dea732d test(regressions): point wizard picker checks at CharacterSelect
  • 9828bc2 fix(client): CharacterSelect Dottore findings

📊 Changes

15 files changed (+1571 additions, -2591 deletions)

View changed files

📝 packages/client/src/components/agents/RegexScriptEditor.tsx (+10 -44)
➕ packages/client/src/components/characters/CharacterPickerList.tsx (+612 -0)
➕ packages/client/src/components/characters/CharacterSelect.tsx (+451 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+161 -460)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+147 -569)
📝 packages/client/src/components/chat/QuickPersonaSwitcher.tsx (+29 -513)
📝 packages/client/src/components/chat/QuickSwitcherMobile.tsx (+17 -380)
📝 packages/client/src/components/game/GameSetupWizard.tsx (+21 -316)
📝 packages/client/src/components/lorebooks/LorebookEditor.tsx (+45 -217)
📝 packages/client/src/features/avatars/setup/AvatarAgentSetup.tsx (+24 -27)
📝 packages/client/src/features/multiplayer/MultiplayerFields.tsx (+19 -19)
📝 packages/client/src/features/multiplayer/MultiplayerParticipantControls.tsx (+10 -14)
📝 packages/client/src/localization/locales/en.json (+16 -19)
📝 scripts/regressions/avatar-crop-contract.regression.ts (+7 -11)
📝 scripts/regressions/multiplayer-wizard-characters.regression.ts (+2 -2)

📄 Description

Why

Marinara had a separate hand-written list for each place where you pick a character or a persona: the chat input, Chat Settings, the setup wizards, multiplayer, avatars, lorebooks and regex scopes. These lists looked different, searched differently, and each one needed its own fixes. This PR adds one shared picker, CharacterSelect, that works the same way as ConnectionSelect, and uses it in those places.

What changed

  • New components/characters/CharacterSelect.tsx and CharacterPickerList.tsx.
    • Triggers: picker (a form field), menu (a Settings row) or controlled (the caller's own button).
    • Kinds: character or persona, single or multiple.
    • On desktop, a popover opens at the trigger. It flips up when there is no room below.
    • On a phone, a bottom sheet opens.
    • The search box gets focus on desktop. The arrow keys move, Enter picks and Esc closes.
  • Multiple picks apply on each tap. Pills at the top remove a pick. Done only closes the window.
  • Folders are collapsible rows. Characters without a folder go into "Ungrouped". A single group shows as a flat list. "Play as a character" stays behind the showCharactersInPersonaPickers setting, and it also shows when a character is in use.
  • These places now use the picker:
    • The chat input persona button and the phone Quick Switcher.
    • The 4 Chat Settings pickers. The onboarding templates stay above the persona list.
    • The chat setup wizard (persona and characters). "Random" and "Add from folder" stay.
    • The game setup wizard (Game Master, party and player persona).
    • Multiplayer character and persona, the avatar owner, lorebook character and persona links, and the regex character scope.
  • IdentityPicker, the old lists, their search state and paging code, and 16 unused text keys are removed.
  • These places are not changed:
    • Scene prompt preferences, because it needs a "Conversation persona" default.
    • The character schedule manager, because it is a manager list, not a picker.

Checks run locally

  • Client tsc --noEmit, ESLint on the changed files and pnpm localization:check pass.
  • A read-only review ran on the branch. Its high and medium findings are fixed in d36e7b30ba:
    • The picker now closes when a greeting or onboarding dialog opens.
    • Pill removes and hosted rooms wait for a pending save.
    • The multiplayer persona field lists only personas.
    • Escape during IME input does not close the picker.
  • A Playwright run took screenshots at 390, 768 and 1440 px on a copy of real data. It covered the chat input, Quick Switcher, Chat Settings, both wizards and the keyboard. It found that the popover did not focus its search box. 5997b2ae24 fixes that, and a second run confirmed the fix.

Known gaps

  • The phone sheet close button is the shared Modal close button (38 px). It is not changed here.

Manual verification

  • Manually verify persona and character folders, and the "Play as a character" folder, with real grouped data. The test data had no folders.
  • Manually verify on a real phone that the bottom sheet does not open the keyboard on its own.
  • Manually verify that adding a card with a greeting in Chat Settings closes the picker and shows "Choose a Greeting".
  • Manually verify the multiplayer host and guest persona and character fields in a hosted room.
  • Manually verify lorebook and regex links in the light theme.

There is no linked issue, because this is planned work.


🔄 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/8763 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 11/3/2026 **Status:** ✅ Merged **Merged:** 11/3/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `shared-character-picker` --- ### 📝 Commits (10+) - [`1381f0b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/1381f0b7172a503621796a3b24b2e3adbd259d2d) feat(client): one shared identity picker for personas and characters - [`3b42daa`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3b42daa75275cec108a1863ba96def5daccbfe14) feat(client): use the identity picker for the drawer add-character list - [`9e8906c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9e8906cca22eedd9503d33457cbf66bbb76835da) feat(client): CharacterSelect, one picker for characters and personas - [`ab98d33`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ab98d3343e4c583c9e5bbefe1106faac0aa6998f) feat(client): setup wizards and other pickers use CharacterSelect - [`c5f28ef`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c5f28ef60a7c34fe06c3a16f971c7c43d7e0ed7c) Merge remote-tracking branch 'origin/staging' into shared-character-picker - [`d36e7b3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/d36e7b30ba1d98cbf2403af37bf1cac893e2dac2) fix(client): CharacterSelect review fixes - [`5997b2a`](https://github.com/Pasta-Devs/Marinara-Engine/commit/5997b2ae2468a94f32dbf3393b88d88520b63e24) fix(client): focus the CharacterSelect popover once it is placed - [`deb12ba`](https://github.com/Pasta-Devs/Marinara-Engine/commit/deb12ba4f2d8dc887d20b13794298124c2b1fdf2) fix(client): CharacterSelect small gaps - [`dea732d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/dea732ddc46da097a352255d50d334602ba70f02) test(regressions): point wizard picker checks at CharacterSelect - [`9828bc2`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9828bc231751d50bd2a447a735969e28532d153c) fix(client): CharacterSelect Dottore findings ### 📊 Changes **15 files changed** (+1571 additions, -2591 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/agents/RegexScriptEditor.tsx` (+10 -44) ➕ `packages/client/src/components/characters/CharacterPickerList.tsx` (+612 -0) ➕ `packages/client/src/components/characters/CharacterSelect.tsx` (+451 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+161 -460) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+147 -569) 📝 `packages/client/src/components/chat/QuickPersonaSwitcher.tsx` (+29 -513) 📝 `packages/client/src/components/chat/QuickSwitcherMobile.tsx` (+17 -380) 📝 `packages/client/src/components/game/GameSetupWizard.tsx` (+21 -316) 📝 `packages/client/src/components/lorebooks/LorebookEditor.tsx` (+45 -217) 📝 `packages/client/src/features/avatars/setup/AvatarAgentSetup.tsx` (+24 -27) 📝 `packages/client/src/features/multiplayer/MultiplayerFields.tsx` (+19 -19) 📝 `packages/client/src/features/multiplayer/MultiplayerParticipantControls.tsx` (+10 -14) 📝 `packages/client/src/localization/locales/en.json` (+16 -19) 📝 `scripts/regressions/avatar-crop-contract.regression.ts` (+7 -11) 📝 `scripts/regressions/multiplayer-wizard-characters.regression.ts` (+2 -2) </details> ### 📄 Description ## Why Marinara had a separate hand-written list for each place where you pick a character or a persona: the chat input, Chat Settings, the setup wizards, multiplayer, avatars, lorebooks and regex scopes. These lists looked different, searched differently, and each one needed its own fixes. This PR adds one shared picker, `CharacterSelect`, that works the same way as `ConnectionSelect`, and uses it in those places. ## What changed - New `components/characters/CharacterSelect.tsx` and `CharacterPickerList.tsx`. - Triggers: `picker` (a form field), `menu` (a Settings row) or `controlled` (the caller's own button). - Kinds: character or persona, single or multiple. - On desktop, a popover opens at the trigger. It flips up when there is no room below. - On a phone, a bottom sheet opens. - The search box gets focus on desktop. The arrow keys move, Enter picks and Esc closes. - Multiple picks apply on each tap. Pills at the top remove a pick. Done only closes the window. - Folders are collapsible rows. Characters without a folder go into "Ungrouped". A single group shows as a flat list. "Play as a character" stays behind the `showCharactersInPersonaPickers` setting, and it also shows when a character is in use. - These places now use the picker: - The chat input persona button and the phone Quick Switcher. - The 4 Chat Settings pickers. The onboarding templates stay above the persona list. - The chat setup wizard (persona and characters). "Random" and "Add from folder" stay. - The game setup wizard (Game Master, party and player persona). - Multiplayer character and persona, the avatar owner, lorebook character and persona links, and the regex character scope. - `IdentityPicker`, the old lists, their search state and paging code, and 16 unused text keys are removed. - These places are not changed: - Scene prompt preferences, because it needs a "Conversation persona" default. - The character schedule manager, because it is a manager list, not a picker. ## Checks run locally - Client `tsc --noEmit`, ESLint on the changed files and `pnpm localization:check` pass. - A read-only review ran on the branch. Its high and medium findings are fixed in d36e7b30ba: - The picker now closes when a greeting or onboarding dialog opens. - Pill removes and hosted rooms wait for a pending save. - The multiplayer persona field lists only personas. - Escape during IME input does not close the picker. - A Playwright run took screenshots at 390, 768 and 1440 px on a copy of real data. It covered the chat input, Quick Switcher, Chat Settings, both wizards and the keyboard. It found that the popover did not focus its search box. 5997b2ae24 fixes that, and a second run confirmed the fix. ## Known gaps - The phone sheet close button is the shared `Modal` close button (38 px). It is not changed here. ## Manual verification - [ ] Manually verify persona and character folders, and the "Play as a character" folder, with real grouped data. The test data had no folders. - [ ] Manually verify on a real phone that the bottom sheet does not open the keyboard on its own. - [ ] Manually verify that adding a card with a greeting in Chat Settings closes the picker and shows "Choose a Greeting". - [ ] Manually verify the multiplayer host and guest persona and character fields in a hosted room. - [ ] Manually verify lorebook and regex links in the light theme. There is no linked issue, because this is planned work. --- <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:42 +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#8787
No description provided.