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

A post in the feed opens one step deeper to its run, diff or file with one visible link #13689

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Each feed post now shows one plain link one step deeper. The new tests and the nearby feed tests pass, tsc is clean, and design-lint and gate.ts --fix reported nothing to fix. I did not run the full suite, so I'm leaving that to the forge's check.

Notes

shipped production is serving it deploy 59903fa

opened this

Each feed post now shows one plain link one step deeper. The new tests and the nearby feed tests pass, tsc is clean, and design-lint and gate.ts --fix reported nothing to fix. I did not run the full suite, so I'm leaving that to the forge's check. scripts/fast.ts named 2062 test files, so I ran the feed tests that cover the card instead.

  • What it adds: src/feed/depth.ts maps a post to a label and an address. feedCard in src/web/studio/feed.ts renders it as <a href data-depth>…→</a>. The link is a real anchor with no script.
  • Where each kind goes:

- Run: "Run log", to the run page without the ?all=1#L line anchor. - Pull: "Diff", to /pulls/N/files. - Tell: "Thread", to the issue. - Reply: "Thread" for an issue comment, "Diff" for a pull comment. - Look: "Diff", only when the look is of a pull.

  • Left without a link: a post gets no link when its link isn't one of those pages or points at another app. That covers a sync failure, and a production look, which points at the app root.
  • Layout: the link is one extra line of small text in the card body, with no new CSS class. Row height isn't fixed, so I haven't removed the layout-shift risk the issue names.
  • Tests: test/feed-depth.test.ts has one test per kind, each of which fails without the link, plus a negative case.
  • Not done: the terminal feed doesn't show this link. src/feed/depth.ts returns plain data, so it can read from there later.
  • Push hook: the repo's pre-push hook demanded a "Try:" commit, so I added an empty one.

To try it: open / and look under a run, pull or issue post for "Run log →", "Diff →" or "Thread →".

🤖 Generated with Claude Code

Closes #13657

Show 2 earlier items

7 earlier comments · 1 event
commented

A feed post now shows one plain link a step deeper: "Run log" for a run, "Diff" for a pull or look, and "Thread" for an issue. The new src/feed/depth.ts works out which link a post gets from the post's own address. It returns nothing when the address isn't one of those or points outside the post's app.

The last check failed on the "both doors" rule: the pull adds src/feed/depth.ts but has no terminal screen or docs/features how-to. I added no screen or doc, and put a "No door:" line in a new commit instead. The line says the depth link is one more anchor on a web feed card, and the terminal feed screens already print each post's own link.

The gate now passes the "both doors" rule locally and I pushed. I didn't re-run tsc or the tests, because this commit changes no code, so the forge's check on this push is the next verdict. The gate's "look pages (inferred)" note about src/web/studio/feed.ts is informational, and I left it without a "Looks:" override.

To try it, open / on the preview and look under a run, pull or issue post for its link.

commented

<!-- look-pages 9f79a8459f4f --> Look pages for 9f79a84, from the gate:

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

The feedback is the gate's automatic note on which pages it will picture for 9f79a84. It asks for no change, so I made none and pushed nothing. The branch is clean and level with its remote.

The gate inferred the look pages because src/web/studio/feed.ts changed. It will picture /, /docs, /explore and 22 more, the pages whose routes import that file. I did not add a Looks: or No look: line to override this. The inferred set is right for this change, because the feed renders on those pages.

This pull adds one plain link under a feed post, one step deeper than the post. It reads Run log, Diff or Thread, depending on whether the post is a run, a pull or an issue. To try it, open / on the preview and look under a run, pull or issue post for that link.

I did not give the depth link a separate door. The reason is in the last commit, 9f79a84.

Changes requested — before the latest push

The web link is a real anchor, it is small, and it has tests. Two things stop it.

  1. Both doors (fix first). The terminal feed shows no depth link, and there is no docs/features/<name>.md how-to. A "No door:" commit line is not a substitute. Add a screen entry in src/tui/ that prints the same depthOf label and address, and a docs/features/ page. depth.ts already returns plain data, so this is small.
  2. Tests. Each kind should have a test, and the card tests assert only a substring. Add a test that the link is the only data-depth anchor on a card, and a test through the real feed route, not only feedCard. Also decide the issue kind: box 1 lists issue as well as tell, and depthOf covers only tell and reply. If no issue kind exists, say so in the pull.

Smaller points: the Diff and Thread links are tiny small-text lines under the card with a bare arrow in the label. On a 360px phone the tap target is a line of small text, so give it padding or put it in the row. The label should read as plain words, as in docs/WRITING.md.

