Skip to content

feat(tui): resolve Discord channel IDs to human-readable names (#743)#762

Merged
Aaronontheweb merged 4 commits intodevfrom
claude-wt-discord-cleanup
Apr 27, 2026
Merged

feat(tui): resolve Discord channel IDs to human-readable names (#743)#762
Aaronontheweb merged 4 commits intodevfrom
claude-wt-discord-cleanup

Conversation

@Aaronontheweb
Copy link
Copy Markdown
Collaborator

Summary

  • Adds IDiscordProbe / DiscordProbe (mirroring the ISlackProbe pattern) with raw HTTP calls to the Discord REST API to validate bot tokens and resolve channel IDs to human-readable names
  • Discord channel entries in the Channels wizard step now display as "GuildName / #channelName" instead of raw snowflake IDs like "Discord:1497604523664085158"
  • Channel resolution runs as a background task starting when the user advances past the channel IDs sub-step, completing while they finish DMs and user IDs — no blocking calls
  • HTTP calls are parallelized via Task.WhenAll for both channel and guild fetches
  • Health check step reuses pre-resolved results when available, falling back to fresh resolution if needed
  • Dynamic column width in ChannelsStepView adapts to resolved name lengths

Closes #743

Test plan

  • All 11 DiscordStepViewModelTests pass (including 4 new health check tests)
  • InitWizardPageTests updated with FakeDiscordProbe
  • dotnet slopwatch analyze — 0 issues
  • Live test against Discord bot in Docker container — verify channel names display correctly

…t wizard (#743)

The Channels step now displays "GuildName / #channelName" instead of raw
snowflake IDs like "Discord:1497604523664085158".

Add IDiscordProbe interface with DiscordProbe HTTP implementation that
calls the Discord REST API (GET /channels/{id} and GET /guilds/{id}) to
resolve channel IDs to display names. Resolution happens eagerly during
the Discord step's OnLeave so names are available before the Channels
step renders. Guild lookups are cached within a single resolution call.

Make ChannelEntry.DisplayName settable so health checks can update names
after resolution. Dynamically compute column width in ChannelsStepView
to keep audience selectors aligned regardless of name length.
…king call

Parallelize HTTP calls in DiscordProbe.ResolveChannelIdsAsync using
Task.WhenAll for both channel and guild fetches. Fire off resolution
as a background task when the user advances past the channel IDs
sub-step, so it completes while they finish remaining sub-steps.
OnLeave picks up the result non-blockingly if available.

Eliminates the .GetAwaiter().GetResult() blocking call, removes
redundant outer timeout constants, consolidates display name patching
into a single ApplyResolvedDisplayNames method, and fixes bare catch
blocks to use specific exception types.
@Aaronontheweb Aaronontheweb enabled auto-merge (squash) April 27, 2026 00:54
@Aaronontheweb Aaronontheweb merged commit 8b87cd7 into dev Apr 27, 2026
4 checks passed
@Aaronontheweb Aaronontheweb deleted the claude-wt-discord-cleanup branch April 27, 2026 02:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Init wizard: resolve Discord channel IDs to human-readable names

1 participant