[PR #6626] [MERGED] feat: explain Decision imports and clarify model guides #7259

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/6626
Author: @kolacheee
Created: 9/24/2026
Status: ✅ Merged
Merged: 9/24/2026
Merged by: @kolacheee

Base: staging ← Head: codex/6605-decision-import-notices


📝 Commits (7)

  • ceb0b58 docs: track Decision import notice work for #6605
  • dcc8afd feat: explain Decision dependencies when importing agents
  • 9fc99cb Merge remote-tracking branch 'origin/staging' into codex/6605-decision-import-notices
  • c7ad3d1 docs: align Decision model guides with runtime behavior
  • adfe857 Merge remote-tracking branch 'origin/staging' into codex/6605-decision-import-notices
  • 823755b fix: address Decision import review and browser CI race
  • f135400 docs: keep sprite CI fix out of release notes

📊 Changes

21 files changed (+394 additions, -84 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 docs/agents/custom-agents.md (+4 -2)
📝 docs/chats/group-chats.md (+3 -1)
📝 docs/connections/decision-models.md (+42 -24)
📝 docs/development/optional-agent-packages.md (+2 -2)
📝 docs/lorebooks/entries.md (+7 -6)
📝 docs/prompts/conditional-prompts.md (+47 -25)
📝 docs/prompts/macros.md (+1 -1)
📝 docs/prompts/preset-variables.md (+1 -1)
📝 docs/prompts/presets.md (+1 -1)
➕ e2e/decision-import-notice.e2e.ts (+194 -0)
📝 e2e/expression-active-sprites.e2e.ts (+7 -2)
📝 packages/client/src/components/agents/AgentCatalogView.tsx (+3 -0)
📝 packages/client/src/components/panels/AgentsPanel.tsx (+5 -0)
📝 packages/client/src/hooks/use-capability-packages.ts (+14 -8)
📝 packages/client/src/lib/decision-import-notice.ts (+35 -4)
📝 packages/client/src/localization/locales/en.json (+4 -1)
📝 packages/server/src/routes/capability-packages.routes.ts (+5 -3)
📝 packages/server/src/services/capability-packages/package-manager.service.ts (+4 -1)
📝 packages/shared/src/utils/macro-engine.ts (+3 -2)

...and 1 more files

📄 Description

Linked issue

Closes #6605

Why this change

Imported agents can depend on a Decision model without explaining what happens when none is selected. Users then see agents running unexpectedly or prompt branches missing. The Decision/Jev guides also made stronger promises about thresholds, request limits, answer reuse and provider inputs than the implementation supports.

This PR adds the import guidance and corrects the English authoring docs together, before translation or Mari's Decision instructions.

What changed

  • Reuse one localized notice across existing content imports, custom agents, and single/bulk Agent catalog installs. Missing-model warnings explain prompt, lorebook and activation-question fallbacks; informational notices explain hosted costs. If the settings lookup fails, a neutral notice says the model selection could not be checked and preserves the successful import. All three open the in-app Decision Models guide.
  • Detect activation questions and prompt statements in successfully imported content. Catalog installs report usage from verified package definitions, including updates awaiting restart. Failed/plain imports remain quiet and mixed batches notify once.
  • Fix the intermittent sprite browser check: on touch devices, wait for the Regenerate confirmation before waiting for generation. The failed CI trace shows the old immediate visibility check returned false before the dialog mounted.
  • Correct nine guides: Jev versus Open-Jev, Smart order's character roster, backend threshold defaults, allowances by phase, cache exceptions, lorebook activation, sidecar requirements, prompt-cache costs, and observable authoring examples. Separate the fixed connection Test from testing a statement against chat messages.

Whole-profile ZIP restoration remains outside the import-notice scope. The docs describe the existing Decision behavior; this PR does not introduce a global spending cap.

Validation

Human verification checklist (intentionally unchecked):

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked light/dark mode, mobile, empty states and error paths
  • Above manual verification completed
  • Read and followed CONTRIBUTING.md

Completed automated checks and review:

  • pnpm check, including localization, formatting, type checks, lint and production build: passed. One existing client hook-dependency warning remains.
  • Decision regressions: 8/8 passed; pnpm regression:prompt: all three regressions passed; capability-package lifecycle regression: passed.
  • Import browser regression: 18/18 passed across desktop Chromium, Android-sized Chromium and iPhone-sized WebKit. Neighboring Decision time-limit and Peek Prompt checks: 6/6 passed. New coverage includes failed/plain imports, mixed batches, selected, missing and unavailable model states, catalog single/bulk installs, existing lorebook imports, themes and Open guide.
  • Sprite browser regression: 6/6 passed across the same three profiles, covering classic and visual-novel presentation, including the touch confirmation that failed in CI.
  • Revised guides opened in all three browser profiles; 6/6 preview checks passed. Checked 36 changed local documentation links. Source-level proofs confirmed Smart roster inputs, custom calibration, cache retry/eviction and Constant + Trigger fallback.
  • Production container build and isolated full/amd64 runtime, native-library and persistence smoke: passed.
  • Local CodeRabbit review of the combined changes: zero findings. The two subsequent GitHub review findings are addressed: #6532 now lists every guide in its body, and a failed model lookup has an explicit unknown-selection notice. Local review of those fixes and the sprite test correction also returned zero findings. Screenshots were visually inspected. WebKit used a temporary copy with libraries from a cached Playwright image on this Fedora host; no host packages were changed.

CI investigation: Updated with staging at 94ee7e6f7. On the previous head, mobile WebKit shard 7 timed out because the sprite test skipped the still-mounting touch confirmation dialog; its trace and final screenshot confirm this, and the test now awaits the dialog. Mobile WebKit shard 9 failed the visual-novel Whisper page-error assertion with fetch access-control errors, matching the known flake in #6628. That unrelated flake remains tracked there.

Full-suite limitation: the unfiltered 1,602-case browser run was stopped after five failures outside the new import tests (Advanced Memory, activation/connection fixtures, Game setup and catalog permissions): 77 passed, 12 interrupted, five skipped and 1,503 not run. This is not a full-suite pass. The focused checks above pass; GitHub CI remains a merge gate.

Manual verification notes

  • Manually import real custom-agent JSON/ZIP files with Decision model set to None and to a working model; verify the warning/info text and guide link.
  • Manually install a real catalog agent with an activation question, individually and in a mixed batch.
  • Review the revised English guides before translation and before using them to write Mari's instructions.

Browser checks used synthetic fixtures and mocked import/install responses, without paid model requests. Hardware requirements were checked against the catalog; no fresh GPU accuracy/performance benchmark was run.

Docs and release impact

  • Updated docs and CHANGELOG.md reviewed
  • Translation follow-up completed after English review
  • Version/release files updated, if needed

All nine changed guides are listed in the body of the existing translation batch. Translation is deferred. No version bump.

UI evidence

Failed Decision lookup notice: before, after on desktop, after on mobile.

Synthetic fixtures; before uses the staging custom-agent panel, after uses this PR. Additional theme screenshots are on a separate evidence branch, outside the application diff.

View Before After
Desktop, dark Before desktop After desktop
Mobile Before mobile After mobile, light theme

Summary by CodeRabbit

  • New Features
    • Imports and Agent catalog installations containing Decision features now show a notice with a link to the Decision Models guide. It warns when no model is selected and provides information if the selection cannot be checked; imports continue either way.
  • Documentation
    • Clarified fallback behavior for Decision features, including agent activation questions, prompt statements, lorebook entries, and Smart response order.
    • Updated guidance on thresholds, answer reuse, request limits, costs, Jev and Open-Jev, and how changing prompt content can affect prompt caching.

🔄 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/6626 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 9/24/2026 **Status:** ✅ Merged **Merged:** 9/24/2026 **Merged by:** [@kolacheee](https://github.com/kolacheee) **Base:** `staging` ← **Head:** `codex/6605-decision-import-notices` --- ### 📝 Commits (7) - [`ceb0b58`](https://github.com/Pasta-Devs/Marinara-Engine/commit/ceb0b581aa6c49f1771ddafc1c2fa24ffc1bee38) docs: track Decision import notice work for #6605 - [`dcc8afd`](https://github.com/Pasta-Devs/Marinara-Engine/commit/dcc8afde54ba97b8dd05180d6a88b5df151bd784) feat: explain Decision dependencies when importing agents - [`9fc99cb`](https://github.com/Pasta-Devs/Marinara-Engine/commit/9fc99cb9bdf1a7d0a5f5b4ba04cdc5dbde9763b7) Merge remote-tracking branch 'origin/staging' into codex/6605-decision-import-notices - [`c7ad3d1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c7ad3d1741d6639b32df86118249eac438759f7b) docs: align Decision model guides with runtime behavior - [`adfe857`](https://github.com/Pasta-Devs/Marinara-Engine/commit/adfe8577a26adaa25a3a2b37ca486033a99c694f) Merge remote-tracking branch 'origin/staging' into codex/6605-decision-import-notices - [`823755b`](https://github.com/Pasta-Devs/Marinara-Engine/commit/823755b2bc4a5539b32cca599f9c9a5e9cecf7b6) fix: address Decision import review and browser CI race - [`f135400`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f135400e8e957d2d7aec27bdad0aa1d6c8de279a) docs: keep sprite CI fix out of release notes ### 📊 Changes **21 files changed** (+394 additions, -84 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `docs/agents/custom-agents.md` (+4 -2) 📝 `docs/chats/group-chats.md` (+3 -1) 📝 `docs/connections/decision-models.md` (+42 -24) 📝 `docs/development/optional-agent-packages.md` (+2 -2) 📝 `docs/lorebooks/entries.md` (+7 -6) 📝 `docs/prompts/conditional-prompts.md` (+47 -25) 📝 `docs/prompts/macros.md` (+1 -1) 📝 `docs/prompts/preset-variables.md` (+1 -1) 📝 `docs/prompts/presets.md` (+1 -1) ➕ `e2e/decision-import-notice.e2e.ts` (+194 -0) 📝 `e2e/expression-active-sprites.e2e.ts` (+7 -2) 📝 `packages/client/src/components/agents/AgentCatalogView.tsx` (+3 -0) 📝 `packages/client/src/components/panels/AgentsPanel.tsx` (+5 -0) 📝 `packages/client/src/hooks/use-capability-packages.ts` (+14 -8) 📝 `packages/client/src/lib/decision-import-notice.ts` (+35 -4) 📝 `packages/client/src/localization/locales/en.json` (+4 -1) 📝 `packages/server/src/routes/capability-packages.routes.ts` (+5 -3) 📝 `packages/server/src/services/capability-packages/package-manager.service.ts` (+4 -1) 📝 `packages/shared/src/utils/macro-engine.ts` (+3 -2) _...and 1 more files_ </details> ### 📄 Description ## Linked issue Closes #6605 ## Why this change Imported agents can depend on a Decision model without explaining what happens when none is selected. Users then see agents running unexpectedly or prompt branches missing. The Decision/Jev guides also made stronger promises about thresholds, request limits, answer reuse and provider inputs than the implementation supports. This PR adds the import guidance and corrects the English authoring docs together, before translation or Mari's Decision instructions. ## What changed - Reuse one localized notice across existing content imports, custom agents, and single/bulk Agent catalog installs. Missing-model warnings explain prompt, lorebook and activation-question fallbacks; informational notices explain hosted costs. If the settings lookup fails, a neutral notice says the model selection could not be checked and preserves the successful import. All three open the in-app Decision Models guide. - Detect activation questions and prompt statements in successfully imported content. Catalog installs report usage from verified package definitions, including updates awaiting restart. Failed/plain imports remain quiet and mixed batches notify once. - Fix the intermittent sprite browser check: on touch devices, wait for the Regenerate confirmation before waiting for generation. The failed CI trace shows the old immediate visibility check returned false before the dialog mounted. - Correct nine guides: Jev versus Open-Jev, Smart order's character roster, backend threshold defaults, allowances by phase, cache exceptions, lorebook activation, sidecar requirements, prompt-cache costs, and observable authoring examples. Separate the fixed connection Test from testing a statement against chat messages. Whole-profile ZIP restoration remains outside the import-notice scope. The docs describe the existing Decision behavior; this PR does not introduce a global spending cap. ## Validation Human verification checklist (intentionally unchecked): - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked light/dark mode, mobile, empty states and error paths - [ ] Above manual verification completed - [ ] Read and followed `CONTRIBUTING.md` Completed automated checks and review: - `pnpm check`, including localization, formatting, type checks, lint and production build: passed. One existing client hook-dependency warning remains. - Decision regressions: 8/8 passed; `pnpm regression:prompt`: all three regressions passed; capability-package lifecycle regression: passed. - Import browser regression: 18/18 passed across desktop Chromium, Android-sized Chromium and iPhone-sized WebKit. Neighboring Decision time-limit and Peek Prompt checks: 6/6 passed. New coverage includes failed/plain imports, mixed batches, selected, missing and unavailable model states, catalog single/bulk installs, existing lorebook imports, themes and Open guide. - Sprite browser regression: 6/6 passed across the same three profiles, covering classic and visual-novel presentation, including the touch confirmation that failed in CI. - Revised guides opened in all three browser profiles; 6/6 preview checks passed. Checked 36 changed local documentation links. Source-level proofs confirmed Smart roster inputs, custom calibration, cache retry/eviction and Constant + Trigger fallback. - Production container build and isolated full/amd64 runtime, native-library and persistence smoke: passed. - Local CodeRabbit review of the combined changes: zero findings. The two subsequent GitHub review findings are addressed: #6532 now lists every guide in its body, and a failed model lookup has an explicit unknown-selection notice. Local review of those fixes and the sprite test correction also returned zero findings. Screenshots were visually inspected. WebKit used a temporary copy with libraries from a cached Playwright image on this Fedora host; no host packages were changed. **CI investigation:** Updated with `staging` at `94ee7e6f7`. On the previous head, [mobile WebKit shard 7](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/36027227843/job/107726822933) timed out because the sprite test skipped the still-mounting touch confirmation dialog; its trace and final screenshot confirm this, and the test now awaits the dialog. [Mobile WebKit shard 9](https://github.com/Pasta-Devs/Marinara-Engine/actions/runs/36027227843/job/107726823008) failed the visual-novel Whisper page-error assertion with fetch access-control errors, matching the known flake in #6628. That unrelated flake remains tracked there. **Full-suite limitation:** the unfiltered 1,602-case browser run was stopped after five failures outside the new import tests (Advanced Memory, activation/connection fixtures, Game setup and catalog permissions): 77 passed, 12 interrupted, five skipped and 1,503 not run. This is not a full-suite pass. The focused checks above pass; GitHub CI remains a merge gate. ### Manual verification notes - [ ] Manually import real custom-agent JSON/ZIP files with Decision model set to None and to a working model; verify the warning/info text and guide link. - [ ] Manually install a real catalog agent with an activation question, individually and in a mixed batch. - [ ] Review the revised English guides before translation and before using them to write Mari's instructions. Browser checks used synthetic fixtures and mocked import/install responses, without paid model requests. Hardware requirements were checked against the catalog; no fresh GPU accuracy/performance benchmark was run. ## Docs and release impact - [ ] Updated docs and `CHANGELOG.md` reviewed - [ ] Translation follow-up completed after English review - [ ] Version/release files updated, if needed All nine changed guides are listed in the body of [the existing translation batch](https://github.com/Pasta-Devs/Marinara-Engine/issues/6532). Translation is deferred. No version bump. ## UI evidence Failed Decision lookup notice: [before](https://raw.githubusercontent.com/kolacheee/Marinara-Engine-kolacheee/8a760f712d9d83b2beeddd0573d7ecf66527255d/unknown-before-desktop.png), [after on desktop](https://raw.githubusercontent.com/kolacheee/Marinara-Engine-kolacheee/8a760f712d9d83b2beeddd0573d7ecf66527255d/unknown-after-desktop-chromium-light.png), [after on mobile](https://raw.githubusercontent.com/kolacheee/Marinara-Engine-kolacheee/8a760f712d9d83b2beeddd0573d7ecf66527255d/unknown-after-mobile-chromium-light.png). Synthetic fixtures; before uses the staging custom-agent panel, after uses this PR. Additional theme screenshots are on a separate evidence branch, outside the application diff. | View | Before | After | | --- | --- | --- | | Desktop, dark | ![Before desktop](https://raw.githubusercontent.com/kolacheee/Marinara-Engine-kolacheee/ee901d8fa69b7ecf03e95c75f6380b57fcaabf35/before-desktop-chromium.png) | ![After desktop](https://raw.githubusercontent.com/kolacheee/Marinara-Engine-kolacheee/ee901d8fa69b7ecf03e95c75f6380b57fcaabf35/after-desktop-chromium-dark.png) | | Mobile | <img src="https://raw.githubusercontent.com/kolacheee/Marinara-Engine-kolacheee/ee901d8fa69b7ecf03e95c75f6380b57fcaabf35/before-mobile-chromium.png" width="195" alt="Before mobile"> | <img src="https://raw.githubusercontent.com/kolacheee/Marinara-Engine-kolacheee/ee901d8fa69b7ecf03e95c75f6380b57fcaabf35/after-mobile-chromium-light.png" width="195" alt="After mobile, light theme"> | <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Imports and Agent catalog installations containing Decision features now show a notice with a link to the Decision Models guide. It warns when no model is selected and provides information if the selection cannot be checked; imports continue either way. * **Documentation** * Clarified fallback behavior for Decision features, including agent activation questions, prompt statements, lorebook entries, and Smart response order. * Updated guidance on thresholds, answer reuse, request limits, costs, Jev and Open-Jev, and how changing prompt content can affect prompt caching. <!-- 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:00 +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#7259
No description provided.