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

The terminal's Adapter screen runs a pull now with one key #10146

Merged opened this

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

Merged

The terminal's Adapter screen now runs a pull with `p`, for a writer. The new tests, `tsc --noEmit` and `bun scripts/gate.ts` pass. I did not use the `keep_plan` tool.

shipped production is serving it deploy ef7edf1

opened this

The terminal's Adapter screen now runs a pull with p, for a writer. The new tests, tsc --noEmit and bun scripts/gate.ts pass. I did not use the keep_plan tool.

  • Key: src/tui/screens/adapter.ts calls pullNow on p. On success the screen reads its facts again, so the last-pull row is fresh, and a toast says pulled: ok or pulled: failed.
  • Refusals: a refusal shows its PULL_NOW_REFUSALS sentence as a toast, which is where this terminal shows status messages.
  • Non-writers: p is listed in the footer only when canWrite is true. Anyone else sees no key, and pressing it does nothing. A second p while a pull runs is ignored.
  • Tests: test/adapter-tui.test.ts has three new cases. A writer sees the key, the pull is called, the rows are read again and the toast shows. A refusal shows the asleep sentence. A reader has no key, and pressing p neither handles the key nor calls pullNow. The screen takes pullNow as an optional trailing argument so a test can replace it.
  • Docs: docs/features/adapters-card.md names the key.

I ran only test/adapter-tui.test.ts, not the whole suite. That is the only test file I ran.

To try it: open a repository whose app declares an adapter, open Adapter from the palette, and press p.

Closes #10126

commented

The terminal's Adapter screen now runs a pull with p, for a writer. The new tests, tsc --noEmit and bun scripts/gate.ts pass. I did not use the keep_plan tool.

  • Key: src/tui/screens/adapter.ts calls pullNow on p. On success the screen reads its facts again, so the last-pull row is fresh, and a toast says pulled: ok or pulled: failed.
  • Refusals: a refusal shows its PULL_NOW_REFUSALS sentence as a toast, which is where this terminal shows status messages.
  • Non-writers: p is listed in the footer only when canWrite is true. Anyone else sees no key, and pressing it does nothing. A second p while a pull runs is ignored.
  • Tests: test/adapter-tui.test.ts has three new cases. A writer sees the key, the pull is called, the rows are read again and the toast shows. A refusal shows the asleep sentence. A reader has no key, and pressing p neither handles the key nor calls pullNow. The screen takes pullNow as an optional trailing argument so a test can replace it.
  • Docs: docs/features/adapters-card.md names the key.

I ran only test/adapter-tui.test.ts, not the whole suite. That is the only test file I ran.

To try it: open a repository whose app declares an adapter, open Adapter from the palette, and press p.

commented

The preview didn't fail. The deploy log ends with done, the process answered, and / on the preview returns 200. The "no tests declared, none run" line is only a note that forge.json has no top-level test key. Tests run through the check block, as they do for every other pull on this repo, so nothing needs fixing and I made no change.

The working tree is clean and HEAD is 02c6cea, the commit that was deployed. I ran bun test test/adapter-tui.test.ts (6 pass), bun x tsc --noEmit and bun scripts/gate.ts before the first push, and all passed. I didn't re-run them or push again.

If the forge's check run has failed, send me that log. This deploy message doesn't contain it.

commented

I merged main into the branch, resolved the three conflicts, and pushed. After the merge, bun x tsc --noEmit and test/adapter-tui.test.ts (7 tests) pass, and bun scripts/gate.ts is clean. I did not run the rest of the suite; the forge runs it on the push.

  • src/tui/screens/adapter.ts: I kept the writer's p pull-now key and main's "Pull runs" heading and last-ten run rows. After a successful pull the screen reloads, so a new run shows up under "Pull runs" straight away.
  • test/adapter-tui.test.ts: I combined both sets of imports. The new p tests and main's run-list tests are both in the file.
  • docs/features/adapters-card.md: I kept both the p pull-now paragraph and main's "last ten pull runs" paragraph.

The gate wanted a "Try:" line in a commit message, so the merge commit has one: open a repository's Adapter screen in the terminal as a writer and press p.

Approved

Writer-only p key on the Adapter screen calls pullNow (which itself checks the writer), reloads rows on success, shows the refusal sentence, ignores a second press while running. Footer key is a getter read at render, hidden from non-writers. Tests cover writer, refusal, reader; docs name the key; README untouched. Next two things I would do: (1) test the rejected-promise path ("The pull could not be run."); (2) word the success toast as a sentence rather than pulled: ok, and show failed runs more plainly. Refusals appear as a toast, which is this terminal status line.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs