thumb / image fields (e.g. inspector list, scheduling, emails).thumb (not image), and a useEffect can reset state from stale server data after cache revalidation.POST /inspector/sync-inspectors) and manual Spectora re-sync (ResyncSpectoraModal) can overwrite image / thumb from Spectora, reverting manual uploads.Frontend (attik-frontend)
src/app/tools/settings/inspectors/[id]/InspectorForm.tsx — ProfilePicUploader with handleImageUpload PATCHes inspector/{id} with { image: file.url, thumb: file.preview }; on success shows toast and setData({ ...data, thumb: file.preview }) only (no router.refresh(), image not updated locally).src/components/ui/ProfilePicUploader.tsx — FilePond uploads via callServerAction → POST files with path: profile-pic; calls handleUpload(resp) without awaiting before closing the editor.src/util/functions/fetching/callServerAction.ts — revalidate uses path /settings/inspectors (other settings forms use /tools/settings/...).src/app/tools/settings/office/[id]/OfficeForm.tsx — likely same class of bug if fix is shared.src/app/tools/settings/ResyncSpectoraModal.tsx and DataForm.tsx handleResync can overwrite profile image from Spectora.Backend (attik-backend)
src/routes/files.ts — POST /files with multipart, path: profile-pic → S3 upload + thumbnail preview URL in response.src/routes/inspector.ts — PATCH /:id saves any defined schema fields including image and thumb.POST /sync-inspectors in same file always sets image and thumb from Spectora on findOneAndUpdate.src/models/inspectorSchema.ts — image and thumb are string fields.Out of scope (unless repro proves otherwise)
ContactForm.tsx).attik-frontend/src/app/tools/settings/inspectors/[id]/InspectorForm.tsxattik-backend/src/routes/files.ts, attik-backend/src/routes/inspector.ts_specId, should a manually uploaded Attik profile photo override Spectora's image / thumb until explicitly re-synced, or should Spectora remain authoritative and Attik uploads be blocked/warned for linked inspectors?ResyncSpectoraModal) and bulk sync (POST /inspector/sync-inspectors) skip image / thumb when Attik has a custom upload, or continue overwriting (current behavior)?OfficeForm.tsx uses the same ProfilePicUploader pattern), or is this ticket inspectors-only?Please authenticate to join the conversation.
Planned
Main App
2 days ago
Linear
Get notified by email when there are changes.
Planned
Main App
2 days ago
Linear
Get notified by email when there are changes.