What do you want to change?
Add a generation-scoped presentation scope API for extensions to transiently focus Hunk's native diff on specific file IDs and hunk indexes without mutating canonical review data.
This is a general presentation mechanism. It is explicitly not a semantic review-plan or tour-provider API.
Why?
Extensions such as hunk-guide need a reversible section-focus mode that narrows what the reviewer sees while preserving standard Hunk diff rendering, navigation, and keybindings.
The current public extension API can navigate and observe filters, but cannot transiently narrow the diff display. Using transformChangeset for this is fundamentally wrong: it mutates canonical review input, breaking comment persistence, review state, user filters, and subsequent navigation.
How? (optional)
- Extension ownership: Each extension owns a generation-scoped presentation scope consisting of runtime file IDs and hunk indexes.
- Lifecycle: Scopes are tied to an opaque
reviewGeneration exposed via pane props. Stale or malformed scopes are rejected. Scopes clear automatically on extension reload, failure, retirement, or unload.
- Composition: Presentation scopes compose downstream of user filters. If multiple extensions register scopes, Hunk intersects them. Canonical review state, file ordering, and comments remain untouched.
- Controls: Extensions set or clear scope via command review controls and pane actions. Users can toggle or bypass presentation filtering directly.
- Navigation: Terminal-visible keyboard, sidebar, file, hunk, and note navigation respects the projected sparse hunks. Authoritative snapshots and agent/session addressing remain canonical.
A fully tested implementation and working consumer (hunk-guide) are ready.
What do you want to change?
Add a generation-scoped presentation scope API for extensions to transiently focus Hunk's native diff on specific file IDs and hunk indexes without mutating canonical review data.
This is a general presentation mechanism. It is explicitly not a semantic review-plan or tour-provider API.
Why?
Extensions such as hunk-guide need a reversible section-focus mode that narrows what the reviewer sees while preserving standard Hunk diff rendering, navigation, and keybindings.
The current public extension API can navigate and observe filters, but cannot transiently narrow the diff display. Using
transformChangesetfor this is fundamentally wrong: it mutates canonical review input, breaking comment persistence, review state, user filters, and subsequent navigation.How? (optional)
reviewGenerationexposed via pane props. Stale or malformed scopes are rejected. Scopes clear automatically on extension reload, failure, retirement, or unload.A fully tested implementation and working consumer (hunk-guide) are ready.