From 4e82f66d08f2062a68df338aed391d0e70d316e4 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 3 Oct 2026 09:07:44 +0000 Subject: [PATCH 1/2] The deploy recipe was missing a pull, and the push kept failing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `git push gitea main` is rejected as a non-fast-forward whenever anything has been published since the last deploy, and the runbook never said so. The translate step commits the generated German and Portuguese siblings back to Gitea — `translate: update N generated siblings [skip-translate]` — so gitea/main gains a commit the server's checkout does not have, every single time a post goes live. The documented three commands then leave the public site serving the previous build while everything looks like it worked. So the recipe is four: pull from GitHub, pull from Gitea, deploy the board, push. The second pull never conflicts, because nothing but the pipeline writes those files. The order of the last two matters on a release that changes both halves: the members area goes up first, so that anything on the static side calling it — the bar asking /comunidad/sesion.json — finds it already there. Also written down, because all three deploys that went wrong this week went wrong the same way: paste one line at a time. Commas between commands made git look for a branch whose name ended in a comma; a block pasted while ssh was asking its host-key question was swallowed as answers to the prompt. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn --- docs/server-setup.md | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/docs/server-setup.md b/docs/server-setup.md index 7f2203d..1f66c68 100644 --- a/docs/server-setup.md +++ b/docs/server-setup.md @@ -415,16 +415,38 @@ finds Gitea level with your local `main`, and answers *"Already up to date."* which is true about the wrong remote, and reads exactly like there is nothing to do. -An update is a named pull, a push to Gitea so the build pipeline sees it, and a -rebuild: +**Paste one line at a time.** Every deploy that has gone wrong here went wrong +in the terminal rather than in the code: three commands pasted on one line +separated by commas, so git looked for a branch whose name ended in a comma; and +a block pasted into a session that was still answering `ssh`'s host-key +question, which swallowed the rest as answers. One line, one Enter, read what it +says. + +An update is **two** named pulls, a push to Gitea so the build pipeline sees it, +and a rebuild: ```sh cd ~/vienalatina git pull --no-rebase --no-edit github -git push gitea main +git pull --no-rebase --no-edit gitea main # see below — Gitea moves on its own sudo bash scripts/deploy-board.sh +git push gitea main ``` +**The second pull is the one this page used to be missing**, and the push fails +without it with a non-fast-forward rejection. The translate step of the pipeline +*commits* the generated German and Portuguese files back to Gitea +(`translate: update N generated siblings [skip-translate]`), so every time +anything is published, `gitea/main` gains a commit this checkout does not have. +A push then has nothing to fast-forward from. Pulling it first merges the +pipeline's own work into yours, which is all that is needed — there is never a +conflict, because nothing but the pipeline writes those files. + +**The order of the last two lines matters when a release changes both halves.** +`deploy-board.sh` puts the members area up; the push is what rebuilds the public +site. Anything on the static side that calls the app — the members' bar asking +`/comunidad/sesion.json` — then finds it already there. + Both flags earn their place. `main` and the branch have genuinely diverged — main carries the previous merge, the branch carries the new work — and a git with no `pull.rebase` set refuses to guess, with *"fatal: Need to specify how to From 8608e71c7eddcf8ac4f261408c05e2235bec1c10 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 3 Oct 2026 09:12:07 +0000 Subject: [PATCH 2/2] The password box was a browser default under a styled username box MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit board.css styled form controls from a list — text, email, date, and inputs with no type attribute at all. The username field on the sign-in page has no type, so it got the full-width box; the password field has one, and `password` was never in the list, so it kept the browser's own narrow grey rectangle directly beneath it. The number box for a page's order, added two days ago, was unstyled for the same reason and nobody had looked at it yet. An allowlist of accepted types is wrong the moment somebody adds a field, and wrong silently: nothing errors, the form just looks unfinished. So the rule is written the other way round — it excludes the controls that are not text boxes (checkbox, radio, file, and the button-like types) and styles everything else, so password, number, url, search and whatever arrives next are covered without anybody remembering to edit it. The guard in test_templates.py is on the shape of the rule rather than on any one type: a revert to listing accepted types fails it. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01NizVpJ2dwzCbjCrTLCjeHn --- apps/board/static/board.css | 20 +++++++++++++++--- apps/board/tests/test_templates.py | 33 ++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+), 3 deletions(-) diff --git a/apps/board/static/board.css b/apps/board/static/board.css index e5b25f1..4d3f819 100644 --- a/apps/board/static/board.css +++ b/apps/board/static/board.css @@ -180,8 +180,22 @@ label { display: block; margin: 1rem 0 0.35rem; font-weight: 600; font-size: 0.9 label.check { display: flex; align-items: center; gap: 0.5rem; font-weight: 400; } label.check input { margin: 0; } -input[type="text"], input[type="email"], input[type="date"], -input:not([type]), select, textarea { +/* Everything a person types in, named by what it is NOT. + * + * This was a list — text, email, date and inputs with no type at all — and a + * list of accepted types is wrong the moment somebody adds one. It was: the + * password box on the sign-in page was a browser default sitting under a + * full-width username box, because `password` was never added, and so was the + * number box for a page's order. Nothing errors; the form just looks unfinished + * in a way only a person looking at it can catch. + * + * The controls below are excluded because they are not text boxes and would be + * disfigured by this: a checkbox, a radio, a file picker (styled separately), + * and the button-like types. Anything else — password, number, url, search, + * tel, whatever arrives next — is a field somebody types in and gets the same + * box without this rule having to be edited again. */ +input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not([type="hidden"]), +select, textarea { width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--border-light); @@ -189,7 +203,7 @@ input:not([type]), select, textarea { background: var(--bg); color: var(--text); } -input[type="checkbox"] { width: auto; } +input[type="checkbox"], input[type="radio"] { width: auto; } textarea { resize: vertical; line-height: 1.55; } :focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; } diff --git a/apps/board/tests/test_templates.py b/apps/board/tests/test_templates.py index 4259ac0..8c29daa 100644 --- a/apps/board/tests/test_templates.py +++ b/apps/board/tests/test_templates.py @@ -174,3 +174,36 @@ def test_the_fields_that_are_not_prose_stay_plain(): html = (Path(__file__).resolve().parents[1] / "templates" / name).read_text(encoding="utf-8") opening = re.search(rf'