From 0a6a5b21beb8db2d09f8335a49950ee049d22c6a Mon Sep 17 00:00:00 2001 From: Ben Vinegar Date: Tue, 19 May 2026 10:51:29 -0400 Subject: [PATCH] test(ui): align plannedReviewRows test with unified inline-note model #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 --- src/ui/diff/plannedReviewRows.test.ts | 33 +++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/ui/diff/plannedReviewRows.test.ts b/src/ui/diff/plannedReviewRows.test.ts index 66205d04..77f69fab 100644 --- a/src/ui/diff/plannedReviewRows.test.ts +++ b/src/ui/diff/plannedReviewRows.test.ts @@ -91,20 +91,49 @@ function inlineNote(key: string, hunkIndex: number): PlannedReviewRow { summary: "Explain why this branch changed.", rationale: "The note should reserve space in the hunk bounds.", }, + note: { + id: "note-1", + annotation: { + id: "note-1", + newRange: [1, 1], + summary: "Explain why this branch changed.", + rationale: "The note should reserve space in the hunk bounds.", + }, + }, anchorSide: "new", noteCount: 1, noteIndex: 0, }; } +// Inline notes were unified into the diff-row stream, so the standalone "note-guide-cap" row +// kind is gone: a guide cap is now a regular diff-row that carries a noteGuideSide marker. function guideCap(key: string, hunkIndex: number): PlannedReviewRow { return { - kind: "note-guide-cap", + kind: "diff-row", key, stableKey: key, fileId: "file-1", hunkIndex, - side: "new", + noteGuideSide: "new", + row: { + type: "split-line", + key, + fileId: "file-1", + hunkIndex, + left: { + kind: "deletion", + sign: "-", + lineNumber: 1, + spans: [{ text: "old" }], + }, + right: { + kind: "addition", + sign: "+", + lineNumber: 1, + spans: [{ text: "new" }], + }, + }, }; }