Skip to content

feat(status): surface subscribed_channels (closes #149) - #254

Merged
joelteply merged 1 commit into
canaryfrom
fix/cmd-status-surfaces-subscribed-channels
Apr 28, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/cmd-status-surfaces-subscribed-channels

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Adds a 'channels:' line to airc status showing the tab's subscribed channels, with the default marked. Replaces the pre-2B.3 ls-the-scope-dirs workflow.

Pre-Phase-2B.3 you had to ls .airc.* + cat each room_name to know
'what rooms is this tab in?'. Post-2B.3 the canonical source is
subscribed_channels in config.json. cmd_status now displays:

  channels:    #cambriantech (default), #useideem, #general

First subscribed channel is the default (what cmd_send stamps without
--channel override); rest are advisory display tags.

Verification: status 7/0, tabs 19/0; manual exercise.
Copilot AI review requested due to automatic review settings April 28, 2026 23:06
@joelteply
joelteply merged commit a9fc63b into canary Apr 28, 2026
@joelteply
joelteply deleted the fix/cmd-status-surfaces-subscribed-channels branch April 28, 2026 23:06

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds visibility into multi-channel participation by surfacing the configured subscribed_channels in airc status, aligning the status command with the post-Phase-2B.3 config-driven workflow (replacing the older scope-dir listing approach).

Changes:

  • Read subscribed_channels from config.json via airc_core.config read_channels.
  • Render a new channels: line in airc status, indicating the default channel and listing any additional subscriptions.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

# is config.json's subscribed_channels; first element is the default
# channel that cmd_send stamps. Display the list with a marker for
# the default.
local _channels; _channels=$("$AIRC_PYTHON" -m airc_core.config read_channels --config "$CONFIG" 2>/dev/null)
Comment on lines +55 to +59
if [ -n "$_rest" ]; then
echo " channels: #${_default} (default), #${_rest}"
else
echo " channels: #${_default}"
fi
Comment on lines +47 to +60
# Channel participation (#149). Post-Phase-2B.3 the canonical source
# is config.json's subscribed_channels; first element is the default
# channel that cmd_send stamps. Display the list with a marker for
# the default.
local _channels; _channels=$("$AIRC_PYTHON" -m airc_core.config read_channels --config "$CONFIG" 2>/dev/null)
if [ -n "$_channels" ]; then
local _default; _default=$(echo "$_channels" | head -1)
local _rest; _rest=$(echo "$_channels" | tail -n +2 | tr '\n' ',' | sed 's/,$//' | sed 's/,/, #/g')
if [ -n "$_rest" ]; then
echo " channels: #${_default} (default), #${_rest}"
else
echo " channels: #${_default}"
fi
fi
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.

2 participants