Skip to content

feat(slack): Expand public context reads for teammate UX - #1388

Merged
dcramer merged 12 commits into
mainfrom
feat/slack-teammate-context-slice1
Aug 10, 2026
Merged

dcramer merged 12 commits into
mainfrom
feat/slack-teammate-context-slice1

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

First slice of #1385.

Make public Slack context feel more like a teammate: accept channel names on existing params, join public channels on demand, read linked public threads and other-channel history, and keep search limits honest.

Changes

  • channel_id params accept a channel id (C123) or public channel name (#foo) via an internal resolve helper (no separate resolve tool)
  • slackChannelListMessages and slackThreadRead join on demand when Slack returns not_in_channel
  • New slackChannelJoin tool for explicit on-demand public joins
  • slackPublicSearch stays registered without an action token and explains the interactive-turn limit instead of disappearing
  • Broader public search content types (messages / files / channels / users)
  • Clearer private / not-in-channel / missing-scope errors and tighter tool descriptions
  • Document required bot scopes including search:read.public, search:read.files, search:read.users, and channels:join

Out of scope

  • Always-on workspace search without Slack action_token
  • Private/DM search
  • Blanket join-all

Test plan

  • Targeted vitest for public search, thread read, channel tools, conversation message search, and tool registration
  • Reinstall / verify prod Slack app has the new scopes after merge

Make public Slack context more teammate-like in the first slice of #1385:
allow cross-channel history and live public-channel access checks, broaden
interactive public search content types, and document the required search
scopes including files and users.

Co-Authored-By: David Cramer <[email protected]>
@vercel

vercel Bot commented Aug 10, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview Aug 10, 2026 8:11pm

Request Review

Complete the teammate-context UX slice: resolve public channel names,
join public channels on demand, retry history/thread reads after join,
keep public search visible without an action token, tighten tool copy,
and document channels:join.

Co-Authored-By: David Cramer <[email protected]>
Drop the separate channel-resolve tool. Accept public channel names on
existing channel_id params via an internal helper used by history, join,
thread read, and retained conversation search.

Co-Authored-By: David Cramer <[email protected]>
Move channel access, name resolution, tool context, URL parsing, and
canvas/list helpers into slack/tool-support so tools/ only contains one
tool definition per file.

Co-Authored-By: David Cramer <[email protected]>
@dcramer
dcramer marked this pull request as ready for review August 10, 2026 19:31
@github-actions github-actions Bot added the risk: high PR risk score: high label Aug 10, 2026

@dcramer dcramer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lots of stuff needs cleaned up around the tool definitions

) {
return zodTool({
description:
"Join a public Slack channel. Use when the user asks Junior to join or when reading a public channel requires membership.",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

dont reference "Junior" in tool descriptions, as the bots name is configurable. We dont need to tell it when to use it.

Drop optional tool-factory DI, shorten model-facing descriptions without
product names or when-to-use prose, put field meaning on shared schemas,
and mark conversations.join retries as idempotent.
Require stable identifiers on search hits and parse Slack wire shapes
through typed Zod transforms instead of optional bag-of-fields helpers.

@cursor cursor Bot 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.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit c4560b4. Configure here.

Normalize blank optional Slack search fields and empty next_cursor to
undefined so final pages and partial payloads keep valid results.
Stop treating stale persisted public visibility as enough for
cross-channel reads when conversations.info cannot prove the channel
is still public.
Keep shared param schemas as the required value shape and apply
.optional() where each tool input needs it. Document the rule in
tool-design policy.
@dcramer
dcramer merged commit 2a28b59 into main Aug 10, 2026
37 checks passed
@dcramer
dcramer deleted the feat/slack-teammate-context-slice1 branch August 10, 2026 20:37

This branch was successfully deployed

1 active deployment
Preview – junior-docs — 176bdf87 Deployed Aug 10, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: high PR risk score: high

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant