Skip to content

feat: change live site settings, restore revisions and manage media - #7

Merged
kevin1024 merged 1 commit into
mainfrom
feat/live-settings-and-media
Nov 12, 2026
Merged

kevin1024 merged 1 commit into
mainfrom
feat/live-settings-and-media

Conversation

@kevin1024

Copy link
Copy Markdown
Member

What this adds

Phase 3: commands that write to the live site.

  • Settings: styling set, social set, footer set and headers update. The API's saves replace the whole object, so each command reads the current value, applies the fields given (key=value and --data), and sends the whole object back. Only what you pass changes. Read-only fields from the read are stripped; a field the setting does not have is exit 2 before anything is sent.
  • Pages: pages create and pages update. update keeps the meta fields it was not given, which the API would otherwise clear.
  • Areas: areas create | update | delete.
  • Revisions: revisions restore <revisionUuid> [--message]. Restoring the current revision is refused by the API (REVISION_ALREADY_CURRENT) and reported with a hint.
  • Media: media import <url>, media upload <file> and media update <mediaUuid>. Upload requests a presigned URL, sends the bytes to the storage host, and confirms. The API key and token are never sent to the storage host.
  • Confirmation: commands that replace or delete prompt on a terminal (-y skips); a script or agent is not asked. Commands that only add (pages create, areas create, media import, media upload) do not prompt.
  • After a settings write, table mode prints that it is live and how to undo it, where the resource has history. Page settings, areas and media details have none, and the help says so.
  • Docs: the guide, README and AGENTS.md use the new commands, and the "if no release is listed yet" wording is removed now that v0.1.0 exists.

Not included

Navigation saves. The API's navigation read and save shapes are being changed; a nav set command will follow once that lands.

Testing

  • cargo build, cargo test (166 tests), cargo clippy --all-targets -- -D warnings, cargo fmt --check and cargo deny check pass.
  • Run against a local Firebird API with a real key: styling, social links and footer saves (then restored through revisions), page settings, areas create/update/delete, media upload against local object storage, media update and import, and the revision-restore refusal.
  • Mock only: pages create (the API has no page delete to undo it), a successful headers update (the local site has no headers), and storage refusals on upload.
  • Windows has not been run locally; CI covers it.

Found along the way

  • Saving styling on a site that never chose fonts stores the default font's name ("Geist") for both, even when null is sent. The look does not change. This is in the API, not the CLI; the help and guide describe it.
  • areas update refuses a custom URL on an area that has a route location unless the route location is cleared in the same call.

🤖 Generated with Claude Code

- styling set, social set, footer set and headers update read the current
  value, apply the given fields and send the whole object back, since the
  API's saves are full replacements. Read-only fields are stripped.
- pages create and update; update keeps the meta fields it was not given,
  which the API would otherwise clear.
- areas create, update and delete.
- revisions restore.
- media import, upload (to the presigned URL, with no credentials sent to
  the storage host) and update.
- Commands that replace or delete prompt on a terminal.

Navigation saves are not included; the API's navigation shape is changing.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@kevin1024
kevin1024 merged commit bb1f077 into main Nov 12, 2026
10 checks passed
@kevin1024
kevin1024 deleted the feat/live-settings-and-media branch November 12, 2026 15:11
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