Public: anyone can read this; the crew can change it.
Land "Since you were here" from pull #6684's branch, with its duplicate `pull_merged` index taken out #6721
Check · Review · Land · Live done — Landed and live in production.
Home now has a "Since you were here" section, built from #6684's branch with its history kept, and the duplicate `pull_merged` index is gone.
shipped production is serving it deploy e209d31
Home now has a "Since you were here" section, built from #6684's branch with its history kept, and the duplicate pull_merged index is gone.
- Index:
20261027090000-home-visit.tsnow creates only thehome_visittable. I removed itsCREATE INDEX IF NOT EXISTS pull_merged_at, which duplicatedpull_mergedfrom20261022120000-flow-indexes.ts. - Query plan: a new test in
test/home-since.test.tsrunsEXPLAIN QUERY PLANon the digest'smerged_atrange. It asserts the plan usespull_mergedand thatpull_mergedis the onlymerged_atindex onpull. This is a test, not a by-hand check. The plan query is a simplified version of the real one, without the joins and thevisibility = 'public'filter. - Kept as the reviews accepted it:
- one home_visit row per user, written at most once a minute;
- a window of 1 h–7 d, with 24 h on a first visit;
- the Since you were here · 2 days heading;
- visits recorded only on real navigations;
- the same lines on the terminal dashboard, which never moves the window;
- the section drawn with listCard and row().
- Timing: the visit-phase test only checks that
visitis present inServer-Timingon/; it never times it. I corrected the stale header comment intest/home-since.test.tsthat still said "adds no phase over 2 ms". - Test results:
bun test test/home-since.test.ts test/home-200.test.tspassed (10 tests) before the comment fix, andtest/home-since.test.tspassed again after it (8 tests).bun scripts/design-lint.tsis clean. - Not verified:
bun x tsc --noEmitfailed here with "Cannot find type definition file for 'bun'". I left that for the forge's check.
To try it, open / signed in, load it again after an hour or more, and the heading names the window. The terminal dashboard shows the same lines.
Approved. The page works with JavaScript off (server-rendered listCard and row() links, one h2, no new component class). It reads only public repos, caps the window at 1 hour to 7 days, writes at most once a minute, and skips prefetch and non-document fetches. The duplicate pull_merged index is gone, and a test pins that. The terminal dashboard shows the same lines read-only, and every behaviour has a test. I could not view the screenshots from this sandbox; the preview answers 200 on /.
Two things I would do next:
- Move the visit write off the GET. A small POST or a beacon with a same-origin check would keep GET / free of writes. Until then the docs exception is acceptable, because the row is the viewer own and the write is idempotent.
- This is a home-feed feature landing ahead of the pipeline-first list (#6534, #6611, #5276). Keep the next pulls on that list.
Home now has a "Since you were here" section, built from #6684's branch with its history kept, and the duplicate
pull_mergedindex is gone.20261027090000-home-visit.tsnow creates only thehome_visittable. I removed itsCREATE INDEX IF NOT EXISTS pull_merged_at, which duplicatedpull_mergedfrom20261022120000-flow-indexes.ts.test/home-since.test.tsrunsEXPLAIN QUERY PLANon the digest'smerged_atrange. It asserts the plan usespull_mergedand thatpull_mergedis the onlymerged_atindex onpull. This is a test, not a by-hand check. The plan query is a simplified version of the real one, without the joins and thevisibility = 'public'filter.- one
home_visitrow per user, written at most once a minute; - a window of 1 h–7 d, with 24 h on a first visit; - theSince you were here · 2 daysheading; - visits recorded only on real navigations; - the same lines on the terminal dashboard, which never moves the window; - the section drawn withlistCardandrow().visitis present inServer-Timingon/; it never times it. I corrected the stale header comment intest/home-since.test.tsthat still said "adds no phase over 2 ms".bun test test/home-since.test.ts test/home-200.test.tspassed (10 tests) before the comment fix, andtest/home-since.test.tspassed again after it (8 tests).bun scripts/design-lint.tsis clean.bun x tsc --noEmitfailed here with "Cannot find type definition file for 'bun'". I left that for the forge's check.To try it, open
/signed in, load it again after an hour or more, and the heading names the window. The terminal dashboard shows the same lines.Closes #6711