feat(sync): re-auth prompt on expired session + server deployment artifacts

On auth failure during pull (access + refresh both expired), sync_plugin now
fires SyncConfigureRequestEvent so the Connect modal reopens automatically
instead of leaving the player with a silent error status. The modal's existing
double-open guard keeps repeated failures idempotent.

Also removes the unused SyncAuthResultEvent (results handled inline in
SyncSetupPlugin via PendingAuthTask polling) and adds server deployment
artifacts: Dockerfile (multi-stage, SQLX_OFFLINE), docker-compose.yml (SQLite
volume, health-check), and .env.example for local development setup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
funman300
2026-05-12 12:45:08 -07:00
parent 432061c3ec
commit 6ce55646d8
5 changed files with 113 additions and 8 deletions
-6
View File
@@ -134,12 +134,6 @@ pub struct ManualSyncRequestEvent;
#[derive(Message, Debug, Clone, Copy, Default)]
pub struct SyncConfigureRequestEvent;
/// Result of an async login or register attempt. `Ok(username)` on success;
/// `Err(human-readable message)` on failure. Consumed by `SyncSetupPlugin`
/// to update the in-world provider and surface errors in the modal.
#[derive(Message, Debug, Clone)]
pub struct SyncAuthResultEvent(pub Result<String, String>);
/// Request to disconnect from the current sync backend, clear stored
/// credentials, and reset to `SyncBackend::Local`. Fired by the "Disconnect"
/// button in the Settings sync section.