Merge origin/main into feature/assign-archetypes-to-tasks-ui
Resolved conflicts: - .gitignore: kept both bd.sock.startlock and .beadboard/ entries - package.json: kept feature branch test script (explicit enumeration) - API routes: kept dynamic export + isValidProjectRoot from main - globals.css: kept HEAD slideInFromRight animation - use-beads-subscription.ts: kept HEAD onopen handler - realtime.ts: kept main console.log in emit() - snapshot-differ.ts: kept main type-aware dependency diff Blue colors preserved from feature branch.
This commit is contained in:
commit
a8079813b8
28 changed files with 931 additions and 70 deletions
|
|
@ -66,7 +66,6 @@ export function useBeadsSubscription(
|
|||
}, [projectRoot, onUpdate]);
|
||||
|
||||
useEffect(() => {
|
||||
console.log('[SSE] Connecting to event source for:', projectRoot);
|
||||
const source = new EventSource(`/api/events?projectRoot=${encodeURIComponent(projectRoot)}`);
|
||||
|
||||
source.onopen = () => {
|
||||
|
|
@ -76,7 +75,7 @@ export function useBeadsSubscription(
|
|||
source.onerror = (err) => {
|
||||
console.error('[SSE] Connection error:', err);
|
||||
};
|
||||
|
||||
|
||||
const onIssues = (event: MessageEvent) => {
|
||||
console.log('🚨 SSE ISSUES RECEIVED:', event.data);
|
||||
onUpdate?.('issues');
|
||||
|
|
@ -100,12 +99,12 @@ export function useBeadsSubscription(
|
|||
source.addEventListener('activity', onActivity as EventListener);
|
||||
|
||||
return () => {
|
||||
console.log('[SSE] Closing connection');
|
||||
source.removeEventListener('issues', onIssues as EventListener);
|
||||
source.removeEventListener('telemetry', onTelemetry as EventListener);
|
||||
source.removeEventListener('activity', onActivity as EventListener);
|
||||
source.close();
|
||||
};
|
||||
|
||||
// onUpdate is intentionally excluded from deps to avoid re-subscribing on parent re-renders
|
||||
// eslint-disable-next-line react-hooks/exhaustive-deps
|
||||
}, [projectRoot, refresh]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue