Repository navigation
Fix open issues #3–#9: full-file diffs, faster startup, and more - #11
Merged
Merged
Conversation
- #9 Full-file view: `z a` (⌥⌘E) shows the whole file instead of the hunks, `z R` / `z M` do it for every file, and `[diff] view = "full"` makes it the default. Files are fetched at the head commit on demand, cached per commit, and merged with the hunks in MaserCore (`FileDiff.fullFile(headText:)`). The cursor moves through every line; GitHub only takes comments on lines in the diff, so the extra lines are read-only, with a note under the diff if you press `c` on one. - #8 Startup and focus: activate after launch finishes instead of in `init`, keep the review queue's list between windows (a Dock click shows it at once and refetches only if older than a minute), and run `gh` without blocking threads while waiting. Adds `scripts/bundle`, which builds Maser.app signed ad hoc. - #7 Finding gh: also look in MacPorts, Nix, ~/.local/bin, ~/bin and mise/asdf shims, then ask the login shell; `[github] gh` overrides. - #6 Conversation times re-render every minute and show a date after 30 days. - #5 Links with target="_blank" (GitHub wraps images in them) open in the browser. - #4 Conversation comments, reviews, checks and long review threads are fetched in full when GitHub has more than one page. - #3 Quoted paths in diff headers (non-ASCII names) are unquoted. Also: `addReviewThread` now throws when GitHub answers with a null thread, which it does for lines outside the diff instead of an error. Non-key settings live in a new `Settings` type read from config.toml. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
LGTM. OK to merge and close |
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.
Summary
Fixes every open issue in one PR, as asked.
z a(⌥⌘E, View menu) switches the current file between its hunks and the whole file.z R/z Mdo it for every file, and[diff] view = "full"in config.toml opens files in full. Hunk navigation (}/{) still jumps between the changes, and the cursor stays on the same line when you switch. The cursor moves through every line, but GitHub only takes comments on lines in the diff. Tested: for a line outside the diff, GitHub returns a null thread instead of an error. So the extra lines are view-only, andcon one shows a note under the diff.init, and that request can be ignored.ghnow runs without blocking threads while it waits. Before, each call held up to three pool threads, which could starve the app's other async work when several windows loaded at once.scripts/bundlebuilds.build/Maser.app, signed ad hoc. That's also the likely path for the work Mac: build and sign there, with no developer account.gh. Maser now also looks in MacPorts, Nix,~/.local/bin,~/binand mise or asdf shims, then asks the login shell (5 s timeout).[github] gh = "…"in config.toml overrides the search.target="_blank"links. Confirmed that GitHub wraps images in<a target="_blank">(seen in cli/cli bodies). Those clicks did nothing; they now open in the browser.totalCount. When there's more than one page, the full list is fetched with--paginate. Threads with more than 100 comments fetch the rest the same way. Labels and review requests go from 50 to 100.DiffParserunquotes git's C-quoted paths (octal UTF-8 bytes,\t,\",\\) indiff --git,---/+++and rename lines.Also fixed:
addReviewThreadused to report success when GitHub returned a null thread. It now throws a clear error.Closes #3, closes #4, closes #5, closes #6, closes #7, closes #8, closes #9.
Implementation notes
FileDiff.fullFile(headText:).isExpansionhunks and lines.commentSideis nil for them; the newcursorLinesincludes them.repos/{owner}/{repo}/contents/{path}?ref={headRefOid}with the raw media type, capped at 4 MB.ReviewContextnow also carriesheadCommitID.ReviewModel.preservingCursor(_:)maps the cursor and selection between views by line numbers, falling back to the next nearest line. Refreshes go through it too, so a refresh keeps the cursor where it was.CommentTarget.lineIDsis gone. Highlights are looked up by line number (FileDiff.lineIDs(for:)), so they survive switching views.Settingstype (MaserCore) reads[diff]and[github], andConfigStorepublishes it. The starter config lists both sections commented out. AGENTS.md now says where new settings go.gh.GitHubCLI()no longer throws, so findinggh(which may ask the login shell) never runs on the main thread. It happens on the first call and is cached.Testing
scripts/check: format lint, build, and 62 tests, all passing.MASER_LIVE_TESTS=1:MASER_LIVE_WRITE_TESTS=1: the round trip now also checks that a thread outside the diff throws.gh.Not checked by hand (the screen was locked):
z a/z R/z M, and after a refresh;full filehint in the key bar;🤖 Generated with Claude Code