Skip to content

docs: cover shorebird metrics, releases delete, and --yes for deletes - #728

Merged
eseidel merged 7 commits into
mainfrom
eseidel/cli-release-docs
Oct 16, 2026
Merged

eseidel merged 7 commits into
mainfrom
eseidel/cli-release-docs

Conversation

@eseidel

@eseidel eseidel commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Shorebird 1.6.129 adds commands and changes how deletes are confirmed, and a few pages now describe the old behavior. This covers the tasks a user would look for, briefly, and points at --help for options rather than repeating them.

  • shorebird metrics (account/cli.mdx): what it's for, one example, and --help.
  • shorebird releases delete (code-push/release.mdx, linked from code-push/delete.mdx): deleting a release, or one platform, from the command line.
  • Delete confirmation (account/cli.mdx, code-push/tracks.mdx, code-push/release.mdx, code-push/ci/scripting.mdx, agent-instructions.txt): releases delete and channels delete prompt y/N in a terminal and take --yes otherwise; apps delete makes you type the app's display name in a terminal and takes --confirm-name "<name>" otherwise, with no --yes (fix(shorebird_cli): require the app name to delete an app shorebird#4098). Each page says briefly what the delete removes, matching the CLI's new messages. tracks.mdx now says what deleting a track removes (the track and its promotion history, not its patches), matching the CLI's message, instead of describing device behavior.
  • API error codes in --json (code-push/ci/scripting.mdx): error.api_code and error.details.
  • whoami example (account/cli.mdx): drops the Subscription: line the CLI no longer prints.

New behavior is marked as needing Shorebird 1.6.129 or newer, matching #726, including the apps delete prompt in account/cli.mdx.

1.6.129 is released, so this can land. scripting.mdx is also edited by #714; the hunks don't overlap, but whichever lands second may need a trivial rebase.

Testing: prettier, cspell, vale (0 errors on changed files), component-label lint, and npm run build (68 pages) all pass. Facts checked against shorebird_cli on main and shorebirdtech/shorebird#4098, and against the server's delete routes (confirm_delete.dart, releases_delete_command.dart, metrics/, whoami_command.dart, json_output.dart).

@eseidel

eseidel commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Adversarial review (separate agent):

Tier 2: 5 docs files, about 50 changed lines, each claim checked against shorebird CLI main.

Sev Scope Where Issue Action
🟡 Watch RelatedFsNotInDiff src/content/docs/code-push/ci/scripting.mdx:136 → public/.well-known/agent-instructions.txt:29 The agent instructions still say "Deleting commands never prompt; they require --confirm-name". This PR fixes that claim on the scripting page it points to, but agents read this file first and will keep using the deprecated flag. Replace line 29 with something like: delete commands prompt in a terminal; unattended, pass --yes (CLI releases after 1.6.128; --confirm-name is deprecated). #714 also edits this file, at line 27; it merges cleanly.
🟡 Watch RelatedFsNotInDiff src/content/docs/code-push/ci/scripting.mdx:137 → src/content/docs/code-push/ci/scripting.mdx:54-64 The "These commands return structured JSON" table lists releases as list, info and has no metrics row. The paragraph under it says other commands "still print human-readable logs". That is wrong for releases delete (emits release_version, platforms, deleted) and for every metrics subcommand (emits the API response). Add delete to the shorebird releases row and a shorebird metrics row linking to /account/cli#metrics-commands. #714 rewrites this table, so whichever PR lands second should carry the change.
🟡 Watch InDiff src/content/docs/code-push/ci/scripting.mdx:121 error.api_code and error.details are new since v1.6.128: v1.6.128's json_output.dart has neither field. This paragraph is the only new behavior in the PR without the "available in Shorebird CLI releases after 1.6.128" marker, so users on 1.6.128 will look for a field that never appears. Add the same version sentence used for --yes, metrics and releases delete.
🟢 Confirm src/content/docs/account/cli.mdx:172 No changelog entries for shorebird metrics, shorebird releases delete or --yes. The existing entries (shorebird-apps-commands.md, shorebird-channels-commands.md) still describe --confirm-name, which is right for their release, but nothing records that it changed. Confirm whether changelog entries come with the release version or belong in this PR.

Verified on CLI main: --yes/-y semantics, --confirm-name still accepted but hidden and deprecated, a non-interactive run (no TTY, CI, or --json) exiting 64 with nothing deleted, app id falling back to shorebird.yaml, --release-version/--name being mandatory, the metrics adoption --release-version example, and whoami no longer printing Subscription:. No over-documentation and no em-dashes. Merges cleanly with #714, #724, #725 and #726.

@eseidel

