[PR #8555] [MERGED] feat(chat-profiles): settings profile builder with slots, Edit and New #8666

Closed
opened 2026-11-07 16:46:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: staging ← Head: feat/settings-profile-builder


📝 Commits (5)

  • e6c6973 feat(chat-profiles): store persona, lorebooks and background as starting picks
  • e5b68d4 feat(chat-profiles): add the settings profile builder with Edit and New entry points
  • 36ff050 fix(chat-profiles): treat the background as a starting pick and address review findings
  • 4c7d316 fix(chat-profiles): clear the character identity on persona apply and undo a wizard persona seed
  • 2bfeb23 fix(chat-profiles): show the profile persona in quick setup without writing it

📊 Changes

13 files changed (+1079 additions, -80 deletions)

View changed files

📝 docs/chats/settings-profiles.md (+23 -10)
➕ packages/client/src/components/chat/ChatProfileBuilder.tsx (+683 -0)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+47 -40)
📝 packages/client/src/components/chat/ChatSetupWizard.tsx (+76 -18)
📝 packages/client/src/hooks/use-chat-presets.ts (+9 -0)
📝 packages/client/src/lib/chat-preset-apply.ts (+16 -0)
📝 packages/client/src/lib/chat-setup-draft.ts (+4 -1)
📝 packages/client/src/localization/locales/en.json (+56 -5)
📝 packages/server/src/routes/chat-presets.routes.ts (+4 -2)
📝 packages/server/src/services/storage/chat-presets.storage.ts (+24 -3)
📝 packages/shared/src/schemas/chat-preset.schema.ts (+2 -0)
📝 packages/shared/src/types/chat-preset.ts (+11 -1)
➕ scripts/regressions/chat-profile-starting-picks.regression.ts (+124 -0)

📄 Description

Linked issue

No linked issue. This is planned work from a Discord design discussion (Promansis / gunterlie): "make creating a profile easier, with open slots like the Jobs list".

Why this change

Today a chat settings profile can only be made with "Save current chat settings as a new profile" from an open chat. There is no blank start, no edit view, and you cannot see what a profile contains. Users asked for a builder with open slots: put something into a slot or leave it empty, then pick the chats that should use the profile.

Users also expect a profile to set up a persona, lorebooks and a background. Profiles left these out on purpose, because the chat owns them. This PR keeps that promise: these three are starting picks. A profile copies them into a chat when you apply it by hand. The chat is never linked to the profile, and chats that follow a profile never get them.

What changed

  • Profile builder modal (ChatProfileBuilder.tsx, new): full-width dashed fields per slot (connection, prompt preset, agents, tools, persona, background, lorebooks, image style), in the type colours. Fill a field by click (inline picker) or by dragging from the "Your library" tray. Agent chips use the existing AgentArtwork tile. Parameters, memory and translation show a summary.
  • Step 2, choose chats: after Save, tick chats and "Apply to N chats", optionally make it the default for new chats.
  • Entry points: Chat settings drawer gets "Edit" and "+ New" (replaces Save As). The new-chat wizard's "Use a Profile" step gets "New profile…" and "Edit".
  • Starting picks (shared schema, server storage, client draft mirror):
    • Hand apply copies the profile persona (only if it still exists), adds the profile lorebooks to the chat's own list (deleted ids skipped), and sets the background. An empty persona, lorebooks or background keeps the chat's own value.
    • Followers never receive starting picks.
    • "Save into profile" keeps the profile's own persona and lorebooks. It takes the chat's background only when the profile has none (keeps the behaviour from 3384d025d for existing profiles).
    • Exported profile files leave out persona and lorebook ids.
  • Wizard: the persona picked in the wizard wins over the profile's starting persona; selecting a profile shows its persona in the picker first.
  • Docs: docs/chats/settings-profiles.md. Removed three unused locale keys (action.saveAs, dialog.createTitle, dialog.newName).
  • Regression: scripts/regressions/chat-profile-starting-picks.regression.ts (new).

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

