test(ui): fix broken plannedReviewRows test on main#334
Conversation
#317 unified inline notes into the diff-row stream and made note the required field on inline-note rows while removing the standalone note-guide-cap row kind, but its colocated test still built the old shapes, breaking tsc on main. Update the test helpers to the current PlannedReviewRow type without changing any assertions. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Greptile SummaryThis PR fixes two stale test helper functions in
Confidence Score: 5/5Safe to merge — test-only change that restores a green Both helpers are updated to match the current type definitions exactly, all three geometry assertions remain unchanged and still exercise the same behaviors, and No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A["PlannedReviewRow union"] --> B["kind: diff-row"]
A --> C["kind: inline-note"]
B --> D["row: DiffRow\nanchorId?: string\nnoteGuideSide?: 'old' | 'new'"]
C --> E["annotation: AgentAnnotation\nnote: VisibleAgentNote\nanchorSide?: 'old' | 'new'"]
style A fill:#4a90d9,color:#fff
style B fill:#5cb85c,color:#fff
style C fill:#5cb85c,color:#fff
subgraph "Before PR #317"
X["kind: note-guide-cap\nside: 'new'"]
end
subgraph "After PR #317 (this fix)"
Y["kind: diff-row\nnoteGuideSide: 'new'\nrow: split-line"]
end
X -. "removed" .-> Y
Reviews (1): Last reviewed commit: "test(ui): align plannedReviewRows test w..." | Re-trigger Greptile |
|
Superseded — #332 already fixed |
Summary
maincurrently failstsc(and therefore the Typecheck + Test + Smoke CI job) independently of any open PR.PR #317 (
feat: unify inline notes and expand behavior coverage) unified inline notes into the diff-row stream:inline-noterows now require anote: VisibleAgentNotefieldnote-guide-caprow kind was removed (a guide cap is now adiff-rowcarryingnoteGuideSide)But its colocated
src/ui/diff/plannedReviewRows.test.tsstill constructed the old shapes, sotscfails onmain:Changes
Test-only. Update the two stale helpers to the current
PlannedReviewRowmodel:inlineNote()now includes the requirednotefieldguideCap()now returns adiff-rowwithnoteGuideSide: "new"(the unified representation)No assertions changed — a guide cap is still a 1-height row that contributes to hunk bounds, so all three geometry tests pass with their original expected values.
Testing
bun run typecheck— cleanbun run lint— cleanbun test src/ui/diff/plannedReviewRows.test.ts— 3 passNo CHANGELOG entry: test-only, no user-visible behavior change.
🤖 Generated with Claude Code