Skip to content

feat(cli): Add junior conversations list - #2234

Open
sentry-junior[bot] wants to merge 1 commit into
feat/conversation-list-cursorfrom
feat/conversations-list-cli
Open

sentry-junior[bot] wants to merge 1 commit into
feat/conversation-list-cursorfrom
feat/conversations-list-cli

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

PR 2 of #2231. Stacked on #2232, which adds the list cursor. Merge #2232 first.

junior conversations list prints one JSON line for each active root Conversation of the token owner:

pnpm exec junior conversations list --base-url https://junior.example.com --token "$JUNIOR_API_TOKEN"
{"id":"slack:C123:1700000000.000100","title":"Deploy question","url":"https://junior.example.com/conversations/slack%3AC123%3A1700000000.000100","slackUrl":"https://example.slack.com/archives/C123/p1700000000000100"}
  • Follows nextCursor from GET /api/conversations until no pages remain.
  • url is the dashboard route. The CLI builds it from --base-url with the same encoding as conversationPath() in the dashboard. It keeps a base path, like the API URLs do.
  • slackUrl is locationUrl, or null when there is no Slack thread.
  • --token falls back to JUNIOR_API_TOKEN. Like briefs, the command skips app plugin loading, so it needs only a token.
  • apiUrl and fetchJson move from briefs.ts to cli/api-client.ts, and optionValue moves to cli/run.ts. Both token-only commands now use the same helpers.
  • New docs page: cli/conversations.md, added to the CLI sidebar.

Notes for review:

Tests: tests/component/conversations-cli.test.ts runs the command against the real API (createJuniorApi()) and SQL, with 51 conversations, so it must follow one cursor. It checks the JSONL fields and the Slack link, and the usage error. I checked that the test fails when the command does not follow nextCursor. pnpm lint, typecheck, and the docs build pass.

via @dingsdax.

--

View Junior Session [Sentry]

Print one JSON line for each active root Conversation of the token
owner, with id, title, dashboard url, and Slack url. The command follows
nextCursor from GET /api/conversations until no pages remain.

Move the API URL and fetch helpers from briefs.ts to cli/api-client.ts,
and optionValue to cli/run.ts, so both token-only commands share them.

Refs #2231

Co-Authored-By: Johannes Daxboeck <114897+dingsdax@users.noreply.github.com>
@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
junior-docs Ready Ready Preview Oct 26, 2026 7:10pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview – junior-docs — f1a7cbdc Deployed Oct 26, 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