mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #3491] [Issue]: Code sweep: misleading names and duplicated implementations that invite wrong edits #1888
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#1888
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @kolacheee on GitHub (Jul 11, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/3491
Originally assigned to: @kolacheee on GitHub.
Summary
Names that say the wrong thing and duplicated implementations that have already started to drift.
Why this is a problem: agents and contributors act on names. An alias whose name implies a narrower scope than it gates, refs whose names are swapped, and a load-bearing variable dressed as unused all invite confident wrong edits. Duplicated logic means a fix to one copy silently misses the other.
What it negatively affects: refactor safety (including automated "remove unused" passes), and behavior consistency between duplicated code paths.
Expected behavior
Names describe scope and usage truthfully; shared logic has one implementation.
Actual behavior
Misleading names:
server/.../services/generation/prose-guardian-settings.ts:108—shouldHoldForProseGuardianRewriteis a verbatim alias ofshouldHoldForTextRewrite, which fires for ANY of prose-guardian, continuity, or html rewrites. Its result gates 7 generation branches far from the definition. The name invites scoping a hold change to Prose Guardian and breaking the other two.client/.../chat/HomeProfessorMariChat.tsx:1894—embeddedTextareaRefis attached inside the floating body (:3073) andfloatingTextareaRefinside the embedded body (:3693). The names are inverted relative to usage; editing "the floating textarea" by name grabs the wrong ref with no type error.client/.../game/GameCombatUI.tsx:441—_isStreamingcarries the unused-underscore convention but is load-bearing: read in the custom-action reset effect (:1544-1556), fed live byGameSurface.tsx:10984. An automated unused-prop cleanup would break combat UI resets.client/.../features/tracker-panel/components/sections/PersonaTrackerPanel.tsx:102— filename does not match the export (PersonaInventoryPanel), breaking the sibling convention (low; TS catches misuse).Duplicated logic already drifting:
client/.../chat/HomeProfessorMariChat.tsx:2916—renderFloatingChatBody(~200 lines) is re-implemented inline in the non-floating return (:3519-3725) and has already drifted (different text-size classes;MariSuggestionChips compactprop in one copy only). Fixes to one surface miss the other.client/.../ui/SpriteGenerationModal.tsx:457— private re-implementation ofcropSpriteDataUrl/percentToPixels/clampPercent(exported bySpriteFrameEditor.tsx) with hardcoded 80/90 instead of the editor's namedMAX_SINGLE_EDGE_CROP/MAX_PAIR_CROP.server/.../services/video/video-generation.ts:1022and:1026—maybeUploadSeedanceReferenceImagecalled twice with identical arguments; the second call is a guaranteed no-op when both run.server/.../routes/generate/retry-agents-route.ts:2923— an innerchatMetashadows the outer live-synced object by re-parsing stalechat.metadata. No active bug today, but any new field crossover silently reads stale data.Steps to reproduce
Open any entry's file/line; each one-liner names the contradicting code location.
Environment
45b650de9)Logs, screenshots, or video
N/A.
Additional context
Found by a repo-wide read-only sweep; adversarially re-verified before filing. Part of a coordinated set of sweep catalogue issues filed together.
Template check
Please uncheck (untick) the box below before submitting so we know you read the template. It is intentionally pre-checked:
@kolacheee commented on GitHub (Jul 11, 2026):
Status update after re-verification against current staging:
shouldHoldForProseGuardianRewritealias, the_isStreamingunderscore trap, thePersonaTrackerPanel.tsxfilename mismatch, and the duplicate Seedance reference upload.floatingTextareaRefattaches inside the floating surface andembeddedTextareaRefoutside it. This item can be checked off.chatMetashadow — four parallel local parses exist in that route, there is no active bug, and re-scoping without runtime coverage looks riskier than the latent issue.