From cff1a1460aeb6ba03ce3cd1bf8fc20173f1dc4ef Mon Sep 17 00:00:00 2001 From: Chris Birch Date: Sun, 8 Nov 2026 11:50:48 -0500 Subject: [PATCH] feat(prs): name the recaps tab's list, show and write commands prs draws a recaps tab from three commands its config names. These run fleet's ledger recaps: list prints each window recorded over 90 days, newest first, show prints one window's recap, and write dispatches one with a model call. needs keeps the tab off a machine without fleet or jq, which the same template reaches. The list runs through sh with pipefail, because fleet failing ahead of jq would otherwise exit 0 with nothing printed, which the tab reads as no recap written. prs refuses a config key it does not know, so this lands only once the prs release that reads recaps is out. Agent-Name: claude-code-unattended Agent-Session: 7e57e57e-0638-4af5-be9f-487326ef59f6 Agent-Run: 01a1bc01-a281-7515-9483-0ecb8a28f7c5 Worklog: 1333.1 --- configs/common/.config/prs/config.yml.tmpl | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/configs/common/.config/prs/config.yml.tmpl b/configs/common/.config/prs/config.yml.tmpl index a29ab62d8..3c4a7357f 100644 --- a/configs/common/.config/prs/config.yml.tmpl +++ b/configs/common/.config/prs/config.yml.tmpl @@ -28,3 +28,20 @@ window_actions: providers: [github] window: "explain {repo} #{number}" command: "claude --permission-mode bypassPermissions '/explain-code-changes #{number}'" + +# The recaps tab, drawn only where every program in needs is on PATH, so a +# machine without them draws none. list sorts, because the recap listing puts +# the oldest window first with days and weeks mixed. pipefail makes a failure +# ahead of the pipe fail the list, which jq's exit would otherwise read as no +# recap written. write is a model call, which prs asks before running. +recaps: + needs: [fleet, jq] + list: + - sh + - -c + - >- + set -o pipefail; + fleet ledger recap --since 90d --json + | jq -r 'sort_by(.window.since) | reverse | .[].window | "\(.kind) \(.label)"' + show: [fleet, ledger, recap, "--{kind}", "{label}"] + write: [fleet, agents, dispatch, recap, "--{kind}", "{label}"]