Skip to content

refactor(ui): inline diff row dispatch - #1018

Merged
benvinegar merged 1 commit into
refactor/diff-row-default-memofrom
refactor/diff-row-inline-dispatch
Sep 7, 2026
Merged

refactor(ui): inline diff row dispatch#1018
benvinegar merged 1 commit into
refactor/diff-row-default-memofrom
refactor/diff-row-inline-dispatch

Conversation

@benvinegar

@benvinegar benvinegar commented Sep 7, 2026

Copy link
Copy Markdown
Member

Summary

  • inline metadata/code row dispatch into DiffRowView
  • remove the 17-argument positional render helper
  • preserve the existing focused CodeRowView and DiffMetaRowView boundaries

Why

The helper had one caller and repeated the facade's complete prop list positionally. Keeping dispatch beside prop resolution makes forwarding easier to audit without changing row rendering ownership.

Stack

  1. refactor(ui): use default diff row memo comparison #1017 — default memo comparison
  2. This PR — inline diff-row dispatch
  3. refactor(ui): require planned diff rows #1019 — require planned diff-row input

Merge bottom to top. This PR is based on refactor/diff-row-default-memo; the next PR is based on this branch.

Validation

Run on the stack tip:

  • bun run typecheck
  • bun run test
  • bun run test:integration
  • bun run test:tty-smoke

All passed. No user-visible rendering behavior changes, so no new visual evidence was captured.

This PR description was generated by Pi using gpt-5.6-sol

@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
hunk-web Ignored Ignored Preview Sep 7, 2026 12:43pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR simplifies diff-row rendering by moving metadata/code row dispatch directly into DiffRowView while preserving the focused child-component boundaries and existing behavior.

  • Removes the single-use, 17-argument renderRow helper.
  • Preserves dispatch for collapsed, hunk-header, split-line, and stack-line rows.
  • Adds the conventional empty changeset for a maintenance-only refactor.

Confidence Score: 5/5

The PR appears safe to merge because it preserves the existing exhaustive row dispatch and child prop forwarding.

No actionable failures remain; every valid row variant follows the same rendering branch with the same values as before, and the empty changeset matches repository convention.

Important Files Changed

Filename Overview
packages/hunk/src/ui/diff/DiffRowView.tsx Inlines behavior-equivalent row dispatch and prop forwarding into the memoized facade.
.changeset/neat-rows-dispatch.md Adds a valid empty changeset for a refactor that does not require release notes.

Reviews (1): Last reviewed commit: "refactor(ui): inline diff row dispatch" | Re-trigger Greptile

@benvinegar
benvinegar force-pushed the refactor/diff-row-inline-dispatch branch from a1ee26d to 2b1088e Compare September 7, 2026 12:43
@benvinegar
benvinegar merged commit 5f50d9d into main Sep 7, 2026
12 of 20 checks passed
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