Skip to content

Fix turn summary details for thread-scoped interactions - #5242

Merged
ymichael merged 1 commit into
mainfrom
bb/timeline-turn-details-400-for-card-only-summary-thr_z7wyhc6tv9
Oct 9, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/timeline-turn-details-400-for-card-only-summary-thr_z7wyhc6tv9

Conversation

@ymichael

@ymichael ymichael commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Resolving a plugin input card during a running turn and then steering that turn can produce a “Worked for …” group containing only thread-scoped interaction lifecycle events. The shared timeline projection assigns these events to the running turn, but the server's details endpoint required an explicitly turn-scoped event in the range. Expanding the group therefore returned 400 “range X-Y does not include turn T”.

What changed

Use the shared thread-view projection's turn bounds to validate detail ranges, removing the server's separate scope-only check. Load turn start and completion context so the projection assigns interactions to the correct running turn and rejects ranges belonging to another turn. Unmatched ranges return an invalid-request response.

How you verified

Added a public API regression that obtains the interaction-only summary range from the timeline response and expands it through the details endpoint. It failed with 400 before the fix and passes after. Added rejection cases for another turn's work, a standalone thread event, and an interaction during another turn; the interaction case also exposed missing lifecycle context before that repair.

Passed:

  • pnpm exec turbo run test --filter=@bb/server -- test/public/public-thread-timeline-turn-details.test.ts test/public/public-thread-data.test.ts test/public/public-thread-timeline-completed-turn-display.test.ts test/public/public-thread-timeline-output-preview.test.ts — 91 tests.
  • pnpm exec turbo run test --filter=@bb/thread-view — 464 tests.
  • pnpm exec turbo run typecheck --filter=@bb/server --filter=@bb/thread-view.
  • Oxlint and Oxfmt on all changed files, plus git diff --check.

AGENT GENERATED

@ymichael
ymichael merged commit 94e046f into main Oct 9, 2026
80 of 81 checks passed
@ymichael
ymichael deleted the bb/timeline-turn-details-400-for-card-only-summary-thr_z7wyhc6tv9 branch October 9, 2026 06:08
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.

1 participant