Skip to content

Add Traverse HTTP runtime client and execution state machine#25

Merged
enricopiovesan merged 1 commit into
mainfrom
claude/issue-3-traverse-starter-client
Jun 30, 2026
Merged

Add Traverse HTTP runtime client and execution state machine#25
enricopiovesan merged 1 commit into
mainfrom
claude/issue-3-traverse-starter-client

Conversation

@enricopiovesan

Copy link
Copy Markdown
Contributor

Summary

  • Adds `src/client/traverseClient.ts` — thin HTTP boundary: `execute`, `pollExecution`, `fetchTrace` per spec `033-http-json-api`
  • Adds `src/hooks/useExecution.ts` — state machine: idle → loading → polling → succeeded / failed
  • Wires `App.tsx` to the client; replaces stub `handleStartWorkflow` and fixes health endpoint to `/healthz` per spec 033
  • 11 unit tests across client, hook, and App

Closes #3

Definition of Done

  • React can start a workflow through a public Traverse runtime/client boundary
  • React subscribes to correlated runtime events (polls executions + fetches trace)
  • UI state is driven by events (idle → loading → polling → succeeded/failed)
  • Failure, loading, progress, and final states are visible in the UI
  • No private Traverse internals imported

Validation

npm run typecheck  # pass
npm run lint       # pass
npm run test       # 11 tests pass (3 files)

Implements the thin client boundary per spec 033-http-json-api:
- traverseClient.ts: execute, pollExecution, fetchTrace against public endpoints
- useExecution.ts: idle → loading → polling → succeeded/failed state machine
- App.tsx wired to client; health check fixed to /healthz per spec 033
- 11 unit tests covering all client methods, state transitions, and UI states

No private Traverse internals imported.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@enricopiovesan enricopiovesan merged commit 4433031 into main Jun 30, 2026
4 checks passed
@enricopiovesan enricopiovesan deleted the claude/issue-3-traverse-starter-client branch June 30, 2026 18:23
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.

Add runtime event client boundary for web React

1 participant