ayushanand13 commented on PR #41252: URL: https://github.com/apache/superset/pull/41252#issuecomment-4761136103
@richardfogaca thanks for the careful review — you were right about the locked version. The lockfile resolves `redux-undo` to **1.1.0**, but I'd validated against `1.0.0-beta9-9-7` (the `package.json` range). They behave oppositely on the key detail: beta `clearHistory()` sets `_latestUnfiltered = present`, while 1.1.0 resets it to `null` under `ignoreInitialState`. So my old `clearHistory()` -> `UPDATE_COMPONENTS` setup never seeded a rootless `past` in 1.1.0 — exactly why those three assertions failed in CI. Pushed `15ede2dc`: - **Reworked the reducer tests** to seed history states explicitly (mirroring `StateWithHistory` — `past`/`present`/`future` is all `undo()` needs), so the guard test now exercises a genuine rootless `past[0]`. Added a `valid -> valid` undo test confirming the guard doesn't interfere with normal undo. - **Corrected the root-cause comment** to match 1.1.0. - Production reducer logic is unchanged; validated all 5 tests against a real `[email protected]` build. Context on 1.1.0: hydration leaves `_latestUnfiltered` null until the first real edit, so a freshly hydrated dashboard already keeps the stack empty (Undo disabled) — the original report's exact trigger doesn't reproduce on current master. I kept the reducer-level reset (your "directionally good") as a guarantee complementing #40569 for SPA navigation, and the guard as defense-in-depth so a rootless layout reaching the stack via any path can't crash Undo. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
