mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3509] [MERGED] chore: remove dead exports, unreachable branches, and parked locals #5972
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#5972
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3509
Author: @kolacheee
Created: 7/12/2026
Status: ✅ Merged
Merged: 7/12/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/3488-dead-code-remainder📝 Commits (4)
1da967bchore: remove dead exports, unreachable branches, and parked locals (#3488)066bb93chore: drop orphaned pi-coding-agent dependency and dangling TypingIndicator JSDocaac7160Merge remote-tracking branch 'origin/staging' into integrate-pr-3509f3d16f0test: follow text rewrite helper rename📊 Changes
32 files changed (+57 additions, -834 deletions)
View changed files
📝
docs/development/frontend.md(+1 -2)📝
packages/client/.instructions.md(+1 -1)📝
packages/client/src/components/agents/AgentEditor.tsx(+0 -1)📝
packages/client/src/components/bot-browser/BotBrowserView.tsx(+0 -50)📝
packages/client/src/components/chat/ChatArea.tsx(+0 -21)📝
packages/client/src/components/chat/ChatInput.tsx(+0 -1)📝
packages/client/src/components/chat/ChatMessage.tsx(+0 -1)📝
packages/client/src/components/game/GameSurface.tsx(+0 -5)📝
packages/client/src/components/layout/ModalRenderer.tsx(+0 -7)➖
packages/client/src/components/modals/EditAgentModal.tsx(+0 -218)📝
packages/client/src/components/onboarding/OnboardingTutorial.tsx(+0 -21)📝
packages/client/src/components/panels/LorebooksPanel.tsx(+2 -5)📝
packages/client/src/components/ui/AppDialogRenderer.tsx(+1 -14)📝
packages/client/src/hooks/use-game.ts(+0 -19)📝
packages/client/src/hooks/use-generate.ts(+1 -12)📝
packages/client/src/hooks/use-touch-folder-drag.ts(+1 -3)📝
packages/client/src/lib/app-dialogs.ts(+2 -22)📝
packages/client/src/stores/dialog.store.ts(+0 -2)📝
packages/server/package.json(+0 -1)📝
packages/server/src/routes/chats.routes.ts(+0 -4)...and 12 more files
📄 Description
Linked issue
Closes #3488 (together with already-open PR #3500, which covers the catalogue's dead-files section — this PR covers the dead exports/branches and dead-locals sections).
Why this change
Dead code is where agents go wrong quietly: they edit files that never run, copy superseded patterns, and two entries here were wrong-import magnets (a dead local colliding with a live resolver's name; docs advertising a never-called utility as THE way to do XML wrapping). This PR removes the remainder of the #3488 catalogue. Every entry was re-verified against current staging with repo-wide consumer searches (including dynamic/string-key dispatch) and git-history intent tracing; per-item reasoning is in the commit message.
What changed
wrapInXml/stripXmlTagsdeleted — never called in the repo's entire history; real wrapping isformat-engine.ts.nameToXmlTagin the same file stays (5 live server consumers) — the catalogue's whole-file-deletion suggestion was wrong on the current tree. The two doc lines advertisingwrapInXml()now point at real utilities.resolveLorebookGenerationTriggers(local, chats.routes.ts) deleted — its only-ever caller was deliberately replaced withpreviewOnly: true; the name collided with the live 2-arg resolver used by generate.routes.showConfirmWithCheckbox, store field, renderer branch) deleted — the maintainer removed its only consumer the day after it shipped (822a3d506); it has been unreachable end-to-end since.loadPiSkills+idFromSkillFiledeleted (superseded bylist()→buildSkillsPromptinf11e67aeb) — and with them the last import of@earendil-works/pi-coding-agent, so that dependency and its lockfile subtree are removed too. (@earendil-works/pi-aiwas already unimported before this PR — left alone, flagged below.)buildAssetTagListdeleted (born unused; GM prompts readgetAssetManifest()directly).buildDeterministicSummarydeleted — it was wired only on the abandoned refactor lineage; staging's conclude path deliberately uses the interactivejson_repairflow instead, so wiring it here would be a design change, not a restoration.resolveProviderTopKcollapsed — a regression fix made the google branch identical to the default; the now-inertproviderparam dropped at all three call sites.ifin generate.routes deleted (the per-character injection it pointed at already exists downstream).formatRetryAgentActivityBubbleunreachable!result.successbranch deleted — the sole caller gates on success sincee95914489; failure UX lives inshowAgentFailuresError.moveCancelThresholdPx(never-passed back-compat alias),LorebookRow.personaName(only caller hardcodesundefined; persona names are pre-merged intocharacterName),_buildClipPath,_isRP,_displayPrompt,_messageOrderIndexById(an O(n) map rebuilt on every messages change — small perf win), localTypingIndicator+ its now-unusedPendingTypingDotsimport (the component itself stays, 5 other consumers),_modelName.getAvatarUrl/getExternalUrl/importCardremoved from the interface and all six providers — everyimportCardwas an empty stub since the file's first commit; live paths arecard.avatarUrl/card.externalUrland the sharedhandleImport.EditAgentModaldeleted (file + ModalRenderer wiring + two doc references) — born dead in the founding commit; nothing has ever calledopenModal("edit-agent"), andAgentEditoris a strict superset with better connection validation. The.instructions.mdopenModalexample now uses the realdocs-viewermodal._rollEncounter/_journalEntryand theiruseRollEncounter/useJournalEntryhooks deleted (the invalidation they would add targets a query key with zero subscribers; the journal UI re-fetches on mount), duplicatenew Set()reset deduped. The used-despite-underscore_advanceTime/_updateReputationstay.normalizedLanguagecomputation deleted (the language directive was relocated tobuildGmFormatReminderinb3fce6c85, which is untouched).Follow-up candidates surfaced by this work, deliberately NOT changed here (API-surface decisions):
POST /game/encounter/rollnow has zero client consumers;useGameJournalwas already zero-reference before this PR;@earendil-works/pi-aiis a declared-but-unimported server dependency; sharedConversationCallParticipantStateis zero-reference; the lorebook?cascade=trueserver plumbing is unreachable from the UI since822a3d506.Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Validation performed: per-item re-verification against current staging by a read-only verification pass (repo-wide consumer searches including dynamic dispatch, plus git-history intent tracing), exact-match scripted edits with assertions,
pnpm checkper batch,pnpm installafter the dependency removal, and a 6-lens adversarial review of the final diff whose findings (orphaned dependency, dangling JSDoc) were fixed in the second commit.Manual checks still worth doing in a browser:
Docs and release impact
(Two developer-doc lines —
docs/development/frontend.mdandpackages/client/.instructions.md— were corrected as part of the removals themselves; no README/CHANGELOG impact.)UI evidence (if applicable)
No visual changes — everything removed was unreachable or write-only.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.