Commit Graph
1788 Commits
Author SHA1 Message Date
openhands 2e25b39364 refactor(auth): single digest registry, extracted 2FA and login-log, dep bumps
- password.ts: derive plain and salted digest detection from one DIGEST_SCHEMES
  table instead of parallel hardcoded lists, so adding a family is one row.
- auth.ts: move 2FA challenge verification into twofactor-verification.ts and
  the website login-log insert into website-login-log.ts, slimming the
  NextAuth provider to orchestration only.
- deps: bump @formatjs/icu-messageformat-parser, @tanstack/react-query, jszip,
  lucide-react, motion (patch/minor only). @types/react stay pinned per
  pnpm-workspace.yaml; next-auth is already at the newest available (v5 beta).
2026-09-17 15:26:25 +02:00
openhands 5d7c9fccdc feat(auth): support combined and salted digest schemes from any CMS
Expand checkLogin to auto-detect and migrate every common retro CMS password
format to bcrypt on login:
- combined digests: md5(md5(pass)), md5(sha1(pass)), sha1(md5(pass)),
  double sha1/sha256/sha512 and md5<->sha256/sha512 combinations
- salted digests of all families (md5/sha1/sha256/sha512) with embedded
  salt using : $ @ _ separators, verifying both salt+pass and pass+salt
- plaintext fallback stays as the final catch-all

All formats verified on login and rewritten to bcrypt, so accounts work
whenever they come from any legacy CMS.
2026-09-17 15:10:15 +02:00
openhands 2c0439db6a refactor(auth): remove obsolete CONVERT_PASSWORDS env var
Legacy md5/argon2id hashes are now always upgraded to bcrypt on login, so
the CONVERT_PASSWORDS flag is no longer used. Drop it from env schema,
.env.example, the docker installer, and test mocks.
2026-09-17 15:01:23 +02:00
openhands e153300da0 feat(auth): auto-upgrade every legacy password format to bcrypt on login
checkLogin now verifies and migrates all known password formats without
configuration: bcrypt, argon2id/argon2i/argon2d, unsalted md5/sha1/sha256/
sha512, double-md5 (UberCMS/Butterfly), salted md5 with embedded salt
(hash:salt, salt:hash, hash$salt), and a guarded plaintext fallback.

Every successful legacy login rewrites the stored hash to bcrypt, so the
CONVERT_PASSWORDS flag is no longer required (kept for deploy compatibility).
2026-09-17 14:56:31 +02:00
openhands 905573e627 fix(ci): realign pnpm lockfile with pinned @types/react versions
The deps update bumped react to 19.3.0 but left the lockfile resolving
@types/react to 19.3.0 while package.json and pnpm-workspace.yaml pin
19.2.18/19.2.7, breaking pnpm install --frozen-lockfile with
ERR_PNPM_OUTDATED_LOCKFILE. Re-resolve the two type packages against the
pinned specifiers (react 19.3.0 unchanged).
2026-09-16 19:56:48 +02:00
openhands 5b4b275b2a feat(housekeeping): add per-hotel theme manager with import/export and background
Theme Manager under /admin-next/hotel/theme-manager lets the owner save, apply, rename, delete, import, and export custom themes, plus set a custom site background by URL or upload. Themes are stored in WebsiteSetting/custom_themes JSON so they survive CMS updates.
2026-09-16 19:45:57 +02:00
openhands 55c13b533c chore(deps): update patch+minor dependencies
Non-breaking updates across prod + dev deps after a pnpm typecheck + full
test run (45 tests green, tsc clean):

- react/react-dom 19.2.8 -> 19.3.0, @types/react(-dom) 19.3.0
- @tanstack/react-query 5.102.8 -> 5.103.0, react-virtual 3.14.13
- lucide-react 1.41.0 -> 1.46.0, motion 13.3.0, tailwind-merge 3.7.0
- isomorphic-dompurify 4.2.0, next-intl 4.14.5, react-hook-form 7.88.0
- mysql2 3.24.4, resend 6.28.1, tinymce 8.9.1, zod 4.6.5
- @biomejs/biome 2.5.14, @playwright/test 1.63.0, vitest 5.0.1

Deliberately kept pinned (breaking): @babel/parser 7.x (8 is a major),
next-auth stays on v5-beta (4.24.15 is the v4 line).
2026-09-16 15:57:07 +02:00
openhands 3d7278e96d perf(studio): header-only nitro validation for fake/broken scan
The cleanup scan used to read every .nitro bundle in full and decompress
the large PNG texture just to confirm the file is structurally valid. On
directories with hundreds of thousands of bundles this took minutes, the
reverse proxy cut the request at its 30s timeoutable with an HTML 504, and
the panel then crashed with "Unexpected token '<'".

Validate bundles with a cheap header-only read (a few KB, no decompression)
that mirrors parseNitroBundle's byte layout; only files whose header looks
suspicious get the expensive full parse. Robust against downloads that
landed as an HTML error page, truncated or zero-filled files. The scan
drops from minutes to seconds on large nitro directories.

Also guard the panel against non-JSON (proxy error page / HTML) responses
so it reports a clear error message instead of a JSON parse failure.
2026-09-16 15:50:04 +02:00
openhands 438277a17a feat(studio): expand nitro cleanup with repair, auto-clean, and orphaned assets
Scan distinguishes fake, broken, and orphaned SWF/icon assets with age
metadata, deletes per asset kind, re-downloads broken nitro bundles from
configured sources, auto-cleans old fake leftovers, and exports a JSON
manifest. Adds rebuild and auto-clean API endpoints with audit coverage
and a housekeeping preview route under the hotel domain.

Verified: full vitest suite (2213 tests), typecheck, and biome all pass.
2026-09-15 21:59:21 +02:00
openhands ea4fd375b4 test(housekeeping): cover nitro cleanup page in migration matrix 2026-09-15 21:32:14 +02:00
openhands 694f87d98c feat(studio): add nitro cleanup tool for fake and broken bundles 2026-09-15 20:54:10 +02:00
openhands ce93b92a81 fix(avatar): render onError avatars only in client components
AvatarImage is used on server pages via UserAvatarThumbnail but lacked
'use client', so the onError handler on its <img> could not cross the
RSC boundary. /login rendered the error page, hanging the news e2e
journey until the 240s test timeout.

- Mark AvatarImage as a client component like ProfileImage
- Replace inline <img onError> on mod/users server pages with the
  client AvatarImage component
2026-09-15 11:43:47 +02:00
openhands faa37e7c58 fix(ci): restore preflight image cleanup marker and remove obsolete publish-container tests
- Restore build_attempted=1 in ci-preflight.sh so the exit trap
  removes the temporary image tag
- Remove publish-container.test.ts and its harness (publication
  workflow and script were removed in fff284aa)
- Update deploy-workflow-contract and docker-build-contract tests
  to assert that publication has been removed
2026-09-15 11:29:20 +02:00
openhands da90b90c97 fix(ci): guard browser context cleanup and export news e2e env before build 2026-09-15 11:21:08 +02:00
Simo fff284aaa0 ci: remove container publication workflows 2026-09-14 21:28:21 +02:00
openhands cfb4c36569 Fix: increase e2e test timeout for news real suite 2026-09-14 19:56:30 +02:00
openhands ffd68e604a Fix: e2e test for organize imports dialog by updating item mock data 2026-09-14 19:38:01 +02:00
openhands 0f01ebf48b Organize imports: persist undo across sessions, translate UI to 23 languages 2026-09-14 19:07:56 +02:00
openhands 3a4089a5fa Organize imports: drag & drop, virtualization, dupes, undo, days select, localStorage
- Native HTML5 drag & drop between categories with drop-target highlight
- Virtualized item lists via @tanstack/react-virtual (fixed 34px rows)
- Auto-batching of large groups (500 items / 50 groups per run)
- Duplicate detection against the destination page with badge + summary
- Per-category layout preview grid
- Undo history for item moves (single + batch, tracks source groups)
- Days-range selector to load older imports (30/60/90/180)
- LocalStorage persistence of user settings (mode, destination, price, days)
- Added translation keys across all 25 locales
2026-09-14 18:40:50 +02:00
openhands 644d53ca16 Rebuild organize imports: move furniture between categories, 500-item cap 2026-09-14 18:24:48 +02:00
openhands 67430e7e9d Polish catalog studio: undo delete, save status pill, faster totals 2026-09-14 18:24:47 +02:00
openhands 6e0ffff94b Restore docker-prune retention windows to match deploy contract 2026-09-14 17:55:28 +02:00
openhands 6ea0ec7d99 Resolve remaining biome lint and formatting errors 2026-09-14 17:43:54 +02:00
openhands 1df1ffc3e9 Make avatar imager resilient with upstream fallback everywhere 2026-09-14 17:35:36 +02:00
openhands 1bbd809b43 Replace standalone catalog editor with the unified Visual Catalog studio
Make /admin/catalog a full-screen catalog studio that replaces the old
listing plus separate [id]/builder-club detail pages:

- Embed CatalogManagerWorkspace on /admin/catalog with a Normal/Builder
  Club toggle, Catalog Sync status, packages (normal), Organize imports
  and a diagnostics link to /admin/studio/maintenance.
