Repository navigation
BB-16: Show agent thread title and chat link in task comments - #746
Merged
SawyerHood merged 2 commits intoJul 16, 2026
Merged
SawyerHood merged 2 commits into
SawyerHood merged 2 commits into
Conversation
Agent-authored task comments rendered the raw thread id ("agent (thr_...)")
and never linked to the chat. Resolve the thread's current human title at
read time in the listComments handler and render it as a link that opens the
chat, with safe fallbacks.
- Add threadTitle to the listComments output (displayCommentSchema); the
stored comment shape is unchanged and threadId was already persisted.
- Resolve titles live via bb.sdk.threads.get, deduped per thread id;
deleted/hidden/inaccessible threads leave no title so callers fall back to
the stored authorName without leaking a thread.
- UI byline links via navigate.toThread only when a title resolves; system
and user comment rendering is unchanged.
- CLI parity: bb tasks show surfaces the resolved title (JSON + table).
- Tests: contract/server enrichment + byline fallback logic.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
…add rendered UI test - resolveAgentThreadTitles now skips side-chat threads (originKind or legacy childOrigin === "side-chat") so internal conversations never surface a title/link through an ordinary comment. - Pick the first non-blank title candidate so a whitespace-only primary title no longer suppresses a useful titleFallback. - Extract CommentAuthor into an SDK-free module and add a rendered jsdom test asserting the linked button name, the exact navigate.toThread(threadId) click, and the user/unresolved non-link fallbacks. - Extend the listComments contract test with side-chat (both variants) and blank-primary-title cases. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
SawyerHood
deleted the
bb/bb-16-agent-titles-and-thread-links-in-comments-thr_rqd2ny55f3
branch
July 16, 2026 18:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Agent-authored task comments used to render the raw thread id (
agent (thr_...)) with no way to open the chat. They now show the authoring thread's current human title as a link that opens the chat, with safe fallbacks.Changes
shared/contract.ts): newdisplayCommentSchemaextendscommentSchemawiththreadTitle: string | null, used for thelistCommentsoutput only. The stored comment shape is unchanged;threadIdwas already persisted.api/index.ts):listCommentsresolves the title at read time viabb.sdk.threads.get, deduped per thread id. A thread contributes no title (callers fall back toauthorName, no link) when it is deleted/hidden/inaccessible or a side chat (originKind/legacychildOrigin === "side-chat"). Picks the first non-blank oftitle/titleFallbackso a whitespace-only primary title can't suppress a useful fallback.views/activity/comment-author.tsx,time.ts,task-activity.tsx):commentBylinedecides link vs. text;CommentAuthor(SDK-free) renders the title as anavigate.toThread(threadId)link only when a title resolves. System/user comment rendering is unchanged.cli/index.ts):bb tasks show --jsonincludesthreadTitleper comment; the human-readable Comments table shows the resolved title.Design decisions (task was underspecified)
bb.sdk.threads.get).threadId, plus user/system comments, fall back to the storedauthorName.Tests
api/api.test.ts: live title, fallback-only, blank primary title → fallback, side chat (originKind) → null, legacy childOrigin side chat → null, missing thread → null, legacy no-thread → null, user → null, and onethreads.getper distinct thread.views/activity/comment-author.test.tsx: rendered jsdom test — linked button name, exactnavigate.toThread("thr_worker")on click, and user/unresolved non-link fallbacks.views/activity/activity.test.ts:commentBylinebranch coverage.Validation
turbo run typecheck build test --filter=bb-plugin-tasks— all green; 153 tests passed.Known tradeoff (non-blocking)
listCommentsfans out onebb.sdk.threads.getper distinct agent thread on each read (deduped). The count equals the number of distinct agent threads on a task — typically a small handful — so no bounded-concurrency/cache layer was added; a short-lived cache would risk stale titles after a rename. Revisit if tasks accrue many distinct agent threads.🤖 Generated with Claude Code