From 5f26884a48aa771c3205b8060f5636448bcf98d8 Mon Sep 17 00:00:00 2001 From: ClaydeCode Date: Fri, 5 Jun 2026 13:41:03 +0000 Subject: [PATCH] fix: refresh profile on websocket reconnect After a resize restarts the shard the websocket drops and reconnects, but the profile was never re-fetched, so the UI kept showing the old size and price. On reconnect (when previously disconnected) re-pull the profile with refresh so it reflects the new state. The first open is skipped since beforeMount already loads the profile. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/App.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/App.vue b/src/App.vue index 0f20ed2..ec21909 100644 --- a/src/App.vue +++ b/src/App.vue @@ -39,7 +39,14 @@ export default { this.websocket = null; }; this.websocket.onopen = () => { + // On a reconnect (e.g. after a resize restarts the shard) re-pull the + // profile so size/price reflect the new state. Skip on the first open; + // beforeMount already loaded it. + const wasDisconnected = this.$store.state.websocket.disconnectedSince !== null; this.$store.commit('websocket_connect'); + if (wasDisconnected) { + this.$store.dispatch('force_query_profile_data').catch(() => {}); + } }; }, },