Skip to content

feat(kitsu): surface sync status and error feedback in UI and events - #179

Draft
Ahmed-Hindy wants to merge 5 commits into
ynput:developfrom
Ahmed-Hindy:sync_feedback_plugins
Draft

Ahmed-Hindy wants to merge 5 commits into
ynput:developfrom
Ahmed-Hindy:sync_feedback_plugins

Conversation

@Ahmed-Hindy

@Ahmed-Hindy Ahmed-Hindy commented Nov 28, 2026 •

Copy link
Copy Markdown
Contributor

Brief description

Adds live sync status and error feedback across the Kitsu server, processor service, and AYON Settings frontend so users can see whether manual, startup, and inbound Kitsu syncs queued, succeeded, or failed.

Preview

image

Dependencies

Changes

Server

  • Added GET /sync-status (server/kitsu/sync_status.py, manager-only) aggregating per-project kitsu.sync / kitsu.sync_request state (including expiry of abandoned/stale jobs, retryability, created_at timestamps, and startup-vs-manual precedence), latest failed kitsu.inbound_sync, heartbeat-checked processor health, and recent processor log.error events.
  • Updated POST /sync/{project_name} and POST /pairing (server/kitsu/init_pairing.py, server/__init__.py) to reject unpaired projects, reset stale error descriptions/payloads on restart, and return queued event metadata (SyncRequestResponseModel).
  • Kept GET /pairing unchanged for backwards compatibility.

Processor

  • Validated Kitsu credentials and login before calling get_pairing_list() so credential/login/pairing startup errors all dispatch redacted log.error diagnostics.
  • Updated manual sync failures (kitsu.sync) to include redacted error summaries in description and full redacted error/traceback details in payload.
  • Recorded startup full syncs in per-project kitsu.sync events (finished / failed).
  • Wrapped inbound Socket.IO event handlers to record failed kitsu.inbound_sync events in AYON /events when a handler raises or /push//remove returns an HTTP error (preserving resolved project_id on legacy Zou <1.0.32 task:update events and propagating casting fetch failures).

Frontend

  • Simplified the Kitsu Settings page (PairingList.jsx, PairingButton.jsx) using native @ynput/ayon-react-components (Section, Toolbar, Spacer, Panel, ScrollPanel, Button, Icon, Dialog) and AYON CSS color tokens.
  • Added sequential status polling (2s while active/retrying, 15s idle), disabled/busy button states on Sync now and Pair project, toolbar processor-offline / error notices (including processor diagnostics when /pairing fails), separate ! Live error indicator (compared against full-sync start time so overlapping full syncs do not hide live errors), and a clickable ! Failed error details Dialog popup.

Testing

  • Added 16 unit tests in tests/tests/test_sync_feedback.py covering secret redaction, kitsu.sync / kitsu.inbound_sync / log.error event recording, startup credential/pairing ordering, casting fetch failures, abandoned-job expiry, legacy Zou task:update context, manager authorization, and server sync_request / get_sync_status helpers.
  • Verified ruff check passes and yarn build succeeds in frontend/.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant