feat(agent): read-only context/artifact inspector panel#166
Open
OnlyTerp wants to merge 8 commits into
Open
Conversation
Add "Inspector" as a new tab in the right-side panel that renders deriveTurnTimeline(session) as a per-turn list showing model id, token usage, context bar, tool calls, and files touched. Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ase 0 turn-timeline test)
… to Inspector Add a compact summary bar at the top of the Inspector panel showing total turns, tool calls, unique files, and session token count. Extend TurnRecord with an `attachments` field derived from ChatMessage.attachments, and render attachment chips per turn alongside the existing file chips. Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Accumulate context% samples in component-local state via
useSyncExternalStore (respecting the no-useEffect lint rule) and render
a compact SVG sparkline in the Inspector summary header. The sparkline
tracks up to 30 samples and resets when the session changes.
Turn->chat scroll was SKIPPED: the Timeline component renders message
wrappers with key={message.id} but does not set an id or data-attribute
on the DOM node, so messages are not addressable by id. Restructuring
the chat pane is out of scope.
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Add data-message-id DOM attribute to timeline message wrappers and make Inspector turn cards clickable to scroll the chat pane to the matching assistant message. Keyboard accessible (Enter/Space), guards against missing elements, and avoids hijacking clicks on interactive children. Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
- Add formatDuration helper for turn and session durations
- Show session duration (first turn start → last turn end) in summary header
- Show per-turn duration in TurnRow
- Add "Tools only" toggle to filter turns with zero tool calls
- Display contextual empty state ("No turns with tool calls") when filter active
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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
A read-only "Inspector" panel in the agent workspace: a per-turn timeline derived purely from the current session, for debugging context/tool usage.
Changes
deriveTurnTimeline(session)model (with unit tests) — zero Session/Pi state mutation.data-message-idattribute to message wrappers).Verification
npx tsx --test tests/frontend/e2e/turn-timeline.test.ts→ pass.typecheck+lint+build→ clean.Non-goals
data-message-idattribute.