feat(git): float actions beside each diff hunk

Replace the shared hunk menu with compact per-hunk controls over following context. Preserve canonical patch checks, bind controls to rendered rows, and keep EOF actions inside the code column.

Validated 19 focused tests, UI type-check, UI/web lint and the web build. Browser checks covered unified and split layouts, themes, and one-line EOF hunks.
This commit is contained in:
Bohdan Triapitsyn
2026-09-09 22:36:15 +03:00
parent d9186afdc0
commit b267b995a5
9 changed files with 386 additions and 394 deletions
+6 -2
View File
@@ -1,8 +1,12 @@
import { test } from 'vitest';
import { exerciseDiffHunkActions } from '@openchamber/ui/components/views/DiffView.hunks.fixture';
import { afterAll, test } from 'vitest';
import { closeDiffHunkWorkers, exerciseDiffHunkActions } from '@openchamber/ui/components/views/DiffView.hunks.fixture';
afterAll(closeDiffHunkWorkers);
// The actual view imports Vite asset globs. Run its UI-owned DOM fixture through
// the web renderer's transform pipeline instead of mocking those modules.
test('hunk actions refresh unchanged-status patches, survive full context and exclude historical diffs', () => exerciseDiffHunkActions());
test('full-context and action reads must describe the same file version', () => exerciseDiffHunkActions('cold'));
test('cached action patches cannot be paired with a newer full-context display', () => exerciseDiffHunkActions('cached'));
test('single-hunk inline actions require matching display and action versions too', () => exerciseDiffHunkActions('cold-single'));
test('split-view hunk controls occupy the matching rendered annotation rows', () => exerciseDiffHunkActions(undefined, 'side-by-side'));