- Manage BC items directly in the studio Items tab (new BcItemsEditor,
  CRUD via existing bc actions; /api/admin/catalog/items now serves BC).
- Inline editor: add pageTextTeaser field for both catalogs and remove
  the legacy full-editor links.
- Remove the 'Open full editor' context action from the tree.
- Move catalog-items-table (dir + barrel) and catalog-translate-tab out
  of the app route into src/components/admin/catalog and update all
  importers.
- Keep /admin/catalog/[id], builder-club/[id] and /admin/catalog/maintenance
  as redirects into the new studio; consolidate maintenance panels into
  /admin/studio/maintenance and point the nav item there.
- Delete the old listing/table/tabs/forms and the standalone bc-manager.
2026-09-14 17:20:52 +02:00
openhands 1a9e1e791a Improve catalog studio UX and aggressive docker cleanup
Catalog Studio:
- Cross-parent drag & drop now uses optimistic updates with rollback
  on failure (no more full tree reload / visible delay)
- Subpage creation adds the node optimistically then refreshes parent
  only (was full tree reload)
- Single page deletion refreshes only the affected parent (was full
  tree reload)
- Root page creation replaces native prompt() with an inline input
  in the root tab bar
- Escape key no longer closes the dialog when an input field is focused
- TreeNodeUpdate type now supports parentId and orderNum for
  optimistic structural changes

Docker:
- docker-prune.sh default mode now aggressively cleans all unreferenced
  build cache, images >1h old, and stopped containers >1h old
  (was 72h/7d/24h which let cache grow past 80% on every push)
2026-09-14 16:52:04 +02:00
Simo 349188af10 Merge remote-tracking branch 'origin/main' into codex/news-ci-preflight 2026-09-13 21:27:05 +02:00
openhands d4e4711a77 feat: add gitlab-ci, logrotate setup and deploy alerts 2026-09-13 21:17:04 +02:00
openhands b688760309 feat: add documentation, alerts, cron setup and update dashboard 2026-09-13 21:16:08 +02:00
openhands bd977da3a5 feat: add db-restore, maintenance, doctor scripts and update dashboard 2026-09-13 21:15:14 +02:00
openhands a605807c69 feat: add perf-report, setup-dev, check-updates and update dashboard 2026-09-13 21:14:26 +02:00
openhands 636fde523f feat: add dashboard, security-scan, and monitor scripts 2026-09-13 21:13:36 +02:00
openhands f2b64bc83a feat: add verify-deploy, check-env, and db-optimize helper scripts 2026-09-13 21:12:50 +02:00
openhands 7840f44e5e feat: add logs.sh and backup.sh helper scripts 2026-09-13 21:11:05 +02:00
openhands 9ef7c6393d feat: add deploy.sh for robust container deployment 2026-09-13 21:09:16 +02:00
openhands b234a51aea chore: add stop_grace_period to cms service for reliable rebuilds 2026-09-13 21:06:57 +02:00
Simo 33a760ab6b ci: verify isolated Docker news journeys before merging to main 2026-09-13 21:05:02 +02:00
Simo 043c763484 test(news): respect sandboxed preview focus and browser isolation 2026-09-13 20:48:26 +02:00
Simo 46f7ad6571 feat(ops): add integrity-checked backups and isolated restore drills 2026-09-13 20:29:18 +02:00
Simo 7867bf6b72 test(news): gate deployment on an isolated real browser publication journey 2026-09-13 20:27:04 +02:00
Simo 60e49c1ec9 feat(hk): connect delivery failures to precise diagnostic records 2026-09-13 20:25:03 +02:00
Simo 275a574203 fix(news): retry rolled-back scheduled publication deadlocks 2026-09-13 20:23:29 +02:00
Simo 9a2d73a6f6 feat(docker): provide verified-header proxy profiles for self-hosted clones 2026-09-13 20:15:10 +02:00
Simo fe34d4ac93 fix(news): enforce shared comment publication and moderation rules 2026-09-13 20:14:32 +02:00
Simo 8aefb415b6 fix(ci): isolate session runtime from database integration tests 2026-09-13 19:47:16 +02:00
Simo c5c9941768 feat(hk): explain background updates with protected content links and retry details 2026-09-13 19:41:25 +02:00
Simo dd7613850e perf(studio): load import organization tools on demand 2026-09-13 19:32:46 +02:00
Simo f7b9b55700 fix(news): preserve recoverable reads and verify publication against real services 2026-09-13 19:31:32 +02:00
Simo 8abfe352ef fix(security): authorize site uploads and harden tokens, media and request identity 2026-09-13 19:24:43 +02:00
Simo 52f6d1491f fix(news): persist publication requests and retry cache delivery 2026-09-13 18:33:45 +02:00