mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
afac44b940
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.
47 lines
1.4 KiB
TypeScript
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);
|