Registry Mirror
Skip to content

Conversation

@benvinegar

Copy link
Copy Markdown
Member

Summary

Same-directory rename headers repeat a long directory prefix, truncating the destination filename. Show the directory once instead:

packages/hunk/src/ui/fileViews/textDisplay.ts -> textPreview.ts
  • Update the existing shared terminal label helper used by headers and note cards; no new rendering path or review semantics.
  • Preserve both full paths for moves between directories.
  • Add unit coverage for root/absolute paths, parser line endings, escaped tabs, unchanged paths, and cross-directory moves; add a header-budget test and a real PTY regression.
  • Include a patch Changeset.

Visual evidence

Original report:

Repeated directory truncates the destination filename

The regression exercises the real TUI with hunk patch <rename.patch> --no-sidebar --mode unified at 80×20 on Linux using the PTY harness and its isolated default theme/config. It asserts that the full compact header and +1 -1 stats remain visible. No after-image is attached; the expected label is shown above. macOS and Windows were not tested locally.

Very long labels still use the existing overflow policy; cross-directory moves are intentionally unchanged.

Validation

Passed before rebasing onto current main:

  • bun run typecheck
  • bun run test — 2,392 passed, 3 skipped
  • bun run test:integration — 191 passed, 1 skipped
  • bun run test:tty-smoke — 10 passed
  • bun run install:bin — rebuilt and installed locally

Passed again after rebasing:

  • bun run typecheck
  • bun test packages/hunk/src/ui/lib/files.test.ts packages/hunk/src/ui/lib/fileHeader.test.ts test/pty/rename-header-integration.test.ts — 28 passed

Commit hooks also passed formatting and lint checks.

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

@vercel

vercel Bot commented Oct 11, 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 Oct 11, 2026 8:38pm UTC

Request Review

@greptile-apps

greptile-apps Bot commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable issues were found.

Summary

This PR shortens same-directory rename labels by showing the destination filename without repeating its directory.

  • Same-directory rename labels show the directory only once.

Reviews (1) · Last reviewed commit: "fix(ui): compact same-directory rename l..." · Reviewed by Greptile

@benvinegar
benvinegar merged commit 9af06b3 into main Oct 11, 2026
16 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