Skip to content

feat(extensions): give panes the current line's source address - #940

Merged
benvinegar merged 1 commit into
mainfrom
feat/pane-current-line-address
Aug 31, 2026
Merged

benvinegar merged 1 commit into
mainfrom
feat/pane-current-line-address

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Summary

Opted-in pane currentLine already follows the cursor, but only as an opaque row painter (render(side, width)). Commands already get { side, line } on ctx.selection.currentLine. Panes did not, so anything that needs the address — blame, diagnostics, notes — could not update as the user stepped.

This adds side and line to ExtensionCurrentLinePaint (API v14). Same opt-in (currentLine: true), same public address as command selection and revealLine. Lens keeps calling .render(); a blame pane can read the address.

Test plan

  • bun test src/ui/lib/extensionCurrentLine.test.ts src/ui/lib/extensionPanes.test.ts src/ui/hooks/useExtensionPaneController.test.tsx src/extensions/runExtension.test.ts
  • oxlint on changed files
  • Load hunk-lens (hunk extension install modem-dev/hunk-lens) and confirm the bottom lens still follows the current line
  • Throwaway pane with currentLine: true that notifys ${currentLine.side}:${currentLine.line} on each step

@vercel

vercel Bot commented Aug 31, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hunk-web Ready Ready Preview Aug 31, 2026 12:40am

Request Review

@greptile-apps

greptile-apps Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR advances the extension API to v14 and exposes the current cursor’s { side, line } source address to panes that opt into current-line paint.

  • Adds immutable source-address fields to ExtensionCurrentLinePaint.
  • Populates the fields from the same live cursor target used by command selection.
  • Updates focused tests, package validation, release metadata, and extension documentation.

Confidence Score: 5/5

The PR appears safe to merge with no actionable correctness, compatibility, or security issues identified.

The pane fields are derived from the same live cursor target used for command selection, publication is guarded by matching cursor identity, and the API version, exports, package check, tests, and documentation remain aligned.

Important Files Changed

Filename Overview
src/extension-api/types.ts Advances the public API to v14 and documents the additive current-line source-address fields.
src/ui/lib/extensionCurrentLine.tsx Publishes the active cursor target alongside the existing frozen row painter.
src/ui/lib/extensionCurrentLine.test.ts Verifies the painter exposes the cursor’s side and line while preserving existing rendering behavior.
scripts/check-pack.ts Extends the package-consumer type check to exercise the newly published fields.
docs/extensions.md Documents API v14 and the pane current-line address contract.

Reviews (1): Last reviewed commit: "feat(extensions): give panes the current..." | Re-trigger Greptile

Opted-in currentLine paint already follows the cursor, but only as a
row painter. Add side and line — the same public address command
selection already carries — so a pane can look up blame or diagnostics
without waiting for a keypress.
@benvinegar
benvinegar force-pushed the feat/pane-current-line-address branch from 8517d2e to c8a9b37 Compare August 31, 2026 00:40
@benvinegar
benvinegar enabled auto-merge (squash) August 31, 2026 00:41
@benvinegar
benvinegar merged commit 2454101 into main Aug 31, 2026
17 of 18 checks passed

This branch was successfully deployed

1 active deployment
Preview — c8a9b37c Deployed Aug 31, 2026 by vercel[bot]
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.

1 participant