Skip to content

Add channel mark command#63

Merged
AmethystLiang merged 4 commits intostablyai:mainfrom
robert10997:feat/channel-mark
Mar 13, 2026
Merged

Add channel mark command#63
AmethystLiang merged 4 commits intostablyai:mainfrom
robert10997:feat/channel-mark

Conversation

@robert10997
Copy link
Contributor

@robert10997 robert10997 commented Mar 11, 2026

Summary

  • Adds channel mark subcommand wrapping Slack's conversations.mark API
  • Marks channels, DMs, and group DMs as read up to a given message timestamp
  • Accepts message URLs (extracts channel + ts automatically), channel names/IDs, or DM channel IDs
  • Updates SKILL.md, commands.md, targets.md, and output.md reference docs

Usage

# By URL
agent-slack channel mark "https://workspace.slack.com/archives/C123/p1700000000000000"

# By channel name + ts
agent-slack channel mark "#general" --workspace "myteam" --ts "1770165109.628379"

# By DM channel ID + ts
agent-slack channel mark "D0A04PB2QBW" --workspace "myteam" --ts "1770165109.628379"

Test plan

  • bun run typecheck passes
  • bun run lint passes (0 warnings, 0 errors)
  • bun run test passes (125 tests)
  • bun run format:check passes
  • Manually tested against live workspace: marking channels, DMs, and Slack Connect DMs as read

Wraps Slack's `conversations.mark` API. Accepts message URLs,
channel names/IDs, or DM channel IDs. Works with channels, DMs,
and group DMs.
@AmethystLiang
Copy link
Contributor

AmethystLiang commented Mar 12, 2026

Here is the review from Codex:

channel mark is a worthwhile addition and fits the CLI well overall, but there is one blocking issue before merge. When <target> is a Slack message URL, the workspace should come from the URL and must not be overridden by --workspace. Right now the implementation lets --workspace take precedence in URL mode, which is inconsistent with the existing URL-based message commands and creates a real footgun for a mutating command: a permalink from workspace A can be executed against workspace B. Please make URL targets authoritative here (or reject --workspace entirely when a URL target is passed), and add a command-level test covering that behavior along with the --ts validation path.

Once addressed, I will merge it.

URL targets are authoritative for workspace — allowing --workspace
to override creates a footgun where a permalink from workspace A
could be executed against workspace B. This aligns channel mark
with the existing message command behavior.

Adds tests for URL workspace rejection and --ts validation.
@robert10997
Copy link
Contributor Author

Thank you, updated!

AmethystLiang and others added 2 commits March 12, 2026 17:31
A URL is a fully-specified target (workspace + channel + ts), so
allowing --ts to override the timestamp is inconsistent with the
existing --workspace rejection. If you want a different ts, use
the #channel --ts form instead.

Adds test for URL --ts rejection and updates commands.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
A URL provides channel + workspace + ts, but --ts override is useful
(e.g. marking to just before a message to make it appear unread).
This differs from --workspace which remains rejected since overriding
the workspace is a genuine footgun.

Adds test for --ts override with URL targets and updates commands.md.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Contributor

@AmethystLiang AmethystLiang left a comment

Choose a reason for hiding this comment

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

Looks good! Clean implementation that follows existing patterns well. Added a commit to allow --ts override with URL targets (useful for the mark-as-unread pattern) while keeping --workspace rejection.

@AmethystLiang AmethystLiang merged commit 7aba3e7 into stablyai:main Mar 13, 2026
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