chore: groundwork for sites & authors

This commit is contained in:
Florian Sylvain committed 2026-10-14 00:33:52 +02:00
1 parent 0d03a27f31
commit 45fcbd890d
17 files changed
+866 -57

No files matched your search

+24 -1
View File
@@ -2,6 +2,12 @@
Every state in the three boards is drawn in light and dark (theme switch) at 1440×900 and 390×844. Counts are in README.md.
## Clock-sensitive states
Only individual states that render a relative time or a countdown are marked "Clock-sensitive" on the board: Articles "Published" (Updated reads "Just now"), Media "Upload: too many requests (429)" and Settings "Too many requests (429)" (countdowns), Users "Renew invite: done", and the Settings update states that show "Last checked today at 09:41" or "yesterday" (Up to date, Check failed, Update available, Update available with notes open, Update done, Plain restart: confirm, Admin view, Role changed, Update already running). Capture and test them with a frozen clock at 13 Oct 2026, 09:41. Frames that merely list dated rows are not marked.
## Sites and authors: roles
Sites: only the owner can create, edit, delete or set the default; other roles have no Sites entry and get a 403 page on a direct link. Anyone who can edit an article can set its site and read the site list. Authors: owner and admin manage; other roles see the list and detail read-only and can create and edit their own author only. The site key is immutable after creation.
## Copy glossary
| Use | Not |
|---|---|
@@ -23,12 +29,29 @@ Glossary pass 2, changes made: activity log lines "Removed N expired invites" an
| Status | Copy |
|---|---|
| 400 | "That request wasn't valid. Check the fields and try again." |
| 401, 403 | Global redirect, no local copy |
| 401, 403 | Global redirect, no local copy (403 from an unverified account). Role 403s have local copy: see the rows below |
| 404 | "That item no longer exists." |
| 409 | "This changed somewhere else. Reload and try again." |
| 413 | "That file is too large." |
| 429 | "Too many requests. Try again in a few minutes." |
| 500, network | "Something went wrong on our side. Nothing was changed. Try again in a moment." |
| 400 invalid_site_url | "Use https. For example https://blog.example.com." / "Remove the path. Use only the host, like https://blog.example.com." / "Enter a full URL, like https://blog.example.com." (inline under base url) |
| 409 site_key_taken | "A site with the key "journal" already exists. Choose another key." (inline under key, with a suggestion) |
| 409 site_has_articles | "Choose where the articles go. This site has 38 articles." (inside the delete dialog) |
| 403 owner_only (page) | "You don't have access to Sites" / "Only the owner can manage sites. Ask the owner of this site if you need a change." / "Back to Settings" (403 page on /settings/sites) |
| 403 owner_only (action) | "Only the owner can manage sites" / "Ask the owner of this site." (error toast, role changed while the page was open) |
| 403 author_rights | "Only an owner or admin can change authors" / "You can still edit your own author profile." (error toast, role changed while the page was open) |
| 400 key_immutable | "Used in API paths, so it can't change." (not shown: the edit form has no editable key) |
| 400 invalid_locale | "Use a language tag like en or fr-CH." (inline under locale) |
| 403 default_site | "The default site can't be deleted. Make another site the default first." (toast if the menu was stale) |
| 404 site_not_found | "That site no longer exists" / "It was deleted somewhere else, so we removed it from the list." (info toast) |
| 409 author_slug_taken | "The slug "camille-roche" is already used by another author." (inline under slug, with a suggestion) |
| 409 author_has_articles | "Can't delete this author" / ""Camille Roche" is credited on 3 articles. Choose another author to credit instead, or remove Camille Roche from those articles first." (server fallback dialog, drawn once) |
| 409 user_already_linked | "That user already has an author. Choose another user." (inline under linked user) |
| 422 bio_too_long | "Shorten the bio to 280 characters." (inline under bio) |
| 422 invalid_url | "Enter a full URL starting with https://." (inline under website and each social link) |
| 404 author_not_found | "That author no longer exists" / "It was deleted somewhere else, so we removed it from the list." (info toast) |
| 500 – | "Couldn't save the site. Your changes are still here. Try again in a moment." / "Couldn't save the author. Your changes are still here. Try again in a moment." / "Couldn't create the author" / "The article is unchanged. Try again in a moment." (notice inside the panel or dialog) |
## Public image 400 bodies
`{ "status": 400, "error": "unknown_variant", "message": "Unknown variant", "detail": "hero" }` and `{ "status": 400, "error": "unsupported_parameter", "message": "Unsupported parameter", "detail": "width" }`. The original is not served as a fallback.