A <script> tag and a javascript: link in a description stay inert.
node_network_up stays literal, and edit mode shows the raw source.
Anonymous requests get a 401.
On a Pixel 7, pages don't scroll sideways.
Every test also fails on any page error, console error or HTTP ≥ 400 from the app. The one exception is the designed avatar 404 for users without an lldap photo.
On failure, the Playwright report, traces and screenshots are uploaded.
UI screenshots (before/after), on PRs that change assets/ or views/:
Starts the base branch and the PR side by side with the same seed data.
Captures the dashboard, three tickets and the create page in dark, light and phone views.
Uploads one side-by-side PNG per changed view as the ui-screenshots artifact, plus unchanged.txt.
Seed timestamps are fixed and the browser clock and timezone are pinned, so identical pages come out byte-identical.
This PR touches views/, so its own run will produce that artifact.
Fixes found along the way
migrate.php failed on a fresh database. It split statements on ;, and migrations 001 and 003 have a ; inside a -- comment. It now drops whole-line comments before splitting, and all 8 migrations apply cleanly. Production is unaffected: everything there is already applied.
API rate limits ignored .env (and TRUSTED_PROXIES).
Every API endpoint calls RateLimitMiddleware::apply() before loading config.php, so on all 25 endpoints the limiter used its hard-coded fallbacks.
It also never saw TRUSTED_PROXIES, so the per-IP bucket probably keyed on the proxy's address. All users behind Authelia would then share one bucket of 120 API requests a minute.
The limiter now loads config itself. The per-IP limits are configurable (RATE_LIMIT_IP, RATE_LIMIT_IP_API), with unchanged defaults (300 / 120), and are documented in .env.example and the README.
Verified locally: with RATE_LIMIT_IP_API=5, requests 6 to 8 get 429.
The tests found it: 429s turned the suite flaky.
Broken avatar image in the header. The avatar error fallback (layout_footer.php) was registered after the header avatar. When the 404 came back first, users without an lldap photo got a broken-image icon instead of their initials. It now also checks images that had already failed.
Before/after (local run with the CI script; development on the left, this PR on the right)
The only visual change is fix 3: the header avatar.
Verified locally
The suite passes 21/21 three times in a row against this branch.
stack.sh brings up the current development too. It runs this branch's migration runner inside the base checkout, so bases from before fix 1 still migrate.
The screenshot script against two copies of the same code: 15/15 views unchanged.
phpcs is clean; eslint reports no errors.
Safety
Seed script:tests/ui/seed.php is CLI only. It connects only as the throwaway tinker_ui user, only to databases named tinker_ui*, and deletes only its own ticket ids.
Router:router.php only runs under php -S.
stack.sh refuses to overwrite a .env it didn't write.
Still served by nginx:tests/ is behind Authelia like everything else, but a location ^~ /tests/ { return 404; }, next to the existing /vendor/ rule, would hide it entirely. I haven't changed the nginx config.
Not fixed, noted
A request with Remote-User but no Remote-Name or Remote-Email gets a 500 (a TypeError in UserModel::syncUserFromAuthelia). Authelia always sends all three, so it only showed up in hand-made test requests.
Follow-up to #119, as agreed: Pulse's Playwright CI (Pulse #49 and #56), adapted for Tinker. Building it turned up three real bugs, fixed here.
## What CI gains
**`UI (playwright)`**, on every push and PR. Deploys now wait for it, as they already wait for the lint jobs.
- Runs in the official Playwright image, like Pulse. `tests/ui/setup.sh` installs PHP and a throwaway MariaDB in the job container.
- `tests/ui/stack.sh` migrates a fresh database, loads synthetic seed data and serves the app with `php -S`.
- 21 tests:
- Every main page loads (dashboard, three tickets, create, four admin pages).
- Description and comment markdown renders (#114).
- A `<script>` tag and a `javascript:` link in a description stay inert.
- `node_network_up` stays literal, and edit mode shows the raw source.
- Anonymous requests get a 401.
- On a Pixel 7, pages don't scroll sideways.
- Every test also fails on any page error, console error or HTTP ≥ 400 from the app. The one exception is the designed avatar 404 for users without an lldap photo.
- On failure, the Playwright report, traces and screenshots are uploaded.
**`UI screenshots (before/after)`**, on PRs that change `assets/` or `views/`:
- Starts the base branch and the PR side by side with the same seed data.
- Captures the dashboard, three tickets and the create page in dark, light and phone views.
- Uploads one side-by-side PNG per changed view as the `ui-screenshots` artifact, plus `unchanged.txt`.
- Seed timestamps are fixed and the browser clock and timezone are pinned, so identical pages come out byte-identical.
This PR touches `views/`, so its own run will produce that artifact.
## Fixes found along the way
1. **`migrate.php` failed on a fresh database.** It split statements on `;`, and migrations 001 and 003 have a `;` inside a `--` comment. It now drops whole-line comments before splitting, and all 8 migrations apply cleanly. Production is unaffected: everything there is already applied.
2. **API rate limits ignored `.env` (and `TRUSTED_PROXIES`).**
- Every API endpoint calls `RateLimitMiddleware::apply()` before loading `config.php`, so on all 25 endpoints the limiter used its hard-coded fallbacks.
- It also never saw `TRUSTED_PROXIES`, so the per-IP bucket probably keyed on the proxy's address. All users behind Authelia would then share one bucket of 120 API requests a minute.
- The limiter now loads config itself. The per-IP limits are configurable (`RATE_LIMIT_IP`, `RATE_LIMIT_IP_API`), with unchanged defaults (300 / 120), and are documented in `.env.example` and the README.
- Verified locally: with `RATE_LIMIT_IP_API=5`, requests 6 to 8 get 429.
- The tests found it: 429s turned the suite flaky.
3. **Broken avatar image in the header.** The avatar error fallback (`layout_footer.php`) was registered after the header avatar. When the 404 came back first, users without an lldap photo got a broken-image icon instead of their initials. It now also checks images that had already failed.
## Before/after (local run with the CI script; development on the left, this PR on the right)
The only visual change is fix 3: the header avatar.


## Verified locally
- The suite passes 21/21 three times in a row against this branch.
- `stack.sh` brings up the current `development` too. It runs this branch's migration runner inside the base checkout, so bases from before fix 1 still migrate.
- The screenshot script against two copies of the same code: 15/15 views unchanged.
- phpcs is clean; eslint reports no errors.
## Safety
- **Seed script:** `tests/ui/seed.php` is CLI only. It connects only as the throwaway `tinker_ui` user, only to databases named `tinker_ui*`, and deletes only its own ticket ids.
- **Router:** `router.php` only runs under `php -S`.
- **`stack.sh`** refuses to overwrite a `.env` it didn't write.
- **Still served by nginx:** `tests/` is behind Authelia like everything else, but a `location ^~ /tests/ { return 404; }`, next to the existing `/vendor/` rule, would hide it entirely. I haven't changed the nginx config.
## Not fixed, noted
A request with `Remote-User` but no `Remote-Name` or `Remote-Email` gets a 500 (a `TypeError` in `UserModel::syncUserFromAuthelia`). Authelia always sends all three, so it only showed up in hand-made test requests.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
New UI (playwright) job: PHP and MariaDB inside the Playwright image, a
seeded instance (tests/ui/stack.sh, synthetic data only) and 21 tests:
every main page loads with no page errors, console errors or failed
requests, description and comment markdown render safely (#114), and
pages fit a phone screen. Deploys now wait for it.
New UI screenshots (before/after) job: for PRs that change assets/ or
views/, runs the base branch and the PR side by side with the same data
and uploads one side-by-side PNG per page and view (dark, light, phone).
Modelled on Pulse's ui and ui-screenshots jobs.
Fixes found while building it:
- migrate.php split statements on semicolons inside -- comments, so 001
and 003 failed on a fresh database.
- API endpoints applied rate limiting before loading config, so
RATE_LIMIT_DEFAULT/RATE_LIMIT_API from .env and TRUSTED_PROXIES were
ignored there: every user behind the proxy shared one per-IP bucket.
The limiter now loads config itself; the per-IP limits are configurable
(RATE_LIMIT_IP, RATE_LIMIT_IP_API) with unchanged defaults.
- The avatar error fallback was registered in the footer, after the
header avatar, so a fast 404 left a broken image instead of initials.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Follow-up to #119, as agreed: Pulse's Playwright CI (Pulse #49 and #56), adapted for Tinker. Building it turned up three real bugs, fixed here.
What CI gains
UI (playwright), on every push and PR. Deploys now wait for it, as they already wait for the lint jobs.tests/ui/setup.shinstalls PHP and a throwaway MariaDB in the job container.tests/ui/stack.shmigrates a fresh database, loads synthetic seed data and serves the app withphp -S.<script>tag and ajavascript:link in a description stay inert.node_network_upstays literal, and edit mode shows the raw source.UI screenshots (before/after), on PRs that changeassets/orviews/:ui-screenshotsartifact, plusunchanged.txt.This PR touches
views/, so its own run will produce that artifact.Fixes found along the way
migrate.phpfailed on a fresh database. It split statements on;, and migrations 001 and 003 have a;inside a--comment. It now drops whole-line comments before splitting, and all 8 migrations apply cleanly. Production is unaffected: everything there is already applied..env(andTRUSTED_PROXIES).RateLimitMiddleware::apply()before loadingconfig.php, so on all 25 endpoints the limiter used its hard-coded fallbacks.TRUSTED_PROXIES, so the per-IP bucket probably keyed on the proxy's address. All users behind Authelia would then share one bucket of 120 API requests a minute.RATE_LIMIT_IP,RATE_LIMIT_IP_API), with unchanged defaults (300 / 120), and are documented in.env.exampleand the README.RATE_LIMIT_IP_API=5, requests 6 to 8 get 429.layout_footer.php) was registered after the header avatar. When the 404 came back first, users without an lldap photo got a broken-image icon instead of their initials. It now also checks images that had already failed.Before/after (local run with the CI script; development on the left, this PR on the right)
The only visual change is fix 3: the header avatar.
Verified locally
stack.shbrings up the currentdevelopmenttoo. It runs this branch's migration runner inside the base checkout, so bases from before fix 1 still migrate.Safety
tests/ui/seed.phpis CLI only. It connects only as the throwawaytinker_uiuser, only to databases namedtinker_ui*, and deletes only its own ticket ids.router.phponly runs underphp -S.stack.shrefuses to overwrite a.envit didn't write.tests/is behind Authelia like everything else, but alocation ^~ /tests/ { return 404; }, next to the existing/vendor/rule, would hide it entirely. I haven't changed the nginx config.Not fixed, noted
A request with
Remote-Userbut noRemote-NameorRemote-Emailgets a 500 (aTypeErrorinUserModel::syncUserFromAuthelia). Authelia always sends all three, so it only showed up in hand-made test requests.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.