[PR #3503] [MERGED] refactor: fix misleading names and a duplicate Seedance upload (part of #3491) #5967

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

📋 Pull Request Information

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

Base: staging ← Head: fix/3491-misleading-names


📝 Commits (1)

  • f3d19ab refactor: fix misleading names and a duplicate upload call (part of #3491)

📊 Changes

7 files changed (+17 additions, -20 deletions)

View changed files

📝 packages/client/src/components/game/GameCombatUI.tsx (+4 -4)
📝 packages/client/src/components/game/GameSurface.tsx (+1 -1)
📝 packages/client/src/features/tracker-panel/components/TrackerSectionList.tsx (+1 -1)
📝 packages/client/src/features/tracker-panel/components/sections/PersonaInventoryPanel.tsx (+0 -0)
📝 packages/server/src/routes/generate.routes.ts (+9 -9)
📝 packages/server/src/services/generation/prose-guardian-settings.ts (+0 -3)
📝 packages/server/src/services/video/video-generation.ts (+2 -2)

📄 Description

Linked issue

Part of #3491 (the mechanically-verifiable subset; skipped items are re-dispositioned below and on the issue).

Why this change

Names that say the wrong thing invite confident wrong edits — especially from automated refactors and agents acting on the name alone. This PR fixes the #3491 items whose correctness TypeScript can verify exhaustively, plus one duplicate call that caused real double work.

What changed

  • shouldHoldForProseGuardianRewrite removed (prose-guardian-settings.ts): it was a verbatim alias of shouldHoldForTextRewrite. The name implied a prose-guardian-only gate, but the predicate fires for prose-guardian, continuity, AND html rewrites, and its result gates seven branches in generate.routes.ts. The call site and its local variable now use the truthful name.
  • _isStreaming → isStreaming (GameCombatUI.tsx + the GameSurface.tsx call site): the underscore convention marks unused values, but this prop is load-bearing (it drives the custom-action reset effect at ~1546). An automated "remove unused underscore props" pass would have silently broken combat UI resets.
  • PersonaTrackerPanel.tsx → PersonaInventoryPanel.tsx: filename now matches its export, restoring the sibling convention; sole import updated.
  • Seedance duplicate upload removed (video-generation.ts): the raw-URL path called maybeUploadSeedanceReferenceImage and, when it returned nothing, fell through to an identical second call. Both paths now converge on the single fallback — same behavior for every path, and the raw-URL path no longer attempts the same upload twice.

Re-verified against current staging and deliberately NOT changed:

  • The HomeProfessorMariChat textarea-ref inversion no longer exists: the component was restructured upstream, and I verified today that floatingTextareaRef attaches inside the floating surface (floatingSurfaceRef container) and embeddedTextareaRef outside it. Nothing to fix.
  • The retry-agents-route chatMeta shadow stays as-is: there are four parallel local parses in that route, the sweep verdict was "no active bug, latent only", and re-scoping variables in a mega-route without runtime coverage is riskier than the landmine it would defuse.
  • The two duplication findings (Mari chat body, sprite crop helpers) still need behavior-equivalence verification and remain open on #3491.

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

Renames are exhaustively verified by the TypeScript strict build (pnpm check passes; zero references to any old name remain, checked by grep). The Seedance change is behavior-preserving by control-flow analysis: identical arguments, and every path still performs exactly one upload attempt (previously the raw-URL path could perform two). Optional live check: generate a Seedance first/last-frame clip with reference upload enabled and confirm a single upload per reference in the server log.

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)

UI evidence (if applicable)

N/A — internal renames; no UI surface changes.

Summary by CodeRabbit

  • New Features

    • Added a dedicated Persona panel with portrait display, editable status, stats, inventory management, and inline editing controls.
    • Portrait focus and zoom updates are saved automatically while editing.
  • Bug Fixes

    • Improved streamed text-rewrite handling for more consistent generated responses.
    • Fixed a video generation issue that could upload the same reference image more than once.
    • Corrected combat streaming state handling and Persona panel loading.

🔄 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/3503 **Author:** [@kolacheee](https://github.com/kolacheee) **Created:** 7/11/2026 **Status:** ✅ Merged **Merged:** 7/12/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `fix/3491-misleading-names` --- ### 📝 Commits (1) - [`f3d19ab`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f3d19ab22a3b6da722c6f0fc8acb8460dad110e5) refactor: fix misleading names and a duplicate upload call (part of #3491) ### 📊 Changes **7 files changed** (+17 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `packages/client/src/components/game/GameCombatUI.tsx` (+4 -4) 📝 `packages/client/src/components/game/GameSurface.tsx` (+1 -1) 📝 `packages/client/src/features/tracker-panel/components/TrackerSectionList.tsx` (+1 -1) 📝 `packages/client/src/features/tracker-panel/components/sections/PersonaInventoryPanel.tsx` (+0 -0) 📝 `packages/server/src/routes/generate.routes.ts` (+9 -9) 📝 `packages/server/src/services/generation/prose-guardian-settings.ts` (+0 -3) 📝 `packages/server/src/services/video/video-generation.ts` (+2 -2) </details> ### 📄 Description ## Linked issue Part of #3491 (the mechanically-verifiable subset; skipped items are re-dispositioned below and on the issue). ## Why this change Names that say the wrong thing invite confident wrong edits — especially from automated refactors and agents acting on the name alone. This PR fixes the #3491 items whose correctness TypeScript can verify exhaustively, plus one duplicate call that caused real double work. ## What changed - **`shouldHoldForProseGuardianRewrite` removed** (`prose-guardian-settings.ts`): it was a verbatim alias of `shouldHoldForTextRewrite`. The name implied a prose-guardian-only gate, but the predicate fires for prose-guardian, continuity, AND html rewrites, and its result gates seven branches in `generate.routes.ts`. The call site and its local variable now use the truthful name. - **`_isStreaming` → `isStreaming`** (`GameCombatUI.tsx` + the `GameSurface.tsx` call site): the underscore convention marks unused values, but this prop is load-bearing (it drives the custom-action reset effect at ~1546). An automated "remove unused underscore props" pass would have silently broken combat UI resets. - **`PersonaTrackerPanel.tsx` → `PersonaInventoryPanel.tsx`**: filename now matches its export, restoring the sibling convention; sole import updated. - **Seedance duplicate upload removed** (`video-generation.ts`): the raw-URL path called `maybeUploadSeedanceReferenceImage` and, when it returned nothing, fell through to an identical second call. Both paths now converge on the single fallback — same behavior for every path, and the raw-URL path no longer attempts the same upload twice. Re-verified against current staging and deliberately NOT changed: - The `HomeProfessorMariChat` textarea-ref inversion **no longer exists**: the component was restructured upstream, and I verified today that `floatingTextareaRef` attaches inside the floating surface (`floatingSurfaceRef` container) and `embeddedTextareaRef` outside it. Nothing to fix. - The `retry-agents-route` `chatMeta` shadow stays as-is: there are four parallel local parses in that route, the sweep verdict was "no active bug, latent only", and re-scoping variables in a mega-route without runtime coverage is riskier than the landmine it would defuse. - The two duplication findings (Mari chat body, sprite crop helpers) still need behavior-equivalence verification and remain open on #3491. ## 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 Renames are exhaustively verified by the TypeScript strict build (`pnpm check` passes; zero references to any old name remain, checked by grep). The Seedance change is behavior-preserving by control-flow analysis: identical arguments, and every path still performs exactly one upload attempt (previously the raw-URL path could perform two). Optional live check: generate a Seedance first/last-frame clip with reference upload enabled and confirm a single upload per reference in the server log. ## 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) ## UI evidence (if applicable) N/A — internal renames; no UI surface changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Added a dedicated Persona panel with portrait display, editable status, stats, inventory management, and inline editing controls. - Portrait focus and zoom updates are saved automatically while editing. - **Bug Fixes** - Improved streamed text-rewrite handling for more consistent generated responses. - Fixed a video generation issue that could upload the same reference image more than once. - Corrected combat streaming state handling and Persona panel loading. <!-- 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:43 +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#5967
No description provided.