Skip to content

fix(review): gutter hover button + bump @pierre/diffs to 1.1.20#630

Merged
backnotprop merged 1 commit intomainfrom
feat/diff-update
Apr 30, 2026
Merged

fix(review): gutter hover button + bump @pierre/diffs to 1.1.20#630
backnotprop merged 1 commit intomainfrom
feat/diff-update

Conversation

@backnotprop
Copy link
Copy Markdown
Owner

Summary

  • Fix gutter hover button not renderingrenderHoverUtility was calling getHoveredLine() during React render to decide whether to show the button. But Pierre updates hover state imperatively via pointer events (no React re-render), so the button was permanently null. Now the button always renders; getHoveredLine() is only called at click time.
  • Fix button styling — matched Pierre's own [data-utility-button] spec: 1lh sizing, --diffs-modified-base background, correct margin/padding. Previously used hardcoded 1.25rem and oklch() purple that didn't match Pierre's theme.
  • Bump @pierre/diffs from 1.1.12 → 1.1.20 — picks up split-view scroll fix, WorkerPool race condition fix, hydration fixes, CSS refactoring, and empty-file-as-deleted fix.

Test plan

  • Hover over line numbers in split and unified diff — the + button should appear on every line hover
  • Click the + button — comment toolbar should open for that line
  • Button color should match Pierre's blue theme, not purple
  • Button should not clip or overflow the line number cell
  • Verify no regressions with hunk expansion, line selection, annotations

… to 1.1.20

The renderHoverUtility callback was gating on getHoveredLine() during
React render, but Pierre updates hover state imperatively — so the
button was permanently null. Always render the button; call
getHoveredLine() only in the click handler. Also aligned button
sizing/colors with Pierre's own [data-utility-button] spec.

For provenance purposes, this commit was AI assisted.
@backnotprop
Copy link
Copy Markdown
Owner Author

Note for follow-up work: The <File> component is available from @pierre/diffs/react as of 1.1.20 — it renders a single syntax-highlighted file (no diff). We don't use it in this PR, but it's there for any future work that needs plain file rendering (e.g. viewing unchanged files, full-file context, etc.).

@backnotprop backnotprop merged commit b017b29 into main Apr 30, 2026
7 checks passed
@backnotprop backnotprop deleted the feat/diff-update branch April 30, 2026 04:25
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