[GH-ISSUE #6207] There is no way to clear the active persona once one has been set #3460

Closed
opened 2026-10-21 06:03:20 +07:00 by bsakaguchi · 2 comments
Owner

Originally created by @kolacheee on GitHub (Sep 14, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6207

Originally assigned to: @SpicyMarinara on GitHub.

Once you set a persona as active in the Personas panel, there is no way to go back to having no active persona. The check button ("Set as active") only appears on personas that are not active, the active one has no "unset" control, no persona editor or settings screen offers one, and the persona API has no call for it. The only things that clear it are deleting that persona or restoring a backup.

Reported by a user on v2.4.4 ("is there a way to have no active persona in ME after setting one? like clear it completely"). Re-verified on staging at 14de2d1ad. Companion issue about what "active" actually does and how the UI hides it: #6206.

How to reproduce (try it yourself)

  1. Open the Personas panel and create two personas, for example "Alice" and "Bob".
  2. Hover "Alice" and click the check button ("Set as active"). Alice gets the highlight ring and the check badge.
  3. Hover "Alice" again and look for a way to turn that off. Hover "Bob": the only choice is to make Bob active instead.
  4. Open a persona's editor and the Library view: the state is displayed, never toggled.

What you'll see: one persona is always active from now on. Switching to Bob just moves the flag; nothing removes it.

What should happen: a way to return to "no active persona", the same way the in-chat persona switcher offers "None". Either the check button on the active persona toggles it off, or a "Clear active persona" action exists, with API support.

Why it matters: the active persona is silently used as the identity for every Conversation-mode chat that has no persona selected, and choosing "None" in such a chat's switcher falls straight back to it. So a user who tried the feature once cannot get an anonymous Conversation chat again without deleting the persona.

Where it is

At staging 14de2d1ad:

  • packages/client/src/components/panels/PersonasPanel.tsx - the row actions render the check button only when the row is not active ({!active && (<button ... activatePersona.mutate(persona.id), around line 1239). This is the only caller of useActivatePersona in the client; bulk selection offers export and delete only.
  • packages/server/src/routes/characters.routes.ts - PUT /personas/:id/activate (line 2538) is the only persona route that touches the flag, and it requires an existing persona id (a stale id returns 404 without clearing, by design since #3041). PATCH /personas/:id (line 2386) validates with personaUpdateInputSchema (packages/shared/src/schemas/persona.schema.ts line 296), which has no isActive field, so {"isActive": false} is stripped, the body is empty, and the route returns the unchanged persona with 200 (verified).
  • packages/server/src/services/storage/characters.storage.ts - setActivePersona(id) clears every row and sets one; updatePersona has no isActive branch; there is no clear-only operation.
  • Precedent for the missing shape: mari themes set-active <id|none> in packages/server/src/services/mari-db/mari-db.service.ts accepts none and deactivates every theme; the persona commands (list|active|get|search|create|update|delete) have no activate or deactivate at all.

The only way to flip the flag today without deleting is the Professor Mari workspace raw database command (mari db patch personas <id> --json '{"isActive":"false"}' --apply), a loopback-only, approval-gated escape hatch that writes arbitrary columns; it is not a persona API or a UI control.

Suggested fix

  • Storage: add a clear operation (set every persona's isActive to "false") next to setActivePersona.
  • API: a PUT /characters/personas/deactivate (or DELETE /characters/personas/active) route, and optionally mari personas set-active <id|none> mirroring the themes command. Keep the 404 for a stale id on the activate route.
  • Client: show the check button on the active row too, as a toggle with a "Clear active persona" tooltip, invalidating the same queries useActivatePersona does (personas, personaActive, the detail).

Context

Found while investigating a user report against v2.4.4; the behavior is unchanged on staging. Verified with the running app, the API, and a nine-way adversarial code review. Please verify before fixing.

Originally created by @kolacheee on GitHub (Sep 14, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/6207 Originally assigned to: @SpicyMarinara on GitHub. Once you set a persona as active in the Personas panel, there is no way to go back to having no active persona. The check button ("Set as active") only appears on personas that are not active, the active one has no "unset" control, no persona editor or settings screen offers one, and the persona API has no call for it. The only things that clear it are deleting that persona or restoring a backup. Reported by a user on v2.4.4 ("is there a way to have no active persona in ME after setting one? like clear it completely"). Re-verified on `staging` at 14de2d1ad. Companion issue about what "active" actually does and how the UI hides it: #6206. ## How to reproduce (try it yourself) 1. Open the Personas panel and create two personas, for example "Alice" and "Bob". 2. Hover "Alice" and click the check button ("Set as active"). Alice gets the highlight ring and the check badge. 3. Hover "Alice" again and look for a way to turn that off. Hover "Bob": the only choice is to make Bob active instead. 4. Open a persona's editor and the Library view: the state is displayed, never toggled. **What you'll see:** one persona is always active from now on. Switching to Bob just moves the flag; nothing removes it. **What should happen:** a way to return to "no active persona", the same way the in-chat persona switcher offers "None". Either the check button on the active persona toggles it off, or a "Clear active persona" action exists, with API support. Why it matters: the active persona is silently used as the identity for every Conversation-mode chat that has no persona selected, and choosing "None" in such a chat's switcher falls straight back to it. So a user who tried the feature once cannot get an anonymous Conversation chat again without deleting the persona. ## Where it is At staging 14de2d1ad: - `packages/client/src/components/panels/PersonasPanel.tsx` - the row actions render the check button only when the row is not active (`{!active && (<button ... activatePersona.mutate(persona.id)`, around line 1239). This is the only caller of `useActivatePersona` in the client; bulk selection offers export and delete only. - `packages/server/src/routes/characters.routes.ts` - `PUT /personas/:id/activate` (line 2538) is the only persona route that touches the flag, and it requires an existing persona id (a stale id returns 404 without clearing, by design since #3041). `PATCH /personas/:id` (line 2386) validates with `personaUpdateInputSchema` (`packages/shared/src/schemas/persona.schema.ts` line 296), which has no `isActive` field, so `{"isActive": false}` is stripped, the body is empty, and the route returns the unchanged persona with 200 (verified). - `packages/server/src/services/storage/characters.storage.ts` - `setActivePersona(id)` clears every row and sets one; `updatePersona` has no `isActive` branch; there is no clear-only operation. - Precedent for the missing shape: `mari themes set-active <id|none>` in `packages/server/src/services/mari-db/mari-db.service.ts` accepts `none` and deactivates every theme; the persona commands (`list|active|get|search|create|update|delete`) have no activate or deactivate at all. The only way to flip the flag today without deleting is the Professor Mari workspace raw database command (`mari db patch personas <id> --json '{"isActive":"false"}' --apply`), a loopback-only, approval-gated escape hatch that writes arbitrary columns; it is not a persona API or a UI control. ## Suggested fix - Storage: add a clear operation (set every persona's `isActive` to `"false"`) next to `setActivePersona`. - API: a `PUT /characters/personas/deactivate` (or `DELETE /characters/personas/active`) route, and optionally `mari personas set-active <id|none>` mirroring the themes command. Keep the 404 for a stale id on the activate route. - Client: show the check button on the active row too, as a toggle with a "Clear active persona" tooltip, invalidating the same queries `useActivatePersona` does (`personas`, `personaActive`, the detail). ## Context Found while investigating a user report against v2.4.4; the behavior is unchanged on staging. Verified with the running app, the API, and a nine-way adversarial code review. Please verify before fixing.
bsakaguchi 2026-10-21 06:03:20 +07:00
Author
Owner

@SpicyMarinara commented on GitHub (Sep 14, 2026):

Implementation owner: @SpicyMarinara, assisted by Codex. Taking this in the assigned issue sweep. Following the decision in #6206 to retire global active personas; explicit chat selections and stored persona data will be preserved. A linked draft PR is being opened before implementation.

<!-- gh-comment-id:5668436446 --> @SpicyMarinara commented on GitHub (Sep 14, 2026): Implementation owner: @SpicyMarinara, assisted by Codex. Taking this in the assigned issue sweep. Following the decision in #6206 to retire global active personas; explicit chat selections and stored persona data will be preserved. A linked draft PR is being opened before implementation.
Author
Owner

@SpicyMarinara commented on GitHub (Sep 14, 2026):

Resolved in #6212, merged to staging. Per the maintainer decision in #6206, global active personas are retired. Legacy flags no longer select an identity, and choosing None in the chat remains cleared after reload. Existing persona records and identities saved on earlier messages are preserved.

The API regression verifies that legacy activation is rejected without rewriting data; the desktop and mobile browser flow verifies switching to None and reloading.

<!-- gh-comment-id:5668919666 --> @SpicyMarinara commented on GitHub (Sep 14, 2026): Resolved in #6212, merged to staging. Per the maintainer decision in #6206, global active personas are retired. Legacy flags no longer select an identity, and choosing None in the chat remains cleared after reload. Existing persona records and identities saved on earlier messages are preserved. The API regression verifies that legacy activation is rejected without rewriting data; the desktop and mobile browser flow verifies switching to None and reloading.
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#3460
No description provided.