feat(bot): step-by-step wizard for creating single games and game pools (issue #111) #121
Closed
Toutsu
wants to merge 0 commits from
feat/issue-111-game-creation-wizard into main
pull from: feat/issue-111-game-creation-wizard
merge into: Toutsu:main
Toutsu:main
Toutsu:feature/telegram-game-card-fields
Toutsu:feature/issue-136-wizard-format-location
Toutsu:fix/issue-135-wizard-publish-schedule
Toutsu:fix/issue-133-on-conflict-inference
Toutsu:fix/issue-130-no-limit-complete
Toutsu:fix/issue-129-libgssapi
Toutsu:fix/issue-127-wizard-capacity-club
Toutsu:fix/issue-125-test-cleanup
Toutsu:fix/issue-123-no-limit-wizard
Toutsu:feat/issue-112-wizard-refactor
Toutsu:fix/issue-110-showcase-500
Toutsu:feat/issue-110-private-club-showcases
Toutsu:codex/feature-issue-108-portfolio
Toutsu:feat/profile-design-system
Toutsu:codex/fix-public-pages-500
Toutsu:feature/issue-40-master-profiles
Toutsu:feature/issue-39-game-catalog
Toutsu:codex/feature/issue-38-public-club-pages
Toutsu:refactor/issue-37-platform-neutral-handlers
Toutsu:codex/fix-template-topic-release
Toutsu:refactor/issue-36-platform-migration
Toutsu:fix/discord-nullable-telegram-columns
Toutsu:fix/discord-dapper-aot-missing
Toutsu:fix/discord-console-logging-deferred
Toutsu:fix/discord-guildinteractionuser-permissions
Toutsu:fix/discord-count-bigint-cast
Toutsu:fix/discord-slash-commands-guild-context
Toutsu:fix/discord-slash-command-registration
Toutsu:feature/issue-35-identity-linking
Toutsu:fix/discord-oauth-diagnostics
Toutsu:feature/issue-34-discord-oauth-dashboard
Toutsu:test/issue-33-regression-tests
Toutsu:chore/issue-32-discord-compose-wiring
Toutsu:codex/issue-31-platform-messenger-scheduler
Toutsu:feature/discord-reschedule-voting
Toutsu:codex/feature-issue-29-discord-join-leave
Toutsu:feature/issue-28-discord-newsession-listsessions
Toutsu:feature/issue-27-discord-session-batch-renderer
Toutsu:feature/issue-26-discord-netcord-gateway
Toutsu:codex/refactor-issue-25-platform-neutral-join-leave
Toutsu:feature/dashboard-design-refresh
Toutsu:feature/issue-58-health-checks
Toutsu:feature/issue-23-platform-identity
Toutsu:fix/issue-60-add-license
Toutsu:feature/issue-57-postgresql-backup
Toutsu:feature/trivy-security-scan
Toutsu:codex/feature/issue-21-telegram-topics
Toutsu:feature/issue-20-rsvp-reminders
Toutsu:feature/issue-15-session-audit-log
Toutsu:feature/issue-19-batch-join-link
Toutsu:fix/navmenu-mobile-overlap
Toutsu:feature/new-logo
Toutsu:issue-47-navmenu-icon-fix
Toutsu:issue-15-session-audit-log
Toutsu:issue-14-attendance-stats
Toutsu:issue-22-neutral-rendering
Toutsu:codex/ftest-telegram-landing-smoke
Toutsu:feat/player-list-kick-waitlist
Toutsu:codex/co-gm-delegation
No Reviewers
Labels
Clear labels
area:bot
area:data
area:discord
area:infra
area:miniapp
area:platform
area:shared
area:web
in-progress
next-up
pending-approval
platform:discord
platform:multi
platform:telegram
priority:p0
priority:p0
priority:p1
priority:p2
priority:p3
security
type:bug
type:chore
type:feature
type:refactor
type:test
Telegram bot and worker logic
Database schema, migrations and persistence model
Discord bot service and Discord adapter
Infrastructure, runtime and deployment
Telegram Mini App dashboard
Platform-neutral abstractions and adapter boundaries
Shared domain and rendering contracts
Blazor web dashboard
В работе (issue взят агентом)
Recommended immediate backlog
Ждёт согласования плана решения
Discord-specific behavior or adapter work
Cross-platform or platform-neutral work
Telegram-specific behavior or adapter work
Critical priority
Блокирующий приоритет: задача должна быть выполнена до признания решения production-ready
High priority
Medium priority
Lower priority
Security-sensitive work
Bug fix or corrective work
Maintenance and supporting work
New product functionality
Structural change without direct feature growth
Testing and coverage work
No Label
Milestone
No items
No Milestone
Projects
Clear projects
No project
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Toutsu/GmRelayBot#121
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "feat/issue-111-game-creation-wizard"
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?
Summary
Replaces the
/newsessiontext-template command with an interactive step-by-step wizard (inline-keyboard prompts) that supports both single games and game pools (multiple linked sessions under onebatch_id).Closes #111.
What changes for users
/newsession title...text template parsed by regex/newsessionopens an inline-keyboard wizardwizard_drafts(24h TTL),/newsessionshows Continue / Reset when one existspoolwas a separate flowArchitecture
wizard_draftstable (V031migration) — JSONB payload + 24hexpires_at, cleaned byWizardDraftCleanupServiceevery minuteGameCreationWizard— pure state machine, no I/O. Reads/writesWizardPayloadfrom JSONB, delegates all Telegram I/O toITelegramWizardMessenger(AOT-safe, swappable in tests)WizardSteprenderer — pure functionspayload → (text, InlineKeyboardMarkup)for all 17 steps (12 single + 5 pool)IWizardDraftRepository— extracted from the sealedWizardDraftRepositoryso the wizard can be tested with hand-rolled fakesScheduledTimes. The sharedCreateSessionHandleralready creates N sessions from one command, so "one batch_id" still holds.(chat, thread, owner)routes to the wizard, not the regular handlers.Resetdeletes the draft,Resumere-renders the current step.Files
New
src/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/GameCreationWizard.cs— state machinesrc/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardStep.cs— step rendererssrc/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardDraftCleanupService.cs— TTL sweepersrc/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardCallbackData.cs— callback-data codecsrc/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/ITelegramWizardMessenger.cs+ implsrc/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardStorageException.cssrc/GmRelay.Shared/Features/Sessions/CreateSession/Wizard/{IWizardDraftRepository,WizardDraft,WizardPayload,WizardPayloadJsonContext,WizardClubOption,JournalArticlePoolSlotPair}.cssrc/GmRelay.Bot/Migrations/V031__add_wizard_drafts.sqltests/.../Wizard/{GameCreationWizardStepTransitionsTests,GameCreationWizardPoolSlotTests,GameCreationWizardValidationTests,GameCreationWizardCancelBackTests,WizardStepRenderTests,WizardDraftCleanupServiceTests,UpdateRouterDelegationTests,UpdateRouterResetsDraftOnStaleCommandTests,CreateSessionHandlerSubmitValidationTests,CreateSessionHandlerSubmitMissingFieldsTests,WizardTestFakes}.csModified
src/GmRelay.Bot/Features/Sessions/CreateSession/CreateSessionHandler.cs—StartWizardAsync/TryResumeAsync/SubmitDraftAsync; legacy text parser removedsrc/GmRelay.Bot/Infrastructure/Telegram/UpdateRouter.cs— wizard takeover +Reset/Resumecallbackssrc/GmRelay.Bot/Program.cs— wizard service registrationssrc/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/WizardDraftRepository.cs— implementsIWizardDraftRepositorysrc/GmRelay.Bot/Features/Sessions/CreateSession/Wizard/TelegramWizardMessenger.cs— usesgame_groupsviagroup_managers(noclubstable in this schema)Testing
dotnet format --verify-no-changescleandotnet list package --vulnerable --include-transitivecleandotnet build— 0 warningsKnown follow-up
The wizard captures
VisibilityandClubIdin the payload, but the sharedCreateSessionCommand(inGmRelay.Shared) doesn't yet accept them. Sessions created via the wizard currently default to non-showcase behaviour. This is a separate concern from the wizard itself and is tracked as a follow-up issue — the wizard is fully functional in every other respect, and the persistence path is in place for the day the shared handler learns about showcase visibility.Out of scope
/newsessionphoto upload (image step in the original mockup) — keeps the bot AOT-publishable and removes a flaky Telegram download dependency🤖 Generated with Claude Code
Pull request closed