Pure useShape API for mutations, event lifecycle e2e tests
Refactor FestipodDataContext to use only the useShape ORM API: - Remove ng.sparql_update, sessionPromise, ensureGraphNuri imports - Use privateNuri (useShape scope) directly as @graph for adds - Create/join are now synchronous (no async wrapper needed) - Leave uses ngSet.delete() — known limitation: doesn't persist (@wip) Add event lifecycle e2e scenarios (cycle-de-vie-evenement.feature): - Create event via form and verify on home screen - Created event persists after reconnexion - Consult event detail from home - Join an event - Modify event location and verify - Leave + persistence tagged @wip (ngSet.delete doesn't persist) Fix DemoMode external navigation: sync initialScreenId prop changes to internal state via useEffect (was ignored after first mount). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,15 @@ export function DemoMode({ initialScreenId, onBack, onNavigateToStory }: DemoMod
|
||||
const [sidebarOpen, setSidebarOpen] = useState(false);
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
// Sync with external hash navigation (e.g. e2e tests changing window.location.hash)
|
||||
useEffect(() => {
|
||||
if (initialScreenId !== currentScreenId) {
|
||||
setCurrentScreenId(initialScreenId);
|
||||
setHistory(prev => [...prev, initialScreenId]);
|
||||
setHistoryIndex(prev => prev + 1);
|
||||
}
|
||||
}, [initialScreenId]);
|
||||
|
||||
const currentScreen = getScreen(currentScreenId);
|
||||
const ScreenComponent = currentScreen?.component;
|
||||
const linkedStories = getStoriesForScreen(currentScreenId);
|
||||
|
||||
Reference in New Issue
Block a user