Repository navigation
Conversation
Copies a minigame's settings into "<name> - Copy" (- Copy 2, … when
taken). Prizes are not copied: the copy starts with no prizes and
nonWinning.loseRate 100 so the 100% total stays valid. Plays, players
and counters start from zero.
Adds minigameService.duplicate, the public POST /v1/minigames/{id}/duplicate
procedure (CLI: `chatbotx minigames duplicate <id>`), and a Duplicate row
action with a confirm dialog in the minigames table.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Duplicate action for minigames, matching the one Mini Apps already have.
nonWinning.loseRate: 100, so the 100% probability total stays valid. Until prizes are added, every play is a loss.playsCount,participantsCount,winnersCount,sharesCount) start from zero.<name> - Copy, or- Copy 2,- Copy 3, … when the name is taken. Long names are cut to fit the 150-character limit. Naming reusesinsertWithFreeCopyName, the helper Mini Apps use, so a concurrent copy that takes a name moves on to the next free one.Changes
minigameService.duplicate(packages/business/src/minigame/service.ts)POST /v1/minigames/{id}/duplicate(minigames.duplicate). The CLI command ischatbotx minigames duplicate <id>, added toapps/cli/README.md. It is not in the MCP default set, soapps/mcp-server/README.mdis unchanged.minigames.duplicateDialog.*added to all 21 locale files.Testing
packages/business/__tests__/minigame-duplicate.test.ts(6 cases: copied fields with prizes stripped, free-name pick, retry after a concurrent copy, name conflict, long-name cut, not found)minigame-service-update.test.tsstill passespublic-spec-operations/public-spec-mcptestspnpm lint,check-typesfor business and builder🤖 Generated with Claude Code