Compare commits

..
Author SHA1 Message Date
Brent Vatne 61c1c1bd62 Release 0.19.0 2026-10-15 13:59:08 -07:00
Brent Vatne ddb8005e09 Harden report uploads and the reports picker after review
- Device labels in the sealed .env allow only letters, digits and a few
  separators: eas deploy expands $VARIABLES there, even single-quoted, so a
  label from an uploaded report could pull the deploying environment (or the
  report's own key) into the deployment.
- readReportZip rejects a report whose commits are not full SHAs or whose
  repository, title, refs and run id are not text, and commitSubject passes
  --end-of-options, so a crafted report cannot hand git an option.
- Text from reports and commits is stripped of control characters when a
  run is saved, read and drawn, so it cannot reach the terminal as escape
  sequences; run.json may only name ios and android.
- The picker: Ctrl+C quits while filtering, escape sequences it has no use
  for (Delete, F-keys, modified arrows, Alt+key) are ignored instead of
  quitting, and a key that skips the title animation only skips it.
- Saved-run ids keep the whole run id and attempt, and a review's platforms
  saved one at a time join one run (same repository and commits).
- A local review removes only its own worktrees, not every stale one.
- Cached captures go after 30 days unused or past 2 GB (also on
  `reports prune`), and a review shown in the Viewer removes its temporary
  copy once the run is saved.
2026-10-15 13:51:49 -07:00
Brent Vatne 07152721ed Show the reports picker in the README, and add reports add
The README shows `npx @expo/explore reports` (light and dark), laid out in
Paper from the real picker over real saved runs. The readme-refresh skill
regenerates it: scripts/readme-reports-rows.mjs renders the picker as the
CLI draws it and writes the terminal body as Paper-ready HTML.

`reports add <report.zip | directory>...` keeps a report already on disk,
such as a downloaded explore-review artifact, among the saved runs without
hosting it.

Also: the picker's selected row kept its background only up to its first
coloured word; it now reaches the end of the row.
2026-10-15 13:39:01 -07:00
Brent Vatne d873690542 Add expo-explore reports: an arrow-key picker of your saved runs
Every local review, exploration and uploaded report is now kept under
~/.cache/expo-explore/reports/<id>/ (its report ZIPs and a run.json with the
kind, title, commits and their subjects, platforms and change counts), for
30 days or up to 2 GB.

`expo-explore reports` in a terminal opens a picker: one aligned line per
run, the selected run's commits and changes below, arrow keys or j/k to
move, / to filter by title, branch, commit subject, SHA or PR number, Enter
to open the run in the local Viewer, u to host it, d to delete it after y,
and tab to switch between this repository and all of them. It opens with
the "Expo Explore" wordmark arriving one of five ways, picked at random
(EXPLORE_INTRO names one, or off). Outside a terminal it lists the runs;
`reports list|open|upload|rm|prune` and --json cover scripts and agents.

Also: report:upload accepts reports from before Android support (no
runtime.platform), which are iOS.
2026-10-15 13:05:11 -07:00
Brent Vatne 2700db1051 Hand off local reports to AI, and fix the review's findings
The local report server now answers agents the way a hosted link does: the
Markdown index at /p/<token>, llms.txt and the api/v1 JSON API, from the
agent API the hosted Worker uses (moved to src/report/agent-api.ts and
zip-reader.ts). The Viewer shows "Hand off to AI" on local reviews, and the
prompt says the link is local and lives while capture:review runs. Local
reviews are named by their refs in the index and the prompt.

Fixes from the multi-model review:
- Single-platform uploads (and explore:binary) list their platform, so an
  Android report is not served as iOS.
- Device labels are cleaned before they reach the sealed .env.
- report:upload sizes files before reading them; the shared ZIP reader stops
  inflating past an entry's declared size.
- Refs like @{u} are named by branch or short SHA before capture, not
  rejected after it.
- On the default branch, unpushed commits are reviewed against origin's tip.
- Ctrl+C stops deterministic captures between steps, on the main thread and
  on capture workers.
- report:upload takes --config, finds a monorepo's committed config, and
  says where its preview settings came from.
- The docs say plainly that a local review runs both commits' code as you.
- The work directory goes after --upload or --output, and cache entries are
  written atomically.
2026-10-15 12:20:09 -07:00
Brent Vatne be82f16d6b Add report:upload to host reports already on this machine
Hosts a report.zip or report directory (one per platform of a review, or
one explore:binary report) behind one token-gated EAS Hosting link, in the
project --upload would have used. capture:review prints the command under
the Viewer link. Deploy errors name your eas login when EXPO_TOKEN is unset.
2026-10-15 10:56:48 -07:00
Brent Vatne adf2249612 Update the README for comparisons and local reviews; tidy local runs
README: the local review needs only a committed config, and its section
says what it does to your checkout, installs, cache and EAS usage. "After
setup", hosted previews, "How it works" and "Keep your setup current"
cover comparisons, local reviews and the ci:* commands. The README
checklist keeps the local-review prompt.

A local review that fails before producing anything removes its work
directory, the progress line no longer mentions a pull request comment,
and the tests delete the directories they create.
2026-10-15 10:39:38 -07:00
Brent Vatne 250eaafa77 Harden local reviews after the multi-model review
- Installs run without any credential-named environment variable, so a
  reviewed commit's .npmrc cannot send NPM_TOKEN or a Claude login token to
  a registry it picks; proxy, CA, cache and SSH-agent settings stay. The
  lockfile is found from the app directory, so an app with its own lockfile
  in a monorepo installs.
- Ctrl+C aborts model requests, stops the recorded simulator sessions and
  lets the review unwind through its cleanup; a second Ctrl+C quits and
  names any session left running. runLocalReview also takes an interrupt
  signal.
- The default base is the newer fork point of the local and origin default
  branches, by exact ref, so a stale branch or a tag of that name never
  adds unrelated changes.
- The capture cache replaces an entry from another recipe, keeps a fuller
  one against a partial capture of the same recipe, and never caches
  evidence that did not validate.
- --upload keeps expiresAfter: never. A finished review keeps only its
  reports; a failed one keeps everything and says where. The local Viewer
  offers no agent handoff, which it cannot serve.
2026-10-15 10:17:19 -07:00
Brent Vatne 906d51a873 Run capture:review on this machine between any two commits
capture:review with refs and none of the CI flags runs the same review
locally: --base (default: where HEAD left the default branch) and --head
or --uncommitted (tracked changes; --include-untracked adds untracked,
non-ignored files). Both commits are checked out as detached worktrees in a
private temporary directory, installed with the frozen-lockfile command
without Explore credentials or corepack enable, and removed afterwards.

It uses EXPO_TOKEN and the provider's API key when set, otherwise your eas
login and your local claude or codex login for the configured provider.
Every configured platform is reviewed; reports are packaged and opened in
a local Viewer (the built Viewer served at /p/<token>, as hosted reports
are) or hosted with --upload. Captures are cached per commit in
~/.cache/expo-explore, and Ctrl+C stops the review's simulator sessions.

doctor --capture uses the local model login the same way, and CLI errors
read as plain text outside GitHub Actions.
2026-10-15 09:44:06 -07:00
Brent Vatne 29bd225775 Stage app-relative paths for hosted repacks
git ls-files --full-name lists paths from the repository root, which were
then joined under the app directory: an app in a monorepo subdirectory
(apps/mobile) staged apps/mobile/apps/mobile/... and missed its own files.
Listing from the app directory without --full-name gives the paths the
staging copies. Standalone apps are unchanged.
2026-10-15 09:44:06 -07:00
Brent Vatne 5db1373ce7 Resolve HEAD to the checked-out commit in ci:compare-refs
The resolver tried refs/remotes/origin/<ref> before the ref itself, so HEAD
resolved through origin/HEAD to the default branch, and a local branch lost
to a possibly stale origin branch. HEAD, @ and their ~/^ forms now resolve
literally, and names are tried as a tag, a local branch, an origin branch,
then as git spells them.
2026-10-15 09:35:29 -07:00
Brent Vatne a3e7bcfa7b Address the multi-model review of comparisons
- Comparisons link GitHub's two-dot diff (base..head), the direct diff that
  capture compares; three dots diffed from the merge base and showed nothing
  for a rollback.
- ci:find-baseline turns a failed lookup into a warning and no baseline. As a
  ci:* error it wrote explore-diagnostics/error.json, which the failure
  comment could report as the cause of another platform's failure.
- The compare concurrency group joins the refs with "..", which no ref name
  contains, so different comparisons never share a group.
- The compare report job uploads its failure diagnostics, like the review's.
- --expires-in is validated even when the config hosts no report.
- When the default branch's ci.trustedAuthors fails validation, the
  SOURCE_NOT_TRUSTED refusal says so and why.
2026-10-14 21:29:31 -07:00
Brent Vatne b54877ba1f Address the second review of comparisons
- Job summaries render refs as code spans, so a ref with ] ( ) cannot break
  their links.
