Repository navigation
[FEAT] - PDF, UX, Docker and CI - #4
Merged
Merged
Conversation
…e item page forms unique ids
…targets and stronger contrast
…uted text contrast
…uted text contrast
… also runnable by hand
…d environment variables
…he automated releases
…nd the automated releases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds direct PDF downloads, a round of UI/UX and accessibility fixes checked against measured contrast, a hardened container image, and the CI/CD around it: tests on pull requests, a multi-architecture image published to
ghcr.io, and automated versions and changelog.Features
/shopping/pdf/) and a kit's checklist (/kits/<id>/pdf/) download as A4 PDFs with a box to tick on each line, a total, long names cut with an ellipsis, and the table header repeated on every page. The writer (apps/core/pdf.py) uses no library: standard Helvetica (not embedded, widths inpdf_metrics.py) and Windows-1252 text. It adds no dependency and no RAM, which matters on a Raspberry Pi, but it only does simple tables. This replaces the print buttons.UI/UX and accessibility
Reviewed against the
ui-ux-pro-maxskill, with contrast measured instead of guessed.emerald-600buttons was 3.77:1. All text is now at least 4.5:1:stone-500is darkened, muted text istext-stone-500 dark:text-stone-400, and filled buttons areemerald-700.<main id="main">on every page; the active menu link hasaria-current="page"; table headers are<th scope="col">; decorative bars, rings, the donut and the heat map arearia-hidden(their numbers are text next to them); error messages are announced as alerts. A global focus ring keeps the focused control clear of the sticky top bar.inertwhile closed, so Tab never lands on invisible links; the menu button keepsaria-expandedand focus returns to it on close.aria-invalidandaria-describedby(set byStyledFormMixin), and an error summary with links when more than one field fails. Login and setup now show the error of each field. The forms on the item page shared ids (id_quantityrepeated); each now has its own prefix.prefers-reduced-motionis respected; forms disable their submit button after sending (htmx forms usehx-disabled-elt), so a stock entry cannot be made twice.Container image
/tmpand/dev/shm, so it runs with--read-only --tmpfs /tmp, with--cap-drop ALL, and with an arbitrary uid.GUNICORN_BIND. OCI labels added.docs/and.claude/stay out of the image.DOCKER.md, a registry-style page: Compose anddocker runexamples, every environment variable, tags, ports, permissions, Raspberry Pi notes and upgrading. The Compose example was run as written.healthy, migrates and serves the setup page and static files.CI/CD
tests.yamlenv:block.pull-request.yamlmasterpublish.yamlmaster,v*tags, by handlinux/amd64+linux/arm64toghcr.io.release.yamlmasterpyproject.toml) and the changelog; merging it tagsvX.Y.Zand startspublish.yamlfor the tag.edgeandsha-<commit>frommaster;X.Y.Z,X.Yandlatestfrom a release. Pre-releases get only their own tag.PUBLISH_IMAGE(already set totrueonbuguno/vault). Without it, for example on a fork, the image is built and smoke-tested but not pushed, and the run shows a notice.secretsare used: CI values are throwaway literals and the only credential is the built-inGITHUB_TOKEN.masteris protected by a repository ruleset (no deletion, no force push, merge only through a pull request with the checktests / 🧪 Lint and testspassing). The release pull request is opened with the built-in token, which GitHub does not test, sorelease.yamlrunspull-request.yaml(now also runnable by hand) on its branch to report that check.featis minor,fixis patch,!is major), so it is documented inCLAUDE.mdand the README.Setup needed on GitHub
vault) and change its visibility to Public. Confirm that the repository has write access under Manage Actions access.mastercannot be deleted or force-pushed, and changes only arrive through a pull request whose checktests / 🧪 Lint and testspassed. That name must stay in sync withtests.yamland the caller job inpull-request.yaml.Other changes
.claude/(the skills folder) is excluded from ruff and from the image, and is not part of this pull request..editorconfig: two-space indentation for HTML and CSS, matching the templates.CLAUDE.mddocument all of the above.Tests
ruffis clean andpoetry css-checkis up to date.Review notes
tests.yaml;publish.yamlandrelease.yamlonly run after the merge.release.yamldispatches them on its branch. This is the least tested part: if the check does not show up on the release pull request, rungh workflow run pull-request.yaml --ref release-please--branches--masteronce and open an issue..release-please-manifest.jsonstarts at1.0.0, so the first release computes1.1.0.?.