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

The feed is readable as JSON Feed at /feed.json, and the home page links to it as an alternate #14496

opened this

Check · Review · Land · Live — No review yet. Next: reviewer, no review yet.

Ready to land

GET /feed.json now answers application/feed+json (JSON Feed 1.1), and every page head carries . The new test/feed-json.test.ts passes, with 7 related suites (68 tests), and tsc and the design lint are clean. The forge's own check will run the full suite on the push.

Notes · 10 files · +150 −7

look green — its preview answered, ready for a look deploy 18e8dca

Check passeddeploy 18e8dca

Website spec: 26 findings (report only)

This pull asks to reach lab--forge-trevato-apps.open-platform.sh. Its preview and check reach what main reaches; the new host opens when the pull lands.

Look

10 pages beside main · 0 new to this pull

/apps

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 18e8dca ·

/docs

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 18e8dca ·

/explore

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 18e8dca ·

/looks/failed

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 18e8dca ·

/looks/missing

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 18e8dca ·

/nope/nothing

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 18e8dca ·

/notes

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 18e8dca ·

/releases

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 18e8dca ·

/review

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 18e8dca ·

/security

main

at aefa81f ·

this pull

In the dark

main

at aefa81f ·

this pull

at 18e8dca ·

opened this

GET /feed.json now answers application/feed+json (JSON Feed 1.1), and every page head carries <link rel="alternate" type="application/feed+json" href="/feed.json">.

The new test/feed-json.test.ts passes, with 7 related suites (68 tests), and tsc and the design lint are clean. The forge's own check will run the full suite on the push. I did not run the full suite or the whole set scripts/fast.ts named: that set was 2,596 of 3,789 test files, because the layout change touches every page.

  • Items: they are the public items /feed shows a signed-out visitor, newest first, up to 50. Each has id, url, title and date_published.
  • Privacy: the feed reads through publicShips, the query the signed-out page already uses, so there is no second filter. Private and archived repositories never appear, and the feed never reads the session cookie. The test checks that a private ship's title and repo name are absent.
  • Head link: I put it in src/web/layout.ts, so it is site-wide rather than only on /.
  • Files: src/feed/json_feed.ts builds the feed and src/http/json_feed_route.ts is the handler. The route is registered in src/http/server.ts. I did not touch src/feed/feed.ts, since that is the per-viewer timeline.
  • Tests: they cover the shape, the same-items-as-the-page check against publicShips, privacy, and the alternate link on / and /feed.

I left out per-viewer or authenticated feeds, and any items beyond merged pulls on public apps: today the public timeline has no other kind. There is no ETag; the response uses max-age=60.

Try it with curl -i $ORIGIN/feed.json, or view the source of / and look for the feed+json alternate link.

The first push was refused until I added a commit with a "Try:" line, so the branch has an empty second commit for that.

Closes #14480

3 earlier comments
commented

GET /feed.json now answers application/feed+json (JSON Feed 1.1), and every page head carries <link rel="alternate" type="application/feed+json" href="/feed.json">.

The new test/feed-json.test.ts passes, with 7 related suites (68 tests), and tsc and the design lint are clean. The forge's own check will run the full suite on the push. I did not run the full suite or the whole set scripts/fast.ts named: that set was 2,596 of 3,789 test files, because the layout change touches every page.

  • Items: they are the public items /feed shows a signed-out visitor, newest first, up to 50. Each has id, url, title and date_published.
  • Privacy: the feed reads through publicShips, the query the signed-out page already uses, so there is no second filter. Private and archived repositories never appear, and the feed never reads the session cookie. The test checks that a private ship's title and repo name are absent.
  • Head link: I put it in src/web/layout.ts, so it is site-wide rather than only on /.
  • Files: src/feed/json_feed.ts builds the feed and src/http/json_feed_route.ts is the handler. The route is registered in src/http/server.ts. I did not touch src/feed/feed.ts, since that is the per-viewer timeline.
  • Tests: they cover the shape, the same-items-as-the-page check against publicShips, privacy, and the alternate link on / and /feed.

I left out per-viewer or authenticated feeds, and any items beyond merged pulls on public apps: today the public timeline has no other kind. There is no ETag; the response uses max-age=60.

Try it with curl -i $ORIGIN/feed.json, or view the source of / and look for the feed+json alternate link.

The first push was refused until I added a commit with a "Try:" line, so the branch has an empty second commit for that.

commented

<!-- look-pages acd85cf6aa24 --> Look pages for acd85cf, from the gate:

  • look pages (inferred): this pull changes src/web/layout.ts; the forge pictures / (src/web/layout.ts), /docs (src/web/layout.ts), /explore (src/web/layout.ts) and 25 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The look-pages note was about commit acd85cf, which had no Looks: or No look: line. A later commit, 47870c955, is already pushed with one, so I made no new changes and pushed nothing.

The line reads: No look: the change adds one link element to the head and draws nothing. The same commit also carries Direction: and No door: lines, which cleared the gate's earlier "pipeline first" and "both doors" failures.

I haven't seen the gate's verdict on 47870c955. My local bun scripts/gate.ts run was killed before it printed anything, so the new commit message is untested against the gate.

I disagree with the inferred list of 28 pages only in that the pictures would not change. src/web/layout.ts gains one <link rel="alternate" type="application/feed+json" href="/feed.json"> element in <head>, so no page's pixels move. If the gate still wants pictures, Looks: / would be the page to name.

commented

/feed.json now passes the five failing checks locally, and I've pushed the fix. I haven't re-run the full suite here.

What changed

  • Route mark: GET /feed.json had no admin-or-open mark, so I added src/http/marks/feed.json.json as open.
  • Looks list: app.looks picked /feed.json up as a page. I added it to NOT_A_PAGE in test/forge-looks.test.ts as "JSON Feed of /feed".
  • Design audit: I added feed.json to the not-a-page pattern in test/design-audit.test.ts, as the other feed files are.
  • Reserved names: feed.json is now in src/core/reserved.ts, so nobody can register it as a username.
  • /docs size: the <link rel="alternate"> for the feed made the /docs index 54 bytes over the 15 KB limit. I dropped its title attribute in src/web/layout.ts. I also shortened a few lines in src/view/doc_sections.ts (the first-line summary text under DOC_LINES) to get back under.

Checks

  • The five suites (design-audit, route-marks, forge-looks, reserved-names, docs-link), plus feed-json and surfaces-adversarial, pass: 78 pass, 0 fail.
  • bun scripts/gate.ts --fix and bun x tsc --noEmit printed no errors.
  • The surfaces-adversarial N+1 test (the dashboard's Apps and On-you cards) failed in the shard run but passes here. The check log said it fails only beside other tests, so I haven't diagnosed it and can't say it's fixed.

What I left out

  • I kept the JSON Feed link's type="application/feed+json" and dropped only its title. Feed readers don't need the title, but it no longer shows a label in browsers that list a page's feeds.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs