Skip to content

Keep agent streams alive after navigation#4173

Open
BenItBuhner wants to merge 3 commits into
stakwork:masterfrom
BenItBuhner:hive-4316-persistent-agent-stream
Open

Keep agent streams alive after navigation#4173
BenItBuhner wants to merge 3 commits into
stakwork:masterfrom
BenItBuhner:hive-4316-persistent-agent-stream

Conversation

@BenItBuhner

Copy link
Copy Markdown

Summary

  • move agent stream draining into the /api/agent route with after() so the remote stream continues server-side after the browser receives session metadata
  • stop returning the remote stream URL/token to the browser and let persisted webhook/Pusher messages drive UI updates
  • clear the agent loading state when the persistent stream is finished and cover the Pusher finished event

Validation

  • npm ci
  • npx vitest run src/__tests__/integration/api/agent.test.ts src/__tests__/unit/lib/pusher.test.ts (unit suite selected by repo config: 28 passed)
  • TEST_DATABASE_URL=postgresql://test:test@localhost:5433/hive_test DATABASE_URL=postgresql://test:test@localhost:5433/hive_test TEST_SUITE=integration npx vitest run src/__tests__/integration/api/agent.test.ts (3 passed)
  • npm run lint -- --quiet
  • git diff --check origin/master...HEAD

Note: npm run test:db:setup applied migrations but hit an existing setup-script cleanup error reading verificationToken.deleteMany from an undefined Prisma client model. The focused integration suite passed after setting both DB env vars directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant