Repository navigation
fix(web): FG-5 commit, diff, log and compare views (renames, totals, compare) - #164
Merged
Merged
Conversation
…-M does (L-24) Port of git's diffcore-rename (exact, unique-basename at 75%, best-first matrix at 50%, diff.renameLimit) scored by diffcore-delta's span hash; checked against git diff -M --raw on random tree pairs. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… and committer, log position in the URL, and /repo/compare (FG-5) L-25 totals as git diff --shortstat counts them, L-29 fixed split gutters, L-69 expandable gaps, L-71 hide whitespace in the URL, L-26/L-27 labelled author and commit dates with co-authors, L-31 ?pages= and scroll kept for Back, L-35 log footer copy, L-30 /repo/compare base...head for branches, tags and commits, L-47 New PR: short-name params, no guessed head, nothing-to-compare. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…chored on the old path, partial rename budgets, compare follow-ups Patches and +/- totals come from the xdiff port over whole files, so counts equal git diff --numstat (dash f5979f7c5: +1331 -1906, as git); files up to 1 MiB are counted though not shown. Expanded context is keyed by whitespace mode; totals on a capped listing say so; ?w=0 is written. A renamed file's old side keeps its old path for inline comments; Update branch is hidden when there is nothing to compare. Rename detection reads what its budget allows in the basename phase (a subset of git's pairs), sorts paths by code point, and reports blobs over its size cap. Compare shows Stop only while searching, keeps the URL's refs for its links, and stops the commit list at the merge base. New PR helpers move to refs.ts; a local check against the dash clone is added. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…me budgets The 747-file merge's whole-commit totals, the renames of f1be1b800, and compare v22.0.0...develop; runs on the live devnet once the showcase mirror is back. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ed branch cannot shadow it Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
|
Warning Review limit reachedNext included review available in 19 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (36)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
What
This PR is fix group FG-5 from the dash-ux QA ledger: the commit, diff, log and compare views. It fixes L-24, L-25, L-26, L-27, L-29, L-30, L-31, L-35, L-47, L-68, L-69 and L-71. Each row of the table has been checked against git on the real dashpay/dash history.
lib/view/renames.ts, a port of git'sdiffcore-renamewithgit diff -Mdefaults, scored bydiffcore-delta's span hash. See the rename detection section below for the phases. It is wired into commit diffs and PR/compare diffs throughdiffTreesWithRenames. A renamed file is one R row,old → new, with its similarity in the tooltip.diffTotalscounts the waygit diff --shortstatdoes. See the totals section below. There are no partial totals.<colgroup>fixes the gutter widths, so a leading gap row can't widen them. Measured 48/575/48/575 px on 00aabf52f at 1440 px.?w=1or?w=0, falling back to the reader's preference. A file that differs only in whitespace says so.<time>with the exact UTC time on hover.Co-authored-bytrailers from the last paragraph are listed. The log and PR commit rows label the author date too.?pages=Nis kept in the URL throughrouter.replace, and a?pages=link loads that many pages again. The scroll position is kept per URL for the tab and used once./repo/compare?base=…&head=…route, GitHub'sbase...head. See the compare section below.?base=master&head=developshort names, as well as full ref names andrepo:branchkeys. It no longer guesses a head, and lists branches with the default first, then in the switcher's order (#162'scompareRefNames). An open PR whose base already contains its head gets "nothing to compare" instead of a diff against the head's parent, and on the PR page "Update branch" is hidden in that case.Rename detection (L-24)
lib/view/renames.tsruns the same three phases asgit diff -M:diff.renameLimit1000.The browser adds two limits that git doesn't have, and the page states whichever one applies:
Totals (L-25)
diffTotalscounts asgit diff --shortstatdoes:script_util.pyin f5979f7c5 counted 12/10 against git's 13/11.Compare (L-30)
/repo/compare?base=…&head=…works like GitHub'sbase...head. Each side can be a branch, a tag or a commit, and short names work.git log base..head) and the diff from the merge base (git diff -M base...head).baseandheadparams are sealed for private repos, likerefandpath.Design decision: New PR still offers branches only, not tags. A PR's head and base must be branches (D-501), so tag comparisons belong on
/repo/compare.Verification
Moutai is on beta.7 and this branch's JS can't read it, so there was no live run (see the follow-up below).
renames.test.ts: 150 random tree pairs matchgit diff -M --rawexactly, including similarity. A tight budget always gives a subset of git's pairs.compare.test.ts: 40 random pairs over a forked and merged history matchgit merge-base,git log base..headandgit diff -M --name-status base...head.diff-totals.test.ts: matchesgit diff -M --shortstat.text-difftests cover the gap expansion.lib/view/dash-compare.local.test.ts, run against a local clone, never in CI):dash-forge-qa/evidence/impl/fix-fg5-diff-compare/.tsc,next lintandnext buildall pass./repo/compareis prerendered.Compare v22.0.0...develop on dash: cost
Measured on the local clone, at the object level:
paint_down_to_commonwould read the same commits.e2e/fg5-dash.spec.tsasserts ≤ 400 requests and ≤ 90 s for this compare.Follow-ups
e2e/fg5-dash.spec.ts(read-only) once the dash showcase mirror is back after the wipe and beta.7 cut-over. It covers the 747-file merge totals, the renames and the v22.0.0...develop compare. The live e2e CI job is expected to be red until then./owner/name/compare/a...b);Ledger: FG-5 in
dash-forge-qa/evidence/dash-ux/LEDGER.md.🤖 Generated with Claude Code