Skip to content

feat(review): add semantic diff overview#871

Merged
backnotprop merged 13 commits into
mainfrom
feat/sem-diff
Jun 9, 2026
Merged

feat(review): add semantic diff overview#871
backnotprop merged 13 commits into
mainfrom
feat/sem-diff

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

Summary

  • add a shared semantic diff runner around sem, including env/managed/package/PATH resolution and JSON parsing
  • expose semantic diff availability and /api/semantic-diff from both Bun and Pi review servers with cwd-aware resolution and bounded successful-result caching
  • add the Semantic diff dock panel as the default review landing view, with the sidebar link above All files, binary rows, inline errors, and retry
  • install the sem sidecar non-fatally from the shell, PowerShell, and cmd installers

Verification

  • bun test
  • bash apps/pi-extension/vendor.sh
  • bunx tsc --noEmit -p packages/shared/tsconfig.json
  • bunx tsc --noEmit -p packages/ai/tsconfig.json
  • bunx tsc --noEmit -p packages/server/tsconfig.json
  • bunx tsc --noEmit -p packages/ui/tsconfig.json
  • bunx tsc --noEmit -p apps/pi-extension/tsconfig.json
  • bun run build:pi

- Restyle the semantic panel as real bordered cards (shadcn surface) instead
  of ASCII box-drawing; centered column, grid-aligned entity rows.
- Hide orphan (module-level) changes from the rows, matching sem's default;
  the count still surfaces in the summary line.
- Add a 'sem · N' hover popover to each diff file header showing that file's
  semantic changes, reusing the same row component as the panel.
- Clicking an entity (panel or popover) scrolls the diff to the lines via
  pierre's [data-selected-line]; centers only when off-screen so manual
  drag-selection isn't disturbed.
- Extract shared rows/helpers into semanticDiffShared; share one cached
  /api/semantic-diff fetch across header badges.
Semantic diff stays available via the file-tree nav entry and header badges,
but it's no longer the initial landing view.
@codythatsme

Copy link
Copy Markdown
Contributor

LOVE this. Have a similar concept locally on my fork. Good to see this coming. Very excited

- Remove unreachable 'moved'/'renamed' entries from the changeSymbols table
  (getChangeSymbol early-returns for those before the lookup).
- Log a console.error once per patch when the file-header badge's semantic
  diff fetch fails or returns a non-ok status, so a systemic failure leaves a
  trace instead of every badge silently showing nothing.
- Dissolve the per-file bordered cards into flat sections: the file path is now
  a quiet underlined header (single hairline) with entity rows flush beneath,
  hierarchy from whitespace + hover tint instead of boxes.
- Split the path into muted directory + emphasized filename for faster scanning.
- Nudge the add/remove glyphs (⊕/⊖) ~15% larger, line-height pinned so rows
  don't grow; modified/rename/reorder glyphs unchanged.
@backnotprop backnotprop merged commit c3ba55e into main Jun 9, 2026
13 checks passed
backnotprop added a commit that referenced this pull request Jun 9, 2026
…l fixes) (#879)

* feat(plan): default to the grid look + look-and-feel image chooser

- Flip gridEnabled default back to true (classic grid / floating-card look),
  reverting #863's flat-by-default so existing users without an explicit
  choice return to the grid view they're used to.
- Rewrite the look-and-feel announcement into a two-image chooser: Grid
  (classic, now the default) vs Clean (the new flat look), each a clickable
  screenshot that hover-zooms to preview — mirroring the code-review
  DiffTypeSetupDialog pattern.
- Bump the announcement version (1 -> 2) so existing users are re-offered the
  choice once.
- Add look-grid.png / look-flat.png preview assets (resized app screenshots).

* fix(review): restore GitLab /diffs fallback for MR review

#871's pr-gitlab refactor moved to the raw_diffs endpoint and deleted the
paginated /diffs path, hard-breaking MR review on self-hosted GitLab too old to
expose raw_diffs (opaque "Failed to fetch MR diff") and silently rendering zero
files when raw_diffs returns empty for oversized MRs.

Keep raw_diffs as the primary path (it preserves binary markers + collapsed
content), but fall back to the restored paginated /diffs + reconstructPatch when
raw_diffs fails or is empty, and throw a clear "diff is empty / too large" error
if both come back empty. Restores parsePaginatedArray / reconstructPatch and
adds tests for the fallback paths.

* fix(install): bound the optional sem sidecar download

The semantic-diff 'sem' download (#871) ran curl / Invoke-WebRequest with no
timeout. The sidecar installs after plannotator itself, so a slow or hung fetch
could wedge an otherwise-complete install. Add --connect-timeout 10
--max-time 120/60 (sh, cmd) and -TimeoutSec 120/60 (ps1) so it times out and
skips gracefully, and document the PLANNOTATOR_SKIP_SEM_INSTALL opt-out in the
installer help.

* chore(install): remove the Glimpse install option from the installers

The installers offered to `npm install -g glimpseui` (a wizard prompt +
--glimpse/--no-glimpse flags + saved pref). Drop all of it across install.sh,
install.ps1, and install.cmd: flags, usage text, the wizard question, the
glimpse_present detection, the saved-pref read/write, the persistence clauses,
and the install block. The guided wizard is now two questions (extras,
model-invocable).

Runtime Glimpse support is unchanged: the app still opens in the native window
if glimpseui is on PATH (packages/server/browser.ts), still gated by
PLANNOTATOR_GLIMPSE. Updated install.test.ts (asserts the installers are
glimpse-free) and the installation docs.

* feat(plan): 0.20.0 release announcement dialog

Turn the first-run look chooser into a two-page 0.20.0 announcement.

- Page 1: header with a "Full release notes" link, a four-up feature
  grid (fresh look, semantic review, multi-repo review, leaner install),
  and the grid/clean plan-look chooser.
- Page 2: "Workspaces are coming" teaser with the waitlist image + link.
- Footer actions grouped bottom-right on both pages (shimmering
  "Workspaces are coming" teaser via TextShimmer + the primary action)
  so focus stays in one corner across the page turn.
- Reshoot the grid/clean chooser screenshots on a clean prose plan and
  add the workspaces teaser image.

* feat(plan): add full-page HTML feature card, lead with leaner install

Add a fifth what's-new card for --render-html (annotate HTML reports and
explainers rendered full-screen) and move Leaner install to the front of
the grid.
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.

2 participants