Add Push-to-Main-App sync UI button to seed import tool #1

Closed
opened 2026-05-25 04:14:53 +00:00 by shawn · 0 comments
Owner

Summary

Added a Push to Main App card to the seed import dashboard UI, completing the end-to-end workflow.

Changes

  • New UI card: Target selector (Dev/Prod) with auto-detection of whether target DB exists
  • Dry-run toggle: Enabled by default — preview changes without writing
  • Push button: Calls POST /api/sync?target=dev|prod&dry_run=true|false
  • Results display: Assets created/updated/skipped, customers/locations created
  • Sample actions: First 10 operations shown for verification
  • Error handling: Red banner with error details

Files changed

  • web/static/index.html — added HTML card + JS functions (runSync, showSyncResult, refreshSyncTargets, selectSyncTarget)
  • Server-side API (/api/sync, /api/sync/targets) was already present

Verification

  • Dry run: 1,848 assets would be updated on dev
  • Both dev (:8093) and prod (:8091) restarted and serving

Notes

Use the UI at https://canteen-seed-dev.ourpad.casa (dev) or https://canteen-seed.ourpad.casa (prod). Always run a dry run first.

## Summary Added a Push to Main App card to the seed import dashboard UI, completing the end-to-end workflow. ## Changes - **New UI card**: Target selector (Dev/Prod) with auto-detection of whether target DB exists - **Dry-run toggle**: Enabled by default — preview changes without writing - **Push button**: Calls `POST /api/sync?target=dev|prod&dry_run=true|false` - **Results display**: Assets created/updated/skipped, customers/locations created - **Sample actions**: First 10 operations shown for verification - **Error handling**: Red banner with error details ## Files changed - `web/static/index.html` — added HTML card + JS functions (runSync, showSyncResult, refreshSyncTargets, selectSyncTarget) - Server-side API (/api/sync, /api/sync/targets) was already present ## Verification - Dry run: 1,848 assets would be updated on dev - Both dev (:8093) and prod (:8091) restarted and serving ## Notes Use the UI at https://canteen-seed-dev.ourpad.casa (dev) or https://canteen-seed.ourpad.casa (prod). Always run a dry run first.
shawn closed this issue 2026-05-25 04:15:01 +00:00
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shawn/canteen-seed-import#1