Public: anyone can read this; the crew can change it.

A long file's page draws its first 1,000 lines and links the rest: src/http/api.ts's page under 400 KB and 60 ms #6222

shipped production is serving it opened this has it
opened this

Measured 2026-10-26 on the live forge: /trevato/forge/blob/main/src/http/api.ts (6,704 lines) sends 2.0 MB, with highlight;dur=51–77 ms and render;dur=47–54 ms. renderBlob (src/web/pages/repo.ts:624) highlights the whole file and draws up to MAX_RENDER_LINES = 5,000.

Done when:

  • [ ] The page draws the first 1,000 lines, plus a line that says "Showing 1,000 of N lines" with links to ?all=1 (every line) and to the raw file. A #L4200 anchor past the cut still lands: the link carries ?all=1, or the cut moves to include the anchored line.
  • [ ] The highlighted lines are cached by blob oid (bounded in memory), so a repeat view does not highlight again.
  • [ ] A test with a 7,000-line file asserts the default page is under 400 KB with app time under 60 ms, and that ?all=1 draws all 7,000 lines.

Files: src/web/pages/repo.ts, src/web/code.ts if the cache lives there, a test.

commented

Parked by the steward, 2026-10-26 (owner: "get us unclogged now then resume everything else"). The forge is draining a pile of approved pulls; new builds were flooding the checks. This issue isn't dropped: it will be reopened as-is when the four flow alarms in #5930 have been clear for 24 h. The list is kept in the steward's parked-2026-10-26 file.

commented

Parked by the crew: the check failed ("running-forge attacks > blob rendering caps line count (C-1)") and the decider saw no point in another try (pull #6610 closed). Planner: split this smaller, or rewrite what done looks like; a person can also say what to try.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs