[GH-ISSUE #1555] [Issue]: Agents regex sidebar toggle misreads enabled state #798

Closed
opened 2026-10-20 17:33:31 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @Promansis on GitHub (May 29, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1555

Originally assigned to: @Romuromylus on GitHub.

Summary

The Agents right-hand panel can show regex scripts as disabled and make the enable/disable pill feel broken even when the script is enabled. Source inspection shows AgentsPanel derives the displayed state with script.enabled === "true", while create/update paths can store booleans.

Parent smoke test: #1485

Expected behavior

Regex scripts should show their saved enabled state consistently in the Agents sidebar, and clicking the sidebar toggle should reliably switch between enabled and disabled.

Actual behavior

The sidebar toggle can appear broken or out of sync. In particular, rows with boolean enabled: true are treated as disabled by the sidebar check because the component only treats the string "true" as enabled.

Steps to reproduce

  1. Open the right-hand Catalog Editors panel.
  2. Go to Agents > Regex Scripts.
  3. Use or create/import a regex script whose stored enabled value is boolean true.
  4. Observe the sidebar row/toggle state, then click the enable/disable toggle.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor branch, reported during manual Catalog Editors sweep on 2026-05-29
  • Run mode: not specified
  • OS + version: not specified
  • Node + pnpm versions: not specified
  • Rust version, if relevant: not relevant
  • Remote Runtime URL configured? not relevant
  • Provider, model, or integration, if relevant: not relevant

Logs, screenshots, or video

Manual report: "in Agents editor: Regex can't be enabled/disabled from main sidebar - the toggle pill appears broken"

Source evidence inspected:

  • src/features/catalog/agents/components/AgentsPanel.tsx reads const enabled = script.enabled === "true" and mutates with { enabled: !enabled }.
  • src/features/catalog/agents/hooks/use-regex-scripts.ts types enabled as string, but storage/create/import paths pass booleans.

Regression notes

Unknown.

Additional context

Checked upstream issues and PRs for regex/agent editor overlap. Related closed issue #965 covered "Prompt Only" toggling, not the main enabled toggle.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (May 29, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1555 Originally assigned to: @Romuromylus on GitHub. ## Summary The Agents right-hand panel can show regex scripts as disabled and make the enable/disable pill feel broken even when the script is enabled. Source inspection shows `AgentsPanel` derives the displayed state with `script.enabled === "true"`, while create/update paths can store booleans. Parent smoke test: #1485 ## Expected behavior Regex scripts should show their saved enabled state consistently in the Agents sidebar, and clicking the sidebar toggle should reliably switch between enabled and disabled. ## Actual behavior The sidebar toggle can appear broken or out of sync. In particular, rows with boolean `enabled: true` are treated as disabled by the sidebar check because the component only treats the string `"true"` as enabled. ## Steps to reproduce 1. Open the right-hand Catalog Editors panel. 2. Go to Agents > Regex Scripts. 3. Use or create/import a regex script whose stored `enabled` value is boolean `true`. 4. Observe the sidebar row/toggle state, then click the enable/disable toggle. ## Impact area - [ ] App shell, navigation, startup, or providers - [x] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [ ] Shared API wrapper or remote runtime routing - [ ] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: refactor branch, reported during manual Catalog Editors sweep on 2026-05-29 - Run mode: not specified - OS + version: not specified - Node + pnpm versions: not specified - Rust version, if relevant: not relevant - Remote Runtime URL configured? not relevant - Provider, model, or integration, if relevant: not relevant ## Logs, screenshots, or video Manual report: "in Agents editor: Regex can't be enabled/disabled from main sidebar - the toggle pill appears broken" Source evidence inspected: - `src/features/catalog/agents/components/AgentsPanel.tsx` reads `const enabled = script.enabled === "true"` and mutates with `{ enabled: !enabled }`. - `src/features/catalog/agents/hooks/use-regex-scripts.ts` types `enabled` as `string`, but storage/create/import paths pass booleans. ## Regression notes Unknown. ## Additional context Checked upstream issues and PRs for regex/agent editor overlap. Related closed issue #965 covered "Prompt Only" toggling, not the main enabled toggle. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-20 17:33:31 +07:00
Author
Owner

@Romuromylus commented on GitHub (May 29, 2026):

Resolved by #1600, merged into refactor.

<!-- gh-comment-id:4580148141 --> @Romuromylus commented on GitHub (May 29, 2026): Resolved by #1600, merged into `refactor`.
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#798
No description provided.