[GH-ISSUE #2624] feat(regex): scoped-regex management polish — global-only Presets, character-card manager, group-name fix #1294

Closed
opened 2026-10-21 05:30:53 +07:00 by bsakaguchi · 0 comments
Owner

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

Originally assigned to: @SpicyMarinara on GitHub.

Summary

Follow-up polish to the character-scoped regex feature (#2603, merged). Three coupled improvements so character-scoped scripts are managed where they belong instead of cluttering the global Presets list:

  1. Presets → Regexes shows global scripts only. Today, character-scoped scripts (non-empty targetCharacterIds) — including ST cards imported as "Character only" — still appear in the global Presets → Regexes list. They should be filtered out, leaving Presets as the global pool.

  2. Character-card scoped-regex manager. Hiding scoped scripts from Presets removes their only create/edit/delete surface (Chat Settings only toggles them), so add a "Regex Scripts" section to the Character editor's Advanced tab to list / create / edit / delete / import / export that character's scoped scripts. (1) and (2) are coupled — shipping (1) without (2) would strand scoped scripts.

  3. Fix the Scoped Regex Scripts group labels. In Chat Settings → Scoped Regex Scripts, each per-character group is labeled the literal "Character" instead of the character's name (it reads the wrong field). Resolve the name via the standard display helper (parseCharacterDisplayData).

Why

#2603 shipped the scoped-regex feature, but scoped scripts still pollute the global Presets list, have no dedicated management home, and the per-character list mislabels its groups. This makes scoped regex behave as intended: scoped scripts live with the character; global scripts live in Presets.

Notes

  • Builds on #2603 (merged).
  • Frontend-only; reuses the existing regex API and the existing RegexScriptEditor for create/edit (a new openRegexDetail option pre-scopes new scripts to the character).
  • Validate with pnpm check; manual verification in the browser (light/dark, empty states).
Originally created by @kolacheee on GitHub (Jun 18, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2624 Originally assigned to: @SpicyMarinara on GitHub. ## Summary Follow-up polish to the character-scoped regex feature (#2603, merged). Three coupled improvements so character-scoped scripts are managed where they belong instead of cluttering the global Presets list: 1. **Presets → Regexes shows global scripts only.** Today, character-scoped scripts (non-empty `targetCharacterIds`) — including ST cards imported as "Character only" — still appear in the global Presets → Regexes list. They should be filtered out, leaving Presets as the global pool. 2. **Character-card scoped-regex manager.** Hiding scoped scripts from Presets removes their only create/edit/delete surface (Chat Settings only *toggles* them), so add a **"Regex Scripts"** section to the Character editor's **Advanced** tab to list / create / edit / delete / import / export that character's scoped scripts. (1) and (2) are coupled — shipping (1) without (2) would strand scoped scripts. 3. **Fix the Scoped Regex Scripts group labels.** In Chat Settings → Scoped Regex Scripts, each per-character group is labeled the literal **"Character"** instead of the character's name (it reads the wrong field). Resolve the name via the standard display helper (`parseCharacterDisplayData`). ## Why #2603 shipped the scoped-regex feature, but scoped scripts still pollute the global Presets list, have no dedicated management home, and the per-character list mislabels its groups. This makes scoped regex behave as intended: **scoped scripts live with the character; global scripts live in Presets.** ## Notes - Builds on #2603 (merged). - Frontend-only; reuses the existing regex API and the existing `RegexScriptEditor` for create/edit (a new `openRegexDetail` option pre-scopes new scripts to the character). - Validate with `pnpm check`; manual verification in the browser (light/dark, empty states).
bsakaguchi 2026-10-21 05:30:53 +07:00
  • closed this issue
  • added the
    in-pr
    label
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#1294
No description provided.