strapi-content-sync-pro 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +65 -18
  2. package/admin/src/components/ConfigTab.jsx +25 -4
  3. package/admin/src/components/HelpTab.jsx +88 -11
  4. package/admin/src/components/MediaTab.jsx +7 -0
  5. package/admin/src/components/StatsTab.jsx +470 -0
  6. package/admin/src/components/SyncProfilesTab.jsx +63 -5
  7. package/admin/src/components/SyncTab.jsx +51 -7
  8. package/admin/src/pages/App/index.jsx +3 -0
  9. package/docs/clipchamp-screen-recording-script.md +0 -0
  10. package/docs/production-readiness-status.md +34 -0
  11. package/docs/production-readiness-test-matrix.md +151 -0
  12. package/docs/test-environments-setup-legacy.txt +60 -0
  13. package/package.json +1 -1
  14. package/server/src/content-types/index.js +2 -0
  15. package/server/src/content-types/sync-run-report/schema.json +26 -0
  16. package/server/src/controllers/config.js +48 -5
  17. package/server/src/controllers/index.js +2 -0
  18. package/server/src/controllers/sync-log.js +6 -0
  19. package/server/src/controllers/sync-media.js +19 -0
  20. package/server/src/controllers/sync-stats.js +51 -0
  21. package/server/src/controllers/sync.js +9 -3
  22. package/server/src/routes/index.js +13 -0
  23. package/server/src/services/config.js +18 -2
  24. package/server/src/services/index.js +2 -0
  25. package/server/src/services/sync-execution.js +102 -5
  26. package/server/src/services/sync-log.js +36 -0
  27. package/server/src/services/sync-media.js +224 -1
  28. package/server/src/services/sync-profiles.js +92 -4
  29. package/server/src/services/sync-stats.js +353 -0
  30. package/server/src/services/sync.js +186 -100
  31. package/server/src/utils/applier.js +120 -13
  32. package/server/src/utils/comparator.js +22 -6
  33. package/server/src/utils/fetcher.js +11 -2
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Content Sync Pro Plugin for Strapi
1
+ # Content Sync Pro Plugin for Strapi
2
2
 
3
3
  <p align="center">
4
4
  <img src="https://raw.githubusercontent.com/eharain/strapi-content-sync-pro/master/docs/logo-horizontal.svg" alt="Content Sync Pro" width="720" />
@@ -14,7 +14,7 @@ A powerful Strapi v5 plugin to copy, migrate, and live-sync content, media, and
14
14
  Plugin intro: https://youtu.be/hr3dD6dLgLQ
15
15
 
16
16
  <a href="https://youtu.be/hr3dD6dLgLQ" target="_blank" rel="noopener noreferrer">
17
- <img src="https://raw.githubusercontent.com/eharain/strapi-content-sync-pro/master/docs/Screenshot%202026-04-20%20160506.png" alt="Content Sync Pro watch the intro video" width="100%" />
17
+ <img src="https://raw.githubusercontent.com/eharain/strapi-content-sync-pro/master/docs/Screenshot%202026-04-20%20160506.png" alt="Content Sync Pro watch the intro video" width="100%" />
18
18
  </a>
19
19
 
20
20
  ## Screenshots
@@ -50,14 +50,17 @@ Plugin intro: https://youtu.be/hr3dD6dLgLQ
50
50
 
51
51
  ## Features
52
52
 
53
- - **Bi-directional Content Sync** - Push, pull, or sync both ways (Local wins, Remote wins, or Latest wins).
53
+ - **Deployment Modes** - Paired mode (plugin on both servers) or Single-side mode (plugin only on local server).
54
+ - **Bi-directional Content Sync** - Push, pull, or sync both ways (Local wins, Remote wins, or Latest wins) in paired mode.
54
55
  - **Media Sync** - Full media synchronization via HTTP (URL-based) or host-level file copy (`rsync`). Includes MIME type filtering and concurrency controls.
