docs: mark club-lookup + modal-popup as fixed in deliverable

This commit is contained in:
2026-06-05 19:11:28 +03:00
parent 7cfb1968c0
commit c4a77d3d73
+24 -17
View File
@@ -107,23 +107,21 @@ PR link: https://git.codeanddice.ru/Toutsu/GmRelayBot/pulls/new/feat/issue-112-w
## Open questions ## Open questions
- **Club lookup at the PickClub step** — `DiscordWizardMessenger.GetOwnerClubsAsync` - ~~**Club lookup at the PickClub step**~~**FIXED in commit `7cfb196`.**
queries `group_managers` for the user's owned/co-GM groups; the `WizardClubLookup.LoadClubsAsync` now queries `group_managers`
dispatcher's `WizardClubLookup` stub currently returns an empty list directly via injected `NpgsqlDataSource` with the same
(DB access goes through `DiscordWizardMessenger`, which is a sibling `Owner | CoGm` role filter the messenger uses. The dispatcher
of the dispatcher in DI). The actual `DiscordWizardMessenger.SendDraftMessageAsync` reads the owner's real club list and renders them in the
path also has the same gap: it doesn't pre-populate clubs. At runtime StringSelectMenu. Build green, 12 source-level smoke tests still
the user sees "У вас нет клубов" at the PickClub step even if they pass.
actually own clubs. The fix is to plumb `NpgsqlDataSource` (or the - ~~**MaybeOpenModalAsync was a no-op in the previous commit**~~ — **FIXED in commit `f095209`.**
messenger itself) into the dispatcher. The dispatcher now runs the wizard first (which edits the draft
- **MaybeOpenModalAsync was a no-op in the previous commit.** The embed), then sends the response as either
fix: don't defer the interaction response before the wizard runs; `InteractionCallback.Modal(modalProperties)` (when the new step
instead, run the wizard (which edits the draft embed), then send needs text input) or `InteractionCallback.DeferredMessage()`
the response as either `InteractionCallback.Modal(modalProperties)` (otherwise). NetCord locks the response type after the first
(when the new step needs text input) or `SendResponseAsync` call, so the fix is NOT to call
`InteractionCallback.DeferredMessage()` (otherwise). NetCord locks `DeferredMessage` upfront.
the response type after the first `SendResponseAsync` call, so the
fix requires NOT calling `DeferredMessage` upfront.
- **Modal handler's free-text mapping is a hack.** Modal steps like - **Modal handler's free-text mapping is a hack.** Modal steps like
`SystemFreeText`, `DurationFreeText`, `PoolSystemDurationFreeText` `SystemFreeText`, `DurationFreeText`, `PoolSystemDurationFreeText`
are mapped to the canonical wizard step (`System`, `Duration`, are mapped to the canonical wizard step (`System`, `Duration`,
@@ -144,3 +142,12 @@ PR link: https://git.codeanddice.ru/Toutsu/GmRelayBot/pulls/new/feat/issue-112-w
sessions in parallel. Acceptable for now, but the wizard's state sessions in parallel. Acceptable for now, but the wizard's state
machine doesn't enforce this — only the dispatcher does, via machine doesn't enforce this — only the dispatcher does, via
`GetActiveAsync("Discord", ownerId)`. `GetActiveAsync("Discord", ownerId)`.
## Final commit history on `feat/issue-112-wizard-refactor`
- `8f0f2ef` — Task 1: platform-neutral wizard refactor (core + Shared types)
- `b81d865` — Task 2: Discord adapter scaffolding (messenger, step, submitter, command)
- `f095209` — Task 2: interaction module + modal popup fix
- `7cfb196` — Task 2: select/modal parser off-by-one + real club lookup
PR link: https://git.codeanddice.ru/Toutsu/GmRelayBot/pulls/new/feat/issue-112-wizard-refactor