Skip to content

fix: refresh profile on websocket reconnect#28

Merged
max-tet merged 1 commit into
mainfrom
fix/refresh-profile-on-reconnect
Jun 5, 2026
Merged

fix: refresh profile on websocket reconnect#28
max-tet merged 1 commit into
mainfrom
fix/refresh-profile-on-reconnect

Conversation

@ClaydeCode

Copy link
Copy Markdown
Contributor

Problem

After a subscribed resize, the controller restarts the shard to apply the new VM size. This drops the management websocket; the client reconnects (1s interval in App.vue), but the profile is never re-fetched — so the Settings UI keeps showing the old size and price even though the backend has updated them.

Fix

In the websocket onopen handler, when the socket was previously disconnected (a reconnect, not the first open), dispatch force_query_profile_data (which fetches /management/profile?refresh=true, forcing shard-core to re-pull the controller self-view). The first open is skipped because beforeMount already loads the profile.

Pairs with the controller-side fix that promotes the price and clears the pending-resize slot on approval (FreeshardBase/freeshard-controller#292).

Note

Not built locally (Vue-CLI toolchain not installed in this worktree). The change mirrors existing call sites — force_query_profile_data (store.js), websocket.disconnectedSince state, and the same .catch(() => {}) pattern used in Settings.vue.

🤖 Generated with Claude Code

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) <noreply@anthropic.com>
@max-tet max-tet merged commit 06eac15 into main Jun 5, 2026
2 checks passed
@max-tet max-tet deleted the fix/refresh-profile-on-reconnect branch June 5, 2026 13:44
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.

2 participants