55
56
  - **Sync Profiles** - Define WHAT to sync with field-level control (Advanced mode) or preset modes.
56
- - **Execution Modes** - On-demand, Scheduled (interval, timeout, cron, or external scheduler), or Live (real-time) sync.
57
+ - **Execution Modes** - On-demand, Scheduled (interval, timeout, cron, or external scheduler), Live (real-time), with per-profile execution controls.
57
58
  - **Pagination & Large Dataset Support** - Built-in pagination ensures stable memory usage even when syncing thousands of records.
58
59
  - **Dependency Analytics** - Automatically detects and syncs related entities and components in the correct order.
59
60
  - **Enforcement Checks** - Pre-sync schema compatibility validation, version checks, and server time drift checks.
60
61
  - **Alerts & Logging** - Detailed sync logs. Receive success/failure alerts via Email (using Strapi's email provider) or Webhooks.
62
+ - **Stats & Run Reports** - Local/remote counts and newest timestamps per content type, with before/after snapshots for each sync run.
63
+ - **Retention Controls** - Manual clear and automatic retention limits for logs and run reports.
61
64
  - **Secure Communication** - API token authentication combined with HMAC-SHA256 request signing using a shared secret.
62
65
 
63
66
  ## Prerequisites
@@ -110,14 +113,23 @@ npm run develop
110
113
 
111
114
  ## Quick Start
112
115
 
113
- ### Step 1: Configure Connection
114
- In the **Configuration** tab, set up the remote server connection.
116
+ ### Step 1: Choose Deployment Mode and Configure Connection
117
+ In **Configuration**, choose one mode:
118
+ - **Paired**: install and enable plugin on both local and remote servers.
119
+ - **Single-side**: install plugin only on local server (remote plugin routes not required).
120
+
121
+ Then configure Base URL, API Token, Instance ID, and Shared Secret.
115
122
 
116
123
  ### Step 2: Enable Content Types
117
124
  In the **Content Types** tab, toggle on the content types you want to sync. Default profiles are auto-generated.
118
125
 
119
- ### Step 3: Run Sync
120
- In the **Sync** tab, click "Sync All Active Profiles" or run individual profiles.
126
+ ### Step 3: Align Sync Settings on Both Servers
127
+ In **Content Types**, enable matching content types on both servers.
128
+ In **Sync Profiles**, set compatible direction/conflict strategy.
129
+ Then in **Sync**, configure execution mode and global page size.
130
+
131
+ ### Step 4: Run Sync
132
+ In the **Sync** tab, click **Sync All Active Profiles** or run individual profiles.
121
133
 
122
134
  ## Sync Profiles
123
135
 
@@ -135,6 +147,20 @@ Configure individual field policies:
135
147
  - **Pull** - Field only pulls from remote
136
148
  - **Exclude** - Field is never synced
137
149
 
150
+ ## Deployment Modes
151
+
152
+ ### Paired mode
153
+ - Plugin installed on both local and remote servers.
154
+ - Supports push, pull, and bidirectional profiles.
155
+ - Supports on-demand, scheduled, and live execution modes.
156
+ - Connection test validates remote plugin endpoints.
157
+
158
+ ### Single-side mode
159
+ - Plugin installed on local server only.
160
+ - Pull-only profiles are enforced.
161
+ - Live execution is disabled (use on-demand or scheduled).
162
+ - Connection test validates remote reachability and API token access without requiring remote plugin routes.
163
+
138
164
  ## Execution Modes
139
165
 
140
166
  Configure **when** sync runs in the Sync tab:
@@ -158,14 +184,15 @@ Configure **when** sync runs in the Sync tab:
158
184
 
159
185
  Full media synchronization between Strapi instances:
160
186
 
161
- - **URL Strategy** (HTTP) Works with any upload provider (local, S3, Cloudinary). Downloads and re-uploads via the Upload API.
162
- - **rsync Strategy** Host-level file copy using the `rsync` binary. Fastest for local-provider setups with SSH access.
163
- - **Profile-based** Create media sync profiles with direction, conflict strategy, MIME filters, filename patterns, and execution settings.
164
- - **DB + File Sync** Syncs both the `plugin::upload.file` database rows and the actual file bytes.
187
+ - **URL Strategy** (HTTP) Works with any upload provider (local, S3, Cloudinary). Downloads and re-uploads via the Upload API.
188
+ - **rsync Strategy** Host-level file copy using the `rsync` binary. Fastest for local-provider setups with SSH access.
189
+ - **Profile-based** Create media sync profiles with direction, conflict strategy, MIME filters, filename patterns, and execution settings.
190
+ - **DB + File Sync** Syncs both the `plugin::upload.file` database rows and the actual file bytes.
191
+ - **Morph Link Remapping** — Syncs `files_related_morphs` links by mapping file + related entities through documentId, then remapping to local numeric ids before insert.
165
192
 
166
193
  ## Enforcement
167
194
 
168
- Pre-sync validation (Configuration ? Enforcement):
195
+ Pre-sync validation (Configuration Enforcement):
169
196
 
170
197
  - **Schema Match** - Verify content type schemas match (strict/compatible/none)
171
198
  - **Version Check** - Verify Strapi versions (exact/minor/major/none)
@@ -173,7 +200,7 @@ Pre-sync validation (Configuration ? Enforcement):
173
200
 
174
201
  ## Alerts
175
202
 
176
- Get notified of sync events (Configuration ? Alerts):
203
+ Get notified of sync events (Configuration Alerts):
177
204
 
178
205
  - **Strapi Logs** - Logs to sync log and server console
179
206
  - **Email** - Requires Strapi email plugin configured
@@ -215,6 +242,24 @@ Sync products from a central catalog to multiple storefronts:
215
242
  - Create "Full Pull" profile for `api::product.product`
216
243
  - Set execution mode to "Scheduled" (every 5 minutes)
217
244
 
245
+ ## Stats & Data Management
246
+
247
+ The **Stats** tab is split into two sub-tabs:
248
+
249
+ **Current Snapshot** — live local vs remote state per content type:
250
+ - Local vs remote record count
251
+ - Media files and media morph stats (local, plus remote where available)
252
+ - Newest record timestamp on each side and which side is newest (local, remote, equal)
253
+ - Search by UID, filter by type (content / media / media morph) or newest side, and paginate large result sets
254
+
255
+ **Run Reports** — before/after snapshots captured for each sync run:
256
+ - Filter by status (all / success / failed) and paginate server-side
257
+ - Expand any report to see the before and after row tables
258
+
259
+ A top action row (shared by both sub-tabs) provides:
260
+ - **Refresh Stats**, **Clear Logs**, **Clear Stats Reports**
261
+ - **Max Logs** / **Max Reports** retention limits with **Save & Apply Retention** (also enforced automatically after each sync run)
262
+
218
263
  ## Troubleshooting
219
264
 
220
265
  ### Common Issues
@@ -222,8 +267,10 @@ Sync products from a central catalog to multiple storefronts:
222
267
  | Error | Solution |
223
268
  |-------|----------|
224
269
  | "Remote server not configured" | Add Base URL and API Token in Configuration |
225
- | "401 Unauthorized" | Regenerate API token on remote server |
226
- | "HMAC verification failed" | Ensure shared secret matches on both instances |
270
+ | "401 Unauthorized / 403 Forbidden" | Regenerate API token and verify required permissions for synced content types (and Upload permissions for media) |
271
+ | "HMAC verification failed" | Ensure shared secret matches on both instances in paired mode |
272
+ | "Content type endpoint not found" | In paired mode, ensure matching content-type definitions and enabled API routes on both instances |
273
+ | "Live mode not available" | Switch to paired mode, or use on-demand/scheduled in single-side mode |
227
274
  | "Schema mismatch" | Sync content type schemas or set enforcement to "compatible" |
228
275
 
229
276
  ### Viewing Logs
@@ -240,7 +287,7 @@ Check the **Logs** tab for detailed sync history including:
240
287
  - **Credential handling.** The optional "Generate Token" feature lets you authenticate to **your own** remote Strapi server to create an API token. Credentials are sent directly from your browser to your server via the plugin's backend proxy, used once, and **never stored** on disk, in the database, or in memory after the request completes.
241
288
  - **API Tokens** are encrypted at rest using Strapi's built-in store.
242
289
  - **HMAC-SHA256** signatures protect all inter-instance requests from tampering.
243
- - **Masked secrets** API tokens and shared secrets are masked (`��������`) in all API responses.
290
+ - **Masked secrets** API tokens and shared secrets are masked (`••••••••`) in all API responses.
244
291
 
245
292
  ## Contributing
246
293
 
@@ -254,4 +301,4 @@ MIT License - see [LICENSE](LICENSE) for details.
254
301
 
255
302
  **Ejaz Husain Arain**
256
303
  - GitHub: [@eharain](https://github.com/eharain)
257
- - Email: eharain@yahoo.com
304
+ - Email: eharain@yahoo.com
@@ -30,6 +30,7 @@ const ConfigTab = () => {
30
30
  apiToken: '',
31
31
  instanceId: '',
32
32
  sharedSecret: '',
33
+ syncMode: 'paired',
33
34
  });
34
35
 
35
36
  // Login modal state
@@ -131,6 +132,7 @@ const ConfigTab = () => {
131
132
  if (config.apiToken && config.apiToken !== '••••••••') payload.apiToken = config.apiToken;
132
133
  if (config.instanceId) payload.instanceId = config.instanceId;
133
134
  if (config.sharedSecret && config.sharedSecret !== '••••••••') payload.sharedSecret = config.sharedSecret;
135
+ if (config.syncMode) payload.syncMode = config.syncMode;
134
136
 
135
137
  await post(`/${PLUGIN_ID}/config`, payload);
136
138
  setMessage({ type: 'success', text: 'Connection configuration saved' });
@@ -349,6 +351,11 @@ const ConfigTab = () => {
349
351
  {/* Connection Tab */}
350
352
  <Tabs.Content value="connection">
351
353
  <Box>
354
+ <Box paddingBottom={4}>
355
+ <Alert variant="info" title="Deployment mode">
356
+ In <strong>Paired</strong> mode, install Content Sync Pro on both local and remote servers. In <strong>Single-side</strong> mode, install on local only; remote plugin routes are not required. Connection test behavior and allowed sync/execution options follow the selected mode.
357
+ </Alert>
358
+ </Box>
352
359
  <Flex gap={6}>
353
360
  {/* LEFT COLUMN: Remote Server */}
354
361
  <Box flex="1">
@@ -362,7 +369,7 @@ const ConfigTab = () => {
362
369
  value={config.baseUrl}
363
370
  onChange={(e) => setConfig((p) => ({ ...p, baseUrl: e.target.value }))}
364
371
  />
365
- <Field.Hint>URL of the Strapi server to sync with</Field.Hint>
372
+ <Field.Hint>URL of the remote Strapi server where this plugin is also installed</Field.Hint>
366
373
  </Field.Root>
367
374
 
368
375
  <Field.Root>
@@ -378,7 +385,7 @@ const ConfigTab = () => {
378
385
  </Box>
379
386
 
380
387
  </Flex>
381
- <Field.Hint>Full Access token from the remote server</Field.Hint>
388
+ <Field.Hint>Remote API token with permissions for this plugin routes and synced content types</Field.Hint>
382
389
  </Field.Root>
383
390
  <Field.Root>
384
391
  <Button
@@ -404,7 +411,7 @@ const ConfigTab = () => {
404
411
  value={config.instanceId}
405
412
  onChange={(e) => setConfig((p) => ({ ...p, instanceId: e.target.value }))}
406
413
  />
407
- <Field.Hint>Name to identify this server in logs</Field.Hint>
414
+ <Field.Hint>Unique local instance name used in logs and sync traceability</Field.Hint>
408
415
  </Field.Root>
409
416
 
410
417
  <Field.Root>
@@ -415,7 +422,21 @@ const ConfigTab = () => {
415
422
  value={config.sharedSecret}
416
423
  onChange={(e) => setConfig((p) => ({ ...p, sharedSecret: e.target.value }))}
417
424
  />
418
- <Field.Hint>Must match on both servers</Field.Hint>
425
+ <Field.Hint>Must match exactly on both local and remote plugin configurations</Field.Hint>
426
+ </Field.Root>
427
+
428
+ <Field.Root>
429
+ <Field.Label>Sync Mode</Field.Label>
430
+ <SingleSelect
431
+ value={config.syncMode || 'paired'}
432
+ onChange={(value) => setConfig((p) => ({ ...p, syncMode: value }))}
433
+ >
434
+ <SingleSelectOption value="paired">Paired (plugin on both servers)</SingleSelectOption>
435
+ <SingleSelectOption value="single_side">Single-side (plugin only on local)</SingleSelectOption>
436
+ </SingleSelect>
437
+ <Field.Hint>
438
+ Paired mode supports push/pull/bidirectional and remote plugin validation. Single-side mode is pull-focused and does not require plugin routes on remote.
439
+ </Field.Hint>
419
440
  </Field.Root>
420
441
  </Flex>
421
442
  </Box>
@@ -38,7 +38,7 @@ export const HelpTab = () => {
38
38
  <Box paddingBottom={4}>
39
39
  <Typography variant="beta" tag="h2">Plugin Documentation</Typography>
40
40
  <Typography variant="omega" textColor="neutral600">
41
- Complete guide for configuring and using the Content Sync Pro plugin.
41
+ End-to-end guide for configuring, securing, and operating Content Sync Pro across Strapi environments.
42
42
  </Typography>
43
43
  </Box>
44
44
 
@@ -50,6 +50,7 @@ export const HelpTab = () => {
50
50
  <Tabs.Trigger value="sync-profiles">Sync Profiles</Tabs.Trigger>
51
51
  <Tabs.Trigger value="execution">Sync Execution</Tabs.Trigger>
52
52
  <Tabs.Trigger value="media">Media</Tabs.Trigger>
53
+ <Tabs.Trigger value="stats">Stats</Tabs.Trigger>
53
54
  <Tabs.Trigger value="enforcement">Enforcement</Tabs.Trigger>
54
55
  <Tabs.Trigger value="alerts">Alerts</Tabs.Trigger>
55
56
  <Tabs.Trigger value="troubleshooting">Troubleshooting</Tabs.Trigger>
@@ -124,9 +125,10 @@ export const HelpTab = () => {
124
125
  <ul style={{ paddingLeft: '20px', marginTop: '8px', lineHeight: '1.8' }}>
125
126
  <li><Typography variant="omega">Bi-directional sync (push, pull, or both)</Typography></li>
126
127
  <li><Typography variant="omega">Sync Profiles for defining WHAT to sync</Typography></li>
127
- <li><Typography variant="omega">Execution modes: On-demand, Scheduled, or Live (real-time)</Typography></li>
128
+ <li><Typography variant="omega">Execution modes: On-demand, Scheduled, Live, or External scheduler</Typography></li>
128
129
  <li><Typography variant="omega">Field-level sync policies (Advanced mode)</Typography></li>
129
130
  <li><Typography variant="omega">Conflict resolution strategies (Latest, Local, Remote wins)</Typography></li>
131
+ <li><Typography variant="omega">Pagination support for large datasets with bounded memory usage</Typography></li>
130
132
  <li><Typography variant="omega">Dependency resolution - sync related entities automatically</Typography></li>
131
133
  <li><Typography variant="omega">Enforcement checks - schema, version, and time validation</Typography></li>
132
134
  <li><Typography variant="omega">Configurable alerts via email, webhook, or Strapi logs</Typography></li>
@@ -148,10 +150,10 @@ export const HelpTab = () => {
148
150
 
149
151
  <HelpSection title="Quick Start">
150
152
  <ol style={{ paddingLeft: '20px', lineHeight: '2' }}>
151
- <li><Typography variant="omega"><strong>Configuration Tab</strong> - Set up remote server URL, API token, and shared secret</Typography></li>
153
+ <li><Typography variant="omega"><strong>Configuration Tab</strong> - Set up remote server URL, API token, instance ID, and shared secret</Typography></li>
152
154
  <li><Typography variant="omega"><strong>Content Types Tab</strong> - Enable content types for sync (auto-generates default profiles)</Typography></li>
153
155
  <li><Typography variant="omega"><strong>Sync Profiles Tab</strong> - Customize sync behavior or use defaults</Typography></li>
154
- <li><Typography variant="omega"><strong>Sync Tab</strong> - Configure execution settings and run sync operations</Typography></li>
156
+ <li><Typography variant="omega"><strong>Sync Execution Tab</strong> - Configure execution settings, page size, and run sync operations</Typography></li>
155
157
  </ol>
156
158
  </HelpSection>
157
159
 
@@ -170,6 +172,14 @@ export const HelpTab = () => {
170
172
  <Typography variant="omega" paddingBottom={2}>
171
173
  Configure the connection to the remote Strapi instance in the <strong>Connection</strong> sub-tab.
172
174
  </Typography>
175
+ <Typography variant="omega" paddingBottom={2}>
176
+ <strong>Deployment modes:</strong> Use <strong>Paired</strong> mode when the plugin is installed on both servers,
177
+ or <strong>Single-side</strong> mode when the plugin is installed only on local server.
178
+ </Typography>
179
+ <Typography variant="omega" paddingBottom={2}>
180
+ In paired mode, connection test validates remote plugin reachability and token access. In single-side mode,
181
+ test validates remote reachability and content API token access without requiring remote plugin endpoints.
182
+ </Typography>
173
183
 
174
184
  <Box background="neutral100" padding={4} hasRadius marginBottom={4}>
175
185
  <Typography variant="sigma" textColor="neutral800">Base URL</Typography>
@@ -295,6 +305,9 @@ http://localhost:1337</CodeBlock>
295
305
  Sync Profiles define <strong>WHAT</strong> to sync and <strong>HOW</strong> conflicts are resolved.
296
306
  They do NOT control when sync runs - that's configured in the Sync tab (Execution).
297
307
  </Typography>
308
+ <Typography variant="omega" paddingTop={2}>
309
+ In <strong>Single-side</strong> mode, profiles are automatically restricted to <strong>Pull Only</strong>.
310
+ </Typography>
298
311
  <Typography variant="omega" paddingTop={2}>
299
312
  Each profile specifies:
300
313
  </Typography>
@@ -525,7 +538,7 @@ http://localhost:1337</CodeBlock>
525
538
  Uses lifecycle hooks to detect changes.
526
539
  </Typography>
527
540
  <Typography variant="pi" textColor="warning600" paddingTop={2}>
528
- Note: Increases server load. Use for critical content only.
541
+ Note: Increases server load. Use for critical content only. Live mode is available in paired mode and disabled in single-side mode.
529
542
  </Typography>
530
543
  </Box>
531
544
  </HelpSection>
@@ -632,6 +645,10 @@ http://localhost:1337</CodeBlock>
632
645
  <Typography variant="omega">
633
646
  Each profile can sync two distinct aspects of media:
634
647
  </Typography>
648
+ <Typography variant="omega" paddingTop={2}>
649
+ For entity-linked media consistency, this plugin also syncs media morph links using <strong>documentId-based remapping</strong>
650
+ (file documentId and related entity documentId are resolved to local numeric ids before insert).
651
+ </Typography>
635
652
  <Box background="neutral100" padding={4} hasRadius marginTop={2} marginBottom={2}>
636
653
  <Typography variant="sigma" textColor="neutral800">DB Rows (Metadata)</Typography>
637
654
  <Typography variant="omega" paddingTop={1}>
@@ -652,6 +669,11 @@ http://localhost:1337</CodeBlock>
652
669
  If you only need metadata references (e.g., both sides use the same S3 bucket), you can
653
670
  sync DB rows only.
654
671
  </Typography>
672
+ <Typography variant="pi" textColor="neutral600" paddingTop={2}>
673
+ Note: Strapi components, repeatable components, and dynamic zones are already tracked by
674
+ document service sync using stable documentIds, so they do not require id-to-documentId remapping
675
+ like upload morph tables do.
676
+ </Typography>
655
677
  </HelpSection>
656
678
 
657
679
  <HelpSection title="URL strategy (HTTP)">
@@ -720,6 +742,61 @@ http://localhost:1337</CodeBlock>
720
742
  </Box>
721
743
  </Tabs.Content>
722
744
 
745
+ {/* Stats Tab */}
746
+ <Tabs.Content value="stats">
747
+ <Box paddingTop={4}>
748
+ <HelpSection title="Database Stats Overview">
749
+ <Typography variant="omega">
750
+ The Stats tab compares local and remote data state per content type, including content
751
+ entries, media files, and media morph (relation) links. The view is split into two
752
+ sub-tabs: <strong>Current Snapshot</strong> and <strong>Run Reports</strong>.
753
+ </Typography>
754
+ </HelpSection>
755
+
756
+ <HelpSection title="Current Snapshot Tab">
757
+ <Typography variant="omega">
758
+ Shows the latest live counts and newest timestamps per content type, with the newest
759
+ side (local / remote / equal) highlighted. Use the controls above the table to drill in:
760
+ </Typography>
761
+ <ul style={{ paddingLeft: '20px', marginTop: '8px', lineHeight: '1.8' }}>
762
+ <li><Typography variant="omega"><strong>Search</strong> - Filter rows by UID substring.</Typography></li>
763
+ <li><Typography variant="omega"><strong>Type</strong> - Filter by Content, Media, or Media Morph.</Typography></li>
764
+ <li><Typography variant="omega"><strong>Newest side</strong> - Show only rows where local, remote, or both are newest.</Typography></li>
765
+ <li><Typography variant="omega"><strong>Page size / pagination</strong> - Browse large snapshots without scrolling.</Typography></li>
766
+ </ul>
767
+ </HelpSection>
768
+
769
+ <HelpSection title="Run Reports Tab (Before vs After)">
770
+ <Typography variant="omega">
771
+ Before every sync run, the plugin captures a pre-run snapshot. After the run completes,
772
+ it captures a post-run snapshot and stores both in a report so you can review sync impact
773
+ and trends over time.
774
+ </Typography>
775
+ <ul style={{ paddingLeft: '20px', marginTop: '8px', lineHeight: '1.8' }}>
776
+ <li><Typography variant="omega"><strong>Status filter</strong> - Show all runs, or only success / failed.</Typography></li>
777
+ <li><Typography variant="omega"><strong>Page size / pagination</strong> - Reports are paginated server-side.</Typography></li>
778
+ <li><Typography variant="omega"><strong>Show details</strong> - Expand a report card to see the before/after row tables (first {25} rows per side).</Typography></li>
779
+ </ul>
780
+ </HelpSection>
781
+
782
+ <HelpSection title="Top Action Row: Refresh, Clear & Retention">
783
+ <Typography variant="omega">
784
+ The top of the Stats tab exposes the controls that apply to both sub-tabs:
785
+ </Typography>
786
+ <ul style={{ paddingLeft: '20px', marginTop: '8px', lineHeight: '1.8' }}>
787
+ <li><Typography variant="omega"><strong>Refresh Stats</strong> - Reload the snapshot and reports.</Typography></li>
788
+ <li><Typography variant="omega"><strong>Clear Logs</strong> - Remove stored sync logs.</Typography></li>
789
+ <li><Typography variant="omega"><strong>Clear Stats Reports</strong> - Remove all before/after run reports.</Typography></li>
790
+ <li><Typography variant="omega"><strong>Max Logs / Max Reports</strong> - Retention limits; older entries are pruned when exceeded.</Typography></li>
791
+ <li><Typography variant="omega"><strong>Save &amp; Apply Retention</strong> - Persists the limits and immediately prunes old data.</Typography></li>
792
+ </ul>
793
+ <Typography variant="pi" textColor="neutral600" paddingTop={2}>
794
+ Retention is also enforced automatically after each sync run.
795
+ </Typography>
796
+ </HelpSection>
797
+ </Box>
798
+ </Tabs.Content>
799
+
723
800
  {/* Enforcement Tab */}
724
801
  <Tabs.Content value="enforcement">
725
802
  <Box paddingTop={4}>
@@ -897,10 +974,10 @@ http://localhost:1337</CodeBlock>
897
974
  </Box>
898
975
 
899
976
  <Box background="danger100" padding={4} hasRadius marginBottom={4}>
900
- <Typography variant="sigma" textColor="danger700">401 Unauthorized</Typography>
977
+ <Typography variant="sigma" textColor="danger700">401 Unauthorized / 403 Forbidden</Typography>
901
978
  <Typography variant="omega" paddingTop={1}>
902
- The API token is invalid or expired. Generate a new token on the remote server and update
903
- Configuration Connection API Token.
979
+ The API token is invalid, expired, or missing required permissions. Generate a new token on the remote
980
+ server and ensure it can access the synced content types (and Upload permissions for media sync).
904
981
  </Typography>
905
982
  </Box>
906
983
 
@@ -913,10 +990,10 @@ http://localhost:1337</CodeBlock>
913
990
  </Box>
914
991
 
915
992
  <Box background="danger100" padding={4} hasRadius marginBottom={4}>
916
- <Typography variant="sigma" textColor="danger700">Content type not found on remote</Typography>
993
+ <Typography variant="sigma" textColor="danger700">Content type endpoint not found on remote</Typography>
917
994
  <Typography variant="omega" paddingTop={1}>
918
- The content type exists locally but not on the remote server. Ensure both instances
919
- have matching content type definitions.
995
+ The content type exists locally but the remote REST endpoint is missing or named differently.
996
+ Ensure both instances have matching content type definitions and API routes are enabled.
920
997
  </Typography>
921
998
  </Box>
922
999
 
@@ -400,6 +400,13 @@ const MediaTab = () => {
400
400
  {status?.lastResult && (
401
401
  <Box paddingTop={3} background="neutral0" padding={4} hasRadius shadow="tableShadow">
402
402
  <Typography variant="sigma">Last Run Result</Typography>
403
+ {(status.lastResult.morphLinksApplied !== undefined || status.lastResult.morphLinksSkipped !== undefined) && (
404
+ <Box paddingTop={2} paddingBottom={2}>
405
+ <Typography variant="omega" textColor="neutral700">
406
+ Morph links synced: applied {status.lastResult.morphLinksApplied || 0}, skipped {status.lastResult.morphLinksSkipped || 0}
407
+ </Typography>
408
+ </Box>
409
+ )}
403
410
  <Typography variant="pi" style={{ fontFamily: 'monospace', whiteSpace: 'pre-wrap' }}>
404
411
  {JSON.stringify(status.lastResult, null, 2)}
405
412
  </Typography>