Skip to content

fix(ux): cmd_kick accepts @peer; identity link is honest about unlink semantics - #242

Merged
joelteply merged 1 commit into
canaryfrom
fix/cmd-kick-and-identity-link-ux
Apr 28, 2026
Merged

joelteply merged 1 commit into
canaryfrom
fix/cmd-kick-and-identity-link-ux

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

Two QA bugs (#7 + #8). cmd_kick now strips @ for parity with msg; identity link's no-handle path is explicit about whether anything was actually unlinked.

… semantics

Two QA bugs from 2026-04-28 pass.

## #7: cmd_kick @-prefix consistency

Before: airc kick @alice  → ERROR: invalid peer name '@alice'
        airc kick alice   → works
        airc msg  @alice  → works
After:  airc kick @alice  → works (@ stripped before validation)

Users who write @ for DM naturally write @ for kick. Inconsistency
was a pure UX wart.

## #8: identity link/unlink output mismatch

Before:
  airc identity link continuum     → "  unlinked: continuum"
                                      (verb said link but action was
                                       unlink, with no acknowledgment
                                       of the disconnect)
After (no handle, was previously linked):
  airc identity link continuum     → "  unlinked: continuum (was: handle;
                                       pass a handle to (re)link)"
After (no handle, never linked):
  airc identity link continuum     → "  no continuum integration to
                                       unlink. Pass a handle to link:
                                       airc identity link continuum
                                       <handle>"
After (with handle, replaces existing):
  airc identity link continuum X   → "  linked: continuum -> X
                                       (was: oldhandle)"

Each output now reflects what actually happened to the integrations
state, including the "you said link but I unlinked" fork.

## Verification

  test/integration.sh kick:     12/0 ✓
  test/integration.sh identity: 19/0 ✓
  Manual: airc kick @x / kick x both work; airc identity link
          continuum prints the new "no integration to unlink" message.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings April 28, 2026 20:18
@joelteply
joelteply merged commit 12d65c4 into canary Apr 28, 2026
1 check passed
@joelteply
joelteply deleted the fix/cmd-kick-and-identity-link-ux branch April 28, 2026 20:18

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

Improves UX consistency for peer targeting and clarifies identity link output so users can tell whether an unlink actually occurred.

Changes:

  • Allow airc kick @peer by stripping a leading @ before validation.
  • Make airc identity link <platform> messaging explicit for relink, unlink, and no-op unlink cases.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
lib/airc_bash/cmd_kick.sh Strips @ prefix from kick target and updates usage text accordingly.
lib/airc_bash/cmd_identity.sh Updates identity integration link/unlink output to reflect previous state and no-op cases.

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

Comment thread lib/airc_bash/cmd_kick.sh
Comment on lines +35 to 41
# Accept @-prefix for parity with `airc msg @peer`. QA pass found
# the @-rejection inconsistent — users who write @ for DM naturally
# write @ for kick. Strip BEFORE validation; the rest of the function
# uses $target (not $1).
target="${target#@}"
_validate_peer_name "$target"
shift || true

Copilot AI Apr 28, 2026

Copy link

Choose a reason for hiding this comment

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

New behavior accepts an @-prefixed peer name, but the existing kick integration scenario only exercises airc kick <peer> without @. To prevent regressions, add a test case (e.g., in scenario_kick) that kicks via airc kick @kjoiner ... and asserts the peer file + authorized_keys removal still occurs.

Copilot uses AI. Check for mistakes.
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