[PR #404] [MERGED] chore: remove leftover game-master and party-player agent references #4608

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/404
Author: @cha1latte
Created: 5/4/2026
Status: ✅ Merged
Merged: 5/4/2026
Merged by: @SpicyMarinara

Base: main ← Head: chore/remove-game-master-leftovers


📝 Commits (2)

  • f63a252 chore: remove leftover game-master and party-player agent references
  • 2baf0ac Merge branch 'main' into chore/remove-game-master-leftovers

📊 Changes

3 files changed (+3 additions, -10 deletions)

View changed files

📝 packages/client/src/components/panels/AgentsPanel.tsx (+2 -5)
📝 packages/shared/src/constants/chat-modes.ts (+1 -1)
📝 packages/shared/src/types/agent.ts (+0 -4)

📄 Description

Summary

Cleanup of dead references that survived the Game Master / Party Player
removal. Three packages still carried these IDs in places that are either
unused or defensive no-ops. No user-facing behavior change.

What this PR removes

  • packages/shared/src/types/agent.ts — BUILT_IN_AGENT_IDS.GAME_MASTER
    and .PARTY_PLAYER enum keys (no callers in the repo), and the matching
    "game-master" / "party-player" entries in DEFAULT_AGENT_TOOLS (all
    consumers use ?? [] fallbacks, so missing keys resolve safely for any
    legacy stored agent rows).
  • packages/shared/src/constants/chat-modes.ts — "game-master" and
    "party-player" strings from CHAT_MODES.game.defaultAgents. The
    defaultAgents field has no consumers anywhere in the repo, so this is
    pure dead-data cleanup; behavior is unchanged.
  • packages/client/src/components/panels/AgentsPanel.tsx — the
    HIDDEN_BUILT_IN_AGENT_IDS / VISIBLE_BUILT_IN_AGENTS filter pair. It
    was filtering IDs that are no longer present in BUILT_IN_AGENTS, so the
    filter was a no-op against an unchanged list. Both call sites now use
    BUILT_IN_AGENTS directly.

Why now

While auditing for visible-but-non-functional UI surfaces, I traced these
references and confirmed each one has no live consumer. They're harmless,
but they read as if Game-mode chats might still try to spin up phantom
agents — which is misleading to anyone reading the code cold.

Why this is safe (verification I ran locally)

  • defaultAgents — git grep defaultAgents returns only the type field
    and the four mode definitions in chat-modes.ts. Nothing reads it.
  • BUILT_IN_AGENT_IDS.GAME_MASTER / .PARTY_PLAYER — no dotted accesses
    anywhere in the repo.
  • DEFAULT_AGENT_TOOLS["game-master"] / ["party-player"] — the only key
    paths into this map are agent.id (always from BUILT_IN_AGENTS,
    which doesn't contain these) and dbConfig.type (legacy-data fallback,
    guarded by ?? []).
  • HIDDEN_BUILT_IN_AGENT_IDS filter — the IDs it filters are not in
    BUILT_IN_AGENTS, so removing the filter changes nothing about what
    the panel renders.
  • pnpm check passes on this branch.

Test plan

  • Manually verify the Agents & Tools panel still lists all built-in
    agents grouped by category and by status, identical to main.
    Verified locally: all 28 agents present (8 Writer, 9 Tracker, 11 Misc).
    No Game Master / Party Player entries anywhere in the panel.
  • Manually verify creating a new Game-mode chat works and seeds the
    same default agents users see today.
    Verified locally: New Game Setup wizard opens cleanly, Step 1
    (Genre & Setting) and Step 2 (Party & GM) render correctly with no
    broken state, no phantom agent dropdowns. Wizard's GM picker uses
    Standalone/Character mode and the party picker uses character
    records — neither path touches the removed agent constants.
  • Manually verify any user with a legacy stored agent config row of
    type game-master or party-player still loads without error.

    n/a — no legacy rows exist in the test profile to exercise this
    path. DEFAULT_AGENT_TOOLS consumers all use ?? [] fallbacks
    (verified by code review), so the path is provably safe.

Summary by CodeRabbit

  • Changes
    • Updated the roster of built-in agents displayed in the Agents panel.
    • Modified the default agent configuration for game mode chat sessions.

🔄 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/404 **Author:** [@cha1latte](https://github.com/cha1latte) **Created:** 5/4/2026 **Status:** ✅ Merged **Merged:** 5/4/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `main` ← **Head:** `chore/remove-game-master-leftovers` --- ### 📝 Commits (2) - [`f63a252`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f63a2520551816fd205f1566497767eed92aa22c) chore: remove leftover game-master and party-player agent references - [`2baf0ac`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2baf0ac02b64f7e9ad66940967bbade18fd50917) Merge branch 'main' into chore/remove-game-master-leftovers ### 📊 Changes **3 files changed** (+3 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/panels/AgentsPanel.tsx` (+2 -5) 📝 `packages/shared/src/constants/chat-modes.ts` (+1 -1) 📝 `packages/shared/src/types/agent.ts` (+0 -4) </details> ### 📄 Description ## Summary Cleanup of dead references that survived the Game Master / Party Player removal. Three packages still carried these IDs in places that are either unused or defensive no-ops. No user-facing behavior change. ### What this PR removes - **`packages/shared/src/types/agent.ts`** — `BUILT_IN_AGENT_IDS.GAME_MASTER` and `.PARTY_PLAYER` enum keys (no callers in the repo), and the matching `"game-master"` / `"party-player"` entries in `DEFAULT_AGENT_TOOLS` (all consumers use `?? []` fallbacks, so missing keys resolve safely for any legacy stored agent rows). - **`packages/shared/src/constants/chat-modes.ts`** — `"game-master"` and `"party-player"` strings from `CHAT_MODES.game.defaultAgents`. The `defaultAgents` field has no consumers anywhere in the repo, so this is pure dead-data cleanup; behavior is unchanged. - **`packages/client/src/components/panels/AgentsPanel.tsx`** — the `HIDDEN_BUILT_IN_AGENT_IDS` / `VISIBLE_BUILT_IN_AGENTS` filter pair. It was filtering IDs that are no longer present in `BUILT_IN_AGENTS`, so the filter was a no-op against an unchanged list. Both call sites now use `BUILT_IN_AGENTS` directly. ### Why now While auditing for visible-but-non-functional UI surfaces, I traced these references and confirmed each one has no live consumer. They're harmless, but they read as if Game-mode chats might still try to spin up phantom agents — which is misleading to anyone reading the code cold. ### Why this is safe (verification I ran locally) - `defaultAgents` — `git grep defaultAgents` returns only the type field and the four mode definitions in `chat-modes.ts`. Nothing reads it. - `BUILT_IN_AGENT_IDS.GAME_MASTER` / `.PARTY_PLAYER` — no dotted accesses anywhere in the repo. - `DEFAULT_AGENT_TOOLS["game-master"]` / `["party-player"]` — the only key paths into this map are `agent.id` (always from `BUILT_IN_AGENTS`, which doesn't contain these) and `dbConfig.type` (legacy-data fallback, guarded by `?? []`). - `HIDDEN_BUILT_IN_AGENT_IDS` filter — the IDs it filters are not in `BUILT_IN_AGENTS`, so removing the filter changes nothing about what the panel renders. - `pnpm check` passes on this branch. ## Test plan - [x] Manually verify the Agents & Tools panel still lists all built-in agents grouped by category and by status, identical to `main`. _Verified locally: all 28 agents present (8 Writer, 9 Tracker, 11 Misc). No Game Master / Party Player entries anywhere in the panel._ - [x] Manually verify creating a new Game-mode chat works and seeds the same default agents users see today. _Verified locally: New Game Setup wizard opens cleanly, Step 1 (Genre & Setting) and Step 2 (Party & GM) render correctly with no broken state, no phantom agent dropdowns. Wizard's GM picker uses Standalone/Character mode and the party picker uses character records — neither path touches the removed agent constants._ - [ ] ~~Manually verify any user with a legacy stored agent config row of type `game-master` or `party-player` still loads without error.~~ **n/a** — no legacy rows exist in the test profile to exercise this path. `DEFAULT_AGENT_TOOLS` consumers all use `?? []` fallbacks (verified by code review), so the path is provably safe. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Changes** * Updated the roster of built-in agents displayed in the Agents panel. * Modified the default agent configuration for game mode chat sessions. <!-- 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-22 04:09:07 +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#4608
No description provided.