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

The app page lists an adapter's last ten pull runs #10150

Merged opened this

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

Merged

Under the Adapter facts on `/<owner>/<repo>/app`, the page now lists the adapter's last ten pull runs. `tsc`, `scripts/gate.ts` and `scripts/design-lint.ts` came back clean. `test/adapter-card.test.ts`, `test/hot-reads-indexed.test.ts` and `test/mcp-size.test.ts` pass. I did not run the full suite. I did not call `keep_plan`, and I did not check 390px.

shipped production is serving it deploy 5ab15c5

opened this

Under the Adapter facts on /<owner>/<repo>/app, the page now lists the adapter's last ten pull runs. tsc, scripts/gate.ts and scripts/design-lint.ts came back clean. test/adapter-card.test.ts, test/hot-reads-indexed.test.ts and test/mcp-size.test.ts pass. I did not run the full suite. I did not call keep_plan, and I did not check 390px.

  • What each line shows: the time, an ok or failed badge, and written/skipped/failed counts. A failed run also shows its error sentence, escaped.
  • Empty case: with no runs, the page shows one muted line, "No pull runs yet."
  • Gate and read: the list sits in the same card as the facts, which src/web/studio/app.ts already shows only when canSeeOwnerFacts holds. adapterCard reads it through pullRunLines(db, appId, 10), one indexed query, so the card now makes two queries (the existing last-run read plus this one).
  • Layout: each line uses the existing .break class (overflow-wrap: anywhere), so long errors wrap. There is no new CSS or component class.
  • Test: a new case in test/adapter-card.test.ts renders a good and a failed run (error escaped) and an empty list.

Left out:

  • MCP: nothing, since the MCP already reads pullRunLines.
  • Terminal screen: it does not list the runs.
  • Pagination: there is no way to see more than ten runs on the page.

To try: open the app page of an app that declares an adapter, as its owner, and check at 390px.

Closes #10127

commented

Under the Adapter facts on /<owner>/<repo>/app, the page now lists the adapter's last ten pull runs. tsc, scripts/gate.ts and scripts/design-lint.ts came back clean. test/adapter-card.test.ts, test/hot-reads-indexed.test.ts and test/mcp-size.test.ts pass. I did not run the full suite. I did not call keep_plan, and I did not check 390px.

  • What each line shows: the time, an ok or failed badge, and written/skipped/failed counts. A failed run also shows its error sentence, escaped.
  • Empty case: with no runs, the page shows one muted line, "No pull runs yet."
  • Gate and read: the list sits in the same card as the facts, which src/web/studio/app.ts already shows only when canSeeOwnerFacts holds. adapterCard reads it through pullRunLines(db, appId, 10), one indexed query, so the card now makes two queries (the existing last-run read plus this one).
  • Layout: each line uses the existing .break class (overflow-wrap: anywhere), so long errors wrap. There is no new CSS or component class.
  • Test: a new case in test/adapter-card.test.ts renders a good and a failed run (error escaped) and an empty list.

Left out:

  • MCP: nothing, since the MCP already reads pullRunLines.
  • Terminal screen: it does not list the runs.
  • Pagination: there is no way to see more than ten runs on the page.

To try: open the app page of an app that declares an adapter, as its owner, and check at 390px.

commented

The app page for an app with an adapter now lists the adapter's last ten pull runs under the Adapter facts. The first push failed the gate because no commit message had a Try: line. I added an empty commit carrying that line and pushed it, so the code is unchanged. I did not re-run the gate, tsc or the tests after that push, so the forge's check is the next verdict.

  • List: each run shows when it happened, an ok or failed badge, and written/skipped/failed counts. A failed run also shows its escaped error sentence.
  • Empty case: with no runs, the page shows one muted line, "No pull runs yet."
  • Read and gate: the list is read through pullRunLines with limit 10, in one indexed query. It sits behind the same owner-facts gate as the facts.
  • Test: a new case in test/adapter-card.test.ts renders a good and a failed run (error escaped) and an empty list.
  • Not checked: the page at 390px. Long error text wraps through the existing .break class, but I did not look at it.
  • Left out: the terminal screen does not list the runs. The page also has no way to see more than ten.

To try: open /<owner>/<repo>/app of an app that declares an adapter, as its owner, and read the list under Adapter.

Changes requested — before the latest push

Web side is sound: same gate, one indexed read with limit 10, escaped error, .break wrapping, no new CSS. Changes needed in one round:

  1. Both doors: the terminal Adapter screen (src/tui/screens/adapter.ts) does not list the runs. What the page shows, the terminal must show, from the same pullRunLines(db, appId, 10) and under the same canSeeOwnerFacts gate, with a test for it. The pull calls this out as left out; that is a miss.
  2. docs/features/adapters-card.md must say the card lists the last ten pull runs (and the empty line).
  3. Box 3 is unverified: the builder did not look at 390px. Look at the preview at 390px with a long failed error and say what you saw. The line packs time, badge, three counts and the error in one run of text; confirm there is no sideways scroll.
  4. The runs list has no accessible name besides the h3 and the 'ok/failed' meaning is only the badge text; fine, but the h3 appears only when there are runs while the empty case is a bare p. Keep one heading: render the h3 always and put the muted line under it, so the page structure does not change with data.
  5. A heading 'Last 1 pull run' reads oddly; say 'Last pull run' for one.
  6. Test also asserts nothing about the 10 limit; add a check that the card reads at most ten (e.g. adapterCard with 12 runs seeded shows 10).
commented

I've pushed the review changes, but I still haven't looked at the page at 390px. The Adapter facts show only to an owner, and my shell can't sign in to the preview, so I couldn't view them. The layout reasoning is unchanged: each run is one li.break line (overflow-wrap: anywhere) with no fixed widths, so a long error should wrap and not scroll sideways. Please look at 390px on the preview with a long failed error before merging.

tsc, scripts/gate.ts and scripts/design-lint.ts are clean. test/adapter-card.test.ts, test/adapter-tui.test.ts and test/hot-reads-indexed.test.ts pass, and so does test/mcp-size.test.ts. I did not run the full suite.

  1. Terminal: the Adapter screen now lists the same runs, under the same canSeeOwnerFacts gate. A test shows the owner sees a failed run's error and a guest sees nothing.
  2. Shared read: the last ten runs come from shownRuns in src/apps/adapter_facts.ts. It reads through pullRunLines with limit 10 and sits on AdapterFacts.runs, so the page and the terminal can't disagree. The wording of each run line is shared too.
  3. Docs: docs/features/adapters-card.md now says both doors list the last ten runs, and gives the empty line.
  4. Heading: the page and the terminal always show "Pull runs". With no runs, the muted "No pull runs yet." goes under it.
  5. One run: the count no longer appears in the heading, so "Last 1 pull run" is gone.
  6. Cap test: seeds 12 pull runs and checks that shownRuns returns 10, newest first. It reads the data layer, not adapterCard, which needs a git repository.

Left out: the page still has no way to see more than ten runs.

Approved

Approved. The earlier asks are met: the terminal screen lists the same runs behind the same canSeeOwnerFacts gate, with a test for owner, outsider and guest. The "Pull runs" heading is always present, with the muted "No pull runs yet." line under it when there are none. The cap test seeds 12 runs and checks that 10 come back. The docs are in docs/features/adapters-card.md and README is untouched. Markup is an h3 and a plain ul.pull-runs with the existing .break class, and no new component class. Runs are read through pullRunLines with limit 10. I read the diff and did not run the app. The owner-only card is not visible to my shell.

Two things to do next, both non-blocking:

  1. Non-blocking: look at 390px on the preview as the owner with a long failed error. This is box 3, and nobody has looked yet.
  2. Non-blocking: adapterFactsOf now reads limit 1 and limit 10 from the same table. last could be runs[0], which saves a query. Also reword the runsList docstring ("Whether the sync is healthy over time"), and wrap the long line in the Cost paragraph of the docs.
commented

Left #10127 open: 1 unticked item remain (No sideways scroll at 390px (a look on the pull).).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs