Compare commits

...
60 Commits
Author SHA1 Message Date
openhands 9560ddc212 Fix taskset missing in container build by installing util-linux and adding fallback
CI / tests-ui (push) Successful in 5m6s
CI / deploy (push) Successful in 4m15s
CI / tests-imaging-browsers (push) Successful in 2m8s
CI / tests-integration (push) Successful in 1m53s
CI / preflight (push) Skipped
CI / check (push) Successful in 50s
CI / tests-unit (push) Successful in 4m18s
CI / tests-quality (push) Successful in 55s
2026-10-23 21:15:29 +02:00
openhands c0a5079ede Restore MySQL/MariaDB Drizzle ORM driver for strict type safety and schema compatibility
CI / check (push) Successful in 35s
CI / tests-quality (push) Successful in 1m20s
CI / tests-integration (push) Successful in 1m47s
CI / tests-imaging-browsers (push) Successful in 2m14s
CI / tests-unit (push) Successful in 4m2s
CI / tests-ui (push) Successful in 5m16s
CI / preflight (push) Skipped
CI / deploy (push) Failing after 48s
2026-10-23 21:03:50 +02:00
openhands a8172ce88e Fix Gitea workflow action reference for upload-artifact
CI / tests-unit (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
CI / check (push) Failing after 33s
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-quality (push) Skipped
2026-10-23 20:53:22 +02:00
openhands 9416317c5b Format files according to Biome standards
CI / tests-integration (push) Skipped
CI / preflight (push) Skipped
CI / check (push) Failing after 40s
CI / tests-unit (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-quality (push) Skipped
CI / deploy (push) Skipped
2026-10-23 20:40:25 +02:00
openhands e17576856f Fix ResultSetHeader casting for postgres result compatibility
CI / check (push) Failing after 25s
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-quality (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
CI / tests-unit (push) Skipped
2026-10-23 20:16:35 +02:00
openhands 201296e837 Add Production Deployment & Zero-Downtime Releases section to README
CI / tests-imaging-browsers (push) Skipped
CI / preflight (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-quality (push) Skipped
CI / deploy (push) Skipped
CI / check (push) Failing after 26s
CI / tests-unit (push) Skipped
CI / tests-integration (push) Skipped
2026-10-23 20:13:35 +02:00
openhands 2ae8127476 Add Testing and Quality Assurance section to README
CI / check (push) Failing after 30s
CI / tests-unit (push) Skipped
CI / preflight (push) Skipped
CI / tests-integration (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-quality (push) Skipped
CI / tests-ui (push) Skipped
CI / deploy (push) Skipped
2026-10-23 20:13:04 +02:00
openhands 95bc7da83e Add professional documentation for multi-engine database architecture in README
CI / tests-integration (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-quality (push) Skipped
CI / check (push) Failing after 26s
CI / tests-unit (push) Skipped
CI / tests-ui (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
2026-10-23 20:09:35 +02:00
openhands 9fd675a6a0 Clarify database setup for MySQL and PostgreSQL in README
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-quality (push) Skipped
CI / check (push) Failing after 26s
CI / tests-unit (push) Skipped
CI / tests-integration (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
2026-10-23 20:08:44 +02:00
openhands 5080ca586d Document PostgreSQL support in README
CI / preflight (push) Skipped
CI / deploy (push) Skipped
CI / check (push) Failing after 28s
CI / tests-integration (push) Skipped
CI / tests-unit (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-quality (push) Skipped
2026-10-23 20:08:12 +02:00
openhands 76493a9df8 Refresh git repository status 2026-10-23 20:03:54 +02:00
openhands 9cff32a04b Add PostgreSQL support via pg and node-postgres drizzle adapter 2026-10-23 19:58:06 +02:00
openhands 79b0b8894d ci: enable pnpm via corepack before install 2026-10-23 16:44:09 +02:00
openhands 6b9ed8d15e ci: set up pinned Node.js before toolchain checks 2026-10-23 16:42:36 +02:00
openhands 6c89a7ed46 fix: restore PATH for systemd-run and use AllowedCPUs
CI / tests-integration (push) Successful in 1m49s
CI / tests-quality (push) Successful in 57s
CI / preflight (push) Skipped
CI / deploy (push) Failing after 29s
CI / check (push) Successful in 29s
CI / tests-imaging-browsers (push) Successful in 1m42s
CI / tests-unit (push) Successful in 3m51s
CI / tests-ui (push) Successful in 4m46s
2026-10-23 14:29:01 +02:00
openhands fbf98cd2b5 chore: use half of CPU cores instead of a single core
CI / check (push) Failing after 30s
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-unit (push) Skipped
CI / tests-quality (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
2026-10-23 14:24:45 +02:00
openhands cf448d6ce9 chore: pin capped commands to one CPU core
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-quality (push) Skipped
CI / check (push) Failing after 29s
CI / tests-unit (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
2026-10-23 14:23:24 +02:00
openhands 4768b2b406 fix: limit vitest to one worker to avoid 100% CPU
CI / tests-quality (push) Successful in 49s
CI / tests-imaging-browsers (push) Successful in 1m35s
CI / tests-ui (push) Successful in 4m54s
CI / preflight (push) Skipped
CI / check (push) Successful in 36s
CI / tests-integration (push) Successful in 1m54s
CI / tests-unit (push) Successful in 4m21s
CI / deploy (push) Successful in 20s
2026-10-23 14:21:23 +02:00
openhands af67a28639 fix: restore playwright/cpu-friendly config and deployment memory handling
CI / tests-imaging-browsers (push) Successful in 2m11s
CI / tests-quality (push) Successful in 58s
CI / check (push) Successful in 27s
CI / tests-integration (push) Successful in 1m54s
CI / tests-unit (push) Successful in 1m58s
CI / tests-ui (push) Successful in 5m17s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 26s
2026-10-23 14:18:39 +02:00
openhands a4bc25b6d6 chore(proxy): remove CPU/pids limits, add open_file_cache, fix nginx-sync symlink check
CI / tests-integration (push) Successful in 2m4s
CI / tests-quality (push) Successful in 47s
CI / check (push) Successful in 31s
CI / tests-unit (push) Failing after 1m55s
CI / tests-imaging-browsers (push) Successful in 1m59s
CI / tests-ui (push) Successful in 4m29s
CI / preflight (push) Skipped
CI / deploy (push) Skipped
2026-10-23 14:05:31 +02:00
openhands fb724a35cc feat(security): drop scanner probes and hostile paths early in proxy
CI / check (push) Successful in 30s
CI / tests-imaging-browsers (push) Successful in 3m38s
CI / tests-ui (push) Successful in 5m6s
CI / tests-unit (push) Successful in 1m55s
CI / tests-integration (push) Successful in 1m59s
CI / preflight (push) Skipped
CI / tests-quality (push) Successful in 4m0s
CI / deploy (push) Failing after 4m7s
2026-10-22 22:02:20 +02:00
openhands a878d831aa fix(proxy): reject malformed server-action requests to reduce CPU spikes
CI / tests-imaging-browsers (push) Successful in 3m42s
CI / tests-ui (push) Successful in 4m49s
CI / check (push) Successful in 29s
CI / tests-unit (push) Successful in 1m55s
CI / tests-integration (push) Successful in 1m59s
CI / tests-quality (push) Successful in 50s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 4m12s
2026-10-22 21:46:55 +02:00
openhands 1ad4f9ea28 docs: sync README core stack version
CI / tests-unit (push) Successful in 1m54s
CI / tests-imaging-browsers (push) Successful in 2m29s
CI / tests-quality (push) Successful in 2m30s
CI / deploy (push) Successful in 5m35s
CI / check (push) Successful in 31s
CI / tests-integration (push) Successful in 1m56s
CI / tests-ui (push) Successful in 4m46s
CI / preflight (push) Skipped
2026-10-22 21:28:54 +02:00
openhands 4f6b352691 style: apply biome 2.6 formatting
CI / tests-unit (push) Skipped
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / preflight (push) Skipped
CI / check (push) Failing after 18s
CI / tests-quality (push) Skipped
CI / deploy (push) Skipped
2026-10-22 21:28:00 +02:00
openhands 42fa988d9c chore: revert unintended formatting changes
CI / check (push) Failing after 24s
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
CI / tests-unit (push) Skipped
CI / tests-quality (push) Skipped
2026-10-22 21:26:08 +02:00
openhands be4dc08c31 chore: update dependencies and biome rules
CI / check (push) Failing after 18s
CI / tests-unit (push) Skipped
CI / tests-integration (push) Skipped
CI / tests-ui (push) Skipped
CI / tests-imaging-browsers (push) Skipped
CI / tests-quality (push) Skipped
CI / preflight (push) Skipped
CI / deploy (push) Skipped
2026-10-22 21:25:00 +02:00
openhands 6ef92f57fc chore: bump Node.js to 26.12.1
CI / check (push) Successful in 32s
CI / tests-unit (push) Successful in 1m48s
CI / tests-quality (push) Successful in 1m46s
CI / tests-ui (push) Successful in 4m32s
CI / preflight (push) Skipped
CI / tests-integration (push) Successful in 1m58s
CI / tests-imaging-browsers (push) Successful in 3m59s
CI / deploy (push) Successful in 3m50s
2026-10-22 21:20:16 +02:00
openhands a16e9da018 fix(media-grid): clear pending copy-url timers on unmount
CI / check (push) Successful in 42s
CI / tests-unit (push) Successful in 2m33s
CI / tests-integration (push) Successful in 2m14s
CI / tests-ui (push) Failing after 2m31s
CI / preflight (push) Skipped
CI / tests-quality (push) Successful in 1m29s
CI / tests-imaging-browsers (push) Successful in 1m52s
CI / deploy (push) Skipped
2026-10-22 18:36:45 +02:00
openhands 3cb5baabfb perf: reduce idle polling frequency in instrumentation (30s to 60s)
CI / tests-quality (push) Successful in 2m7s
CI / tests-imaging-browsers (push) Successful in 2m23s
CI / deploy (push) Successful in 26s
CI / check (push) Successful in 48s
CI / tests-unit (push) Successful in 2m25s
CI / tests-integration (push) Successful in 2m26s
CI / tests-ui (push) Successful in 6m11s
CI / preflight (push) Skipped
2026-10-22 18:34:19 +02:00
openhands e96c408ac1 perf(cache): bound reported-failures set and halve default in-process budget
CI / tests-quality (push) Successful in 1m5s
CI / tests-imaging-browsers (push) Successful in 1m57s
CI / tests-ui (push) Successful in 6m9s
CI / preflight (push) Skipped
CI / check (push) Successful in 45s
CI / tests-integration (push) Successful in 2m22s
CI / tests-unit (push) Successful in 2m35s
CI / deploy (push) Successful in 22s
2026-10-22 18:31:33 +02:00
openhands e4564abc5e fix(auth): remove duplicate headings and subtitle on register page
CI / check (push) Successful in 35s
CI / tests-quality (push) Successful in 1m0s
CI / preflight (push) Skipped
CI / tests-integration (push) Successful in 2m22s
CI / tests-unit (push) Successful in 2m30s
CI / tests-imaging-browsers (push) Successful in 1m35s
CI / tests-ui (push) Successful in 6m17s
CI / deploy (push) Successful in 36s
2026-10-22 18:28:58 +02:00
openhands 30583b8e2e feat(seo): add JSON-LD, OG images and RSS feed for news
CI / tests-imaging-browsers (push) Successful in 2m32s
CI / tests-ui (push) Successful in 5m14s
CI / preflight (push) Skipped
CI / check (push) Successful in 29s
CI / deploy (push) Successful in 2m41s
CI / tests-unit (push) Successful in 2m17s
CI / tests-integration (push) Successful in 2m29s
CI / tests-quality (push) Failing after 2m18s
2026-10-22 18:22:32 +02:00
openhands 97454f361b feat(home): rebuild the landing page on a shared panel system
CI / tests-unit (push) Successful in 2m12s
CI / tests-integration (push) Successful in 2m43s
CI / deploy (push) Successful in 3m1s
CI / check (push) Successful in 32s
CI / tests-ui (push) Successful in 4m22s
CI / tests-imaging-browsers (push) Successful in 2m10s
CI / tests-quality (push) Successful in 1m32s
CI / preflight (push) Skipped
The homepage mixed four different translucent washes (surface 44-60% plus a
backdrop-filter each), rendered the same four counters twice, and showed a
dangling "Welcome to " eyebrow because the localized string expected the hotel
name. A missing theme wallpaper replaced the whole sky gradient with flat
white, and stale CMS image references produced broken images and 404s.

Replace the ad-hoc panels with one opaque, theme-derived `.panel` token set
(surface, border, shadow, header, radius) and a `.panel-float` variant for the
counter strip that straddles the hero edge. The strip is now the single home
of the four headline counters; a failed read renders "unavailable" instead of
silently dropping a cell. Add the fourth feature card (Games) that already had
translated copy, link recent users to their profiles, and fall back to themed
placeholders for news covers and camera photos without an upload.

Add `pages.home.heroEyebrow` to all 25 locales, layer the CMS wallpaper over
`--site-bg-gradient` instead of replacing it, and keep the sky in dark mode.
Add `publicAssetExists` so local uploads that no longer exist are skipped
(wallpaper, help topics) rather than rendered broken. Fix the `/help` topic
icons to use the `/assets/images/help-center/` base the detail page already
used.

Throttle the spotlight glow to one update per animation frame, drop the dead
`.glass-chip` rules, define the missing `.panel-float`, and fix the stat
divider and reduced-motion selectors. Stat labels use the readable text token
so they clear WCAG AA, and the language button's accessible name now contains
its visible label.

Verified: tsc, biome, 3590 unit tests, i18n audit unchanged, axe 0 violations
at 390/768/1024/1280/1440 in light and dark, quality e2e 16/16.
2026-10-22 17:39:30 +02:00
openhands ecd8e5852c perf(build): keep test suites out of the image and cache CI builds durably
CI / tests-integration (push) Successful in 1m54s
CI / tests-quality (push) Successful in 2m19s
CI / tests-ui (push) Successful in 4m31s
CI / preflight (push) Skipped
CI / check (push) Successful in 30s
CI / tests-unit (push) Successful in 1m53s
CI / tests-imaging-browsers (push) Successful in 2m26s
CI / deploy (push) Failing after 3m9s
Three build-time improvements, all measured on this host.

The build context no longer ships the test suites. `next build` type-checks
the whole project, so `e2e/` and `integration/` in the context made the image
build fail on a type error in test code and pulled @playwright/test, vitest,
msw, testcontainers and drizzle-kit into the image. The CI runs those suites
on the host. Type-check time in the build drops from 2.2s to 1.3s, and a
contract test now fails if application code ever imports from those folders.

The CI now exports the build cache to a directory outside the runner
workspace: /var/cache/epicnext-cms-buildcache for the release and a separate
map for branch preflights, so a branch can never feed the release cache. The
workspace is wiped after every job and `docker builder prune` runs after
every release, so the next build started with an empty cache and downloaded
all 493 packages again (measured: reused 0, downloaded 493). With the
durable export the frozen dependency layer is reused (measured: reused 493,
downloaded 0) even after a full prune. A cache directory that is not
writable only produces a warning; the release is never blocked.

Investigated the remaining ~30s of Next.js build tracing: excluding the
dev-only packages with `outputFileTracingExcludes` made it slower (35s vs
30s), because the traced output was already minimal (5 packages). The cost
is Next's own page-config collection and file tracing over 329 routes, not
the dependency set, so no configuration was kept.
2026-10-21 19:29:50 +02:00
openhands 8ca538f99f perf(build): resolve pnpm from the pin and reuse the real pnpm store
CI / check (push) Successful in 29s
CI / tests-integration (push) Successful in 2m13s
CI / tests-unit (push) Successful in 2m28s
CI / tests-quality (push) Successful in 55s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m47s
CI / tests-imaging-browsers (push) Successful in 2m29s
CI / tests-ui (push) Successful in 5m10s
The Docker build was slower than it needed to be and could drift away from
the lockfile. Three separate causes, fixed together.

The image installed a pinned [email protected].1 while package.json pins 12.11.2
through `packageManager`. pnpm silently self-managed the difference at
build time: it downloaded the right version into an uncached location and
never verified the sha512 hash. Install corepack instead and let it resolve
version and hash from the pin, so the image can no longer diverge and a
tampered tarball is rejected. The resolved pnpm lives in COREPACK_HOME
inside the image, so the migrations image still runs pnpm offline
(`docker run --entrypoint pnpm ... db:migrate`).

The pnpm store cache-mount pointed at /root/.local/share/pnpm/store, but
pnpm keeps its store in $PNPM_HOME/store/v11. The mount was a no-op: every
build re-downloaded all 493 packages ("reused 0, downloaded 493"). Mounting
the store where pnpm actually keeps it turns that into "reused 493,
downloaded 0".

The build context carried backups/ (232MB of rotating database dumps) and
public/vendor/ (regenerated by `pnpm assets:editor` from node_modules).
Both grew the context and invalidated the `COPY . .` layer on every daily
backup rotation, forcing a full Next.js rebuild. Excluding them takes the
context from 276MB to 23MB.

Compose now also exports the build cache to .docker-cache/cms and imports it
again, so the cache survives `scripts/docker-prune.sh`, which trims the
daemon cache to 4GB after every deploy. Verified by pruning the entire
daemon cache: the next build restored every layer from the local export and
downloaded nothing.

Also: byparr's floating `:latest` tag is now pulled on every start, the
migrations build in scripts/docker-update.sh imports the same local cache,
the README no longer claims the build needs host networking or an
iptables-disabled daemon, the pnpm rationale in renovate.json reflects that
Docker follows the pin automatically, and contract tests pin the new
invariants so the store path cannot drift back.
2026-10-21 18:51:17 +02:00
openhands 1e81cac504 test(ui): isolate the fixture port so parallel runs stop colliding
CI / check (push) Successful in 29s
CI / tests-unit (push) Successful in 2m4s
CI / tests-ui (push) Successful in 4m31s
CI / tests-imaging-browsers (push) Successful in 1m37s
CI / tests-integration (push) Successful in 2m12s
CI / tests-quality (push) Successful in 55s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m39s
The self-hosted CI runner packs several jobs onto the shared host network
(capacity 4). The UI suite pinned the fixture server to 127.0.0.1:3107 and set
reuseExistingServer: true, so overlapping runs fought over the bind: one job
won it, and every browser in the other got "connection refused" on all four
projects. Pass one random high port per run through the environment (shared by
the main process and its worker) and only reuse an existing server outside CI.
Verified with the full ui suite: 150 passed, 2 skipped.
2026-10-19 20:16:28 +02:00
openhands 3bc218ba16 chore(deps): dedupe the lockfile to the newest transitive versions
CI / check (push) Successful in 33s
CI / tests-integration (push) Successful in 1m58s
CI / tests-unit (push) Successful in 2m6s
CI / tests-quality (push) Successful in 52s
CI / tests-imaging-browsers (push) Successful in 1m5s
CI / tests-ui (push) Failing after 6m11s
CI / preflight (push) Skipped
CI / deploy (push) Skipped
`pnpm dedupe --check` still flagged strtok3 10.5.0 (via file-type 22.2.0)
against the 10.6.2 already in the graph. Collapse it so the lockfile resolves
every transitive dependency to the highest version its parents allow; the
check is now clean and the full unit suite still passes.
2026-10-19 19:55:41 +02:00
openhands 61f4db2a00 chore(deps): update dependencies to the latest releases
CI / check (push) Successful in 28s
CI / tests-imaging-browsers (push) Successful in 1m42s
CI / tests-integration (push) Successful in 2m30s
CI / tests-unit (push) Successful in 2m55s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 21s
CI / tests-quality (push) Successful in 1m20s
CI / tests-ui (push) Successful in 6m1s
Bump every direct dependency to the newest published version, including the
@hookform/resolvers 5 -> 6 major. The zodResolver API used by the admin room
and user edit forms is unchanged, and typecheck plus the full unit suite pass
on the new resolver.

Highlights: next 16.4.2, react-query 5.104.4, react-virtual 3.14.21, motion
14.4.0, lucide-react 1.59.0, isomorphic-dompurify 4.6.0, resend 6.34.1,
music-metadata 12.2.3, vitest / coverage-v8 5.0.5, postcss 8.5.31 and
@axe-core/playwright 4.14.0. README core-stack versions are re-synced.
2026-10-19 19:52:08 +02:00
openhands 597287fce5 fix(compose): keep the CMS opt-in so it cannot claim the CI port
CI / check (push) Successful in 36s
CI / tests-unit (push) Successful in 2m4s
CI / tests-ui (push) Successful in 4m39s
CI / tests-imaging-browsers (push) Successful in 1m49s
CI / tests-integration (push) Successful in 1m59s
CI / tests-quality (push) Successful in 42s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m20s
On a CI-managed host scripts/ci-deploy.sh owns port 3002 through the
blue/green slots, so a compose replica of the cms service could only ever
crash-loop on EADDRINUSE — it never serves traffic, because nginx points at a
slot container. Gate the service behind the `cms` profile so a bare
`docker compose up -d` starts only byparr. Naming the service explicitly
(`docker compose up -d cms`, which is what the installer and updater already
do) still enables the profile automatically, so the compose-only install path
keeps working.

Keep the one port that is actually served (3002) and make the 2 GB ceiling
hard by capping swap at 2g as well. Drop the green compose service (3003):
the green slot only ever exists as a docker run container created by CI, so
compose no longer defines it and the two paths cannot drift apart.

The loopback override contract stays covered: proxy-config.test.mjs now
renders the configuration with --profile cms, and a new build-contract test
pins the profile and the memory limits so neither can be dropped by accident.
2026-10-19 19:00:07 +02:00
openhands 5c428c4526 feat(home): label the top-bar online counter with the hotel name
CI / check (push) Successful in 33s
CI / tests-integration (push) Successful in 1m58s
CI / tests-imaging-browsers (push) Successful in 1m24s
CI / tests-quality (push) Successful in 50s
CI / tests-ui (push) Successful in 4m34s
CI / preflight (push) Skipped
CI / tests-unit (push) Successful in 2m1s
CI / deploy (push) Successful in 3m12s
Use the shared LiveOnlineCount so the landing top bar reads "0 <hotel> online"
instead of a bare number, and drop the hotel name from the left (the logo
stays) so it is not shown twice.
2026-10-18 20:16:23 +02:00
openhands e7a6b2b602 style(home): tidy hero spacing and top-bar online badge
CI / check (push) Successful in 28s
CI / tests-ui (push) Successful in 5m1s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 2m24s
CI / tests-imaging-browsers (push) Successful in 1m32s
CI / tests-integration (push) Successful in 1m49s
CI / tests-unit (push) Successful in 1m55s
CI / tests-quality (push) Successful in 50s
Drop the orphaned h1 margin left over from the removed hero online chip, and
the stray title attribute on the top-bar online indicator.
2026-10-18 20:09:54 +02:00
openhands 4b25292ecc feat(site): hide global chrome on landing pages
CI / tests-imaging-browsers (push) Successful in 2m7s
CI / tests-ui (push) Successful in 5m14s
CI / preflight (push) Skipped
CI / check (push) Successful in 28s
CI / tests-unit (push) Successful in 2m23s
CI / tests-integration (push) Successful in 2m22s
CI / tests-quality (push) Successful in 52s
CI / deploy (push) Successful in 3m43s
The index, login and register render their own AuthTopBar, so the shared
TopHeader / SiteHeader banner / Navigation duplicated the same chrome. Hide the
global chrome on those three standalone landing pages only.
2026-10-18 19:58:53 +02:00
openhands b40293bd06 feat(home): clean shared top bar with live online counter
CI / check (push) Successful in 28s
CI / tests-imaging-browsers (push) Successful in 1m34s
CI / tests-quality (push) Successful in 50s
CI / tests-ui (push) Successful in 4m39s
CI / tests-integration (push) Successful in 1m57s
CI / tests-unit (push) Successful in 2m1s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m29s
The homepage duplicated the online count and recent-user avatars (hero plus
community sidebar), and the public pages each kept their own chrome. Put one
AuthTopBar at the top of index, login and register — logo + hotel name plus a
live online indicator and the language/clock/theme controls — and drop the
duplicated hero rows.
2026-10-18 19:38:32 +02:00
openhands 9cf1eb615c feat(auth): make password length configurable via env (min 5–30, max 30–128)
CI / tests-imaging-browsers (push) Successful in 1m46s
CI / tests-unit (push) Successful in 1m49s
CI / preflight (push) Skipped
CI / check (push) Successful in 29s
CI / tests-integration (push) Successful in 1m47s
CI / tests-quality (push) Successful in 44s
CI / tests-ui (push) Successful in 4m38s
CI / deploy (push) Successful in 3m38s
Add PASSWORD_MIN_LENGTH / PASSWORD_MAX_LENGTH (validated in src/env.ts) and a
shared passwordPolicy helper. The policy drives the zod schemas in register,
password reset and the admin create-user dialog, plus the live requirement
checks and strength meter in the register form.

Locale messages now interpolate the configured minimum via {min} instead of
hard-coding 12.
2026-10-18 19:20:38 +02:00
openhands aef0939ee9 refactor(auth): share the auth landing and extract AuthField
CI / check (push) Successful in 36s
CI / tests-integration (push) Successful in 1m52s
CI / tests-unit (push) Successful in 1m57s
CI / tests-quality (push) Successful in 52s
CI / preflight (push) Skipped
CI / tests-imaging-browsers (push) Successful in 1m36s
CI / tests-ui (push) Successful in 4m46s
CI / deploy (push) Successful in 3m40s
The login and register pages were near-identical after the previous cleanup,
and both forms repeated the same labelled, icon-prefixed input seven times.
Move the data loading and page shell into auth-landing.tsx (loadAuthLanding +
AuthLandingView) and the input markup into a single AuthField, so the pages
become thin compositions and every field shares one focus, icon and aria
implementation. The numbered section headers collapse into AuthSectionHeader.

No behaviour change.
2026-10-18 19:01:40 +02:00
openhands c6e5e0b1a9 feat(auth): unify and polish login, register and homepage auth UI
CI / preflight (push) Skipped
CI / check (push) Successful in 35s
CI / tests-imaging-browsers (push) Successful in 1m34s
CI / tests-integration (push) Successful in 2m1s
CI / tests-unit (push) Successful in 2m11s
CI / tests-quality (push) Successful in 52s
CI / tests-ui (push) Successful in 5m7s
CI / deploy (push) Successful in 4m11s
Login and register each carried their own copy of the promo panel and the
error banner, so the two pages drifted apart and every caller had to wire
role="alert" by hand. Extract a shared AuthPromoCard and AuthAlert, use them
in both forms and for the login notices, and link errors to their fields via
aria-invalid / aria-describedby.

Focus now lands on the 2FA code field the moment it appears, the credential
fields lock while a request is in flight, and invalid inputs get a danger
tint. The homepage top bar was a byte-for-byte duplicate of AuthTopBar; it
now renders the shared component, and the compact homepage login uses the
tighter spacing its comment already promised.
2026-10-18 18:49:18 +02:00
openhands 2249303dbd chore(lint): remove dead eslint-disable directives
CI / check (push) Successful in 30s
CI / tests-unit (push) Successful in 1m45s
CI / tests-quality (push) Successful in 47s
CI / preflight (push) Skipped
CI / tests-imaging-browsers (push) Successful in 1m31s
CI / tests-integration (push) Successful in 1m49s
CI / tests-ui (push) Successful in 4m24s
CI / deploy (push) Successful in 3m39s
The project lints with Biome only, so none of these 78 directives across 57
files ever suppressed anything. Directives that carried the rationale for a
flagged dynamic index access keep that rationale as a plain comment.
2026-10-18 14:50:51 +02:00
openhands 07c5904879 test: make coverage opt-in and ratchet thresholds to the measured floor
Coverage was enabled by default, which forced v8 instrumentation on every run
and made a focused `vitest run <file>` fail the global thresholds that a
single file can never satisfy. `pnpm test:coverage` now opts in explicitly
while `pnpm test` stays fast.

Thresholds ratcheted from 36/29/30/37 to the measured full-suite floor of
37/30/31/38, so a drop in coverage fails again. Also drops a stale comment
about a parent Laravel repo and a dead .next.prev exclude from the config.
2026-10-18 14:50:50 +02:00
openhands 4776a41c01 fix(env): align suggested DB pool size with MariaDB max_connections
The example .env suggested DATABASE_POOL_SIZE=150 and connection_limit=150.
MariaDB defaults max_connections to 151, so a single CMS instance could claim
the server's entire connection budget, starving the emulator and any second
instance. The README already documents a pool size of 25; the example now
matches and notes that DATABASE_POOL_SIZE is the value that actually applies.
2026-10-18 14:50:33 +02:00
openhands a32cf6119b perf(build): measure the homepage and fix optimizePackageImports
/ is the highest-traffic route but was missing from both the public-route
instrumentation and the JS size budgets, so a payload regression there could
never fail the build. It is now wrapped in withPublicPagePerformance and
budgeted alongside the other public routes.

optimizePackageImports listed date-fns, which is not a dependency (a no-op),
while omitting the barrel-heavy packages that are actually imported: motion,
@dnd-kit/core, @dnd-kit/sortable and @tanstack/react-virtual.
2026-10-18 14:50:32 +02:00
openhands bb3799f705 perf(i18n): stop serializing the full catalogue on public pages
The root layout fed the entire ~254 KB message catalogue to
NextIntlClientProvider, which serializes it into the RSC payload of every
page. A public page only reads ~59 KB of it; the ~195 KB difference is staff
tool copy that only /admin, /admin-next and /mod ever render.

The root provider now installs the reduced catalogue and each staff route
group re-installs the full one, since a nested NextIntlClientProvider replaces
the parent message set rather than merging into it. pages.admin.actions stays
public because the shared useServerAction hook runs on public pages too.

Measured: 253 KB -> 59 KB of messages per public page (raw JSON).

Guard tests cover all three halves: the root keeps using the reduced
catalogue, every staff layout installs its own full provider, and no public
tree reads a staff-only namespace.
2026-10-18 14:50:26 +02:00
openhands d28dde459a perf(auth): memoize auth() per request with React cache
A single authenticated render called auth() 4-5 times (access guard, site
layout, both permission loaders, the page itself), and every call re-parsed
the session cookie, decoded and HMAC-verified the JWT and ran the jwt/session
callbacks. Wrapping NextAuth's handler in React's cache scopes that work to
one verification per request.

Outside a render (scripts, jobs worker) React's cache is a pass-through, so
those call sites behave exactly as before.
2026-10-18 14:49:34 +02:00
openhands 095353012a fix(build): suppress circular-chunk warning (server-only, no runtime impact)
CI / tests-imaging-browsers (push) Successful in 1m53s
CI / tests-integration (push) Successful in 2m4s
CI / tests-quality (push) Successful in 1m12s
CI / tests-ui (push) Successful in 5m49s
CI / deploy (push) Successful in 3m29s
CI / check (push) Successful in 32s
CI / tests-unit (push) Successful in 2m47s
CI / preflight (push) Skipped
2026-10-17 19:16:40 +02:00
openhands ef0c425598 fix(redis): skip missing-REDIS_URL warning during production build
CI / check (push) Successful in 40s
CI / tests-integration (push) Successful in 2m15s
CI / tests-imaging-browsers (push) Successful in 1m36s
CI / tests-ui (push) Failing after 6m56s
CI / deploy (push) Skipped
CI / tests-unit (push) Successful in 3m7s
CI / tests-quality (push) Successful in 1m14s
CI / preflight (push) Skipped
2026-10-17 19:03:43 +02:00
openhands 8d3263a8fe feat(i18n): translate dashboard and home/profile strings for nl
CI / tests-integration (push) Successful in 2m19s
CI / tests-unit (push) Successful in 3m9s
CI / tests-quality (push) Successful in 1m32s
CI / tests-ui (push) Successful in 7m6s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 21s
CI / check (push) Successful in 39s
CI / tests-imaging-browsers (push) Successful in 1m51s
2026-10-17 19:03:24 +02:00
openhands 050fcdf25b feat(i18n): wire header strings to translations across locales
CI / tests-ui (push) Successful in 5m45s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m10s
CI / check (push) Successful in 34s
CI / tests-imaging-browsers (push) Successful in 2m7s
CI / tests-integration (push) Successful in 2m18s
CI / tests-unit (push) Successful in 3m8s
CI / tests-quality (push) Successful in 1m20s
2026-10-17 18:50:54 +02:00
openhands a40669b130 feat(i18n): add header menu keys to all locales
CI / tests-integration (push) Successful in 2m33s
CI / tests-unit (push) Successful in 3m24s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m27s
CI / check (push) Successful in 31s
CI / tests-imaging-browsers (push) Successful in 1m46s
CI / tests-quality (push) Successful in 1m31s
CI / tests-ui (push) Successful in 5m52s
Adds the header.* keys introduced by the header rewrite (enter, search
users, staff, mod/admin panel, command center, logs, logo generator,
dashboard/profile/settings links, credits/duckets/diamonds, ...) to all
25 message files. Values are translated where available and fall back to
English otherwise.

The working tree files had been re-serialized with escaped unicode
(\uXXXX); this commit restores literal UTF-8 so the diff shows only the
content change instead of a full-file rewrite.
2026-10-17 18:25:47 +02:00
openhands c15177a52e fix(build): keep the server logger out of client bundles
CI / check (push) Successful in 33s
CI / tests-imaging-browsers (push) Successful in 1m50s
CI / tests-ui (push) Successful in 5m56s
CI / tests-integration (push) Successful in 2m28s
CI / tests-unit (push) Successful in 3m6s
CI / tests-quality (push) Successful in 1m40s
CI / preflight (push) Skipped
CI / deploy (push) Successful in 3m58s
The production webpack build failed with UnhandledSchemeError: client
components imported @/lib/logger, which binds pino, AsyncLocalStorage
(node:async_hooks), node:crypto and node:fs — and validates server env on
import. The UI fixture aliased those modules, so the harness and tests
never hit it.

- add src/lib/browser-log.ts: browser-safe logger with the same interface;
  errors are forwarded to /api/diagnostics/errors via reportBrowserError
- guard src/lib/logger.ts with server-only and drop its now-dead browser
  branches
- switch the 11 client components/hooks to @/lib/browser-log

Verified with the Dockerfile's production build (pnpm run build) and the
full vitest suite.
2026-10-17 17:49:53 +02:00
openhands fb470123c3 test(ui): stabilize cross-browser suite
CI / check (push) Successful in 30s
CI / tests-integration (push) Successful in 1m58s
CI / tests-imaging-browsers (push) Successful in 2m2s
CI / tests-ui (push) Successful in 4m50s
CI / preflight (push) Skipped
CI / deploy (push) Failing after 1m42s
CI / tests-unit (push) Successful in 2m9s
CI / tests-quality (push) Successful in 1m2s
- Run visual snapshots on Chromium only; Firefox/WebKit rendering does
  not match Chromium pixel output. Functional and accessibility
  assertions still run on all four projects (baselines were renamed to
  the new project names in the previous commit).
- Poll axe audits until clean: WebKit can report stale color-contrast
  violations for a moment after interactions while styles settle.
- Poll the Tab-focus assertion: Firefox can swallow a Tab while the
  sandboxed srcdoc preview frame is still loading.
- Fix the recovery clock race: install the fake clock before navigation
  at a fixed time and pause at a fixed target instead of wall-clock
  values, which under load could already be in the fake clock's past
  ('Cannot fast-forward to the past').
2026-10-17 17:14:13 +02:00
openhands 1dd584cd82 fix(ui): make fixture bundle browser-safe, fast and cacheable
The UI fixture bundle crashed at runtime, so every test waited out its
45s timeout:
- server-only modules leaked into the bundle and referenced node
  built-ins, the process global, and validated env at import time
- the previous platform: 'node' fix kept esbuild happy but emitted
  require() calls that cannot run in the browser

Fix it at the bundle boundary:
- alias node:* imports to e2e/ui/node-stubs.mjs (shape-compatible stubs,
  no real I/O)
- inject e2e/ui/process-shim.mjs for the process global
- define process.env.SKIP_ENV_VALIDATION=1 so src/env.ts skips parsing
  in the fixture (same escape hatch vitest uses)

Also make the fixture server fast to start:
- build JS and Tailwind CSS in parallel
- cache built assets in node_modules/.cache/nexst-ui-fixture keyed on a
  content hash of src/, fixtures, stubs and the server file
- startup drops from ~1.7s to ~220ms on cache hits
2026-10-17 17:13:59 +02:00
207 changed files with 9351 additions and 4930 deletions

No files matched your search

+19
View File
@@ -26,6 +26,25 @@ bun.lockb
public/nitro-assets
public/swf
# Testbronnen draaien op de host (pnpm test:ui / test:integration / test:e2e),
# de image heeft ze niet nodig. In de image zouden ze alleen de typecheck van
# `next build` meebepalen en de image van @playwright/test, vitest, msw,
# testcontainers en drizzle-kit afhankelijk maken.
e2e/
integration/
# Databasebackups (~232MB, dagelijkse rotatie): horen niet in de buildcontext.
# Ze maakten elke context groot en invalideerden bij elke rotatie de
# `COPY . .`-laag, waardoor de Next-build volledig opnieuw draaide.
backups/
# Wordt tijdens de build opnieuw gegenereerd door `pnpm assets:editor`
# (bron: node_modules/tinymce) en staat niet in git.
public/vendor/
# Lokale buildcache voor `docker compose build` (cache_from/cache_to).
.docker-cache/
.deploy.lock
logs
+12 -2
View File
@@ -3,8 +3,14 @@
# ==============================================================================
# --- DATABASE (High Performance Pooling & Strict Timeouts) ---
DATABASE_URL="mysql://user:password@localhost:3306/dbname?charset=utf8mb4&connection_limit=150&connect_timeout=5"
DATABASE_POOL_SIZE=150
# The pool size is governed by DATABASE_POOL_SIZE (src/lib/db.ts); the
# `connection_limit` in the URL is only honoured by tools that read the URL
# directly (drizzle-kit, scripts). Keep both in step and keep them well below
# MariaDB's `max_connections` (151 by default) or the emulator and any second
# CMS instance get "Too many connections". README §performance: pool size 25.
# DATABASE_URL supports both MySQL/MariaDB ("mysql://...") and PostgreSQL ("postgres://...").
DATABASE_URL="mysql://user:password@localhost:3306/dbname?charset=utf8mb4&connection_limit=25&connect_timeout=5"
DATABASE_POOL_SIZE=25
DATABASE_IDLE_TIMEOUT_MS=60000
DATABASE_CONNECT_TIMEOUT_MS=5000
@@ -59,6 +65,10 @@ AUTH_SECRET=your-super-secret-auth-key-change-this-min-32-chars
APP_KEY=base64:your-app-key-here=
# Bcrypt cost factor for new password hashes.
BCRYPT_COST=12
# Password-length policy for every new password (register, password reset and
# staff-created accounts). Minimum: 5-30. Maximum: 30-128.
PASSWORD_MIN_LENGTH=12
PASSWORD_MAX_LENGTH=128
# --- ANTI-DDOS (app-layer gate, production only) ---
# On by default in production. Set to "false" to disable (not recommended).
File diff suppressed because it is too large. Load diff
+13 -13
View File
@@ -29,16 +29,16 @@ jobs:
LOG_LEVEL: ${{ github.event.inputs.debug == 'true' && 'debug' || 'info' }}
shell: bash
run: |
docker run --rm \
--memory=6g \
--memory-swap=6g \
-e RENOVATE_PLATFORM=gitea \
-e RENOVATE_ENDPOINT=https://gitlab.epicnabbo.nl/ \
-e RENOVATE_TOKEN \
-e RENOVATE_REPOSITORIES='["remco/EpicNext-Cms"]' \
-e RENOVATE_AUTODISCOVER=false \
-e RENOVATE_BINARY_SOURCE=install \
-e LOG_LEVEL \
-e RENOVATE_ONBOARDING=true \
-e RENOVATE_REQUIRE_CONFIG=required \
"renovate/renovate:${RENOVATE_VERSION}"
docker run --rm \
--memory=6g \
--memory-swap=6g \
-e RENOVATE_PLATFORM=gitea \
-e RENOVATE_ENDPOINT=https://gitlab.epicnabbo.nl/ \
-e RENOVATE_TOKEN \
-e RENOVATE_REPOSITORIES='["remco/EpicNext-Cms"]' \
-e RENOVATE_AUTODISCOVER=false \
-e RENOVATE_BINARY_SOURCE=install \
-e LOG_LEVEL \
-e RENOVATE_ONBOARDING=true \
-e RENOVATE_REQUIRE_CONFIG=required \
"renovate/renovate:${RENOVATE_VERSION}"
+3
View File
@@ -57,6 +57,9 @@ blob-report/
build-reports/
!/docs/performance-budgets.md
# Local buildcache (docker compose cache_from/cache_to)
.docker-cache/
# One-off local snapshots (o.a. catalog-integrity/pre-fix.json): runtime-werk,
# geen bron. Per map opgeslagen om een incident terug te kunnen lezen.
backups/
+1 -1
View File
@@ -1 +1 @@
26.10.0
26.12.1
+9 -9
View File
@@ -26,15 +26,15 @@ This source change alone does not configure or deploy the production service.
## Exported content
| Source | Repository destination |
| --- | --- |
| Configured Nitro bundles, including furniture, figures, effects and pets | `Gamedata/bundled` |
| Configured furni icons | `Gamedata/icons` |
| Existing badge/catalog images | `Gamedata/c_images` |
| FurnitureData and supported public game-data JSON files | `Gamedata/config` |
| Existing localized FurnitureData files | `catalogue version 2 ( Final (Dev)/langs furnidata` |
| `items_base`, `catalog_pages`, `catalog_items` | `catalogue version 2 ( Final (Dev)/sqls` |
| `catalog_pages_bc`, `catalog_items_bc`, when present | Same SQL directory |
| Source | Repository destination |
| ------------------------------------------------------------------------ | --------------------------------------------------- |
| Configured Nitro bundles, including furniture, figures, effects and pets | `Gamedata/bundled` |
| Configured furni icons | `Gamedata/icons` |
| Existing badge/catalog images | `Gamedata/c_images` |
| FurnitureData and supported public game-data JSON files | `Gamedata/config` |
| Existing localized FurnitureData files | `catalogue version 2 ( Final (Dev)/langs furnidata` |
| `items_base`, `catalog_pages`, `catalog_items` | `catalogue version 2 ( Final (Dev)/sqls` |
| `catalog_pages_bc`, `catalog_items_bc`, when present | Same SQL directory |
SQL is read in one consistent, read-only InnoDB transaction. Dumps contain table
definitions and deterministic upserts with hexadecimal UTF-8 string literals.
+29 -7
View File
@@ -1,23 +1,45 @@
# syntax=docker/dockerfile:1
FROM node:26.10.0-alpine AS migrations
FROM node:26.12.1-alpine AS migrations
WORKDIR /app
ENV NEXT_TELEMETRY_DISABLED=1
# Installeer git, bash en pnpm v12. bash is nodig voor
# Installeer git, bash en corepack. bash is nodig voor
# scripts/with-memory-cap.sh (gebruikt bashisme zoals arrays en BASH_REMATCH);
# Alpine levert geen bash mee.
#
# pnpm komt niet meer uit een losgepind npm-pakket, maar uit corepack: die
# leest de versie én de sha512-hash uit de `packageManager`-pin van
# package.json. Daarmee kan de image nooit uit sync raken met het lockfile
# (vroeger stond hier [email protected] terwijl package.json 12.11.2 voorschreef)
# en wordt de gedownloade pnpm-binary ook in de runtime-image bewaard.
RUN --mount=type=cache,target=/var/cache/apk \
apk add --no-cache git bash \
&& npm install -g [email protected]
--mount=type=cache,target=/root/.npm \
apk add --no-cache git bash util-linux \
&& npm install -g [email protected] \
&& corepack enable pnpm
# corepack bewaart de gedownloade pnpm buiten de cache-mount, zodat de runtime
# (`docker run --entrypoint pnpm <migrations-image> db:migrate`) pnpm ook
# zonder netwerk kan gebruiken.
ENV COREPACK_HOME="/usr/local/share/corepack"
ENV COREPACK_ENABLE_DOWNLOAD_PROMPT=0
# Stel het PATH zo in dat Alpine pnpm gegarandeerd overal herkent
ENV PNPM_HOME="/usr/local/share/pnpm"
ENV PATH="$PNPM_HOME:/usr/local/bin:$PATH"
# Alleen package.json: de `packageManager`-pin bepaalt welke pnpm corepack
# installeert. Deze laag blijft gecachet wanneer alleen de lockfile verandert.
COPY package.json ./
RUN corepack install
COPY package.json pnpm-lock.yaml* pnpm-workspace.yaml* .npmrc* ./
# Voer de installatie uit met de pnpm v12 store cache-mount
RUN --mount=type=cache,target=/root/.local/share/pnpm/store \
# Voer de installatie uit met de pnpm v12 store cache-mount. De mount moet op
# de store staan die pnpm ook echt gebruikt ($PNPM_HOME/store/v11); met het
# oude pad (/root/.local/share/pnpm/store) cache'te de mount niets en
# downloadde elke build alle packages opnieuw.
RUN --mount=type=cache,target=/usr/local/share/pnpm/store \
pnpm install --frozen-lockfile --ignore-scripts
COPY . .
@@ -52,7 +74,7 @@ RUN --mount=type=cache,target=/app/.next/cache \
pnpm run build \
&& PERFORMANCE_COMMIT_SHA="$NEXT_DEPLOYMENT_ID" node scripts/performance-report.mjs --output-dir build-reports
FROM node:26.10.0-alpine AS runner
FROM node:26.12.1-alpine AS runner
ARG NEXT_DEPLOYMENT_ID="unknown"
LABEL org.opencontainers.image.revision="$NEXT_DEPLOYMENT_ID"
WORKDIR /app
+284 -187
View File
File diff suppressed because it is too large. Load diff
+4
View File
@@ -25,6 +25,10 @@
},
"style": {
"noDescendingSpecificity": "off"
},
"correctness": {
"noComponentHookFactories": "off",
"usePlaywrightValidDescribeCallback": "off"
}
}
},
+7 -1
View File
@@ -6,4 +6,10 @@ services:
HOSTNAME: 127.0.0.1
PORT: "3002"
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:3002/api/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))"]
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:3002/api/health').then(r=>{if(!r.ok)process.exit(1)}).catch(()=>process.exit(1))",
]
+7
View File
@@ -39,6 +39,13 @@ http {
server_tokens off;
keepalive_timeout 30s;
# Gamedata/icons are served from disk by alias locations. Caching the
# stat/open results avoids a syscall storm on every room load.
open_file_cache max=10000 inactive=30s;
open_file_cache_valid 60s;
open_file_cache_min_uses 2;
open_file_cache_errors off;
client_max_body_size 64m;
client_body_buffer_size 16k;
client_header_buffer_size 1k;
+47 -18
View File
@@ -1,5 +1,20 @@
# ─────────────────────────────────────────────────────────────────────────────
# Next.js CMS — blue/green
# Next.js CMS — single slot on port 3002
#
# ── Eigenaar van poort 3002 ─────────────────────────────────────────────────
# Deze repo kent twee deploy-paden die allebei op poort 3002 willen:
# * `scripts/ci-deploy.sh` (blue/green, docker run) — de eigenaar op een
# CI-host. Elke push naar main bouwt daar een nieuwe image, draait de
# migrations en zet nginx pas om na health + e2e + imaging.
# * deze compose-`cms`-service — bedoeld voor een LOSSE host zonder CI.
#
# Ze kunnen niet naast elkaar draaien: wie op 3002 zit, blokkeert de ander met
# `EADDRINUSE`. Daarom staat `cms` achter een profile. Een bloot
# `docker compose up -d` start dus alleen byparr en kan nooit de live CI-release
# van de site drukken. De service start alleen als je hem expliciet noemt
# (`docker compose up -d cms`, `docker compose build cms`, ...): Compose schakelt
# het profile van een expliciet genoemde service vanzelf in. Op een CI-host wil
# je dat dus juist NOOIT doen.
# ─────────────────────────────────────────────────────────────────────────────
x-cms: &cms
image: epicnext-cms:${CMS_RELEASE:-local}
@@ -14,8 +29,20 @@ x-cms: &cms
dockerfile: Dockerfile
args:
NEXT_DEPLOYMENT_ID: ${CMS_RELEASE:-unknown}
# Runtime host networking IS required: blue/green needs per-release host ports
# (3002/3003) and nginx reaches the slot over 127.0.0.1.
# Lokale buildcache op schijf. `scripts/docker-prune.sh` brengt de
# daemon-cache na elke deploy terug tot 4GB, waardoor de lagen van de
# vorige release verdwijnen. Deze export overleeft die prune: een rebuild
# na een lockfile-wijziging hergebruikt dan de al gedownloade packages
# (pnpm store) in plaats van ze opnieuw te downloaden.
# De map ligt binnen de buildcontext, zodat buildx een ontbrekende
# cachemap stilzwijgend negeert i.p.v. de build te laten falen; zowel
# .dockerignore als .gitignore sluiten de map uit.
cache_from:
- type=local,src=.docker-cache/cms
cache_to:
- type=local,dest=.docker-cache/cms,mode=max
# Runtime host networking IS required: nginx reaches the CMS over 127.0.0.1
# on the single port that is actually served (3002).
network_mode: host
stop_grace_period: 15s
restart: unless-stopped
@@ -28,13 +55,17 @@ x-cms: &cms
- /var/www/Gamedata:/var/www/Gamedata
# ── Resource limits ──
mem_limit: 6g
memswap_limit: 7g
cpus: 2.0
pids_limit: 512
mem_limit: 4g
memswap_limit: 5g
healthcheck:
test: ["CMD", "node", "-e", "fetch('http://127.0.0.1:'+(process.env.PORT||'3002')+'/api/health').then(r=>{process.exit(r.ok?0:1)}).catch(()=>process.exit(1))"]
test:
[
"CMD",
"node",
"-e",
"fetch('http://127.0.0.1:'+(process.env.PORT||'3002')+'/api/health').then(r=>{process.exit(r.ok?0:1)}).catch(()=>process.exit(1))",
]
interval: 15s
timeout: 5s
retries: 3
@@ -43,21 +74,19 @@ x-cms: &cms
services:
cms:
<<: *cms
# Alleen starten als je deze host bewust compose-only beheert.
profiles: ["cms"]
container_name: epicnext-cms
environment:
- HOSTNAME=0.0.0.0
- PORT=3002
cms-green:
<<: *cms
container_name: epicnext-cms-green
profiles: ["green"]
environment:
- HOSTNAME=0.0.0.0
- PORT=3003
byparr:
image: ghcr.io/thephaseless/byparr:latest
image: ghcr.io/thephaseless/byparr:v3.0.4
# `latest` is een drijvende tag. Zonder pull_policy haalt compose de
# bestaande image nooit opnieuw op en blijft byparr hangen op de eerste
# versie die ooit werd binnengehaald.
pull_policy: always
container_name: byparr
network_mode: host
restart: unless-stopped
@@ -69,4 +98,4 @@ services:
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
start_period: 30s
+14 -15
View File
@@ -2,20 +2,20 @@
## Operator changes
| Area | Behavior and location |
| --- | --- |
| Release | Deployment checks HTTP health, release identity and Chromium pages before marking the running image verified. Registry publication reuses that verified digest on the shared runner; independent hosts build and verify their own image. |
| Shared HK | Dialogs scroll within the available viewport. Table column preferences persist per page in the current browser session; filters already remain in the URL. No favorites added. |
| Catalog Studio | Dedicated detail drawer and five separate completeness states: SQL, offers, furnidata, icon and Nitro. Sprite/type conflicts are consistently excluded from import and linked to audit. Missing source files are never represented as available. |
| Operations | Command center includes permission-filtered error groups, personal import failures, open support tickets and news drafts. A failed source is shown separately from an empty source. |
| Error center | Retained occurrence counts, first/last times, identified users, release counts, self-assignment and recognized local links. Assignment requires edit permission and is audited. |
| News | Private server-backed autosave, recover/discard/retry, prior saved revisions restored as a draft, and concurrent-edit detection. New status/search filters and pagination make older drafts reachable. |
| Jobs | Cancellation finishes the current item and stops pending items. Completed work stays completed. Uncertain interrupted mutations are excluded from retry. Live lease checks stop known stale worker writes. |
| Installation | `/admin/devops/installation` shows release, DB latency, Redis, emulator, storage permissions, migration history and worker heartbeat. Renderer defaults are recognized. Registry access is explicitly unverified from the web process. |
| Public dashboard | Current/next published event, clearer unread-message action, useful empty/error states and mobile layout refinements. |
| Audit | Exact actor/action and UTC date filters, readable recorded before/after values and permission-protected CSV of the filtered page, capped at 100 rows. |
| Performance | Active import polling remains 5 seconds; idle polling is 30 seconds and pauses in hidden tabs. History returns at most 30 owned jobs and initially renders 50 items per job. Health probes are deduplicated within a render; diagnostics report observed probe duration. |
| Text | New messages are translated in English, Italian and Dutch. Other locales have explicit English fallback strings. Existing translation debt is not reported as resolved. |
| Area | Behavior and location |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Release | Deployment checks HTTP health, release identity and Chromium pages before marking the running image verified. Registry publication reuses that verified digest on the shared runner; independent hosts build and verify their own image. |
| Shared HK | Dialogs scroll within the available viewport. Table column preferences persist per page in the current browser session; filters already remain in the URL. No favorites added. |
| Catalog Studio | Dedicated detail drawer and five separate completeness states: SQL, offers, furnidata, icon and Nitro. Sprite/type conflicts are consistently excluded from import and linked to audit. Missing source files are never represented as available. |
| Operations | Command center includes permission-filtered error groups, personal import failures, open support tickets and news drafts. A failed source is shown separately from an empty source. |
| Error center | Retained occurrence counts, first/last times, identified users, release counts, self-assignment and recognized local links. Assignment requires edit permission and is audited. |
| News | Private server-backed autosave, recover/discard/retry, prior saved revisions restored as a draft, and concurrent-edit detection. New status/search filters and pagination make older drafts reachable. |
| Jobs | Cancellation finishes the current item and stops pending items. Completed work stays completed. Uncertain interrupted mutations are excluded from retry. Live lease checks stop known stale worker writes. |
| Installation | `/admin/devops/installation` shows release, DB latency, Redis, emulator, storage permissions, migration history and worker heartbeat. Renderer defaults are recognized. Registry access is explicitly unverified from the web process. |
| Public dashboard | Current/next published event, clearer unread-message action, useful empty/error states and mobile layout refinements. |
| Audit | Exact actor/action and UTC date filters, readable recorded before/after values and permission-protected CSV of the filtered page, capped at 100 rows. |
| Performance | Active import polling remains 5 seconds; idle polling is 30 seconds and pauses in hidden tabs. History returns at most 30 owned jobs and initially renders 50 items per job. Health probes are deduplicated within a render; diagnostics report observed probe duration. |
| Text | New messages are translated in English, Italian and Dutch. Other locales have explicit English fallback strings. Existing translation debt is not reported as resolved. |
## Deployment requirements
@@ -37,7 +37,6 @@
## Verification
Local verification on 2026-09-09:
- Production build succeeded with fixture configuration and an intentionally unavailable database. Build-time fallback logs are expected in this check.
- Full Vitest run: 254 files passed, 4 skipped; 1,466 tests passed, 6 skipped. Coverage thresholds passed (19.89% lines); this does not imply exhaustive coverage.
- Global Biome rules/import checks passed across 1,328 files; modified source/locales were formatted separately to avoid unrelated Windows line-ending changes.
+1 -1
View File
@@ -81,7 +81,7 @@ The direct template intentionally records the CDN/edge socket address when place
### Local verification and deployment boundary
`pnpm exec vitest run --coverage.enabled=false scripts/proxy-config.test.mjs` runs the installed Docker Compose CLI against a disposable clone configuration, without contacting Docker Engine, building images or reading the real `.env`. It verifies selection through `.env`, loopback/port override precedence, the IPv4 healthcheck and preservation of mounts, release selection and host networking. It explicitly skips when Compose is unavailable. This is not a container-start or network-isolation test.
`pnpm exec vitest run --coverage.enabled=false scripts/proxy-config.test.mjs` runs the installed Docker Compose CLI against a disposable clone configuration, without contacting Docker Engine, building images or reading the real `.env`. It verifies selection through `.env`, loopback/port override precedence, the IPv4 healthcheck and preservation of mounts, release selection and host networking. The `cms` service is behind the `cms` profile (so a bare `docker compose up -d` cannot claim port 3002 on a CI-managed host), so the test renders the configuration with `--profile cms`. It explicitly skips when Compose is unavailable. This is not a container-start or network-isolation test.
`pnpm test:integration` additionally starts disposable Nginx containers from the actual templates, supplies a temporary test certificate, and sends real HTTPS requests with forged identity headers. It checks direct-mode replacement even with an inherited real-IP rule, rejection of untrusted peers, and acceptance through an explicitly trusted peer. This requires Docker Engine and the OpenSSL CLI and does not read deployment credentials. The templates must still pass `nginx -t` on the intended host after its hostname/certificate substitution, then the listener and trusted-header checks above; the disposable fixture cannot certify that host or its firewall.
+9 -11
View File
@@ -14,12 +14,11 @@ For each configured App Router route, resolve its exact app path using `app-path
The **initial entry envelope** is the union of route bootstrap `rootMainFilesTree[appPath]` (or `rootMainFiles`) and every client chunk that route's client-reference manifest lists. This includes layout, page and boundary/loading entries.
The manifest exposes those chunks differently per bundler. Turbopack emits an explicit per-segment `entryJSFiles` map; webpack emits no such field and records chunks only per client module, as `clientModules[*].chunks`, in `[chunkId, fileName, chunkId, fileName, …]` order. The report reads `entryJSFiles` when present and otherwise derives the same envelope from `clientModules`, which is the source Next's own `static-routes-info` uses. Numeric chunk ids are skipped; a malformed chunk *path* still fails rather than being dropped, so a broken manifest cannot quietly under-report a route.
The manifest exposes those chunks differently per bundler. Turbopack emits an explicit per-segment `entryJSFiles` map; webpack emits no such field and records chunks only per client module, as `clientModules[*].chunks`, in `[chunkId, fileName, chunkId, fileName, …]` order. The report reads `entryJSFiles` when present and otherwise derives the same envelope from `clientModules`, which is the source Next's own `static-routes-info` uses. Numeric chunk ids are skipped; a malformed chunk _path_ still fails rather than being dropped, so a broken manifest cannot quietly under-report a route.
> The build runs webpack (`next build --webpack`), so the `clientModules` path is the live one. An earlier revision only read `entryJSFiles`, and after the switch to webpack every route reported `unavailable` while the command still exited 0 — the budgets were silently not being measured. When a bundler switch changes the manifest layout again, re-check this section rather than trusting a clean exit.
The definition follows the data exposed by the installed Next 16.3.8 build and the `getLinkAndScriptTags` / `getRequiredScripts` renderer helpers; it is deliberately a build-artifact envelope, not a browser network trace. Conditional rendering, redirects, streaming and browser caches can change actual requests.
- Raw bytes are filesystem byte lengths of unique JavaScript assets in that envelope.
- Gzip bytes are the **sum of independent gzip level 9 compressions** of those files using the recorded Node/zlib runtime. They are not gzip of concatenated source, nor observed CDN transfer sizes.
- Deployment query strings and `/_next/` prefixes are normalized before deduplication. Shared files count once per route; each route is measured independently, with no misleading cross-route total.
@@ -34,16 +33,15 @@ Baselines were last recalibrated against a local webpack production build (Next
The image build compiles the app, then runs `scripts/performance-report.mjs` in the same `RUN` layer (`Dockerfile:48-53`). In `mode: enforce` a failing route therefore fails the image build, which blocks both the PR `preflight` job and the `deploy` job. Recalibrate the table and `scripts/performance-budgets.json` **together** in the same commit whenever the envelope legitimately grows (new route dependency, Next upgrade).
| Route | Baseline raw bytes | Baseline gzip bytes | Raw limit | Gzip limit |
| --- | ---: | ---: | ---: | ---: |
| `/me` | 621460 | 195411 | 716800 | 225280 |
| `/news` | 616712 | 193199 | 716800 | 225280 |
| `/events` | 617121 | 193450 | 716800 | 225280 |
| `/search` | 618536 | 194216 | 716800 | 225280 |
| `/admin/catalog` | 1049094 | 330369 | 1208320 | 389120 |
| `/admin/studio/furni` | 1397566 | 447765 | 1607680 | 522240 |
| Route | Baseline raw bytes | Baseline gzip bytes | Raw limit | Gzip limit |
| --------------------- | -----------------: | ------------------: | --------: | ---------: |
| `/me` | 621460 | 195411 | 716800 | 225280 |
| `/news` | 616712 | 193199 | 716800 | 225280 |
| `/events` | 617121 | 193450 | 716800 | 225280 |
| `/search` | 618536 | 194216 | 716800 | 225280 |
| `/admin/catalog` | 1049094 | 330369 | 1208320 | 389120 |
| `/admin/studio/furni` | 1397566 | 447765 | 1607680 | 522240 |
Configured limits are positive integer bytes; `null` explicitly means observe-only. `scripts/performance-budgets.json` runs `mode: enforce`: an `over-budget` route prints `Performance budgets enforced: <route> (over-budget)` and exits non-zero. Missing production `BUILD_ID`, unsupported manifests, missing routes or missing referenced assets produce `unavailable` with a reason and **no partial/zero total**; under `enforce` an `unavailable` route also fails the command, so a bundler change that breaks measurement cannot pass quietly. Malformed budget configuration or an unwritable output directory always fails the command. Set `mode` back to `informational` only while recalibrating, never as a permanent state.
Synthetic tests cover shared-chunk deduplication, exact byte/gzip calculations, route bootstrap selection, missing data, safe parsing and CLI exit behavior in both modes. Run `pnpm exec vitest run --coverage.enabled=false scripts/performance-report.test.mjs`.
+6 -2
View File
@@ -6,12 +6,16 @@ import { defineConfig } from "drizzle-kit";
// This DB is shared with the Arcturus emulator — NEVER run `drizzle-kit migrate`
// or `push` against it. CMS DDL stays in drizzle/migrations/*.sql applied by
// `pnpm db:migrate`. Use `pnpm db:generate` only for draft SQL under drizzle/drafts/.
const dbUrl = process.env.DATABASE_URL ?? "";
const isPostgres =
dbUrl.startsWith("postgres://") || dbUrl.startsWith("postgresql://");
export default defineConfig({
dialect: "mysql",
dialect: isPostgres ? "postgresql" : "mysql",
schema: "./src/db/schema.ts",
out: "./drizzle/drafts",
dbCredentials: {
url: process.env.DATABASE_URL ?? "",
url: dbUrl,
},
strict: true,
verbose: true,
+1 -1
View File
@@ -1 +1 @@
Draft SQL from `pnpm db:generate` (drizzle-kit). Never apply these automatically — copy reviewed statements into drizzle/migrations/ as numbered CMS migrations, then `pnpm db:migrate`.
Draft SQL from `pnpm db:generate` (drizzle-kit). Never apply these automatically — copy reviewed statements into drizzle/migrations/ as numbered CMS migrations, then `pnpm db:migrate`.
+7 -2
View File
@@ -116,9 +116,14 @@ test("saving while recovery is pending enables recovery for subsequent edits", a
test("unmount flush retains an edit before the autosave interval", async ({
page,
}) => {
// Install the fake clock before navigation so every page timer is faked,
// then jump forward to a fixed pause point. Using wall-clock `new Date()`
// for both calls raced under load: the fake clock ticks in real time
// between the calls and can pass the target ("Cannot fast-forward to the
// past"). The 60s jump only fires no-op persists on a clean form.
await page.clock.install({ time: new Date("2030-01-01T12:00:00Z") });
await page.goto("/admin/articles/recovery");
await page.clock.install();
await page.clock.pauseAt(new Date());
await page.clock.pauseAt(new Date("2030-01-01T12:01:00Z"));
await page.locator('input[name="title"]').fill("Immediate final edit");
await page
.getByRole("button", { name: "Close editor fixture", exact: true })
+147 -56
View File
File diff suppressed because it is too large. Load diff
+162 -11
View File
File diff suppressed because it is too large. Load diff
+25
View File
@@ -0,0 +1,25 @@
// Minimal `process` shim injected into the UI fixture bundle. Server-only
// modules that leak into the bundle reference the `process` global at module
// scope (release ids, paths, etc). esbuild's `inject` rewrites those free
// identifier references to import from this file so evaluation cannot crash
// in the browser.
export const process = {
env: { NODE_ENV: "production" },
platform: "linux",
arch: "x64",
version: "v20.0.0",
versions: { node: "20.0.0" },
argv: [],
cwd: () => "/",
nextTick: (fn, ...args) => setTimeout(() => fn(...args), 0),
on: () => {},
once: () => {},
emit: () => {},
exit: () => {},
hrtime: Object.assign(() => [0, 0], { bigint: () => 0n }),
memoryUsage: () => ({ heapUsed: 0, rss: 0 }),
pid: 0,
};
export default process;
File diff suppressed because it is too large. Load diff
+24 -1
View File
@@ -158,7 +158,15 @@ const nextConfig: NextConfig = {
},
experimental: {
optimizePackageImports: ["lucide-react", "date-fns"],
// Barrel-heavy packages: without this every import pulls the whole
// module graph into the chunk that first touches it.
optimizePackageImports: [
"lucide-react",
"motion",
"@dnd-kit/core",
"@dnd-kit/sortable",
"@tanstack/react-virtual",
],
useTypeScriptCli: true,
hideLogsAfterAbort: true,
},
@@ -167,6 +175,21 @@ const nextConfig: NextConfig = {
formats: ["image/avif", "image/webp"],
},
// The SWF/Nitro image pipeline (src/lib/services/swf, src/lib/services/image-*)
// pulls shared helpers into several server chunks that webpack reports as a
// circular dependency between chunks with runtime. The cycle only affects
// server-side module caching of already-loaded chunks and has no runtime
// impact, so suppress the noisy warning instead of refactoring the shared
// helpers (which would risk the hot image path). Revisit if a real deadlock
// appears.
webpack(config) {
config.ignoreWarnings = [
...(config.ignoreWarnings ?? []),
/Circular dependency between chunks with runtime/,
];
return config;
},
async headers() {
return [
{
+22 -20
View File
File diff suppressed because it is too large. Load diff
+26 -9
View File
@@ -1,22 +1,39 @@
import { defineConfig, devices } from "@playwright/test";
// Deploy gate: keep this suite deterministic and light. One worker, one browser
// engine, no live dev server and no parallelism — that is what keeps the host
// from pinning at 100% CPU while the specs run.
export default defineConfig({
testDir: "./e2e",
testIgnore: ["**/ui/**", "**/news-real/**", "**/quality/**"],
testIgnore: ["**/ui/**", "**/imaging/**", "**/news-real/**", "**/quality/**"],
forbidOnly: !!process.env.CI,
fullyParallel: false,
workers: 1,
retries: 1,
retries: process.env.CI ? 1 : 0,
timeout: 30000,
expect: { timeout: 10000 },
globalTimeout: 10 * 60 * 1000,
maxFailures: process.env.CI ? 10 : undefined,
reporter: [["list"], ["html", { open: "never" }]],
expect: {
toHaveScreenshot: {
animations: "disabled",
caret: "hide",
maxDiffPixelRatio: 0.02,
},
},
use: {
baseURL: process.env.PLAYWRIGHT_BASE_URL || "http://127.0.0.1:3002",
trace: "retain-on-failure",
screenshot: "only-on-failure",
video: "off",
launchOptions: {
args: [
"--disable-gpu",
"--disable-software-rasterizer",
"--disable-dev-shm-usage",
"--disable-background-networking",
"--disable-default-apps",
"--disable-extensions",
"--disable-sync",
"--metrics-recording-only",
"--mute-audio",
"--no-first-run",
],
},
},
projects: [{ name: "chromium", use: { ...devices["Desktop Chrome"] } }],
});
+20 -4
View File
@@ -1,8 +1,24 @@
import { randomInt } from "node:crypto";
import { defineConfig } from "@playwright/test";
const port = Number(process.env.UI_TEST_PORT || 3107);
if (!Number.isInteger(port) || port < 1024 || port > 65535)
throw Error("Invalid UI_TEST_PORT");
// The fixture server binds a loopback port. The CI runner packs several jobs
// onto the shared host network (capacity > 1), so a fixed port makes concurrent
// runs fight over the bind: one wins, the other's browser then gets
// "connection refused". Pick one random high port for the whole run and pass it
// to every worker through the environment, unless a port is pinned explicitly
// (e.g. a developer reusing a manually started fixture server).
function fixturePort() {
const requested = Number(process.env.UI_TEST_PORT);
if (Number.isInteger(requested) && requested >= 1024 && requested <= 65535)
return requested;
const shared = Number(process.env.PW_UI_TEST_PORT);
if (Number.isInteger(shared) && shared >= 1024 && shared <= 65535)
return shared;
const port = randomInt(30000, 50000);
process.env.PW_UI_TEST_PORT = String(port);
return port;
}
const port = fixturePort();
const baseURL = `http://127.0.0.1:${port}`;
export default defineConfig({
testDir: "./e2e/ui",
@@ -65,7 +81,7 @@ export default defineConfig({
command: "node e2e/ui/fixture-server.mjs",
url: `${baseURL}/health`,
timeout: 120000,
reuseExistingServer: true,
reuseExistingServer: !process.env.CI,
env: { UI_TEST_PORT: String(port) },
},
});
+4788 -2549
View File
File diff suppressed because it is too large. Load diff
+8 -8
View File
@@ -1,9 +1,9 @@
packages:
- '.'
- "."
allowBuilds:
'@parcel/watcher': true
'@swc/core': true
"@parcel/watcher": true
"@swc/core": true
cpu-features: true
esbuild: true
msw: true
@@ -13,12 +13,12 @@ allowBuilds:
minimumReleaseAge: 60
overrides:
glob: '^11.0.0'
'@esbuild-kit/core-utils': 'npm:tsx@^4.23.15'
'@esbuild-kit/esm-loader': 'npm:tsx@^4.23.15'
source-map-js: '1.2.2'
glob: "^11.0.0"
"@esbuild-kit/core-utils": "npm:tsx@^4.23.15"
"@esbuild-kit/esm-loader": "npm:tsx@^4.23.15"
source-map-js: "1.2.2"
# GHSA advisory: postcss-selector-parser <7.1.6. Pulled in only by
# @tailwindcss/typography (build-time prose selectors), which pins 6.0.10
# exactly and has no upstream bump. The API subset it uses is unchanged in
# v7, so force the patched major.
postcss-selector-parser: '^7.1.6'
postcss-selector-parser: "^7.1.6"
+1 -1
View File
@@ -61,7 +61,7 @@
"enabled": false
},
{
"description": "De pnpm packageManager-pin is afgestemd op Docker en de runner-toolchain; niet automatisch bumpen",
"description": "De pnpm packageManager-pin blijft handmatig: Docker (corepack) en de runner volgen de pin automatisch, maar een bump raakt ook de lockfile en de README-versietabel (scripts/sync-readme-versions.mjs)",
"matchPackageNames": ["pnpm"],
"enabled": false
}
+41 -41
View File
File diff suppressed because it is too large. Load diff
+19 -6
View File
@@ -42,13 +42,10 @@ old_container=""
new_container=""
blue_green=0
# Resource limits voor de container. Zonder deze limieten kan één geheugenlek de
# hele host vullen, met MariaDB, nginx en Traefik als slachtoffer. 2 CPU laat
# achtergrondwerk toe zonder de hele kernel aan één release te geven.
# CPU en pids zijn bewust verwijderd; memory blijft gelimiteerd op 4g/5g swap
# om een geheugenlek niet de host te laten vullen (MariaDB, nginx, Traefik).
mem_limit="4g"
mem_swap_limit="5g"
cpu_limit="2"
pids_limit="512"
is_current() {
local head
@@ -300,7 +297,6 @@ start_candidate() {
done < "$deploy_dir/.env"
docker run -d --name "$name" --restart always --net=host \
--memory="$mem_limit" --memory-swap="$mem_swap_limit" \
--cpus="$cpu_limit" --pids-limit="$pids_limit" \
"${ENV_ARGS[@]}" -e "PORT=$port" -e HOSTNAME=0.0.0.0 \
-v "$deploy_dir/public/nitro-assets:/app/public/nitro-assets" \
-v "$deploy_dir/public/swf:/app/public/swf" \
@@ -416,9 +412,26 @@ pnpm install --frozen-lockfile
pnpm exec playwright install chromium firefox webkit
echo "Building $image"
# Duurzame buildcache buiten de werkboom. De CI-werkboom wordt na elke job
# gewist en `docker builder prune` gooit de buildcache weg, waarna de hele
# pnpm-laag opnieuw gedownload moet worden. Een lokale cache-export overleeft
# allebei. Een lege CMS_BUILD_CACHE_DIR schakelt de cache uit.
build_cache_dir="${CMS_BUILD_CACHE_DIR-/var/cache/epicnext-cms-buildcache}"
build_cache_flags=()
if [ -n "$build_cache_dir" ]; then
if mkdir -p "$build_cache_dir" 2>/dev/null && [ -w "$build_cache_dir" ]; then
build_cache_flags=(
--cache-from "type=local,src=$build_cache_dir"
--cache-to "type=local,dest=$build_cache_dir,mode=max"
)
else
echo "Warning: buildcache $build_cache_dir is niet beschrijfbaar; build zonder hergebruikte cache." >&2
fi
fi
# No --network=host: BuildKit only grants it via --allow=network.host, and the
# build needs nothing but outbound internet (apk, pnpm, next/font/google).
DOCKER_BUILDKIT=1 docker build --progress=plain --cache-from epicnext-cms:latest \
${build_cache_flags[@]+"${build_cache_flags[@]}"} \
--build-arg NEXT_DEPLOYMENT_ID="$sha" -t "$image" .
check_current
# Read reports from the already-built image; do not start an extra application.
+17
View File
@@ -39,6 +39,23 @@ pnpm exec playwright install chromium
export NEWS_E2E_IMAGE="$image"
export NEWS_E2E_RELEASE="$sha"
build_attempted=1
# Duurzame buildcache buiten de tijdelijke werkmap, zodat de lagen van een
# vorige preflight hergebruikt worden in plaats van opnieuw gedownload. Eigen
# map, gescheiden van de release-cache: een branch-preflight mag nooit de cache
# van de release-build voeden. Een lege CMS_BUILD_CACHE_DIR schakelt het uit.
build_cache_dir="${CMS_BUILD_CACHE_DIR-/var/cache/epicnext-cms-preflight-cache}"
build_cache_flags=()
if [ -n "$build_cache_dir" ]; then
if mkdir -p "$build_cache_dir" 2>/dev/null && [ -w "$build_cache_dir" ]; then
build_cache_flags=(
--cache-from "type=local,src=$build_cache_dir"
--cache-to "type=local,dest=$build_cache_dir,mode=max"
)
else
echo "Warning: buildcache $build_cache_dir is niet beschrijfbaar; build zonder hergebruikte cache." >&2
fi
fi
DOCKER_BUILDKIT=1 docker build --progress=plain \
${build_cache_flags[@]+"${build_cache_flags[@]}"} \
--build-arg NEXT_DEPLOYMENT_ID="$sha" -t "$image" .
NEWS_E2E_IMAGE="$image" NEWS_E2E_RELEASE="$sha" node --import tsx e2e/news-real/run.ts
+3 -1
View File
@@ -126,7 +126,9 @@ if [[ -n "${CMS_IMAGE_REPOSITORY:-}" ]]; then
docker tag "$app_reference" "epicnext-cms:$CMS_RELEASE"
docker tag "$remote_migration_image" "$migration_image"
else
docker build --target migrations --build-arg NEXT_DEPLOYMENT_ID="$CMS_RELEASE" -t "$migration_image" . >>"$LOG_FILE" 2>&1
docker build --target migrations --build-arg NEXT_DEPLOYMENT_ID="$CMS_RELEASE" \
--cache-from type=local,src=.docker-cache/cms \
-t "$migration_image" . >>"$LOG_FILE" 2>&1
docker compose build --build-arg NEXT_DEPLOYMENT_ID="$CMS_RELEASE" cms >>"$LOG_FILE" 2>&1
fi
expected_image="$(docker image inspect --format '{{.Id}}' "epicnext-cms:$CMS_RELEASE")"
+15 -4
View File
@@ -78,13 +78,24 @@ else
if install_file "$PROXY_DIR/cms_upstream_servers.conf" "$NGINX_DIR/snippets/cms_upstream_servers.conf"; then changed=1; fi
fi
if [[ ! -f "$NGINX_DIR/sites-enabled/cms.conf" ]]; then
# sites-enabled/cms.conf must be a symlink, not a copy. A regular file here
# silently shadows sites-available/cms.conf, so nginx keeps serving stale
# config even though the sync updated sites-available.
enabled="$NGINX_DIR/sites-enabled/cms.conf"
if [[ -L "$enabled" && "$(readlink "$enabled")" == "../sites-available/cms.conf" ]]; then
echo "= $enabled symlink up to date"
else
if [[ "$MODE" == "check" ]]; then
echo "- sites-enabled/cms.conf missing"
echo "- $enabled is not the expected symlink"
changed=1
else
ln -sf ../sites-available/cms.conf "$NGINX_DIR/sites-enabled/cms.conf"
echo "+ linked sites-enabled/cms.conf"
mkdir -p "$NGINX_DIR/sites-enabled"
if [[ -e "$enabled" || -L "$enabled" ]]; then
mkdir -p "$BACKUP_DIR"
cp -a "$enabled" "$BACKUP_DIR/cms-enabled.conf"
fi
ln -sfn ../sites-available/cms.conf "$enabled"
echo "+ linked $enabled"
changed=1
fi
fi
+5
View File
@@ -2,6 +2,11 @@
"schemaVersion": 1,
"mode": "enforce",
"routes": [
{
"route": "/",
"maxInitialRawBytes": 716800,
"maxInitialGzipBytes": 225280
},
{
"route": "/me",
"maxInitialRawBytes": 716800,
+5 -2
View File
@@ -18,7 +18,7 @@ const hasCompose =
}).status === 0;
it.skipIf(!hasCompose)(
"loads the loopback profile from .env for bare Compose commands without changing mounts or host networking",
"loads the loopback override from .env for the cms service without changing mounts or host networking",
() => {
const directory = mkdtempSync(path.join(tmpdir(), "cms-proxy-config-"));
try {
@@ -50,9 +50,12 @@ it.skipIf(!hasCompose)(
["CMS_RELEASE", "HOSTNAME", "PORT"].includes(key)
)
delete environment[key];
// `cms` is behind the `cms` profile so a bare `docker compose up -d`
// can never squat port 3002 on a CI-managed host. Selecting the
// profile here keeps the loopback/port-override contract under test.
const result = spawnSync(
"docker",
["compose", "config", "--format", "json"],
["compose", "--profile", "cms", "config", "--format", "json"],
{ cwd: directory, env: environment, encoding: "utf8", timeout: 15_000 },
);
expect(result.status, result.stderr).toBe(0);
+18 -3
View File
@@ -118,6 +118,13 @@ systemd_cmd=()
# starten. De markering maakt dat afdwingbaar in next.config.ts.
export CMS_MEMORY_CAPPED=1
# Gebruik hoogstens de helft van de cores, zodat de machine niet op 100% CPU
# piekt, maar behoud voldoende parallelle kracht op (Ryzen) hosts.
cpu_count="$(nproc 2>/dev/null || echo 1)"
worker_cores=$((cpu_count / 2))
[ "$worker_cores" -lt 1 ] && worker_cores=1
cpu_affinity="0-$((worker_cores - 1))"
# Echt proberen, niet alleen uitzoeken of het bestand bestaat: `systemd-run`
# zonder rechten faalt met "Access denied", en dat moet dan een nette
# terugval naar ulimit worden in plaats van een kapotte build.
@@ -174,7 +181,7 @@ run_systemd() {
# expliciet: deze host heeft geen swap.
local high=$((effective * 95 / 100))
echo "[mem-cap] systemd cgroup MemoryHigh=$((high / 1024 / 1024))MB MemoryMax=$((effective / 1024 / 1024))MB MemorySwapMax=0: $*" >&2
exec "${systemd_cmd[@]}" -p "MemoryHigh=$high" -p "MemoryMax=$effective" -p "MemorySwapMax=0" "$@"
exec "${systemd_cmd[@]}" -E "PATH=$PATH" -p "MemoryHigh=$high" -p "MemoryMax=$effective" -p "MemorySwapMax=0" -p "AllowedCPUs=$cpu_affinity" "$@"
}
run_ulimit() {
@@ -186,7 +193,11 @@ run_ulimit() {
echo "[mem-cap] ulimit -v $virtual_kb werd geweigerd" >&2
return 1
}
exec "$@"
if command -v taskset >/dev/null 2>&1; then
exec taskset -c "$cpu_affinity" "$@"
else
exec "$@"
fi
}
run_refuse() {
@@ -197,7 +208,11 @@ run_refuse() {
run_opted_out() {
echo "[mem-cap] WAARSCHUWING: plafond bewust uitgeschakeld, dit commando kan de machine laten OOM-killed worden: $*" >&2
exec "$@"
if command -v taskset >/dev/null 2>&1; then
exec taskset -c "$cpu_affinity" "$@"
else
exec "$@"
fi
}
case "$backend" in
-1
View File
@@ -60,7 +60,6 @@ export async function uploadBadge(formData: FormData): Promise<void> {
try {
const buffer = Buffer.from(await file.arrayBuffer());
const gif = await toBadgeGif(buffer);
// eslint-disable-next-line security/detect-non-literal-fs-filename
await writeFile(target, gif);
} catch {
back("error", "Could not process or write the badge file");
+1 -1
View File
@@ -32,7 +32,7 @@ async function upsertSetting(key: string, value: string): Promise<void> {
.values({
key,
value,
// eslint-disable-next-line security/detect-object-injection -- key is one of 3 known const values
// key is one of 3 known const values
comment: COMMENTS[key] ?? null,
})
.onDuplicateKeyUpdate({ set: { value } });
+2 -2
View File
@@ -71,10 +71,10 @@ export async function savePoints(formData: FormData): Promise<void> {
POINTS_KEYS.map((key) =>
db
.insert(WebsiteSetting)
// eslint-disable-next-line security/detect-object-injection -- key from POINTS_KEYS const
// key from POINTS_KEYS const
.values({ key, value: values[key], comment: "Radio points" })
.onDuplicateKeyUpdate({
// eslint-disable-next-line security/detect-object-injection -- key from POINTS_KEYS const
// key from POINTS_KEYS const
set: { value: values[key] },
}),
),
+1 -1
View File
@@ -112,7 +112,7 @@ export async function saveTheme(formData: FormData): Promise<void> {
export async function applyPreset(formData: FormData): Promise<void> {
const staff = await requirePermission(PERMS.SETTINGS_EDIT);
const name = String(formData.get("preset") ?? "").normalize("NFC");
// eslint-disable-next-line security/detect-object-injection -- guarded by null check below
// guarded by null check below
const preset = PRESETS[name];
if (!preset) redirect("/admin/theme");
+6 -1
View File
@@ -6,6 +6,7 @@ import { redirect } from "next/navigation";
import { env } from "@/env";
import { invalidateLoginCache } from "@/lib/auth/login-core";
import { hashPassword } from "@/lib/auth/password";
import { passwordPolicy } from "@/lib/auth/password-policy";
import { revokeUserCredentials } from "@/lib/auth/session-revocation";
import { db, PasswordReset, User } from "@/lib/db";
import { logger } from "@/lib/logger";
@@ -109,7 +110,11 @@ export async function resetPassword(formData: FormData): Promise<void> {
}
let error: "password" | "invalid" | "failed" | null = null;
if (password.length < 12) error = "password";
if (
password.length < passwordPolicy.minLength ||
password.length > passwordPolicy.maxLength
)
error = "password";
if (!error) {
try {
+10 -4
View File
@@ -5,6 +5,7 @@ import { after } from "next/server";
import { z } from "zod";
import { sendVerification } from "@/lib/auth/email-verification";
import { hashPassword } from "@/lib/auth/password";
import { passwordPolicy } from "@/lib/auth/password-policy";
import { DEFAULT_AVATAR_FIGURE } from "@/lib/avatar-figure";
import { invalidateKey } from "@/lib/cached-db";
import { db, User } from "@/lib/db";
@@ -83,6 +84,11 @@ function hasDisposableEmailDomain(email: string): boolean {
return domain ? DISPOSABLE_EMAIL_DOMAINS.has(domain) : false;
}
// Rendered into the schema below and mapped back to a locale-independent code
// via `ZOD_MESSAGE_CODES`, so the length always reflects the configured policy.
const PASSWORD_MIN_MESSAGE = `Password must be at least ${passwordPolicy.minLength} characters`;
const PASSWORD_MAX_MESSAGE = "Password is too long";
const registerSchema = z
.object({
username: z
@@ -105,8 +111,8 @@ const registerSchema = z
),
password: z
.string()
.min(12, "Password must be at least 12 characters") // Increased min length
.max(128, "Password is too long") // Added max length
.min(passwordPolicy.minLength, PASSWORD_MIN_MESSAGE)
.max(passwordPolicy.maxLength, PASSWORD_MAX_MESSAGE)
.regex(/[A-Z]/, "Password must contain at least one uppercase letter")
.regex(/[a-z]/, "Password must contain at least one lowercase letter")
.regex(/[0-9]/, "Password must contain at least one digit")
@@ -160,8 +166,8 @@ const ZOD_MESSAGE_CODES: Record<string, RegisterErrorCode> = {
"This username is reserved": "usernameReserved",
"Enter a valid email address": "emailValid",
"Temporary email domains are not allowed": "emailDisposable",
"Password must be at least 12 characters": "passwordMinLength",
"Password is too long": "passwordMaxLength",
[PASSWORD_MIN_MESSAGE]: "passwordMinLength",
[PASSWORD_MAX_MESSAGE]: "passwordMaxLength",
"Password must contain at least one uppercase letter": "passwordUpper",
"Password must contain at least one lowercase letter": "passwordLower",
"Password must contain at least one digit": "passwordDigit",
-4
View File
@@ -31,9 +31,7 @@ export async function saveFavicon(
}
const buffer = upload.bytes;
// eslint-disable-next-line security/detect-non-literal-fs-filename
await mkdir(baseDir, { recursive: true });
// eslint-disable-next-line security/detect-non-literal-fs-filename
await writeFile(filePath, buffer);
const url = `/api/media/favicon/${filename}`;
@@ -46,7 +44,6 @@ export async function saveFavicon(
const oldPath = path.resolve(baseDir, oldName);
if (oldPath.startsWith(baseDir + path.sep)) {
try {
// eslint-disable-next-line security/detect-non-literal-fs-filename
await unlink(oldPath);
} catch {
/* ignore if file doesn't exist */
@@ -85,7 +82,6 @@ export async function deleteFavicon(): Promise<{
const oldPath = path.resolve(baseDir, oldName);
if (oldPath.startsWith(baseDir + path.sep)) {
try {
// eslint-disable-next-line security/detect-non-literal-fs-filename
await unlink(oldPath);
} catch {
/* ignore */
-2
View File
@@ -29,9 +29,7 @@ export async function saveLogo(
}
const buffer = upload.bytes;
// eslint-disable-next-line security/detect-non-literal-fs-filename
await mkdir(baseDir, { recursive: true });
// eslint-disable-next-line security/detect-non-literal-fs-filename
await writeFile(filePath, buffer);
const url = `/api/media/logo/${filename}`;
+1 -3
View File
@@ -278,14 +278,12 @@ export async function uploadBackground(formData: FormData): Promise<void> {
let uploaded = false;
try {
// eslint-disable-next-line security/detect-non-literal-fs-filename
await mkdir(MEDIA_ROOT, { recursive: true });
const ext = file.name.split(".").pop() ?? "png";
const name = `${Date.now()}-${Math.random().toString(36).slice(2, 8)}.${ext}`;
const bytes = await file.arrayBuffer();
const filePath = resolveMediaPath(name);
if (filePath.startsWith(MEDIA_ROOT + path.sep)) {
// eslint-disable-next-line security/detect-non-literal-fs-filename
await writeFile(filePath, Buffer.from(bytes));
await writeSetting("background_image", `/api/media/${name}`);
await writeSetting(
@@ -319,7 +317,7 @@ export async function applyPresetManager(formData: FormData): Promise<void> {
const name = String(formData.get("preset") ?? "")
.normalize("NFC")
.trim();
// eslint-disable-next-line security/detect-object-injection -- guarded by null check below
// guarded by null check below
const preset = PRESETS[name];
if (!preset) redirect(MANAGER_PATH);
-1
View File
@@ -142,7 +142,6 @@ export default async function ApplyStaffPage({
<article key={String(position.id)} className="content-card">
<div className="content-card-head">
{team?.badge ? (
/* eslint-disable-next-line @next/next/no-img-element */
<img
src={`${BADGE_IMG_BASE}=${encodeURIComponent(team.badge)}`}
alt={rankName}
-1
View File
@@ -120,7 +120,6 @@ export default async function ApplyTeamPage({
<article key={String(team.id)} className="content-card">
<div className="content-card-head">
{team.badge ? (
/* eslint-disable-next-line @next/next/no-img-element */
<img
src={`${BADGE_IMG_BASE}=${encodeURIComponent(team.badge)}`}
alt={team.rankName}
-1
View File
@@ -48,7 +48,6 @@ export default async function BadgesPage() {
alignItems: "flex-start",
}}
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={`${BADGE_IMG_BASE}=${encodeURIComponent(badge.badgeKey)}`}
alt={badge.badgeName}
-1
View File
@@ -190,7 +190,6 @@ export default async function DrawBadgePage({
{b.badgeUrl ? (
// Badge images are arbitrary external URLs stored by the
// draw-badge tool, so a plain <img> is correct here.
// eslint-disable-next-line @next/next/no-img-element
<img
src={b.badgeUrl}
alt=""
-1
View File
@@ -149,7 +149,6 @@ export default async function GuildPage({
style={{ display: "flex", gap: "1.25rem", alignItems: "flex-start" }}
>
{guild.badge ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={`https://habbo-stories-content.s3.amazonaws.com/badge-part-images/${guild.badge}.gif`}
alt={`${guild.name} badge`}
-1
View File
@@ -74,7 +74,6 @@ export default async function GuildsPage() {
}}
>
{g.badge ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={`https://habbo-stories-content.s3.amazonaws.com/badge-part-images/${g.badge}.gif`}
alt={`${g.name} badge`}
+5 -2
View File
@@ -6,6 +6,7 @@ import { ContentCard } from "@/components/public/ui";
import { SanitizedHtml } from "@/components/shared/sanitized-html";
import { db, WebsiteHelpCenterCategories } from "@/lib/db";
import { resolveHotelName } from "@/lib/hotel-name";
import { publicAssetExists } from "@/lib/public-asset";
import { sanitize } from "@/lib/sanitize";
// Asset path matches AtomCMS's Blade view: asset('/assets/images/help-center/<image_url>').
@@ -99,7 +100,10 @@ export default async function HelpCategoryPage({
const title = withHotel(cat.name, hotelName);
const content = withHotel(cat.content, hotelName);
const buttonText = withHotel(cat.buttonText, hotelName);
const imageSrc = cat.imageUrl ? `${HELP_IMAGE_BASE}/${cat.imageUrl}` : "";
const imageSrc =
cat.imageUrl && publicAssetExists(`${HELP_IMAGE_BASE}/${cat.imageUrl}`)
? `${HELP_IMAGE_BASE}/${cat.imageUrl}`
: "";
const hasButton = Boolean(cat.buttonText && cat.buttonText.trim() !== "");
return (
@@ -110,7 +114,6 @@ export default async function HelpCategoryPage({
<ContentCard icon="❓" title={title} subtitle={t("topicSubtitle")}>
{imageSrc ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={imageSrc}
alt=""
File diff suppressed because it is too large. Load diff
+27 -11
View File
@@ -1,4 +1,5 @@
import dynamic from "next/dynamic";
import { headers } from "next/headers";
import { NextIntlClientProvider } from "next-intl";
import { getLocale, getMessages } from "next-intl/server";
import type { ReactNode } from "react";
@@ -34,28 +35,43 @@ export default async function SiteLayout({
}: {
children: ReactNode;
}) {
const [session, locale, messages] = await Promise.all([
const [session, locale, messages, h] = await Promise.all([
auth(),
getLocale(),
getMessages(),
headers(),
]);
const clientMessages = publicClientMessages(messages);
// The landing pages render their own AuthTopBar (logo + live online), so the
// global site banner / navigation is hidden there to keep them clean and
// avoid showing the same chrome twice. Everything else keeps the chrome.
const pathname = h.get("x-pathname");
const isLandingPage =
pathname === "/" || pathname === "/login" || pathname === "/register";
return (
<NextIntlClientProvider locale={locale} messages={clientMessages}>
<CloudsField />
{/* Site chrome is public: hiding it all for anonymous visitors used to
strand them — from /news, /leaderboard or /shop there was no way to
reach any other page at all. */}
<div data-theme-block="top_header">
<TopHeader session={session} />
</div>
<div data-theme-block="site_header">
<SiteHeader />
</div>
<div data-theme-block="navigation">
<Navigation session={session} />
</div>
reach any other page at all. Only the standalone landing pages opt
out, because they carry their own header. */}
{!isLandingPage && (
<div data-theme-block="top_header">
<TopHeader session={session} />
</div>
)}
{!isLandingPage && (
<div data-theme-block="site_header">
<SiteHeader />
</div>
)}
{!isLandingPage && (
<div data-theme-block="navigation">
<Navigation session={session} />
</div>
)}
<main>
<div
data-theme-block="content_grid"
+1 -1
View File
@@ -171,7 +171,7 @@ export default async function LeaderboardPage({
const rows = await (active === "credits"
? loadCreditsRows()
: active === "diamonds" || active === "duckets"
? // eslint-disable-next-line security/detect-object-injection -- active validated as "diamonds"|"duckets" in this branch
? // active validated as "diamonds"|"duckets" in this branch
loadCurrencyRows(CURRENCY_TYPE[active])
: loadSettingsRows(
SETTINGS_FIELD[active as keyof typeof SETTINGS_FIELD],
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+25
View File
@@ -0,0 +1,25 @@
import { resolveHotelName } from "@/lib/hotel-name";
import { buildNewsRss } from "@/lib/news-rss";
import { appBaseUrl } from "@/lib/seo";
import { getNewsList } from "@/lib/services/news-list";
// Built per request so the feed never needs a database connection during
// `next build`, matching the sitemap and robots routes.
export const dynamic = "force-dynamic";
export async function GET() {
const [hotelName, items] = await Promise.all([
resolveHotelName(),
getNewsList(30),
]);
return new Response(
buildNewsRss(items, { hotelName, appUrl: appBaseUrl() }),
{
headers: {
"Content-Type": "application/rss+xml; charset=utf-8",
"Cache-Control": "public, s-maxage=300, stale-while-revalidate=600",
},
},
);
}
+556 -664
View File
File diff suppressed because it is too large. Load diff
-2
View File
@@ -108,7 +108,6 @@ export default async function RareCategoryPage({
}}
>
{badgeSrc ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={badgeSrc}
alt={`${cat.name} badge`}
@@ -150,7 +149,6 @@ export default async function RareCategoryPage({
<tr key={String(r.id)}>
<td>
{iconSrc ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={iconSrc}
alt=""
-1
View File
@@ -88,7 +88,6 @@ export default async function RareValuesPage() {
>
<div className="content-card-head">
{badgeSrc ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={badgeSrc}
alt={`${c.name} badge`}
File diff suppressed because it is too large. Load diff
+7 -2
View File
@@ -3,6 +3,7 @@ import { getTranslations } from "next-intl/server";
import { resetPassword } from "@/actions/password-reset";
import Link from "@/components/link";
import { ContentCard } from "@/components/public/ui";
import { passwordPolicy } from "@/lib/auth/password-policy";
export async function generateMetadata(): Promise<Metadata> {
const t = await getTranslations("pages.reset");
@@ -41,8 +42,12 @@ export default async function ResetPage({
<input
name="password"
type="password"
placeholder={t("passwordPlaceholder")}
placeholder={t("passwordPlaceholder", {
min: passwordPolicy.minLength,
})}
autoComplete="new-password"
minLength={passwordPolicy.minLength}
maxLength={passwordPolicy.maxLength}
required
/>
<button type="submit" className="btn btn-primary">
@@ -58,7 +63,7 @@ export default async function ResetPage({
marginBottom: 0,
}}
>
{t(errorKey)}
{t(errorKey, { min: passwordPolicy.minLength })}
</p>
) : null}
<p
+1 -1
View File
@@ -16,7 +16,7 @@ const STATE_LABELS: Record<string, { label: string; icon: string }> = {
};
function describeState(state: string): { label: string; icon: string } {
// eslint-disable-next-line security/detect-object-injection -- STATE_LABELS has known keys, fallback provided
// STATE_LABELS has known keys, fallback provided
return STATE_LABELS[state] ?? { label: state || "Unknown", icon: "🚪" };
}
-1
View File
@@ -249,7 +249,6 @@ export default async function ShopPage({
}}
>
{a.iconUrl ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={a.iconUrl}
alt=""
-1
View File
@@ -366,7 +366,6 @@ async function ProfilePage({
flexWrap: "wrap",
}}
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<ProfileImage
src={avatar}
alt={user.username}
+11 -1
View File
@@ -1,4 +1,6 @@
import { notFound } from "next/navigation";
import { NextIntlClientProvider } from "next-intl";
import { getLocale, getMessages } from "next-intl/server";
import type { ReactNode } from "react";
import { env } from "@/env";
import { isHousekeepingPreviewEnabled } from "@/features/housekeeping/foundation/preview-gate";
@@ -27,5 +29,13 @@ export default async function AdminNextLayout({
notFound();
}
return children;
// Staff tree: re-install the full catalogue the root layout scopes down to
// the public subset (nested providers replace the parent set).
const [locale, messages] = await Promise.all([getLocale(), getMessages()]);
return (
<NextIntlClientProvider locale={locale} messages={messages}>
{children}
</NextIntlClientProvider>
);
}
-1
View File
@@ -49,7 +49,6 @@ export function AdsTable({ ads }: { ads: AdRow[] }) {
{ads.map((ad) => (
<tr key={ad.id}>
<td>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={ad.image}
alt=""
-1
View File
@@ -103,7 +103,6 @@ export default async function AdminCalendarCampaign({
<div className="admin-card flex items-center gap-5 mb-6">
{campaign.image ? (
// eslint-disable-next-line @next/next/no-img-element
<img
className="w-24 h-24 object-cover"
src={campaign.image}
-1
View File
@@ -98,7 +98,6 @@ export default async function AdminCalendar() {
className="admin-card hover article"
>
{c.image ? (
// eslint-disable-next-line @next/next/no-img-element
<img className="article-img" src={c.image} alt={c.name} />
) : (
<div className="article-img" />
+1 -1
View File
@@ -87,7 +87,7 @@ export default async function AdminAntiDdosPage() {
const ip = key.replace("antiddos:block:", "");
return {
ip,
ttlMs: ttlMs > 0 ? ttlMs : 0,
ttlMs: Math.max(ttlMs, 0),
count: violationCounts.get(ip) ?? 0,
source: "gate" as const,
};
-1
View File
@@ -96,7 +96,6 @@ export default async function AdminGuildDetailPage({
<div className="flex flex-wrap items-start justify-between gap-4">
<div className="flex items-center gap-4">
{guild.badge ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={`https://habbo-stories-content.s3.amazonaws.com/badge-part-images/${guild.badge}.gif`}
alt=""
-1
View File
@@ -155,7 +155,6 @@ export default async function AdminGuildsPage({
<td className="muted">{g.id}</td>
<td>
{g.badge ? (
// eslint-disable-next-line @next/next/no-img-element
<img
src={`https://habbo-stories-content.s3.amazonaws.com/badge-part-images/${g.badge}.gif`}
alt=""
+9 -3
View File
@@ -1,7 +1,8 @@
import { eq } from "drizzle-orm";
import { LogOut } from "lucide-react";
import { redirect } from "next/navigation";
import { getTranslations } from "next-intl/server";
import { NextIntlClientProvider } from "next-intl";
import { getLocale, getMessages, getTranslations } from "next-intl/server";
import type { ReactNode } from "react";
import { AdminHubChrome } from "@/components/admin/admin-hub-chrome";
import { AdminMobileWrapper } from "@/components/admin/admin-mobile-wrapper";
@@ -40,8 +41,13 @@ export default async function AdminLayout({
if (!u?.twoFactorConfirmedAt) redirect("/settings/2fa?error=staffrequired");
}
// The root layout ships the reduced catalogue so public pages do not carry
// the ~195 KB of staff-tool strings. Nested providers replace the parent
// set rather than merging, so staff route groups re-install the full one.
const [locale, messages] = await Promise.all([getLocale(), getMessages()]);
return (
<>
<NextIntlClientProvider locale={locale} messages={messages}>
{csrfToken ? <meta name="csrf-token" content={csrfToken} /> : null}
<AdminMobileWrapper sidebar={<Sidebar staff={staff} />}>
<div
@@ -56,7 +62,7 @@ export default async function AdminLayout({
</div>
</AdminMobileWrapper>
<AdminToaster />
</>
</NextIntlClientProvider>
);
}
Loaded 100 of 207 files, more files were not shown because too many files have changed in this diff. Show more