[PR #1980] [MERGED] Fix active persona fallback data #5371

Closed
opened 2026-10-22 04:15:42 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1980
Author: @cha1latte
Created: 6/2/2026
Status: ✅ Merged
Merged: 6/2/2026
Merged by: @cha1latte

Base: refactor ← Head: fix/1964-active-persona-full-data


📝 Commits (2)

  • 392d1f4 Fix active persona fallback data
  • 14fccc8 Refresh PR validation

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 src/features/catalog/personas/hooks/use-personas.ts (+4 -1)

📄 Description

Linked issue

Closes #1964

Why this change

  • Chat and shared mode surfaces rely on fallback active persona resolution when a chat does not have an explicit personaId.
  • The fallback was returning the active persona summary projection, so consumers missed full persona fields such as saved statuses, long persona text, and active description extensions.

What changed

  • Updated useActivePersona to use persona summaries only to find the active persona id, then fetch the full persona row for the active-persona cache.
  • Preserved the lightweight summary projection for persona lists and switchers.

Refactor impact

Primary owner:

  • Catalog personas

Impact areas reviewed:

  • Catalog persona hooks
  • Chat mode saved status consumer
  • Shared mode UI persona-info consumer
  • Runtime generation persona snapshot cache reader

Boundary notes:

  • Change stays in src/features/catalog/personas.
  • No engine, shared API wrapper, Rust storage, schema, import/export, or remote-runtime behavior changed.

Pressure points touched:

  • Active persona React Query cache value consumed by chat input, shared mode UI, and generation cache snapshot helpers.

Validation

  • Matching validation command passes locally (for example pnpm typecheck, pnpm build, pnpm check:architecture, pnpm check:docs, or full pnpm check when warranted)
  • Full pnpm check passes before PR push/handoff
  • Human/manual validation completed by contributor or reviewer

Manual verification notes

  • Local scratch proof node scratch\proof-1964-active-persona.mjs passed: active fallback still finds the active id through summaries, fetches the full persona row by id, and no longer returns the projected summary row directly.
  • pnpm typecheck passed.
  • pnpm check passed after rebasing onto current origin/refactor.
  • No manual app/browser validation was needed for this data-resolution fix.

Feature Discoverability

Check exactly one:

  • Updated src/features/shell/discovery/ because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool.
  • N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find.

Reason:

  • Bugfix only; no new discoverable feature or workflow.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

UI evidence

N/A. This fixes the active persona data row returned by the fallback hook; there is no visible layout change.


🔄 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/1980 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 6/2/2026 **Status:** ✅ Merged **Merged:** 6/2/2026 **Merged by:** [@cha1latte](https://github.com/cha1latte) **Base:** `refactor` ← **Head:** `fix/1964-active-persona-full-data` --- ### 📝 Commits (2) - [`392d1f4`](https://github.com/Pasta-Devs/Marinara-Engine/commit/392d1f4086f64089a2018d6896a0773156757faf) Fix active persona fallback data - [`14fccc8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/14fccc8e938ec6ef225267886076e7b59ba42bb0) Refresh PR validation ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/features/catalog/personas/hooks/use-personas.ts` (+4 -1) </details> ### 📄 Description <!-- Target branch: `refactor`. Change the base to `refactor` before submitting unless a maintainer explicitly asked for another base. --> <!-- Keep all checkboxes unchecked until a human has actually verified them. --> ## Linked issue Closes #1964 ## Why this change - Chat and shared mode surfaces rely on fallback active persona resolution when a chat does not have an explicit `personaId`. - The fallback was returning the active persona summary projection, so consumers missed full persona fields such as saved statuses, long persona text, and active description extensions. ## What changed - Updated `useActivePersona` to use persona summaries only to find the active persona id, then fetch the full persona row for the active-persona cache. - Preserved the lightweight summary projection for persona lists and switchers. ## Refactor impact Primary owner: - Catalog personas Impact areas reviewed: - Catalog persona hooks - Chat mode saved status consumer - Shared mode UI persona-info consumer - Runtime generation persona snapshot cache reader Boundary notes: - Change stays in `src/features/catalog/personas`. - No engine, shared API wrapper, Rust storage, schema, import/export, or remote-runtime behavior changed. Pressure points touched: - Active persona React Query cache value consumed by chat input, shared mode UI, and generation cache snapshot helpers. ## Validation <!-- Check only what you personally ran or manually verified. Treat unchecked items as explicit TODOs. --> <!-- Do not submit *.test.ts or *.test.tsx files as PR proof; cite existing checks, command output, app/browser/Tauri verification, or manual notes instead. --> - [ ] Matching validation command passes locally (for example `pnpm typecheck`, `pnpm build`, `pnpm check:architecture`, `pnpm check:docs`, or full `pnpm check` when warranted) - [ ] Full `pnpm check` passes before PR push/handoff - [ ] Human/manual validation completed by contributor or reviewer ### Manual verification notes - Local scratch proof `node scratch\proof-1964-active-persona.mjs` passed: active fallback still finds the active id through summaries, fetches the full persona row by id, and no longer returns the projected summary row directly. - `pnpm typecheck` passed. - `pnpm check` passed after rebasing onto current `origin/refactor`. - No manual app/browser validation was needed for this data-resolution fix. ## Feature Discoverability Check exactly one: - [ ] Updated `src/features/shell/discovery/` because this PR adds or materially changes a user-discoverable feature, workflow, setting, mode, panel, import path, agent, media capability, or advanced tool. - [x] N/A because this PR is only a bugfix, refactor, test, docs, internal wiring, visual polish, copy edit, or compatibility fix and does not add a new thing users need to find. Reason: - Bugfix only; no new discoverable feature or workflow. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence N/A. This fixes the active persona data row returned by the fallback hook; there is no visible layout change. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:15: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#5371
No description provided.