[PR #2175] [MERGED] Fix persona duplicate active flags #5453

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/2175
Author: @Promansis
Created: 6/4/2026
Status: ✅ Merged
Merged: 6/4/2026
Merged by: @Promansis

Base: refactor ← Head: fix/issue-2172-persona-duplicate-active


📝 Commits (1)

  • e0402b7 Fix persona duplicate active flags

📊 Changes

2 files changed (+77 additions, -1 deletions)

View changed files

📝 src-tauri/src/commands/storage/commands/entities.rs (+59 -1)
📝 src-tauri/src/commands/storage/personas.rs (+18 -0)

📄 Description

Linked issue

Closes #2172

Why this change

  • Duplicating an active persona on refactor copied isActive/active truthy flags through the generic storage duplicate path, allowing multiple personas to appear active after duplicate.

What changed

  • Routed storage_duplicate for personas through a persona-owned duplicate helper.
  • Persona duplicates now clear both isActive and active before the new row is created.
  • Added focused Rust storage coverage for active and inactive persona duplicate behavior.

Refactor impact

Primary owner:

Rust storage

Impact areas reviewed:

  • Catalog personas duplicate hook still calls the existing shared storage_duplicate wrapper.
  • Remote runtime command allowlist already includes storage_duplicate; command shape did not change.
  • Persona activation path still enforces one active row when explicitly activating.

Boundary notes:

  • The invariant is enforced in src-tauri storage ownership, not in React UI or shared API call sites.
  • No engine, mode, or shared API contract changes.

Pressure points touched:

  • Generic storage duplicate router in src-tauri/src/commands/storage/commands/entities.rs.
  • Persona storage helper in src-tauri/src/commands/storage/personas.rs.

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

  • cargo fmt --manifest-path src-tauri/Cargo.toml
  • cargo test --manifest-path src-tauri/Cargo.toml duplicating_
    • Passed 3 tests: the two new persona duplicate tests plus the existing connection duplicate test matched by the filter.
  • cargo check --manifest-path src-tauri/Cargo.toml

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:

  • Existing persona duplicate workflow is fixed; no new discoverable behavior or entrypoint was added.

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: storage behavior fix with no visible UI changes beyond duplicated persona active state.


🔄 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/2175 **Author:** [@Promansis](https://github.com/Promansis) **Created:** 6/4/2026 **Status:** ✅ Merged **Merged:** 6/4/2026 **Merged by:** [@Promansis](https://github.com/Promansis) **Base:** `refactor` ← **Head:** `fix/issue-2172-persona-duplicate-active` --- ### 📝 Commits (1) - [`e0402b7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e0402b7c65a6bbde48a5485f0cdd919ba9f6c591) Fix persona duplicate active flags ### 📊 Changes **2 files changed** (+77 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/commands/entities.rs` (+59 -1) 📝 `src-tauri/src/commands/storage/personas.rs` (+18 -0) </details> ### 📄 Description ## Linked issue Closes #2172 ## Why this change - Duplicating an active persona on `refactor` copied `isActive`/`active` truthy flags through the generic storage duplicate path, allowing multiple personas to appear active after duplicate. ## What changed - Routed `storage_duplicate` for `personas` through a persona-owned duplicate helper. - Persona duplicates now clear both `isActive` and `active` before the new row is created. - Added focused Rust storage coverage for active and inactive persona duplicate behavior. ## Refactor impact Primary owner: Rust storage Impact areas reviewed: - Catalog personas duplicate hook still calls the existing shared `storage_duplicate` wrapper. - Remote runtime command allowlist already includes `storage_duplicate`; command shape did not change. - Persona activation path still enforces one active row when explicitly activating. Boundary notes: - The invariant is enforced in `src-tauri` storage ownership, not in React UI or shared API call sites. - No engine, mode, or shared API contract changes. Pressure points touched: - Generic storage duplicate router in `src-tauri/src/commands/storage/commands/entities.rs`. - Persona storage helper in `src-tauri/src/commands/storage/personas.rs`. ## Validation - [x] 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 - `cargo fmt --manifest-path src-tauri/Cargo.toml` - `cargo test --manifest-path src-tauri/Cargo.toml duplicating_` - Passed 3 tests: the two new persona duplicate tests plus the existing connection duplicate test matched by the filter. - `cargo check --manifest-path src-tauri/Cargo.toml` ## 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: - Existing persona duplicate workflow is fixed; no new discoverable behavior or entrypoint was added. ## Docs and release impact - [x] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [x] Confirmed this PR does not restore old staging/package-workspace/release claims ## UI evidence N/A: storage behavior fix with no visible UI changes beyond duplicated persona active state. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:16:27 +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#5453
No description provided.