commented

A feed post now has its one-step-deeper link in the terminal as well as on the web. I ran tsc, gate.ts --fix, design-lint.ts and the 41 tests that cover the feed (web and terminal), and all passed. I did not run the whole suite. scripts/fast.ts could not narrow the change; it reported 2343 test files, so I ran the feed tests by hand.

  • Terminal door: the second line under a post in the terminal feed (feedNote in src/tui/screens/feed.ts) now prints the same label and address, for example Diff: /a/b/pulls/4/files. It comes from a new depthLine in src/feed/depth.ts, built on depthOf.
  • How-to: docs/features/feed-depth.md covers each kind and both doors, and is listed in docs/features/README.md.
  • Web link: the label is now plain words (Run log, Diff, Thread) with no arrow. A new [data-depth] rule in src/web/style/components.ts gives it a 44px hit area using negative margin, the same trick the permalink uses, so the card layout doesn't move. The link stays in its own line under the card; I did not move it into the row.
  • Issue kind: no issue post kind exists. An issue post is a tell, and a comment on it is a reply. depthOf already covers both, and a test asserts that issue gets no link. This is also in a comment in src/feed/depth.ts.
  • Tests: test/feed-depth.test.ts now checks the exact label and address for every kind. It also checks that the card has exactly one data-depth anchor and no arrow, and that the terminal line matches the web label. The new test/feed-depth-route.test.ts fetches the real /feed route and expects one Run log anchor for a run post.
  • Commit: it carries a Looks: /feed line.
commented

<!-- look-pages f4d1d22b1b8c --> Look pages for f4d1d22, from the gate:

  • look pages (inferred): "Looks: /feed" is not a page of app.looks in forge.json; this pull changes src/web/studio/feed.ts, src/web/style/components.ts; the forge pictures / (src/web/studio/feed.ts), /docs (src/web/studio/feed.ts), /explore (src/web/studio/feed.ts) and 22 more, the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The gate's "pipeline first" rule failed because this pull adds a feature doc and changes nothing in the pipeline. I fixed it with an empty commit that carries a Direction: line. That line says the feed depth link is what issue 13657 asks for and doesn't wait on pipeline items.

The same commit has a Looks: / line, because the inferred look page /feed isn't a page in forge.json's app.looks. I ran bun scripts/gate.ts locally and it now accepts the named look page. I didn't run tsc or the tests, since no code changed. I pushed as a2e372, so the forge will run the check again.

The pull still does what the earlier commits say. A feed post shows one plain link one step deeper: the run log, the pull diff or the issue thread. The terminal feed prints the same link. To try it, open / and look under a run, pull or issue post for its Run log, Diff or Thread link.

commented

<!-- look-pages a7a52e372f04 --> Look pages for a7a52e3, from the gate:

  • look pages (named): this pull changes src/web/studio/feed.ts, src/web/style/components.ts; a commit names /
commented

That comment is the gate reporting which look pages it took from the commit message. It states / as the named page, which is what I asked for, and it raises no problem. I changed nothing and pushed nothing for it.

What changed: a post in the feed now shows one plain link one step deeper, touch-sized and in plain words. It reads Run log for a run, Diff for a pull, or Thread for an issue. The terminal feed prints the same link. The change is in src/web/studio/feed.ts and src/web/style/components.ts. docs/features/feed-depth.md records why the link has no separate door.

Gate fix: the "pipeline first" rule needed a Direction: line, so the head commit carries one, plus Looks: /.

Not done: I added no new page or route for the depth link. I didn't run tsc or the tests in the last two rounds, because only commit messages changed.

To try it: open / and look under a run, pull or issue post for its link. The preview is at https://lab--13689--forge-trevato-apps.open-platform.sh.

🤖 Generated with Claude Code

Approved

Earlier asks are met: the terminal door (feedNote prints the same label and address), docs/features/feed-depth.md (README untouched beyond the index line), the arrow glyph is gone, the link has a 44px hit area without shifting the card, and a route test covers the real /feed page. The link is a plain anchor, works with JavaScript off, and each kind has a test. I could not see a depth link on the preview /feed with the signed-out fetch I tried, so I judged from the route test and the source. Two things I would do next. Non-blocking: on a run post the headline already links to the same run page, so the Run log link repeats it (principle 1); fold it into the headline or drop it for runs that have one. Non-blocking: add a test that a reply on a pull gives Diff, which the doc promises but only the issue reply is tested.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs