mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-26 06:05:45 +00:00
* Centralize OpenAPI sync state in Redux Move per-collection OpenAPI sync state into the Redux slice and update callers. Adds storedSpec and drift maps and reducers (setDrift, clearDrift, setStoredSpec, clearOpenApiSyncTabState), removes the old diff payload from collectionUpdates, and keeps storedSpecMeta. Components and hooks were updated to use inline selectors (state.openapiSync...) instead of exported selectors, and useOpenAPISync was refactored to persist drift/storedSpec to Redux, use the store to read tabs, and call setDrift/setStoredSpec rather than keeping duplicate local state. The collections closeTabs action now clears openapi-sync state for closing openapi-sync tabs so transient state is dropped when tabs are closed. Small variable renames and minor logic adjustments to use the new shape were included. * Enhance useOpenAPISync hook with comments for clarity on store usage. This update clarifies that tabs are read-only within handlers to prevent unnecessary re-renders when using useSelector.