Skip to content

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

@Aaronontheweb

Description

@Aaronontheweb

Context

During Discord integration testing (#713), the Channels audience editor (step 5) displays raw Discord snowflake IDs like Discord:1497604523664085158 instead of human-readable channel names. This is unusable for configuration review.

Problem

Discord channels are configured by numeric ID (unlike Slack which uses channel names). The wizard has the bot token available from the previous step but doesn't use it to resolve IDs to names.

With a single bot token serving all servers, the same channel name (e.g. #general) can exist in multiple guilds — the guild name is essential context.

Proposed Display Format

  Chat channels:

    Discord DMs                [◀ personal ▶]
  ▶ MyServer / #general       [◀ public    ▶]
    OtherServer / #ops-chat   [◀ team      ▶]

Instead of:

    Discord:1497604523664085158 [◀ public    ▶]

Implementation

  • After the Discord step collects channel IDs and the bot token, resolve each ID via the Discord API (DiscordSocketClient.GetChannel() → cast to IGuildChannelGuild.Name + Name)
  • Store the resolved display name alongside the ID in ChannelEntry.DisplayName
  • Graceful fallback: if resolution fails (bot not yet connected, invalid ID), show the raw ID with a warning

Key Files

  • src/Netclaw.Cli/Tui/Wizard/Steps/DiscordStepViewModel.cs — resolves IDs after collection
  • src/Netclaw.Cli/Tui/Wizard/Steps/ChannelsStepView.cs — renders DisplayName
  • src/Netclaw.Cli/Tui/Wizard/WizardContext.csChannelEntry already has DisplayName

Metadata

Metadata

Assignees

No one assigned

    Labels

    tuiTerminal UI (Termina) issues

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions