Conversation
The presentation-scope projection added in modem-dev#1118 drops every file without hunks from the terminal's navigation files. Binary and other skipped files have no hunks, so `.`/`,` stepped over them and clicking them in the files pane did nothing; selectVisibleFile also bailed out when a file had no first hunk. Unscoped files without hunks now stay in the navigation projection and are selected at the shared file-jump index, matching the core file-jump rule. Hunk moves still pass over them because they contribute no cursors, and a presentation scope still hides files it gives no hunks.
|
@bottercode is attempting to deploy a commit to the Modem Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
|
PR author is not in the allowed authors list. |
Contributor
Author
|
CI note: the two failing checks are unrelated to this change.
All code checks pass, including PTY integration and Windows. |
This was referenced Oct 13, 2026
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Since #1118, binary files can't be selected in the terminal review.
./,(next/previous file) jump over them, and clicking one in the files pane does nothing. This includes images, PDFs, and any other file Hunk renders as "Binary file skipped".It shipped in 0.24.0-beta.0. 0.23.0 is not affected. To reproduce in this repository:
bunx hunkdiff@0.24.0-beta.0 show a3321c82 # the logo commit: two changed PNGs among 12 filesPress
.repeatedly: the selection never stops onwebsite/public/apple-icon.pngorwebsite/public/icon.png. Clickingicon.pngin the files pane leaves the selection where it was.Cause
#1118 made the terminal build its own navigation projection (
projectedNavigationFilesinuseTerminalReview.ts). That projection drops every file whose hunk list is empty, and binary or skipped files never have hunks:./,pass over them;selectVisibleFile, which files-pane clicks use, returns early when the file has no first hunk.The core file-jump rule already expects these files:
planFileMovefalls back toREVIEW_FILE_JUMP_HUNK_INDEXwhen a file has no hunk indexes.Fix
[/]) still pass over them because they contribute no cursors.selectVisibleFileselects a hunkless file atREVIEW_FILE_JUMP_HUNK_INDEX, like the core file jump.Non-goal: pressing
]while a binary file is selected jumps to the review's first hunk rather than the next one. That behavior predates #1118 and is unchanged here; it could be a separate follow-up.Tests
useTerminalReview.test.tsx: file moves andselectVisibleFilereach a binary file between text files while hunk moves skip it; a presentation scope that omits the binary file still keeps it unreachable.test/pty/nav.test.ts(newcreateBinaryNavigationRepoFixture):.lands on a binary file between two long text files, and clicking it in the files pane selects it.Both new PTY tests and the new hook test fail without the change and pass with it.
Commands run
macOS (Darwin 25.5), Bun 1.4.3, branch rebased on
6aa52617. Not tested on Linux or Windows.Failures in the full runs, each checked on unmodified
main(6aa52617):bun run test: 9 failures ininstalledPackageResolution.test.ts(3),hostRuntimeModules.test.ts(4),manage/npm.test.ts(1) andAppHost.reload.test.tsx(1) fail identically onmainon this machine; Main CI is green on the same commit, so they look environment-specific. The tenth, infilesystemSource.observe.test.ts, is an intermittent watcher timeout that fails about one run in three onmainhere.bun run test:integration: the twostatus-integration.test.tsfailures also fail onmain. Thecomment-target.test.tswheel-return test failed 2 of 6 runs onmainand 0 of 6 on this branch.dialog-first-open-integration.test.ts("opens help promptly after two seconds idle") failed once in the full run and passed when run alone on bothmainand this branch.Manual check in Ghostty: with this branch,
hunk show a3321c82and.stop on all 12 files in order, including both PNGs, and clickingicon.pngin the files pane selects it.I found this while prototyping image previews for binary files as a file view, which needs image files to be selectable.