[PR #7597] [MERGED] fix(agents): show only what affects the 2D and 3D Avatars on their pages #7826

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/7597
Author: @SpicyMarinara
Created: 10/14/2026
Status: ✅ Merged
Merged: 10/14/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/avatar-agents-no-context-sources


📝 Commits (2)

  • 3f92285 fix(agents): hide Context sources on the 2D and 3D Avatars pages
  • 23f3f3c fix(agents): show only what affects the 2D and 3D Avatars on their pages

📊 Changes

3 files changed (+292 additions, -211 deletions)

View changed files

📝 e2e/avatar-setup.e2e.ts (+64 -1)
📝 packages/client/src/components/agents/AgentEditor.tsx (+226 -208)
📝 scripts/regressions/prompt.regression.ts (+2 -2)

📄 Description

Important

Contributions target staging. Only SpicyMarinara may promote this repository's staging branch or a same-repository hotfix/* branch to main.
Outside and first-time contributors also require an approving review from SpicyMarinara.

Linked issue

No linked issue: asked by the maintainer on 2026-10-14. She decided the same day which sections stay.

Why this change

  • The 2D Avatars and 3D Avatars pages showed every setting a pipeline agent has: Pipeline Phase, Context Sources, Agent Budget, Add as Prompt Section, Prompt Template with Named prompt options, Tools, and Connection Override with "Share requests with other agents". Almost none of them do anything for these agents, so the pages suggested settings that change nothing.
  • The avatar agents never run in the agent pipeline. Both packages are execution: "host", and the pipeline skips host agents (agent-resolution.ts:412 and :593, retry-agents-route.ts:1684 and :1694). The Engine draws the avatars, and faces come from the local mood reader or the Game Master's expressions. No chat context, prompt or tool call is ever sent for them.
  • "Add as Prompt Section" was misleading as well: turning it on adds the agent as a marker in the Preset editor (PresetEditor.tsx:1286-1292), and that marker is always empty because the agent never produces output.
  • The one setting that does matter is the 2D agent's connection. The Mesh Avatar Layout uses it as its vision connection when the setup's picker is left on "The agent's connection" (generation-context.ts:224, mesh-rig.ts:175), so it stays on the 2D page.

What changed

  • Both avatar pages (AgentEditor.tsx) no longer show:
    • Pipeline Phase (L2265)
    • Context Sources (L2433)
    • "Share requests with other agents" inside Connection Override (L2734)
    • Agent Budget: context size and max output tokens (L2911)
    • Add as Prompt Section (L3413)
    • Prompt Template and its Named prompt options (L4334)
    • Tools / Function Calling (L4508)
  • 3D Avatars also no longer shows Connection Override (L2681). Nothing reads the 3D agent's connection.
  • 2D Avatars keeps Connection Override, without the batching switch.
  • Both pages still show Description and Author, and the Avatars setup.
  • One flag, isAvatarAgent (L1966), drives every condition, including the existing Avatars setup check.
  • Every other agent's page is unchanged.
  • Saved agent settings are unchanged. The hidden fields keep their loaded values, so saving an avatar page writes what it wrote before.
  • The avatar setup e2e now checks that both avatar pages leave out all of these sections and the batching switch, that Connection Override shows on 2D only, and that a normal agent's page still shows every one of them.
  • prompt.regression.ts: two Storyboard source checks matched the old guard text {!isStoryboardAgent && ( for Agent Budget and {!isStoryboardAgent ? ( for Prompt Template. Only their expected text changed, to include the new !isAvatarAgent clause. They still check that Storyboard hides both sections.

What I confirmed in code for each hidden setting, for these two agents:

  • Pipeline Phase, batching, Agent Budget, Tools: they are read only for resolved pipeline agents (agent-executor.ts, tool-resolution-runtime.ts, generate.routes.ts:5419, :5520 and :12286), and the pipeline never includes host agents. The mesh layout uses a fixed 1500-token limit (mesh-rig.ts:149), not the agent's budget. The packages ship defaultTools: [].
  • Prompt Template and Named prompt options: these are stored in promptTemplate and settings.promptTemplates. The 2D agent's real prompts (blink, talking, mesh layout) are in settings.avatarGenerationTemplates (generation-context.ts:222), a separate key. The only other read is the macro preload scan (generate.routes.ts:3049), which does not send the text anywhere.
  • Add as Prompt Section: it only lists the agent as a Preset editor marker (PresetEditor.tsx:1292). The Roleplay HUD reads it for custom agents only (RoleplayHUDActionsMenu.tsx:546 and :603).
  • 3D Connection Override: the server only reads the 2D agent's connection (generation-context.ts:220-224). The picture tools appear only on the 2D page (AvatarAgentSetup.tsx:309).

The previous "Not changed (for the maintainer to decide)" list is gone. Mari decided on 2026-10-14 to hide all of those sections and keep the 2D connection.

Validation

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

Commands run by the agent (results as reported locally, not human-verified):

  • playwright test e2e/avatar-setup.e2e.ts -g "agent pipeline" --project=desktop-chromium, with the new test and without the AgentEditor.tsx change: failed as expected. On the 2D Avatars page it found 1 "Pipeline Phase" heading where it expected 0.
  • With the change: playwright test e2e/avatar-setup.e2e.ts --project=desktop-chromium --project=mobile-chromium: 6 passed (all three tests in the file on both projects). The new test also passed on mobile-webkit.
  • pnpm regression:prompt: failed first on the Storyboard source check described above. After that expectation update: passed (3/3).
  • run-regressions --filter for avatar-stage-logic, open-issues and prompt-token-counters (the other regressions that read AgentEditor.tsx): passed.
  • pnpm localization:check: passed (no new or changed copy).
  • pnpm check: passed. Its one lint warning is already on staging, in HomeProfessorMariChat.tsx.
  • Local CodeRabbit (coderabbit review --agent --committed): 1 finding (trivial), rejected. It asked for 16px text on the Connection Override select so phones don't zoom on focus. This PR doesn't change that select, it only wraps it. On touch screens, globals.css:7157-7161 (@media (pointer: coarse), outside any layer) already sets every select to 1rem, and the mobile-webkit screenshot taken during the e2e run shows the larger text.

Manual verification notes

  • Manually verify in the browser: open Agents → 2D Avatars. The page should show only Description, Avatars and Connection Override. Connection Override should have no "Share requests with other agents" switch.
  • Manually verify Agents → 3D Avatars shows only Description and Avatars.
  • Manually verify that another agent's page (for example World State, or any custom agent) still shows Pipeline Phase, Context Sources, Connection Override with the batching switch, Agent Budget, Add as Prompt Section, Prompt Template with Named prompt options, and Tools.
  • Manually verify that on 2D Avatars, a connection picked in Connection Override is still used by Make an avatar from a sprite → mesh avatar when its vision picker is left on "The agent's connection".
  • Manually verify that pressing Save on either avatar page still saves, and that an avatar set up before this change still works.
  • Manually verify that at phone width both avatar pages lay out cleanly.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

docs/agents/avatars.md doesn't describe any of the hidden sections. Its mention of "the connection set on the 2D Avatars page" (L146) is still accurate.

UI evidence (if applicable)

Not attached. The e2e checks each section directly. Screenshots taken locally during the run showed 2D Avatars with Description, Avatars and Connection Override only, and 3D Avatars with Description and Avatars only.


🔄 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/7597 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 10/14/2026 **Status:** ✅ Merged **Merged:** 10/14/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/avatar-agents-no-context-sources` --- ### 📝 Commits (2) - [`3f92285`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3f9228556c7a4cdd9307403bf9982829f20be034) fix(agents): hide Context sources on the 2D and 3D Avatars pages - [`23f3f3c`](https://github.com/Pasta-Devs/Marinara-Engine/commit/23f3f3c886fc4e80c8e236ed884a275ccbe4e632) fix(agents): show only what affects the 2D and 3D Avatars on their pages ### 📊 Changes **3 files changed** (+292 additions, -211 deletions) <details> <summary>View changed files</summary> 📝 `e2e/avatar-setup.e2e.ts` (+64 -1) 📝 `packages/client/src/components/agents/AgentEditor.tsx` (+226 -208) 📝 `scripts/regressions/prompt.regression.ts` (+2 -2) </details> ### 📄 Description > [!IMPORTANT] > Contributions target `staging`. Only `SpicyMarinara` may promote this repository's `staging` branch or a same-repository `hotfix/*` branch to `main`. > Outside and first-time contributors also require an approving review from `SpicyMarinara`. <!-- See CONTRIBUTING.md § Branches. --> ## Linked issue No linked issue: asked by the maintainer on 2026-10-14. She decided the same day which sections stay. ## Why this change - The 2D Avatars and 3D Avatars pages showed every setting a pipeline agent has: Pipeline Phase, Context Sources, Agent Budget, Add as Prompt Section, Prompt Template with Named prompt options, Tools, and Connection Override with "Share requests with other agents". Almost none of them do anything for these agents, so the pages suggested settings that change nothing. - The avatar agents never run in the agent pipeline. Both packages are `execution: "host"`, and the pipeline skips host agents (`agent-resolution.ts:412` and `:593`, `retry-agents-route.ts:1684` and `:1694`). The Engine draws the avatars, and faces come from the local mood reader or the Game Master's expressions. No chat context, prompt or tool call is ever sent for them. - "Add as Prompt Section" was misleading as well: turning it on adds the agent as a marker in the Preset editor (`PresetEditor.tsx:1286-1292`), and that marker is always empty because the agent never produces output. - The one setting that does matter is the 2D agent's connection. The Mesh Avatar Layout uses it as its vision connection when the setup's picker is left on "The agent's connection" (`generation-context.ts:224`, `mesh-rig.ts:175`), so it stays on the 2D page. ## What changed - **Both avatar pages** (`AgentEditor.tsx`) no longer show: - Pipeline Phase (L2265) - Context Sources (L2433) - "Share requests with other agents" inside Connection Override (L2734) - Agent Budget: context size and max output tokens (L2911) - Add as Prompt Section (L3413) - Prompt Template and its Named prompt options (L4334) - Tools / Function Calling (L4508) - **3D Avatars** also no longer shows Connection Override (L2681). Nothing reads the 3D agent's connection. - **2D Avatars** keeps Connection Override, without the batching switch. - Both pages still show Description and Author, and the Avatars setup. - One flag, `isAvatarAgent` (L1966), drives every condition, including the existing Avatars setup check. - Every other agent's page is unchanged. - Saved agent settings are unchanged. The hidden fields keep their loaded values, so saving an avatar page writes what it wrote before. - The avatar setup e2e now checks that both avatar pages leave out all of these sections and the batching switch, that Connection Override shows on 2D only, and that a normal agent's page still shows every one of them. - `prompt.regression.ts`: two Storyboard source checks matched the old guard text `{!isStoryboardAgent && (` for Agent Budget and `{!isStoryboardAgent ? (` for Prompt Template. Only their expected text changed, to include the new `!isAvatarAgent` clause. They still check that Storyboard hides both sections. What I confirmed in code for each hidden setting, for these two agents: - **Pipeline Phase, batching, Agent Budget, Tools:** they are read only for resolved pipeline agents (`agent-executor.ts`, `tool-resolution-runtime.ts`, `generate.routes.ts:5419`, `:5520` and `:12286`), and the pipeline never includes host agents. The mesh layout uses a fixed 1500-token limit (`mesh-rig.ts:149`), not the agent's budget. The packages ship `defaultTools: []`. - **Prompt Template and Named prompt options:** these are stored in `promptTemplate` and `settings.promptTemplates`. The 2D agent's real prompts (blink, talking, mesh layout) are in `settings.avatarGenerationTemplates` (`generation-context.ts:222`), a separate key. The only other read is the macro preload scan (`generate.routes.ts:3049`), which does not send the text anywhere. - **Add as Prompt Section:** it only lists the agent as a Preset editor marker (`PresetEditor.tsx:1292`). The Roleplay HUD reads it for custom agents only (`RoleplayHUDActionsMenu.tsx:546` and `:603`). - **3D Connection Override:** the server only reads the 2D agent's connection (`generation-context.ts:220-224`). The picture tools appear only on the 2D page (`AvatarAgentSetup.tsx:309`). The previous "Not changed (for the maintainer to decide)" list is gone. Mari decided on 2026-10-14 to hide all of those sections and keep the 2D connection. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Commands run by the agent (results as reported locally, not human-verified): - `playwright test e2e/avatar-setup.e2e.ts -g "agent pipeline" --project=desktop-chromium`, with the new test and without the `AgentEditor.tsx` change: **failed** as expected. On the 2D Avatars page it found 1 "Pipeline Phase" heading where it expected 0. - With the change: `playwright test e2e/avatar-setup.e2e.ts --project=desktop-chromium --project=mobile-chromium`: **6 passed** (all three tests in the file on both projects). The new test also **passed** on `mobile-webkit`. - `pnpm regression:prompt`: **failed** first on the Storyboard source check described above. After that expectation update: **passed** (3/3). - `run-regressions --filter` for `avatar-stage-logic`, `open-issues` and `prompt-token-counters` (the other regressions that read `AgentEditor.tsx`): **passed**. - `pnpm localization:check`: **passed** (no new or changed copy). - `pnpm check`: **passed**. Its one lint warning is already on staging, in `HomeProfessorMariChat.tsx`. - Local CodeRabbit (`coderabbit review --agent --committed`): **1 finding (trivial), rejected.** It asked for 16px text on the Connection Override select so phones don't zoom on focus. This PR doesn't change that select, it only wraps it. On touch screens, `globals.css:7157-7161` (`@media (pointer: coarse)`, outside any layer) already sets every `select` to `1rem`, and the mobile-webkit screenshot taken during the e2e run shows the larger text. ### Manual verification notes - Manually verify in the browser: open Agents → 2D Avatars. The page should show only Description, Avatars and Connection Override. Connection Override should have no "Share requests with other agents" switch. - Manually verify Agents → 3D Avatars shows only Description and Avatars. - Manually verify that another agent's page (for example World State, or any custom agent) still shows Pipeline Phase, Context Sources, Connection Override with the batching switch, Agent Budget, Add as Prompt Section, Prompt Template with Named prompt options, and Tools. - Manually verify that on 2D Avatars, a connection picked in Connection Override is still used by **Make an avatar from a sprite → mesh avatar** when its vision picker is left on "The agent's connection". - Manually verify that pressing Save on either avatar page still saves, and that an avatar set up before this change still works. - Manually verify that at phone width both avatar pages lay out cleanly. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) `docs/agents/avatars.md` doesn't describe any of the hidden sections. Its mention of "the connection set on the 2D Avatars page" (L146) is still accurate. ## UI evidence (if applicable) Not attached. The e2e checks each section directly. Screenshots taken locally during the run showed 2D Avatars with Description, Avatars and Connection Override only, and 3D Avatars with Description and Avatars only. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-24 04:07:54 +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#7826
No description provided.