yousoph opened a new pull request, #40506:
URL: https://github.com/apache/superset/pull/40506

   ### Summary
   
   Fixes `TypeError: o.useAppDispatch is not a function` when clicking SQL Lab.
   
   - Adds a shim at `src/SqlLab/hooks/useAppDispatch.ts` that re-exports 
`useAppDispatch` from `src/views/store` with a nullish-coalesce fallback to 
`useDispatch`
   - Updates all 19 SQL Lab components to import from the shim
   
   ### Root cause
   
   In Module Federation deployments where the host shell shares 
`src/views/store` as a singleton, a version skew between the shell bundle and 
the SQL Lab remote chunk can leave `useAppDispatch` undefined at runtime. The 
shell was built before `useAppDispatch` was exported (commit 785a08c7d5), but 
SQL Lab was built after. SQL Lab gets the older shared module and crashes.
   
   ### Fix
   
   The shim is transparent in up-to-date deployments. In version-skewed 
deployments it falls back silently to `useDispatch` rather than crashing.
   
   ### Test plan
   - [ ] Click SQL Lab — loads without `TypeError: useAppDispatch is not a 
function`
   - [ ] `cd superset-frontend && npm run type-check` passes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
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]

Reply via email to