[eric] onboarding fixes — auto fit-to-view before drag select, scroll-aware move_to, robust celebration timer, no-flash app preview, openrouter / custom model integration bug fixes (windows)

This commit is contained in:
ciregenz
2026-05-10 11:06:04 -07:00
parent 89cbfe9749
commit 443327d4bd
8 changed files with 129 additions and 31 deletions
+12 -1
View File
@@ -251,7 +251,18 @@ const settingsSlice = createSlice({
.addCase(fetchSettings.fulfilled, (state, action) => {
state.loading = false;
state.loaded = true;
state.data = action.payload;
// Belt-and-suspenders: skip the assignment when the payload is
// byte-identical to what we already have. The SignInGate's 2s poll
// would otherwise flip the `state.data` reference on every tick,
// re-running every effect that depends on `s.settings.data` —
// including form-sync useEffects elsewhere in the tree. Cheap on
// a small object, prevents an entire class of "polling wipes my
// form" bugs without needing every consumer to be defensive.
const next = JSON.stringify(action.payload);
const prev = JSON.stringify(state.data);
if (next !== prev) {
state.data = action.payload;
}
})
.addCase(fetchSettings.rejected, (state) => {
state.loading = false;