Repository navigation
fix(web): diff hang, fast merge-base walk, short commit ids, persisted browse index (D-005, D-040, D-057, D-023) - #70
Conversation
|
Warning Review limit reachedNext included review available in 8 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 ignored due to path filters (1)
📒 Files selected for processing (24)
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 |
00eea0e to
855cc89
Compare
|
@coderabbitai review 🤖 Posted autonomously by Claude on behalf of pasta. |
|
DiffView wrote each finished patch with pending.current.set(key, await load()). The receiver is read before the await, so a patch that finished after a flush had swapped in a fresh map went into the batch that was already committed and never rendered. The file stayed on Reading file forever with nothing in flight: 4 of 4 loads of preact 8101ff8 on master, 0 of 4 with the fix. The batching now lives in createBatcher, which owns its pending map, so no caller can hold a stale one. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…se index D-040: the merge-base walk read commits one ranged GET at a time and gave up at 2,000 commits. It now reads through a block read-ahead source (256 KiB blocks); pack-objects stores commits first and in history order, so a block holds hundreds. A 2,700-commit walk costs 3 reads instead of 2,700, the cap is 50,000, and the PR view shows commits read with a Stop button. A stopped search falls back to the first parent, and a Search again button restarts it. D-057: commit URLs accept 4 to 40 hex characters, including odd lengths. A short id is resolved by prefix over the locator's sorted OID index, as git does. Ambiguous, unknown and malformed ids get a clear message instead of a raw hex error. D-023: objectLocator fragments are kept in IndexedDB, keyed by their manifest packHash and re-checked against it on every read. A reload no longer downloads the whole browse index. The store is self-contained so the P-2 delta caches can fold it in. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…fixes Index cache: eviction reads a small meta store instead of loading every stored index, entries are touched on read so eviction is least recently used, a connection opened after a blocked upgrade is closed, and hashes use WebCrypto. It is tested against fake-indexeddb. Merge base: the read-ahead walker is built per comparison and dropped afterwards, a single-copy pack keys its blocks as copy 0 so the first block is not fetched twice, and hash-check verdicts reach the trust panel in batches. A reload shows progress and Stop, a stopped search on an imported PR says it was stopped, and a disabled comparison aborts its walk. Short ids: candidate types are read from entry headers only, a partial clone says the commit may be in an unreachable pack instead of not found, a single non-commit match gets its own message, and 16 or more matches are ambiguous. Diff view: a failed load becomes a placeholder, and pending patches are flushed on unmount. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…hemes Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
a52ca5a to
b27e2c7
Compare
The CLI issue-parity scenario is renumbered 21 (20 is config + storage UX). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Fixes D-005 (S1), D-040, D-057 and D-023: web code-browsing defects from QA wave 1.
D-005: commit and PR diffs stuck on "Reading file…"
DiffViewwrote each finished patch withpending.current.set(key, await loadFilePatch(...)).pending.currentbefore theawait.lib/view/batcher.tsowns its pending map, so no caller can hold a stale one.D-040: merge-base walk on PRs spanning more than 2,000 commits
readAheadSource, a cache of aligned 256 KiB blocks.git pack-objects --revs, which forge-corepack/build.rsuses, writes all commits first and in history order. So one block holds hundreds of commits.findMergeBases, used by the browser merge engine from feat(web): merge pull requests in the browser (fast-forward and disjoint merges) #61, takes the same options. That engine keeps its own read budget.D-057: short or odd-length commit ids
ObjectLocator.findByPrefix: the fanout slice, then a binary search).MissingObjectErrorclass.D-023: S3-stored repos re-download the browse index on every load
dash-forge-index), keyed by network and manifestpackHash.metastore, never the stored bytes.lib/view/index-cache.ts, so the P-2 delta caches can fold it in.browse-source.test.ts: a second resolve makes 0 fragment chunk queries.index-cache.test.ts: tests againstfake-indexeddb, a new dev dependency.Tests
batcher.test.tsread-ahead.test.tscovers block edges, pack end, failure fallback, copy keys and LRU.merge-base-budget.test.tscovers the request budget, verdict batching, progress and Stop, and a short id through a realBrowseReader.commit-id.test.tsindex-cache.test.tsbrowse-source.test.ts.e2e/code-browsing.spec.ts, run against moutai on the preact showcase repo:zzzzand0000000give clear states.Evidence:
/Users/pasta/workspace/dash-forge-qa/evidence/impl/fix-web-diff-hang/🤖 Generated with Claude Code