eseidel commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

Addressed in 0c52a0b: agent-instructions.txt now says deletes prompt in a terminal, --yes skips it, and without a terminal/in CI/with --json they exit 64 unless --yes is passed; the api_code/details paragraph now carries the after-1.6.128 marker. The JSON command table is left to #714, which rewrites it (noted there). CLI changelog entries ship with the release notes.

@AbhishekDoshi26 AbhishekDoshi26 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed at 7b1b1b7.

Verdict: No findings. Every claim in the diff matches shorebird origin/main and _shorebird origin/main, and the lint checks pass.

Checked

  • The two existing review comments. The agent-instructions.txt delete line has been rewritten. The api_code/details paragraph now has the "after 1.6.128" marker. The JSON command table is left to #714, and CLI changelog entries ship with the release notes. These were not raised again.
  • Delete confirmation. Checked in packages/shorebird_cli/lib/src/commands/confirm_delete.dart:
    • releases delete and channels delete ask a y/N question and take -y, --yes. They still accept --confirm-name, but it is hidden and prints a deprecation warning.
    • apps delete makes you type the app's display name and only takes --confirm-name. It has no --yes.
    • When the command can't prompt, reportError returns ExitCode.usage (64, in shorebird_command.dart:203-215) and nothing is deleted.
    • Whether it can prompt is _canPrompt = isInteractive && canAcceptUserInput: stdout and stdin must both be terminals, not CI, and not --json (interactive_mode.dart, shorebird_env.dart:322). That matches "Without a terminal, in CI, or with --json" in scripting.mdx, tracks.mdx and agent-instructions.txt.
  • apps delete. The warning text ("its releases and their patches, its channels and its collaborators. Devices running it stop getting patches") and the --confirm-name "<name>" example match apps/apps_delete_command.dart. The app ID falls back to shorebird.yaml through AppScopedCommand.
  • channels delete.
    • The tracks.mdx wording matches the command description and warning in channels/channels_delete_command.dart: deleting a track removes it and its promotion history, and its patches stay on their releases and other tracks.
    • --name is mandatory, and the example --name qa --yes is valid.
    • The built-in stable, beta and staging tracks are refused.
  • releases delete.
    • The release.mdx text matches releases/releases_delete_command.dart: "Devices on this release get no new patches", and --platform removes only that platform's release artifacts and patch files and keeps the release.
    • --release-version is mandatory.
    • The command is registered in releases_command.dart:11.
    • The --yes --json example in scripting.mdx matches the command's own JSON hint.
  • metrics.
    • Registered in shorebird_cli_command_runner.dart:100. The command description says the console shows these as "Insights".
    • The console app page has an "Insights" tab (web/apps/console/app/routes/orgs.$orgId.apps.$appId.tsx:92).
    • In metrics_adoption_command.dart, --release-version is optional, so the example is valid. metrics_subcommand.dart adds --app-id and the shorebird.yaml fallback, and --json emits the API response.
    • Not mentioning the plan requirement matches how account/api.mdx already lists Metrics.
  • error.api_code / error.details.
    • Present in json_output.dart:146-156 on main and absent in v1.6.128, so the version marker is correct.
    • shorebird_plan_insufficient_tier is a real server code (packages/code_push_server/lib/src/middleware/plan_guard.dart:30).
  • whoami.
    • Main no longer prints Subscription: (account/whoami_command.dart:80-87).
    • v1.6.128 still prints it. The PR description already declares this change, and an older CLI printing one extra line does no harm.
  • Links and anchors. /code-push/release#delete-releases and /account/cli#delete-an-app both resolve. The new ## Metrics commands section sits correctly between the app commands and the JSON section.
  • Other pages on main. No remaining "never prompt", "no confirmation prompt" or --confirm-name-only claims outside the changelog, whose old entries are correct for their releases.
  • Agent entry points. agent-instructions.txt is updated. Nothing about deletes needs changing in the astro.config.mjs details block or in agent-skills/index.json.
  • Lint and conventions.
    • Prettier: clean.
    • cspell: 0 issues in the 5 changed docs files. The 2 hits in agent-instructions.txt (plists, tlsv on lines 15 and 18) are on lines this PR doesn't touch.
    • vale: 0 errors, warnings or suggestions.
    • No em-dashes in added lines.
    • No internal gating documented.

Findings

None.

@eseidel
eseidel enabled auto-merge (squash) October 16, 2026 16:33
@eseidel
eseidel merged commit abd8ecd into main Oct 16, 2026
4 checks passed
@eseidel
eseidel deleted the eseidel/cli-release-docs branch October 16, 2026 16:35
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.

2 participants