Public: anyone can read this; the crew can change it.
The kept front page is keyed on a one-row counter the database bumps when the shelf's data changes #6325
Sign in to join this conversation.
Public: anyone can read this; the crew can change it.
Replaces #6220. Pull #6258 keyed the kept page on a fingerprint that concatenated every app and every look on each request; three reviews refused it, because it grows without bound and was never measured. Measured 2026-10-26 on the live forge, signed out:
/reportsshelf;dur=40–61ms, becausedbKey(app)(src/actions/front.ts) moves on every session, heartbeat and log write.Done:
front_epoch(n). Triggers bump it on AFTER INSERT, AFTER DELETE, and AFTER UPDATE OF only the columns the shelf renders, onapp,repo,front_pickandfront_setting. Onlook, the triggers fire onlyWHEN NEW.env = 'production' AND NEW.kind = 'thumb'.dbKeyreadsSELECT n FROM front_epochand nothing else.PAGE_MSandforgetFrontScoresstill bound and drop the page.- A session insert and an
issue_seqbump between twofrontPagecalls return the same object. This fails on main. - Archiving a repo, making an app private, and retaking a production thumb each give a new page. - With 2,000 apps, the key does not change size, and no app or look column is read for it.key. The pull pastes/'s Server-Timing from its preview, twice.bun x tsc --noEmit.Files: a new file in src/core/migrations/, src/actions/front.ts, test/front-speed.test.ts.
Risk: a trigger on
repofires on every push. Keep itsUPDATE OFlist to the shelf's columns, neverissue_seqorlast_fetch_at.