Files
EpicNext-Cms/src/components/admin/studio
openhands 7b249a7222
CI / check (push) Canceled after 0s
CI / tests-unit (push) Canceled after 0s
CI / tests-integration (push) Canceled after 0s
CI / tests-ui (push) Canceled after 0s
CI / preflight (push) Canceled after 0s
CI / deploy (push) Canceled after 0s
Gitea Runner Clean Test / test-job (push) Canceled after 0s
Gitea Actions Runner Test / test-job (push) Canceled after 0s
P1-P3 admin cleanup: rank guard, SSRF guard, count caching, dead code removal, pagination rewrite
- P1: new src/lib/admin/rank-guard.ts with tryGuardRank/guardRank + RankGuardTarget/Result; extracted from users.ts; applied to admin-bans (create/lift + rank redirect) and admin-badges (caps + rank guard + error surfacing); import-url-safety.ts SSRF guard wired into clone save+icon fetch; logAudit await in help-tickets; antiddos mutations SETTINGS_EDIT; markAllAlertsRead NOTIFICATIONS_EDIT; rankError/saveError in all 25 message files; tests rew/new for bans/badges/rank-guard/import-url-safety

- P2: ticket-inbox merged pagination reworked to single UNION ALL SQL with LIMIT/OFFSET (avoids O(offset) materialization); getCachedAdminCount with cacheFiltered option applied to devops/errors/photos/items/guilds/help-tickets/moderation pages; admin-theme catches→?error=1+banner+25 locales; logger in silent catches (rare-values/writeable-boxes); catalog-items-loader CAST→plain equality; count caching helper extended with opt-in cacheFiltered

- P3: removed dead modules is-staff/notice/recent-furni-resync/log-filters plus load-user-sanctions/user-sanction-timeline; removed orphaned CATALOG_PAGE_COLUMNS re-export; removed getFurniIconUrl from studio-furni-icons

Build: lint 0, typecheck 0, 3480 tests pass, i18n:check exit 0, colors exit 0. Circular chunk warning (9452/10535/66463) is webpack code-splitting artifact; build succeeds.
2026-10-12 17:42:19 +02:00
..

Catalog Studio code map

studio-client.tsx composes the workspace, selection and actions. Keep reusable data handling outside its render tree.

Client responsibilities

  • studio-filters.ts: pure filtering and sorting of the loaded furniture list; never mutates the input array.
  • use-studio-translations.ts: language selection, persisted defaults and translation requests.
  • use-furniture-jobs.ts: queue submission, retry identity, polling and completion notifications.
  • furniture-jobs.tsx: job history and retry controls.
  • use-furniture-inspection.ts: cancellable inspection requests and explicit rechecks.
  • furniture-inspector.tsx: local component status, source comparison and repair controls.
  • import-review.tsx: import review, actionable review groups and attachment confirmation.
  • import-recommendation.ts: completion, conflict and verification recommendations from inspected component evidence.
  • studio-types.ts: shared client data types.

Server responsibilities

  • src/lib/services/furniture-inspection.ts: reads SQL, catalog offers, furnidata and asset presence.
  • src/lib/furni/studio-inspection.ts: shared validation, comparison and completeness classification.
  • src/lib/services/furniture-repair.ts: preflight, preservation options and post-repair verification.
  • src/lib/services/furni-job-worker.ts: durable queued work and per-item results.

Keep client modules free of filesystem/database imports. Background refreshes must not reset open editors or unsaved input. Completion status must come from verification, not optimistic UI flags.

Detail navigation keeps the mounted workspace state and restores the list scroll position and originating control on close. Escape closes an open detail before clearing selection. Furniture responses must belong to the latest list request; source changes invalidate pending detail, review and delete state. Selection is never persisted outside the mounted workspace.