Skip to content

fix(cli): add Matrix to channels status display#1891

Closed
lailoo wants to merge 1 commit intoHKUDS:mainfrom
lailoo:fix/matrix-missing-from-channel-list-1887
Closed

fix(cli): add Matrix to channels status display#1891
lailoo wants to merge 1 commit intoHKUDS:mainfrom
lailoo:fix/matrix-missing-from-channel-list-1887

Conversation

@lailoo
Copy link
Copy Markdown
Contributor

@lailoo lailoo commented Mar 11, 2026

Summary

  • Bug: Matrix channel is missing from nanobot channels status output
  • Root cause: nanobot/cli/commands.py:channels_status() function does not include Matrix in the table display
  • Fix: Added Matrix channel row to the status table output

Fixes #1887

Problem

The nanobot channels status command displays all configured channels, but Matrix was missing from the list even though it's defined in the config schema.

Before fix:

$ nanobot channels status
Channel Status
┏━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Channel  ┃ Enabled ┃ Configuration                                ┃
┡━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ WhatsApp │ ✗       │ ws://localhost:3001                          │
│ Discord  │ ✗       │ wss://gateway.discord.gg/?v=10&encoding=json │
│ Feishu   │ ✗       │ not configured                               │
│ Mochat   │ ✗       │ https://mochat.io                            │
│ Telegram │ ✗       │ not configured                               │
│ Slack    │ ✗       │ not configured                               │
│ DingTalk │ ✗       │ not configured                               │
│ QQ       │ ✗       │ not configured                               │
│ Email    │ ✗       │ not configured                               │
└──────────┴─────────┴──────────────────────────────────────────────┘

Matrix is defined in nanobot/config/schema.py:219 but was not displayed.

Changes

  • nanobot/cli/commands.py — Added Matrix channel display between Discord and Feishu
  • tests/test_channels_status.py — Added regression test to verify Matrix is included in output

After fix:

$ nanobot channels status
Channel Status
┏━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Channel  ┃ Enabled ┃ Configuration                                ┃
┡━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
│ WhatsApp │ ✗       │ ws://localhost:3001                          │
│ Discord  │ ✗       │ wss://gateway.discord.gg/?v=10&encoding=json │
│ Matrix   │ ✗       │ https://matrix.org                           │
│ Feishu   │ ✗       │ not configured                               │
│ Mochat   │ ✗       │ https://mochat.io                            │
│ Telegram │ ✗       │ not configured                               │
│ Slack    │ ✗       │ not configured                               │
│ DingTalk │ ✗       │ not configured                               │
│ QQ       │ ✗       │ not configured                               │
│ Email    │ ✗       │ not configured                               │
└──────────┴─────────┴──────────────────────────────────────────────┘

Test plan

  • New test: test_channels_status_includes_matrix verifies Matrix is in output
  • Verified in real environment: python -m nanobot channels status shows Matrix
  • E2E tested with multiple config scenarios:
    • Matrix enabled with custom homeserver → displays ✓ + custom URL
    • Matrix disabled with default homeserver → displays ✗ + https://matrix.org
    • Matrix enabled with empty homeserver → displays ✓ + "not configured"
    • Matrix enabled with matrix.org → displays ✓ + https://matrix.org
  • 189 existing tests pass

Effect on User Experience

Before: Users with Matrix channel configured cannot see its status in nanobot channels status output, causing confusion about whether Matrix is supported.

After: Matrix channel is properly displayed in the status table, showing its enabled state and homeserver configuration.

@lailoo
Copy link
Copy Markdown
Contributor Author

lailoo commented Mar 11, 2026

Issue Already Fixed in Main

After checking the latest main branch, I found that this issue has been resolved by a recent refactoring:

Main branch now uses auto-discovery (commit f869a53):

  • The channels_status() function was refactored to use discover_channel_names()
  • Matrix is now automatically discovered and displayed
  • No hardcoded channel list needed

Current output on main:

    Channel Status    
┏━━━━━━━━━━┳━━━━━━━━━┓
┃ Channel  ┃ Enabled ┃
┡━━━━━━━━━━╇━━━━━━━━━┩
│ Matrix   │ ✓       │  ← Matrix is now shown

Note: The new implementation removed the Configuration column, so it only shows Channel and Enabled status.

Closing this PR as the issue is already fixed. The refactored approach is better as it automatically includes all channels without manual updates.

@lailoo
Copy link
Copy Markdown
Contributor Author

lailoo commented Mar 11, 2026

Closing as the issue is already fixed in main branch through auto-discovery refactoring.

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.

Matrix missing from channel list

1 participant