Agent-run (not human-verified): full pnpm check, client and server tsc, ESLint on changed files, pnpm localization:check, regressions chat-profile-starting-picks and chat-profile-followers all passed. A Playwright run on a local instance applied a profile and checked the chat over the API, and took screenshots at 390/768/1440 px. An Opus review found 4 issues; all are fixed in 36ff050a9.

To verify manually:

  • Manually verify in the browser: Chat settings → Profile → "+ New" opens the builder pre-filled from the chat; drag a lorebook and a persona from the library into their fields; click a field and pick from the list.
  • Manually verify: Save → step 2 → tick two chats → Apply. Both chats get the persona and the extra lorebook; their other lorebooks stay.
  • Manually verify: apply a profile with an empty background to a chat that has a background. The background stays.
  • Manually verify: "Edit" on a profile shows its saved picks; Default cannot be edited.
  • Manually verify: new-chat wizard → Use a Profile → "New profile…" saves and selects the new profile; pick a different persona than the profile's, Apply & Start, the chat keeps your persona.
  • Manually verify on a phone (390 px): no library tray, empty fields say "Click to pick", picking works by tap.
  • Manually verify: export a profile with a persona and lorebooks; the file has no persona or lorebook ids.
  • Manually verify light and dark mode.

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-i18n follow-up: #8554

UI evidence (if applicable)

Screenshots at 390/768/1440 px are on the devbox (~/scratch/profile-builder/shots/). They still need to be uploaded here. Approved design mockup: builder with full-width dashed slot fields, library tray, step 2 chat checklist.


🔄 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/8555 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `feat/settings-profile-builder` --- ### 📝 Commits (5) - [`e6c6973`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e6c6973a3b483598fa96b5698d8388eeb7cda72a) feat(chat-profiles): store persona, lorebooks and background as starting picks - [`e5b68d4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e5b68d42140b4edc5223981cb9bdd486d95c6c13) feat(chat-profiles): add the settings profile builder with Edit and New entry points - [`36ff050`](https://github.com/Pasta-Devs/Marinara-Engine/commit/36ff050a9dc2fba4465cb795c1e6b0674137dc61) fix(chat-profiles): treat the background as a starting pick and address review findings - [`4c7d316`](https://github.com/Pasta-Devs/Marinara-Engine/commit/4c7d3163deb352983948c6c0912c8e5c0d4f52aa) fix(chat-profiles): clear the character identity on persona apply and undo a wizard persona seed - [`2bfeb23`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2bfeb235dda0e1a629333dbc5492afda1cfdbfee) fix(chat-profiles): show the profile persona in quick setup without writing it ### 📊 Changes **13 files changed** (+1079 additions, -80 deletions) <details> <summary>View changed files</summary> 📝 `docs/chats/settings-profiles.md` (+23 -10) ➕ `packages/client/src/components/chat/ChatProfileBuilder.tsx` (+683 -0) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+47 -40) 📝 `packages/client/src/components/chat/ChatSetupWizard.tsx` (+76 -18) 📝 `packages/client/src/hooks/use-chat-presets.ts` (+9 -0) 📝 `packages/client/src/lib/chat-preset-apply.ts` (+16 -0) 📝 `packages/client/src/lib/chat-setup-draft.ts` (+4 -1) 📝 `packages/client/src/localization/locales/en.json` (+56 -5) 📝 `packages/server/src/routes/chat-presets.routes.ts` (+4 -2) 📝 `packages/server/src/services/storage/chat-presets.storage.ts` (+24 -3) 📝 `packages/shared/src/schemas/chat-preset.schema.ts` (+2 -0) 📝 `packages/shared/src/types/chat-preset.ts` (+11 -1) ➕ `scripts/regressions/chat-profile-starting-picks.regression.ts` (+124 -0) </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 --> No linked issue. This is planned work from a Discord design discussion (Promansis / gunterlie): "make creating a profile easier, with open slots like the Jobs list". ## Why this change <!-- What user problem, bug, or goal does this solve? --> Today a chat settings profile can only be made with "Save current chat settings as a new profile" from an open chat. There is no blank start, no edit view, and you cannot see what a profile contains. Users asked for a builder with open slots: put something into a slot or leave it empty, then pick the chats that should use the profile. Users also expect a profile to set up a persona, lorebooks and a background. Profiles left these out on purpose, because the chat owns them. This PR keeps that promise: these three are **starting picks**. A profile copies them into a chat when you apply it by hand. The chat is never linked to the profile, and chats that follow a profile never get them. ## What changed <!-- List the key changes in this PR --> - **Profile builder modal** (`ChatProfileBuilder.tsx`, new): full-width dashed fields per slot (connection, prompt preset, agents, tools, persona, background, lorebooks, image style), in the type colours. Fill a field by click (inline picker) or by dragging from the "Your library" tray. Agent chips use the existing `AgentArtwork` tile. Parameters, memory and translation show a summary. - **Step 2, choose chats**: after Save, tick chats and "Apply to N chats", optionally make it the default for new chats. - **Entry points**: Chat settings drawer gets "Edit" and "+ New" (replaces Save As). The new-chat wizard's "Use a Profile" step gets "New profile…" and "Edit". - **Starting picks** (shared schema, server storage, client draft mirror): - Hand apply copies the profile persona (only if it still exists), adds the profile lorebooks to the chat's own list (deleted ids skipped), and sets the background. An empty persona, lorebooks or background keeps the chat's own value. - Followers never receive starting picks. - "Save into profile" keeps the profile's own persona and lorebooks. It takes the chat's background only when the profile has none (keeps the behaviour from 3384d025d for existing profiles). - Exported profile files leave out persona and lorebook ids. - **Wizard**: the persona picked in the wizard wins over the profile's starting persona; selecting a profile shows its persona in the picker first. - Docs: `docs/chats/settings-profiles.md`. Removed three unused locale keys (`action.saveAs`, `dialog.createTitle`, `dialog.newName`). - Regression: `scripts/regressions/chat-profile-starting-picks.regression.ts` (new). ## Validation <!-- Required: include commands run and/or manual checks performed --> - [ ] `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 <!-- Describe exactly what you tested in a real browser/app, step by step. --> <!-- ⚠️ 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. --> Agent-run (not human-verified): full `pnpm check`, client and server `tsc`, ESLint on changed files, `pnpm localization:check`, regressions `chat-profile-starting-picks` and `chat-profile-followers` all passed. A Playwright run on a local instance applied a profile and checked the chat over the API, and took screenshots at 390/768/1440 px. An Opus review found 4 issues; all are fixed in 36ff050a9. To verify manually: - Manually verify in the browser: Chat settings → Profile → "+ New" opens the builder pre-filled from the chat; drag a lorebook and a persona from the library into their fields; click a field and pick from the list. - Manually verify: Save → step 2 → tick two chats → Apply. Both chats get the persona and the extra lorebook; their other lorebooks stay. - Manually verify: apply a profile with an empty background to a chat that has a background. The background stays. - Manually verify: "Edit" on a profile shows its saved picks; Default cannot be edited. - Manually verify: new-chat wizard → Use a Profile → "New profile…" saves and selects the new profile; pick a different persona than the profile's, Apply & Start, the chat keeps your persona. - Manually verify on a phone (390 px): no library tray, empty fields say "Click to pick", picking works by tap. - Manually verify: export a profile with a persona and lorebooks; the file has no persona or lorebook ids. - Manually verify light and dark mode. ## Docs and release impact - [ ] No docs changes needed - [x] Updated docs (README / CONTRIBUTING / android/README) as needed - [x] 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-i18n follow-up: #8554 ## UI evidence (if applicable) <!-- Add before/after screenshots or recordings for UI changes --> Screenshots at 390/768/1440 px are on the devbox (`~/scratch/profile-builder/shots/`). They still need to be uploaded here. Approved design mockup: builder with full-width dashed slot fields, library tray, step 2 chat checklist. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-07 16:46:22 +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#8666
No description provided.