[PR #6671] [MERGED] fix(client): fence copied support diagnostics and keep package Lorebook filters through updates #7282

Closed
opened 2026-10-23 04:18:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6671
Author: @Gunterlie
Created: 9/25/2026
Status: ✅ Merged
Merged: 9/25/2026
Merged by: @Gunterlie

Base: staging ← Head: fix/6668-diagnostics-codeblock-package-filters


📝 Commits (3)

  • 96eda78 fix(client): fence copied support diagnostics and keep package filters through restart-pending updates
  • fc1b1f3 test(regressions): pin chat package toggles to isCapabilityPackageAvailable
  • f1121ae fix(client): keep backticks inside copied diagnostics from closing the code fence

📊 Changes

8 files changed (+85 additions, -52 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 packages/client/src/components/characters/CharacterEditor.tsx (+2 -4)
📝 packages/client/src/components/chat/ChatSettingsDrawer.tsx (+8 -8)
📝 packages/client/src/components/lorebooks/LorebookEntryRow.tsx (+8 -9)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+33 -29)
📝 packages/client/src/hooks/use-capability-packages.ts (+8 -0)
📝 scripts/regressions/agent-registry-hydration.regression.ts (+20 -0)
📝 scripts/regressions/capability-package-chat-controls.regression.ts (+2 -2)

📄 Description

Closes #6668.

Why

Support diagnostics. Users paste "Copy Support Diagnostics" into Discord and GitHub. As plain text, the report is hard to read, and markdown can change parts of it. The copied report is now wrapped in a ``` code block, so both sites show it as one monospace block.

Package Lorebook filters (user report). After #6660, a user reported that the Noodle and Slurp Generation filter pills were gone from Lorebook entries, although Noodle was visible there before. I found two ways this can happen:

  1. noodle and slurp2 both set restartRequired: true. After an update, the registry marks the package restart-required. Until the Engine restarts, the previous version keeps running. The pill check accepted only status === "active", so both pills disappeared while the packages kept working. ChatSettingsDrawer (Noodle timeline / Slurp activity context) and CharacterEditor (Noodle settings) had the same check, and #6660 copied it from them.
  2. Slurp Legacy (slurp) sends the "noodle" generation trigger. Since #6660, the Noodle pill required the noodle package, so Slurp Legacy users lost the filter that controls their lore scans.

What changed

  • SettingsPanel: the copied diagnostics are fenced with ```. The formatter output itself is unchanged.
  • New isCapabilityPackageAvailable(installed, id) in use-capability-packages.ts: true for active, or for a restart-required update whose previous version is still loaded. This reuses isCapabilityPackageAvailableUntilRestart, which Home tabs and client modules already use. A first install that waits for a restart still counts as unavailable.
  • All three status === "active" checks for Noodle/Slurp (Lorebook pills, chat settings, character editor) use the helper.
  • The Lorebook Noodle pill shows for noodle or slurp (Legacy). The Slurp pill still maps to slurp2.
  • Regression: agent-registry-hydration.regression.ts covers the helper for noodle and slurp2 (restart-pending update, first install waiting for restart, active, error).

Validation

  • tsc --noEmit (client): passed
  • node scripts/run-regressions.mjs --filter scripts/regressions/agent-registry-hydration.regression.ts: passed
  • ESLint on the changed client files: clean
  • Local CodeRabbit (--committed): 0 findings
  • prettier --check CHANGELOG.md warns, but it warns on unmodified staging too.

Manual verification

  • Click Settings → Advanced → Support Diagnostics → Copy Support Diagnostics, paste it into Discord, and check that it shows as one code block.
  • Paste the same report into a GitHub comment preview and check that it shows as a code block.
  • Install Noodle and Slurp Remastered, then check that a Lorebook entry → Context filters → Generation shows both the Noodle and Slurp pills.
  • Update Noodle or Slurp Remastered without restarting, then check that the pills and the chat-settings package toggles are still visible.
  • With only Slurp Legacy installed (no Noodle), check that the Noodle pill shows.
  • With none of the packages installed, check that neither pill shows and that saved values stay on the entry.

Summary by CodeRabbit

  • Bug Fixes
    • Noodle and Slurp settings and Lorebook filters remain available after package updates that require a restart. The Noodle filter is also available with Slurp Legacy.
    • Copying support diagnostics now formats the report in a Markdown code block for easier pasting.

🔄 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/6671 **Author:** [@Gunterlie](https://github.com/Gunterlie) **Created:** 9/25/2026 **Status:** ✅ Merged **Merged:** 9/25/2026 **Merged by:** [@Gunterlie](https://github.com/Gunterlie) **Base:** `staging` ← **Head:** `fix/6668-diagnostics-codeblock-package-filters` --- ### 📝 Commits (3) - [`96eda78`](https://github.com/Pasta-Devs/Marinara-Engine/commit/96eda78d0e63a90ceadce42ef3f08792ae9bdbe9) fix(client): fence copied support diagnostics and keep package filters through restart-pending updates - [`fc1b1f3`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fc1b1f3c5e779fde1f3941d78497a9ead43c35eb) test(regressions): pin chat package toggles to isCapabilityPackageAvailable - [`f1121ae`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f1121aebeb3ecaaa87e1c53c7de418cb93bfad08) fix(client): keep backticks inside copied diagnostics from closing the code fence ### 📊 Changes **8 files changed** (+85 additions, -52 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `packages/client/src/components/characters/CharacterEditor.tsx` (+2 -4) 📝 `packages/client/src/components/chat/ChatSettingsDrawer.tsx` (+8 -8) 📝 `packages/client/src/components/lorebooks/LorebookEntryRow.tsx` (+8 -9) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+33 -29) 📝 `packages/client/src/hooks/use-capability-packages.ts` (+8 -0) 📝 `scripts/regressions/agent-registry-hydration.regression.ts` (+20 -0) 📝 `scripts/regressions/capability-package-chat-controls.regression.ts` (+2 -2) </details> ### 📄 Description Closes #6668. ## Why **Support diagnostics.** Users paste "Copy Support Diagnostics" into Discord and GitHub. As plain text, the report is hard to read, and markdown can change parts of it. The copied report is now wrapped in a ``` code block, so both sites show it as one monospace block. **Package Lorebook filters (user report).** After #6660, a user reported that the Noodle and Slurp Generation filter pills were gone from Lorebook entries, although Noodle was visible there before. I found two ways this can happen: 1. `noodle` and `slurp2` both set `restartRequired: true`. After an update, the registry marks the package `restart-required`. Until the Engine restarts, the previous version keeps running. The pill check accepted only `status === "active"`, so both pills disappeared while the packages kept working. `ChatSettingsDrawer` (Noodle timeline / Slurp activity context) and `CharacterEditor` (Noodle settings) had the same check, and #6660 copied it from them. 2. Slurp Legacy (`slurp`) sends the `"noodle"` generation trigger. Since #6660, the Noodle pill required the `noodle` package, so Slurp Legacy users lost the filter that controls their lore scans. ## What changed - `SettingsPanel`: the copied diagnostics are fenced with ```. The formatter output itself is unchanged. - New `isCapabilityPackageAvailable(installed, id)` in `use-capability-packages.ts`: true for `active`, or for a `restart-required` update whose previous version is still loaded. This reuses `isCapabilityPackageAvailableUntilRestart`, which Home tabs and client modules already use. A first install that waits for a restart still counts as unavailable. - All three `status === "active"` checks for Noodle/Slurp (Lorebook pills, chat settings, character editor) use the helper. - The Lorebook Noodle pill shows for `noodle` **or** `slurp` (Legacy). The Slurp pill still maps to `slurp2`. - Regression: `agent-registry-hydration.regression.ts` covers the helper for noodle and slurp2 (restart-pending update, first install waiting for restart, active, error). ## Validation - `tsc --noEmit` (client): passed - `node scripts/run-regressions.mjs --filter scripts/regressions/agent-registry-hydration.regression.ts`: passed - ESLint on the changed client files: clean - Local CodeRabbit (`--committed`): 0 findings - `prettier --check CHANGELOG.md` warns, but it warns on unmodified `staging` too. ## Manual verification - [ ] Click Settings → Advanced → Support Diagnostics → Copy Support Diagnostics, paste it into Discord, and check that it shows as one code block. - [ ] Paste the same report into a GitHub comment preview and check that it shows as a code block. - [ ] Install Noodle and Slurp Remastered, then check that a Lorebook entry → Context filters → Generation shows both the Noodle and Slurp pills. - [ ] Update Noodle or Slurp Remastered without restarting, then check that the pills and the chat-settings package toggles are still visible. - [ ] With only Slurp Legacy installed (no Noodle), check that the Noodle pill shows. - [ ] With none of the packages installed, check that neither pill shows and that saved values stay on the entry. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * Noodle and Slurp settings and Lorebook filters remain available after package updates that require a restart. The Noodle filter is also available with Slurp Legacy. * Copying support diagnostics now formats the report in a Markdown code block for easier pasting. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:18:14 +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#7282
No description provided.