Commit cfd36a7
authored
fix: pair browser screenshots with their exact tool action (#198)
## Summary
- fixes the activity model grouping every consecutive tool under one
generic `data-tool` type
- groups evidence-free runs by their actual tool name
- keeps every evidence-bearing tool call standalone so its screenshot
expands beneath the exact action that produced it
## Root Cause
`collapseToolRuns` compared `part.type`, which is `data-tool` for every
tool call. As a result, a browser open followed by a screenshot rendered
as one `Opened ... (+1 more)` action even though the screenshot evidence
belongs only to the screenshot call.
## Decision
Evidence is keyed by `toolCallId` and an evidence-bearing call is never
collapsed with another action. Repeated actions without evidence can
still collapse to keep the activity timeline compact.
## Verification
- `pnpm lint`
- `pnpm typecheck`
- `pnpm turbo build --force`
- `pnpm deadcode`
- `pnpm architecture:check`
- `pnpm turbo skills:build`
- focused runtime assertion covering browser open, multiple screenshots,
exact evidence pairing, and repeated evidence-free actions
## Production QA
After merge and deployment, re-run the existing authenticated screenshot
flow and verify each screenshot appears only inside its own expanded
`Captured a screenshot` action, never as a Deliverable.1 parent f185a94 commit cfd36a7
1 file changed
Lines changed: 29 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
108 | 108 | | |
109 | 109 | | |
110 | 110 | | |
111 | | - | |
| 111 | + | |
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | 115 | | |
116 | | - | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
117 | 124 | | |
118 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
119 | 129 | | |
120 | 130 | | |
121 | | - | |
122 | | - | |
123 | 131 | | |
124 | | - | |
125 | | - | |
126 | | - | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
127 | 135 | | |
128 | 136 | | |
129 | 137 | | |
130 | 138 | | |
131 | 139 | | |
132 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
133 | 154 | | |
134 | 155 | | |
135 | 156 | | |
| |||
0 commit comments