mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #7335] [MERGED] fix(game): ask before a same-name library card joins the party #7686
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#7686
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/7335
Author: @SpicyMarinara
Created: 10/9/2026
Status: ✅ Merged
Merged: 10/9/2026
Merged by: @SpicyMarinara
Base:
staging← Head:fix/7324-party-promotion-card-match📝 Commits (10+)
49a300efix(game): ask before a same-name library card joins the partydd73ce9fix(game): keep party card choice rows fully outlined and readableb1c57a1Merge origin/staging into fix/7324-party-promotion-card-match8a33630Merge remote-tracking branch 'origin/staging' into fix/7324-party-promotion-card-matchf8d6abbfix(game): ask about NPCs met this session and match NPCs by whole wordsffa120cMerge remote-tracking branch 'origin/fix/7324-party-promotion-card-match' into fix/7324-party-promotion-card-match0678cb8fix(game): tell same-name party cards apart when they have no title14753ecMerge origin/staging into fix/7324-party-promotion-card-matchad2ef22Merge origin/staging into fix/7324-party-promotion-card-matchd0cd1d6Move the CHANGELOG entry away from other open PRs📊 Changes
9 files changed (+372 additions, -57 deletions)
View changed files
📝
CHANGELOG.md(+1 -0)📝
docs/game/party-and-npcs.md(+2 -0)📝
packages/client/src/components/game/GameSurface.tsx(+36 -11)📝
packages/client/src/components/ui/AppDialogRenderer.tsx(+53 -16)📝
packages/client/src/hooks/use-game.ts(+13 -1)📝
packages/client/src/localization/locales/en.json(+3 -0)📝
packages/client/src/stores/dialog.store.ts(+12 -2)📝
packages/server/src/routes/game.routes.ts(+71 -27)➕
scripts/regressions/game-party-recruit-card-choice.regression.ts(+181 -0)📄 Description
Linked issue
Closes #7324
Why this change
POST /game/party/recruit(packages/server/src/routes/game.routes.ts) matched library cards by exact name and then by substring (lookup.includes(...)), and a library match always won over the game's own tracked NPC.What changed
/game/party/recruitcardChoices(id, name, title, avatar, avatar crop) so the player can pick.characterIdin the request: a card id from those choices, ornullto keep the game's own character. A card id that is not one of the same-name cards is refused.GameSurfacehandles thecardChoicesanswer by opening the shared app choice dialog. Each card shows its avatar, name and title. The bottom button, Keep the game's own , keeps the NPC. Closing the window (X, Escape, backdrop) does the same, so the game is never left half-done. Several prompts from one turn are asked one at a time, back to back (the next window does not wait for the previous pick's party card).mutateAsync, because the per-call callbacks ofmutate()only fire for the last of several calls in a loop.AppDialogRenderer/dialog.store: choice dialog entries can carry an optional avatar and a smaller description line. Those rows are equal picks (no first-button highlight). Existing choice dialogs are unchanged.game.partyCardChoice.*.docs/game/party-and-npcs.md(Recruiting and removing party members). Translation follow-up: #7336.scripts/regressions/game-party-recruit-card-choice.regression.tsruns the real route: Sam is never Samantha, NPC plus same-name card asks and changes nothing, a stray choice is refused, keeping the NPC addsnpc:emmaand asking again is quiet, two same-name cards let the player pick one, a single card still joins, and "Kael" stays the party's Kael Stormborn. It fails on currentstaging(Sam joins as Samantha).Validation
pnpm checkpasses locallyCONTRIBUTING.mdManual verification notes
Agent-run checks:
node ./scripts/run-regressions.mjs --filter scripts/regressions/game-party-recruit-card-choice(passes; fails on unfixed staging),node ./scripts/run-regressions.mjs --filter scripts/regressions/game-ruleset-setup(passes, recruit path unchanged for a single card),pnpm checkvia the slot limiter (exit 0), the existingcore-flowse2e test "destructive confirmation actions use the shared accent button treatment" (passes, so plain choice dialogs keep their look), and a temporary Playwright check (not committed) that opened the new window on desktop-chromium and mobile-chromium: two rows with avatar or letter, name and truncated title, no first-row highlight, no overflow, and Escape resolving to "keep the game's own". Local CodeRabbit (--committedagainst the staging merge-base, run on the final commit after one earlier rate_limit answer) completed with no findings.Docs and release impact
docs-i18nbranch updated to match, or a[docs-i18n]follow-up issue opened (see CONTRIBUTING.md § Translated documentation)CHANGELOG: one entry under
[Unreleased]. Docs:docs/game/party-and-npcs.md; translation follow-up #7336.UI evidence (if applicable)
None captured by the agent. The window reuses the shared app choice dialog (
Modal), with theme variables only.Out of scope: the reporter's wish to remove a card from a party member without removing the profile is not built here.
Summary by CodeRabbit
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.