- ci:pr reads only ci.trustedAuthors from the default branch's config and
  ignores other keys, as before this branch, so a config written for another
  release still trusts its bots.
- The deploy check names its probes by shape (/p/<token>/...), never the
  token or its one-character near miss.
- capture:review's preview output is written by writeCaptureOutputs, now
  tested, since it alone starts the deploy job.
- The compare template's calling example grants contents and actions read,
  and the template and README say to call it once per workflow run.
2026-10-14 20:11:48 -07:00
Brent Vatne ac4400296f Keep a comparison's hosted link usable in the run summary
The runner masks registered secrets in job summaries as well as logs, so a
masked report token made the summary link read .../p/***. For a comparison,
ci:deploy no longer registers the token as a mask and leaves the link out
of the log; it appears only in the summary, as a PR's link appears only in
its comment.
2026-10-14 19:48:53 -07:00
Brent Vatne c3b8b2769e Fix review findings for comparisons
- ci:publish links a comparison from the run summary with the Open (hosted
  Viewer) and zip links a PR comment carries, replacing a summary line that
  pointed at expo-explore view, which does not open a report ZIP.
- explore-compare.yml takes optional scope and expires-in inputs, applied as
  capture:review --scope/--expires-in over the reviewed config, so a release
  comparison can capture every screen and keep its hosted link.
- ci:after-capture runs only when Explore installed, so a failed install
  reports one error instead of two.
- The Viewer's drop page and expired-link text mention the workflow run as
  well as the pull request.
- CI-FLOW.md describes the ci:* steps and the compare workflow; the README
  release example skips prereleases as the base and the first release.
2026-10-14 18:45:48 -07:00
Brent Vatne fa32f8e45e Move workflow logic into ci:* commands
The inline scripts in the review, baseline and compare workflows become CLI
commands, so fixes ship with an npm release instead of regenerated workflows:
ci:pr (resolve and authorize the PR), ci:find-baseline, ci:compare-refs and
ci:after-capture (stop sessions, check checkouts). capture:review writes the
preview request to the step outputs. The templates define the install steps
once with YAML anchors and the app directories once in the workflow env,
which fixes monorepo capture jobs that used the repository root; doctor now
checks every APP_PROJECT_DIR and APP_INSTALL_DIR in a workflow.
2026-10-14 18:23:02 -07:00
Brent Vatne 9e067e6308 Review any two commits without a pull request
A comparison origin, capture:review --compare, and an explore-compare.yml
workflow (workflow_dispatch and workflow_call with base and head refs) that
captures and reports like a PR review and links the report from the run
summary. setup --workflows installs it; doctor treats it as optional.
2026-10-14 17:52:10 -07:00

Diff Content Not Available