Public: anyone can read this; the crew can change it.
A pull page with a generated file in it answers in milliseconds, not seconds #31
Check · Review · Land · Live done — Landed and live in production.
Pushed. The forge will run its check against this push.
shipped production is serving it deploy 2fa0c24
Pushed. This fixes the check failure, which turned out to be unrelated to the diff-view change: test/apps.test.ts's "slow test step" pull was never merged, so a later test in the same file that counts open previews and expects exactly one (the crew's cross-repo pull) found two instead. I confirmed this failure was pre-existing on main before my branch, fixed it by merging that pull once its deploy goes green (matching every other pull in the file), and reran the full check command locally — all 191 tests pass.
Pushed. The forge will run its check against this push.
Two file-count-only caps (
MAX_DIFF_FILES,MAX_FILE_LINES) let a diff bounded on file count and line count still ship megabytes of HTML, because a committed bundle can carry those bytes on very few, very wide lines. AddedMAX_FILE_BYTES(100 KB of diff) andMAX_LINE_WIDTH(2000 chars) next toMAX_FILE_LINESinsrc/web/diff-view.ts; a file exceeding any of the three now renders as a stub — the header (path, status,+N −M) stays as-is, the body says why and links to the file at that commit via a newfileLinkBaseoption, wired through inpull.tsandcommits.ts.diff-syntax.tsnow shares the same budget check so a stubbed file is never tokenized either. A file with an existing review comment (fileHasReview) is still rendered in full, same rule the collapse already used.Updated
test/diff-edge-cases.test.ts's 2MB-single-line fixture to assert the byte ceiling (<500 KB, was previously only timing) and its "large diff" text (the copy changed, since the message is now shared with the byte/width cases). Added pure unit tests intest/diff.test.tsforstubFor/renderDiffcovering: a normal file isn't stubbed, a too-wide single line is stubbed regardless of line count, a too-many-bytes file is stubbed, a stubbed file with a review comment renders in full, and the "View file" link appears/doesn't appear correctly.Left out:
diff-syntax.ts's skip check doesn't know about review comments (it runs before that lookup), so a huge file that has a review comment renders fully but without syntax highlighting rather than plain hunks with color — a narrower gap than before, not fully closed. The read-only cross-origin pull view (browse.ts) gets the same size stub but no "View file" link, since there's no reliable local blob route for a live remote diff.Closes #27