Handle SSE event for View and ViewField (#18218)

This PR implements a first working version of SSE for View and
ViewField.

We could improve the logic but we re-use the same actual codepath for
refreshing the views of an object.

This does not handle filters and sorts for now.

# Demo 


https://github.com/user-attachments/assets/73367f3a-a5fc-4b06-a2e2-fad3b99deec7
This commit is contained in:
Lucas Bordeau
2026-02-25 13:43:56 +01:00
committed by GitHub
parent 121788c42f
commit 2c02f2c499
17 changed files with 460 additions and 241 deletions
@@ -1,5 +1,5 @@
import { metadataStoreState } from '@/metadata-store/states/metadataStoreState';
import { MainContextStoreProviderEffect } from '@/context-store/components/MainContextStoreProviderEffect';
import { metadataStoreState } from '@/metadata-store/states/metadataStoreState';
import { useIsSettingsPage } from '@/navigation/hooks/useIsSettingsPage';
import { useLastVisitedView } from '@/navigation/hooks/useLastVisitedView';
import { objectMetadataItemsState } from '@/object-metadata/states/objectMetadataItemsState';
@@ -76,7 +76,7 @@ export const MainContextStoreProvider = () => {
const shouldComputeContextStore =
(isRecordIndexPage || isRecordShowPage || isSettingsPage) &&
!showAuthModal &&
viewsEntry.status === 'loaded';
viewsEntry.status === 'up-to-date';
if (!shouldComputeContextStore) {
return null;