Skip to content

feat(channels): add join and leave - #211

Merged
piekstra merged 2 commits into
mainfrom
feat/channels-join-leave
Oct 19, 2026
Merged

piekstra merged 2 commits into
mainfrom
feat/channels-join-leave

Conversation

@piekstra

Copy link
Copy Markdown
Member

Summary

Adds slck channels join <channel> and slck channels leave <channel>. Joining as yourself (--as-user) is what lets you invite a bot or person to a public channel you are not in; slck could invite but not join.

  • join: conversations.join. Slack answers an existing membership with ok plus an already_in_channel warning (alongside others such as missing_charset, in response_metadata.warnings), reported as "Already in channel".
  • leave: conversations.leave. Slack answers a missing membership with ok and not_in_channel: true, reported as "Not in channel".

Verification

  • Unit tests for both outcomes and an error for each command; make lint clean.
  • Against a real workspace with a user token: join, join again (Already in channel), invite a bot, leave, leave again (Not in channel). The warning shape above is what Slack returned.
  • integration-tests.md gains the same four steps.

Joining a public channel as yourself is what lets you invite others to a channel you are not in, and slck had no way to do it. Both commands are idempotent: Slack reports an existing membership as an already_in_channel warning and a missing one as not_in_channel on a successful response.

@monit-reviewer monit-reviewer 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.

Automated PR Review

Reviewed commit: c9e34be6068b
Profile: claude-monit-reviewer - Posting as: monit-reviewer

Summary

Reviewer Findings
go:implementation-tests 0
harness-engineering:repo-health 0
policies:conventions 0
architecture:solid-reviewer-agnostic 1
security:code-auditor 0
documentation:docs 0
architecture:solid-reviewer-agnostic (1 finding)

Minor - internal/client/client.go:973

U-T1: the behavior this PR adds is the membership signal parsed in JoinChannel (already_in_channel in response_metadata.warnings) and LeaveChannel (not_in_channel), but no test checks it. TestRunJoin and TestRunLeave in channels_test.go only assert require.NoError for both the member and non-member replies. If JoinChannel always returned false, or the warning were read from the top-level warning string, every test would still pass and the CLI would print "Joined" for an existing membership. Suggested fix: add TestClient_JoinChannel_* and TestClient_LeaveChannel_* cases to internal/client/client_test.go, matching the existing TestClient_ArchiveChannel_Success pattern, and assert the returned bool for each reply shape. Alternatively (or as well), have the cmd tests capture output the way captureOutput does in internal/cmd/emoji/emoji_test.go and assert "Already in channel" / "Not in channel".

Reviewer Coverage

  • go:implementation-tests — complete (broad); inspected 5 assigned files (7 inspected across reviewers): internal/client/client.go, internal/cmd/channels/channels.go, internal/cmd/channels/channels_test.go, internal/cmd/channels/join.go, internal/cmd/channels/leave.go; skipped: none; constraints: none
  • harness-engineering:repo-health — complete (constrained); inspected 5 assigned files (7 inspected across reviewers): internal/client/client.go, internal/cmd/channels/channels.go, internal/cmd/channels/channels_test.go, internal/cmd/channels/join.go, internal/cmd/channels/leave.go; skipped: none; constraints: none
  • policies:conventions — complete (broad); inspected 5 assigned files (7 inspected across reviewers): README.md, internal/cmd/channels/channels.go, internal/cmd/channels/channels_test.go, internal/cmd/channels/join.go, internal/cmd/channels/leave.go; skipped: none; constraints: Shared cli-common docs and .github automation were not available as sibling checkouts in this workbench; convention check relied on in-repo precedent (internal/cmd/channels/invite.go) rather than canonical external docs.
  • architecture:solid-reviewer-agnostic — complete (broad); inspected 4 assigned files (7 inspected across reviewers): internal/client/client.go, internal/cmd/channels/channels.go, internal/cmd/channels/join.go, internal/cmd/channels/leave.go; skipped: none; constraints: Ran go build ./... and go test for internal/cmd/channels and internal/client at the PR head; both pass.
  • security:code-auditor — complete (broad); inspected 3 assigned files (7 inspected across reviewers): internal/client/client.go, internal/cmd/channels/join.go, internal/cmd/channels/leave.go; skipped: none; constraints: none
  • documentation:docs — complete (broad); inspected 2 assigned files (7 inspected across reviewers): README.md, integration-tests.md; skipped: none; constraints: none
Inspected files (7)
  • README.md
  • integration-tests.md
  • internal/client/client.go
  • internal/cmd/channels/channels.go
  • internal/cmd/channels/channels_test.go
  • internal/cmd/channels/join.go
  • internal/cmd/channels/leave.go

0 PR discussion threads considered. 0 summarized; 0 resolved.


Completed in 2m 57s | ~$2.43 (est.) | claude-sonnet-5, claude-opus-5-5 | cr 0.10.319
Field Value
Model claude-sonnet-5, claude-opus-5-5
Reviewers go:implementation-tests, harness-engineering:repo-health, policies:conventions, architecture:solid-reviewer-agnostic, security:code-auditor, documentation:docs
Engine claude_cli · claude-sonnet-5, claude-opus-5-5
Reviewed by cr · monit-reviewer
Duration 2m 57s wall · 6m 26s compute
Cost ~$2.43 (est.)
Pricing basis anthropic-public-2026-09-23
Tokens 100 in / 18.4k out

Per-workstream usage

  • orchestrator-selection — claude-sonnet-5
    • In: 6
    • Out: 3.6k
    • Cache read: 93.9k
    • Cache create: 41.1k
    • Cost: ~$0.22 (est.)
    • Duration: 47s
  • go:implementation-tests — claude-sonnet-5
    • In: 16
    • Out: 2.5k
    • Cache read: 390.8k
    • Cache create: 64.1k
    • Cost: ~$0.36 (est.)
    • Duration: 1m 05s
  • harness-engineering:repo-health — claude-sonnet-5
    • In: 22
    • Out: 3.6k
    • Cache read: 603.5k
    • Cache create: 46.8k
    • Cost: ~$0.34 (est.)
    • Duration: 1m 33s
  • policies:conventions — claude-sonnet-5
    • In: 14
    • Out: 2.2k
    • Cache read: 340.9k
    • Cache create: 41.1k
    • Cost: ~$0.25 (est.)
    • Duration: 38s
  • architecture:solid-reviewer-agnostic — claude-opus-5-5
    • In: 14
    • Out: 2.4k
    • Cache read: 278.6k
    • Cache create: 58.5k
    • Cost: ~$0.57 (est.)
    • Duration: 55s
  • security:code-auditor — claude-sonnet-5
    • In: 8
    • Out: 1.4k
    • Cache read: 175.4k
    • Cache create: 53.0k
    • Cost: ~$0.26 (est.)
    • Duration: 27s
  • documentation:docs — claude-sonnet-5
    • In: 16
    • Out: 2.3k
    • Cache read: 395.9k
    • Cache create: 41.1k
    • Cost: ~$0.27 (est.)
    • Duration: 38s
  • orchestrator-rollup — claude-sonnet-5
    • In: 4
    • Out: 461
    • Cache read: 87.1k
    • Cache create: 33.5k
    • Cost: ~$0.16 (est.)
    • Duration: 19s

Comment thread internal/client/client.go
@piekstra
piekstra marked this pull request as ready for review October 19, 2026 14:18
@piekstra
piekstra merged commit 32540c9 into main Oct 19, 2026
9 checks passed
@piekstra
piekstra deleted the feat/channels-join-leave branch October 19, 2026 14:19
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