Skip to content

feat(prs): name the recaps tab's list, show and write commands - #108

Merged
datapointchris merged 1 commit into
mainfrom
prs-recaps-config
Nov 8, 2026
Merged

datapointchris merged 1 commit into
mainfrom
prs-recaps-config

Conversation

@datapointchris

Copy link
Copy Markdown
Owner

prs draws a recaps tab only where its config names the commands behind it, so until this lands the tab never shows on any machine. This names the three commands in prs's config template: list prints each window recorded over the last 90 days as <kind> <label>, newest first, show prints one window's recap, and write dispatches one with a model call.

What to look at

  1. configs/common/.config/prs/config.yml.tmpl, the recaps block. needs: [fleet, jq] keeps the tab off a machine the same template reaches without them, because the list runs through sh -c and hides both from prs.
  2. The list script's set -o pipefail. Without it, fleet failing ahead of jq exits 0 with nothing printed, and the tab reads that as no recap written.

How it was verified

The template was rendered with REPOS_REGISTRY filled, and loaded by the prs binary built from datapointchris/prs#16:

$ XDG_CONFIG_HOME=<rendered> prs config show | tail -4
recaps    drawn
  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}
$ XDG_CONFIG_HOME=<rendered> prs tui --view recaps --json | jq -c '[.windows[] | "\(.kind) \(.label)"]'
["day 2026-11-06","day 2026-11-05","day 2026-11-04","week 2026-W45","week 2026-W44"]

Without pipefail, the list run with fleet's daemon unconfigured printed fleet's error on stderr and exited 0. With it, the same run exited 1.

What changes

  • prs tui gains a recaps tab on every machine with fleet and jq, after the next dotfiles apply.
  • A machine missing either draws no tab, and nothing else changes there.

Risk and rollback

prs 0.15.0 and earlier refuse a config key they do not know, and this adds recaps:

$ XDG_CONFIG_HOME=<rendered> prs config show
Error: reading .../prs/config.yml: yaml: unmarshal errors:
  line 37: field recaps not found in type config.file

So this merges only once the prs release carrying datapointchris/prs#16 is installed. A revert removes the block, and the tab with it.

Session 7e57e57e-0638-4af5-be9f-487326ef59f6

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
@datapointchris
datapointchris merged commit f61fe84 into main Nov 8, 2026
3 checks passed
@datapointchris
datapointchris deleted the prs-recaps-config branch November 8, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant