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

Waves in the terminal: list and read waves/*.md from the app terminal #1915

Parked opened this
Closed without merging

The terminal can now list and read a repository's waves/.md, but the web pages from #1507 aren't on main, so I built the shared reader myself. src/web/pages/waves.ts doesn't exist and #1801 was closed unmerged.

Notes

stopped parked by the crew deploy d776cda

opened this

The terminal can now list and read a repository's waves/*.md, but the web pages from #1507 aren't on main, so I built the shared reader myself. src/web/pages/waves.ts doesn't exist and #1801 was closed unmerged. I ran bun test on the new test file plus test/cut-wave.test.ts and test/waves.test.ts, and the type check is clean. I did not run the whole suite; the forge's check does that on this push.

What changed

  • Reader: src/actions/waves.ts reads waves/*.md from the default branch and caches each file's text by git object id, so an unchanged wave isn't read twice. src/actions/cut_wave.ts now uses it instead of its own private copy, and newer in src/story/cut.ts is exported.
  • List: src/story/list.ts parses the files with parseWave. Waves that parse come out newest first, then the files that don't, each with its reason. A web page can use the same list later.
  • Screen: src/tui/screens/waves.ts shows the list (j/k, r refreshes). enter reads one wave: headline, each highlight with its why, and the pulls with their addresses. esc goes back.
  • Access and escaping: Text from the files has control characters stripped. A repository the viewer can't read shows "No waves yet".
  • Palette: Ctrl+K, then Waves in a repository, asks for owner/name. It goes through the same readable-repository check as the other repository commands.
  • Tests and docs: test/tui-waves.test.ts covers list order, a bad file with its reason, reading a wave, and the unreadable-repository case. It is listed in the gate's EXCLUDED like the other terminal tests, and the README has a paragraph.

Left out

  • The web pages /:owner/:name/waves and /waves/<version> from #1507. This pull only supplies the reader and list they would use.
  • The terminal doesn't link the pulls; it prints their addresses. A bad file in the list can't be opened.

Try it: ssh in with FORGE_APP_SSH, press Ctrl+K, choose Waves in a repository, and enter owner/name.

🤖 Generated with Claude Code

Closes #1819

2 earlier comments
commented

This pull lets the app terminal list a repository's waves/*.md and read one wave. It also restores two functions that main was missing, which was what made the check fail.

The failing check: main didn't compile. #1770 removed carriedByRuns and carriesText from src/core/carried.ts because nothing called them. #1901 then merged a terminal deploys screen (src/tui/screens/deploys.ts) that imports both. I put the two functions back unchanged from the commit that removed them, and I merged current main into this branch. The type check is clean. test/tui-deploys.test.ts, test/carried-deploy.test.ts and test/tui-waves.test.ts pass. I did not run the whole suite, because the forge runs it on this push. If someone else lands the same fix on main first, the one-file carried.ts change drops out on merge.

Waves in the terminal (#1819):

  • Opening it: Ctrl+K, then Waves in a repository, asks for owner/name. A repository the viewer can't read shows nothing.
  • The list: it shows the repository's waves/*.md, newest first. Files that don't parse come after, each with its reason.
  • Reading a wave: enter shows the headline, each highlight with its why, and the pulls with their addresses. esc goes back.
  • Shared reader: I built it here, in src/actions/waves.ts with the list in src/story/list.ts, because the web pages from #1507 never landed (#1801 was closed unmerged). It caches each file by git object id, and src/actions/cut_wave.ts now uses it too.
  • Tests: test/tui-waves.test.ts is new and is listed in the gate's EXCLUDED, like the other terminal tests. The README has a paragraph on it.

Left out:

  • The web pages /:owner/:name/waves and /waves/<version>.
  • Pull links in the terminal; it prints the addresses.
  • Opening a bad file from the list.

Try it: ssh in with FORGE_APP_SSH, press Ctrl+K, choose Waves in a repository, and enter owner/name.

🤖 Generated with Claude Code

commented

This pull lets the app terminal list a repository's waves/*.md and read one wave. The merge conflict from the last check is fixed, and the branch is merged with current main.

The conflict: main had meanwhile restored carriedByRuns and carriesText in src/core/carried.ts itself, so my copy of that fix collided with it. I dropped mine and took main's version, so this pull no longer touches that file. The type check is clean. test/tui-waves.test.ts and test/tui-deploys.test.ts pass. I did not run the whole suite; the forge runs it on this push.

What it adds (#1819):

  • Opening it: Ctrl+K, then Waves in a repository, asks for owner/name. A repository the viewer can't read shows "No waves yet".
  • The list: it shows the repository's waves/*.md, newest first. Files that don't parse come after, each with its reason.
  • Reading a wave: enter shows the headline, each highlight with its why, and the pulls with their addresses. esc goes back.
  • Shared reader: the web pages from #1507 never landed (#1801 was closed unmerged), so I built the reader here, in src/actions/waves.ts. It caches each file's text by git object id. The list logic is in src/story/list.ts, and src/actions/cut_wave.ts now uses the same reader.
  • Tests and docs: test/tui-waves.test.ts is new and is listed in the gate's EXCLUDED, like the other terminal tests. The README has a paragraph on it.

Left out:

  • The web pages /:owner/:name/waves and /waves/<version>.
  • Pull links in the terminal; it prints the addresses.
  • Opening a bad file from the list.

Try it: ssh in with FORGE_APP_SSH, press Ctrl+K, choose Waves in a repository, and enter owner/name.

🤖 Generated with Claude Code

commented

Parked by the crew: the check stayed red through 2 automatic tries

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs