Files
backnotprop__plannotator/packages/ui/shortcuts/code-review/allFilesDiff.shortcuts.ts
T
Michael Ramos afac44b940 feat(review): migrate all-files code review to Pierre CodeView (#885)
Replaces the all-files renderer with Pierre's virtualized CodeView (one scroller, identical look, scales to huge diffs); deletes the legacy AllFilesDiffView/LazyFileDiff and their flag; single-file panels stay on FileDiff. @pierre/diffs pinned exact 1.2.8 (1.2.9's tree is broken on npm — see #880).

Also ships: diff staleness detection ('Diff out of date · Refresh' toolbar notice backed by shared per-VCS fingerprints + GET /api/diff/fresh on both Bun and Pi servers), a stale-content guard so files edited mid-review degrade to raw-patch view instead of breaking virtualization, the Ask AI wrong-file fix (pre-existing), and toolbar/header UI polish (global settings cog, aligned sem badges, no all-files split dragger).

Hardened through five review waves; tested with 1384 passing tests incl. real-git fingerprint and patch-consistency suites. Known minor gaps documented in the PR.
2026-06-10 21:07:58 -07:00

47 lines
1.4 KiB
TypeScript

import { defineShortcutScope } from '../core';
import { createShortcutScopeHook } from '../runtime';
export const reviewAllFilesDiffShortcuts = defineShortcutScope({
id: 'review-all-files-diff',
title: 'All-Files Diff View',
shortcuts: {
toggleCollapse: {
description: 'Collapse / expand current file',
bindings: ['X'],
section: 'All-Files View',
hint: 'Available when the all-files diff panel is active.',
displayOrder: 10,
},
undoCollapse: {
description: 'Re-expand nearest collapsed file',
bindings: ['Z'],
section: 'All-Files View',
hint: 'Reopens the nearest collapsed file at or above the current position (collapse also fires when toggling viewed).',
displayOrder: 20,
},
addFileComment: {
description: 'Add file-scoped comment',
bindings: ['C'],
section: 'All-Files View',
hint: 'Opens the file-scoped comment popover for the active file.',
displayOrder: 30,
},
nextFile: {
description: 'Scroll to next file',
bindings: [']'],
section: 'All-Files View',
hint: 'All-files panel only.',
displayOrder: 40,
},
prevFile: {
description: 'Scroll to previous file',
bindings: ['['],
section: 'All-Files View',
hint: 'All-files panel only.',
displayOrder: 50,
},
},
});
export const useReviewAllFilesDiffShortcuts = createShortcutScopeHook(reviewAllFilesDiffShortcuts);