Repository navigation
feat(status): surface subscribed_channels (closes #149) - #254
Merged
Merged
Conversation
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.
There was a problem hiding this comment.
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_channelsfromconfig.jsonviaairc_core.config read_channels. - Render a new
channels:line inairc 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 |
2 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.