Skip to content

feat(ext): add generation-scoped presentation scope API - #1118

Draft
brettinternet wants to merge 7 commits into
modem-dev:mainfrom
brettinternet:feat/extension-presentation-scope
Draft

brettinternet wants to merge 7 commits into
modem-dev:mainfrom
brettinternet:feat/extension-presentation-scope

Conversation

@brettinternet

Copy link
Copy Markdown

Draft PR. Closes #1117

This adds an extension presentation scope API that allows extensions to transiently focus Hunk's native diff on specific file IDs and hunk indexes without mutating canonical review data.

Core Ownership and Design

  • Scope model: Each extension owns an optional, generation-scoped set of runtime file IDs and hunk indexes.
  • Lifecycle: Tied to an opaque reviewGeneration provided in pane props. Stale or invalid scopes are rejected. Scopes clear on extension reload, crash, retirement, or unload.
  • Composition: Applied downstream of user filters. Multiple active extension scopes intersect. Canonical review state, file order, and comment attachments remain untouched.
  • Navigation: Visible keyboard, sidebar, file, hunk, and note navigation paths adapt to projected sparse hunks. Authoritative review snapshots and agent/session addressing stay canonical.
  • Controls: Exposed via command review controls and pane actions, with direct user override (such as toggling Show All).

Validation

  • 139 focused scope and navigation unit tests passed.
  • 203 focused UI, diff, and AppHost unit tests passed.
  • Workspace typecheck, lint, dependency check, build:npm, and extension consumer check passed.
  • PTY smoke test verified on macOS: loaded drawer, applied presentation scope, toggled Show All with Alt+A, with no render loops.
  • Broad test suite note: The full repository test suite exhibits pre-existing, environment-sensitive failures in Git, Jujutsu, file-watching, install-VM, trust, and signal tests unrelated to these changes.
  • Platform coverage: Verified on macOS (Darwin arm64). Linux and Windows environments were not tested.

@vercel

vercel Bot commented Sep 21, 2026

Copy link
Copy Markdown

@brettinternet is attempting to deploy a commit to the Modem Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extension presentation scope API for focused diff reviews

1 participant