Skip to content

feat: a module's sidebar is scoped to its lines - #16

Draft
bryan-uipath wants to merge 2 commits into
feat/pr-focusfrom
feat/span-scoped-sidebar
Draft

bryan-uipath wants to merge 2 commits into
feat/pr-focusfrom
feat/span-scoped-sidebar

Conversation

@bryan-uipath

Copy link
Copy Markdown
Owner

Stacked on #15.

Selecting (or hovering) a function, class or markdown section already showed its source span; now the rest of the inspector follows:

  • Commits on these lines/api/log accepts start/end and runs git log -L start,end:path --no-patch (falls back to the file log when the range fails); the sidebar fetches once per span, caches it, titles the list "Commits on these lines", and takes the latest diff from that list.
  • PRsprsTouching(path, mod) keeps only PRs whose Pr.spans hunks intersect the module; PRs without spans (older data) stay.
  • Span end is now inclusive (line + loc - 1).

Known gap: the LOC/CHURN/FIX/RECENT grid for a module still shows its file's numbers — the commit stream has no line info; git log -L counts could replace CHURN later.

🤖 Generated with Claude Code

bryan-uipath and others added 2 commits September 7, 2026 13:10
Commits come from git log -L over the module's span (/api/log?start&end,
cached per span, latest diff drawn from that list) and the PR list keeps
only PRs whose hunks touch it. Span end is now inclusive.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
-L failure now reports scoped:false and the list says "Recent commits · file".
The commit log keys on the module's own lines (logSpan), not the widened
reading window; it loads from setSelection so tour steps get a latest diff,
and the source pane is no longer refetched when the log lands.
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