refactor(catalog): separate Studio data hooks and presentation
This commit is contained in:
1 parent
570f3dde44
commit
3ae4f21217
9 files changed
+348
-263
No files matched your search
@@ -0,0 +1,23 @@
|
||||
# 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 and attachment confirmation.
|
||||
- `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.
|
||||
Reference in new issue
Block a user