[PR #3508] [MERGED] fix: remove settings, fields, and switches that silently do nothing #5971

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

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3508
Author: @kolacheee
Created: 7/12/2026
Status: ✅ Merged
Merged: 7/12/2026
Merged by: @SpicyMarinara

Base: staging ← Head: fix/3487-silent-noops


📝 Commits (3)

  • 68e0afe fix: remove settings, fields, and switches that silently do nothing (#3487)
  • cd19c5f fix: drop orphaned ElementPresetName type and stale soundboard doc wording
  • a34fca8 Merge remote-tracking branch 'origin/staging' into integrate-pr-3508

📊 Changes

22 files changed (+46 additions, -685 deletions)

View changed files

📝 docs/conversation/calls.md (+2 -2)
📝 packages/client/src/components/chat/ConversationCallSurface.tsx (+18 -47)
📝 packages/client/src/components/game/GameNarration.tsx (+5 -9)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+0 -1)
📝 packages/client/src/components/panels/settings/TTSConfigCard.tsx (+1 -3)
📝 packages/client/src/components/presets/PresetEditor.tsx (+0 -12)
📝 packages/client/src/features/tracker-panel/components/sections/WorldStatePanel.tsx (+1 -1)
📝 packages/client/src/features/tracker-panel/lib/world-state-display.ts (+1 -10)
📝 packages/client/src/hooks/use-game.ts (+0 -1)
📝 packages/client/src/lib/tts-dialogue.ts (+7 -16)
📝 packages/server/src/routes/bot-browser-chartavern.routes.ts (+1 -1)
📝 packages/server/src/routes/bot-browser-datacat.routes.ts (+1 -1)
📝 packages/server/src/routes/bot-browser-janny.routes.ts (+1 -1)
📝 packages/server/src/routes/bot-browser-pygmalion.routes.ts (+1 -1)
📝 packages/server/src/routes/bot-browser-wyvern.routes.ts (+1 -1)
📝 packages/server/src/routes/bot-browser.routes.ts (+1 -1)
📝 packages/server/src/routes/game.routes.ts (+2 -252)
📝 packages/server/src/routes/updates.routes.ts (+0 -1)
📝 packages/server/src/services/game/element-reactions.service.ts (+2 -315)
📝 packages/server/src/utils/security.ts (+1 -1)

...and 2 more files

📄 Description

Linked issue

Closes #3487 (together with already-open PR #3499, which covers the env-watcher SPRITE_ANIMATED_FFMPEG_TIMEOUT_MS item — the only catalogue entry not in this PR).

Why this change

Controls that silently do nothing break user trust and mislead agents into building on inert toggles. This PR removes the remaining nine no-op surfaces from the #3487 catalogue. Every item was re-verified against current staging (the catalogue was verified 129 commits ago) and traced through git history before removal — each one is a deliberately-dismantled or born-dead surface, not a dropped wire-up, and the reasoning per item is in the commit message.

What changed

  • updates /apply: the currentBuild body field was never read by the handler (the build label is exactly currentVersion+currentCommit, both already validated); removed from the body type and the client sender. Old clients still sending it remain compatible (no runtime schema rejects unknown keys).
  • TTS dialogue scope: ttsConfigMatchesSpeaker returned true unconditionally since its first commit, so the dialogueScope/dialogueCharacterName config fields gated nothing in any shipped version; removed the stub, its four call-site gates, and the schema fields. Stored configs carrying the stale keys parse fine (zod strips unknown keys). Game voice-line cache keys are preserved byte-for-byte via fixed placeholders in buildVoiceConfigSignature, so no user pays TTS regeneration cost.
  • world-state display: getWorldAmbienceStyle ignored its state argument since 454cfcfb5 deliberately replaced dynamic ambience with the user-controlled tracker-panel background theming; the signature now says so. Two keyword branches that returned their own fallback value collapsed (the cherry-blossom/aurora pair differs from its fallback and is untouched). This also covers the two world-state-display entries from #3488's no-op-branch list.
  • element reactions: the genshin/hsr presets were unreachable — nothing ever writes gameSetupConfig.elementPreset (the setup schema strips it), and the two /game/elements discovery endpoints had zero callers. Removed presets, endpoints, and the orphaned shared ElementPresetName type. Maintainer note: this was flagged as a plausibly-staged feature (the client renderer has display support for these element ids, which is kept — the GM can emit arbitrary element strings); removal over wire-up was an explicit ruling by @kolacheee. The live default-preset combat threading is deliberately untouched to avoid modifying live damage-resolution code.
  • PresetEditor: the parameters round-trip is a leftover from the Parameters tab removed in v1.4.0. The server PATCH is field-conditional and merging, so omitting the field preserves imported ST/Marinara parameters exactly — and removal closes a real stale-snapshot clobber vector between two concurrently-open editors. The server-side parameters field is live generation data and is untouched.
  • game /create: characterConnectionId was accepted, destructured, and discarded (the write hardcoded null) — the character-connection tier was deliberately dismantled in v1.5.5. Removed the schema field, destructure, null metadata write, and client type. Third-party senders get silent zod stripping, identical net effect to today.
  • resolveValidatedImage: the contentTypeHeader param was never read (a 2f3bef600 refactor remnant); all six bot-browser callers passed it under the impression it validates. Magic-byte sniffing is the authoritative check and the signature now admits it. AVIF behavior unchanged (these endpoints never accepted AVIF, before or after the helper existed).
  • ConversationCallSurface: soundboardEnabled = true (upstream #3310 committed to always-on and removed one guard itself — this finishes that cleanup), the write-only Participant.canSpeak field, and the command-message formatting switch that visibleCallMessages filters out before the only render site. Live command execution (the turn handler) is a separate, untouched path. Covers the #3488 command-switch entry.
  • scene-wrap inline asset generation (~185 lines): generateSceneWrapAssetsInline = false was born false in 0b7e03c68 — the same commit that built the richer deferred /game/generate-assets replacement — and the route's own comment documents why inline generation is architecturally wrong here (client scene-analysis timeout). The unreachable branches had been hand-mirrored through 6+ refactors to keep compiling. Also deletes the orphaned applyGeneratedIllustration helper, and stops per-character sprite-file disk reads on every scene-wrap request that only fed never-read maps (pure perf win).

Two adversarial-review follow-ups included: the orphaned ElementPresetName shared type, and two docs/conversation/calls.md lines that described a soundboard enable condition that doesn't exist.

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

Manual verification notes

Validation performed: every item re-verified against current staging by a dedicated read-only verification pass (repo-wide consumer searches including dynamic dispatch, plus git-history intent tracing), exact-match scripted edits with assertions, pnpm check after each batch, and a 6-lens adversarial review of the final diff (regression / orphan / scope lenses per branch) whose findings were fixed in the second commit.

Manual checks still worth doing in a browser:

  • Manually verify a conversation call: soundboard button opens/plays sounds, call messages render, TTS speaks dialogue with "Only read dialogues" on and off.
  • Manually verify game mode: scene-wrap still resolves backgrounds/illustrations via the deferred /game/generate-assets flow, and combat rounds still apply element reactions (default preset).
  • Manually verify a preset edit + save preserves generation parameters on a preset imported from SillyTavern.
  • Manually verify the updates panel Apply flow still works (server ignores the removed field either way).

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

(Two in-app guide lines in docs/conversation/calls.md were corrected as part of the change itself; no README/CHANGELOG impact.)

UI evidence (if applicable)

No visual changes — all removals are of surfaces that never rendered or never had any effect. The soundboard button renders identically (it was gated by a hardcoded true).

Summary by CodeRabbit

  • New Features
    • Soundboard controls are now consistently available during calls, including sound uploads with supported formats and file-size guidance.
    • Missing scene backgrounds and illustrations can be generated after scene preparation, improving scene-loading flow.
  • Bug Fixes
    • Improved avatar image validation for proxied character images.
    • Updated voice playback and caching to provide more consistent dialogue narration.
  • Changes
    • Removed legacy element-reaction presets and preset parameter editing.
    • Simplified text-to-speech settings by removing dialogue-scope options.

🔄 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/3508 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 7/12/2026 **Status:** ✅ Merged **Merged:** 7/12/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3487-silent-noops` --- ### 📝 Commits (3) - [`68e0afe`](https://github.com/Pasta-Devs/Marinara-Engine/commit/68e0afeb2c4f1effa2a81bc09929f7bd45e7669e) fix: remove settings, fields, and switches that silently do nothing (#3487) - [`cd19c5f`](https://github.com/Pasta-Devs/Marinara-Engine/commit/cd19c5faf364787d2120d860bbf76a2a94efb02d) fix: drop orphaned ElementPresetName type and stale soundboard doc wording - [`a34fca8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a34fca8444b630164603398f698231c55808eb45) Merge remote-tracking branch 'origin/staging' into integrate-pr-3508 ### 📊 Changes **22 files changed** (+46 additions, -685 deletions) <details> <summary>View changed files</summary> 📝 `docs/conversation/calls.md` (+2 -2) 📝 `packages/client/src/components/chat/ConversationCallSurface.tsx` (+18 -47) 📝 `packages/client/src/components/game/GameNarration.tsx` (+5 -9) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+0 -1) 📝 `packages/client/src/components/panels/settings/TTSConfigCard.tsx` (+1 -3) 📝 `packages/client/src/components/presets/PresetEditor.tsx` (+0 -12) 📝 `packages/client/src/features/tracker-panel/components/sections/WorldStatePanel.tsx` (+1 -1) 📝 `packages/client/src/features/tracker-panel/lib/world-state-display.ts` (+1 -10) 📝 `packages/client/src/hooks/use-game.ts` (+0 -1) 📝 `packages/client/src/lib/tts-dialogue.ts` (+7 -16) 📝 `packages/server/src/routes/bot-browser-chartavern.routes.ts` (+1 -1) 📝 `packages/server/src/routes/bot-browser-datacat.routes.ts` (+1 -1) 📝 `packages/server/src/routes/bot-browser-janny.routes.ts` (+1 -1) 📝 `packages/server/src/routes/bot-browser-pygmalion.routes.ts` (+1 -1) 📝 `packages/server/src/routes/bot-browser-wyvern.routes.ts` (+1 -1) 📝 `packages/server/src/routes/bot-browser.routes.ts` (+1 -1) 📝 `packages/server/src/routes/game.routes.ts` (+2 -252) 📝 `packages/server/src/routes/updates.routes.ts` (+0 -1) 📝 `packages/server/src/services/game/element-reactions.service.ts` (+2 -315) 📝 `packages/server/src/utils/security.ts` (+1 -1) _...and 2 more files_ </details> ### 📄 Description ## Linked issue Closes #3487 (together with already-open PR #3499, which covers the env-watcher `SPRITE_ANIMATED_FFMPEG_TIMEOUT_MS` item — the only catalogue entry not in this PR). ## Why this change Controls that silently do nothing break user trust and mislead agents into building on inert toggles. This PR removes the remaining nine no-op surfaces from the #3487 catalogue. Every item was re-verified against current staging (the catalogue was verified 129 commits ago) and traced through git history before removal — each one is a deliberately-dismantled or born-dead surface, not a dropped wire-up, and the reasoning per item is in the commit message. ## What changed - **updates `/apply`**: the `currentBuild` body field was never read by the handler (the build label is exactly `currentVersion`+`currentCommit`, both already validated); removed from the body type and the client sender. Old clients still sending it remain compatible (no runtime schema rejects unknown keys). - **TTS dialogue scope**: `ttsConfigMatchesSpeaker` returned `true` unconditionally since its first commit, so the `dialogueScope`/`dialogueCharacterName` config fields gated nothing in any shipped version; removed the stub, its four call-site gates, and the schema fields. Stored configs carrying the stale keys parse fine (zod strips unknown keys). Game voice-line cache keys are preserved byte-for-byte via fixed placeholders in `buildVoiceConfigSignature`, so no user pays TTS regeneration cost. - **world-state display**: `getWorldAmbienceStyle` ignored its state argument since 454cfcfb5 deliberately replaced dynamic ambience with the user-controlled tracker-panel background theming; the signature now says so. Two keyword branches that returned their own fallback value collapsed (the cherry-blossom/aurora pair differs from its fallback and is untouched). This also covers the two world-state-display entries from #3488's no-op-branch list. - **element reactions**: the `genshin`/`hsr` presets were unreachable — nothing ever writes `gameSetupConfig.elementPreset` (the setup schema strips it), and the two `/game/elements` discovery endpoints had zero callers. Removed presets, endpoints, and the orphaned shared `ElementPresetName` type. **Maintainer note:** this was flagged as a plausibly-staged feature (the client renderer has display support for these element ids, which is kept — the GM can emit arbitrary element strings); removal over wire-up was an explicit ruling by @kolacheee. The live default-preset combat threading is deliberately untouched to avoid modifying live damage-resolution code. - **PresetEditor**: the `parameters` round-trip is a leftover from the Parameters tab removed in v1.4.0. The server PATCH is field-conditional and merging, so omitting the field preserves imported ST/Marinara parameters exactly — and removal closes a real stale-snapshot clobber vector between two concurrently-open editors. The server-side `parameters` field is live generation data and is untouched. - **game `/create`**: `characterConnectionId` was accepted, destructured, and discarded (the write hardcoded null) — the character-connection tier was deliberately dismantled in v1.5.5. Removed the schema field, destructure, null metadata write, and client type. Third-party senders get silent zod stripping, identical net effect to today. - **`resolveValidatedImage`**: the `contentTypeHeader` param was never read (a 2f3bef600 refactor remnant); all six bot-browser callers passed it under the impression it validates. Magic-byte sniffing is the authoritative check and the signature now admits it. AVIF behavior unchanged (these endpoints never accepted AVIF, before or after the helper existed). - **ConversationCallSurface**: `soundboardEnabled = true` (upstream #3310 committed to always-on and removed one guard itself — this finishes that cleanup), the write-only `Participant.canSpeak` field, and the command-message formatting switch that `visibleCallMessages` filters out before the only render site. Live command execution (the turn handler) is a separate, untouched path. Covers the #3488 command-switch entry. - **scene-wrap inline asset generation** (~185 lines): `generateSceneWrapAssetsInline = false` was born false in 0b7e03c68 — the same commit that built the richer deferred `/game/generate-assets` replacement — and the route's own comment documents why inline generation is architecturally wrong here (client scene-analysis timeout). The unreachable branches had been hand-mirrored through 6+ refactors to keep compiling. Also deletes the orphaned `applyGeneratedIllustration` helper, and stops per-character sprite-file disk reads on every scene-wrap request that only fed never-read maps (pure perf win). Two adversarial-review follow-ups included: the orphaned `ElementPresetName` shared type, and two `docs/conversation/calls.md` lines that described a soundboard enable condition that doesn't exist. ## Validation - [x] `pnpm check` passes locally - [x] Container (Docker / Podman) built and ran without issue - [x] Ran the app, clicked through the changes manually - [x] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [x] Above manual verification completed (describe below) - [x] Read and followed `CONTRIBUTING.md` ### Manual verification notes Validation performed: every item re-verified against current staging by a dedicated read-only verification pass (repo-wide consumer searches including dynamic dispatch, plus git-history intent tracing), exact-match scripted edits with assertions, `pnpm check` after each batch, and a 6-lens adversarial review of the final diff (regression / orphan / scope lenses per branch) whose findings were fixed in the second commit. Manual checks still worth doing in a browser: - Manually verify a conversation call: soundboard button opens/plays sounds, call messages render, TTS speaks dialogue with "Only read dialogues" on and off. - Manually verify game mode: scene-wrap still resolves backgrounds/illustrations via the deferred `/game/generate-assets` flow, and combat rounds still apply element reactions (default preset). - Manually verify a preset edit + save preserves generation parameters on a preset imported from SillyTavern. - Manually verify the updates panel Apply flow still works (server ignores the removed field either way). ## Docs and release impact - [x] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) (Two in-app guide lines in `docs/conversation/calls.md` were corrected as part of the change itself; no README/CHANGELOG impact.) ## UI evidence (if applicable) No visual changes — all removals are of surfaces that never rendered or never had any effect. The soundboard button renders identically (it was gated by a hardcoded `true`). <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Soundboard controls are now consistently available during calls, including sound uploads with supported formats and file-size guidance. * Missing scene backgrounds and illustrations can be generated after scene preparation, improving scene-loading flow. * **Bug Fixes** * Improved avatar image validation for proxied character images. * Updated voice playback and caching to provide more consistent dialogue narration. * **Changes** * Removed legacy element-reaction presets and preset parameter editing. * Simplified text-to-speech settings by removing dialogue-scope options. <!-- 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:05:46 +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#5971
No description provided.