Skip to content

Allow exporting Conversations and Automations with dashboard and location links #2231

Closed

Description

@sentry-junior

Ask

Sync or export my Junior Conversations and Automations by script, with links back to the dashboard and to the outside location (such as a Slack thread). A script reads Briefs with one detail call per Conversation.

Works today

GET /api/conversations returns at most 50 roots (CONVERSATION_FEED_LIMIT in packages/junior/src/api/conversations/list.ts) and has no cursor. A client must build the dashboard link, which is wrong when the dashboard has a base path. GET /api/automations already pages with page + total.

Proposal

PR 1: API cursor and dashboard links (#2232)

  • GET /api/conversations takes an optional cursor and returns nextCursor while more rows remain. Without cursor, the response is unchanged apart from the new optional fields.
  • Signed keyset cursor: lastActivityAt + conversationId, plus a pinned flag, because the viewer's pins sort first. cursor works with q and status. Callers send the same filters on each page.
  • Conversation and Automation summaries return an optional dashboardUrl, built by the server. It includes the dashboard base path and is missing when the dashboard is off. The MCP mappers use the same field.

PR 2: junior conversations list (#2234)

  • JSONL in the MCP searchConversations shape (mcpConversation()), with new kind and parentConversationId fields.
  • One line per root, then one line per visible Thread under it.
  • --status active|archived (default active).
  • Follows nextCursor. Drops repeated ids, because the first page adds roots that wait on the viewer, and those can show again on a later page.

PR 3: junior automations list (#2880)

  • JSONL in the MCP searchAutomations shape (mcpAutomation()).
  • scope=mine, sort=oldest, 100 per page, stops at total. No new cursor.

Follow-ups

  • A cursor for the MCP searchConversations tool.
  • Archived Threads, and Threads under a root that the viewer archived: the API does not return them today.

via @dingsdax.

--

View Session [Sentry]

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions