Convex-only Slice 1: clients talk to Convex, Flue is a private worker #20

Merged
puter merged 3 commits from feat/auth-and-project-requests into master 2026-07-27 16:03:37 +00:00
Owner

Summary

Normalizes the topology so web/desktop/mobile clients communicate only with Convex. Convex admits durable commands, dispatches private Flue turns through FLUE_URL, and stores the product-facing result before clients observe it.

Changes

Architecture

  • Clients -> Convex only. Flue and future Rivet/AgentOS services are private workers.
  • Convex admits commands, invokes the worker, and stores results.
  • /api/flue retained through Caddy as the private Convex-to-Flue gateway (no browser use).

Convex backend (normalized relational core)

  • organizations, organizationMembers (tenancy)
  • projects, projectContextDocuments
  • conversations, conversationTurns, conversationMessages, conversationAttachments
  • signals, signalConstraints, signalSources, works, signalWorkAttachments, workEvents
  • Conversation turns queued in Convex; agent runAction dispatches to Flue and persists assistant response, signals, and proposed work back into Convex.

Web client

  • Chat moved off the Flue transport: use-chat-agent reads reactive Convex rows and sends through conversationMessages.send.
  • Fixed signed-in blank screen: gate all product queries on useConvexAuth (isAuthenticated && !isRefreshing) plus personal-org bootstrap.
  • Pinned react/react-dom to 19.2.8 via catalog to fix SSR dual-React crash.

Removed (~16.6k net lines)

  • Daemon, AgentOS/Orb, project issues/runs/artifacts, todos, browser Flue transport, mobile execution views, smoke scripts.

Verification

End-to-end on cheaptricks (https://zopu.cheaptricks.puter.wtf):

  • Connected repo, sent actionable message.
  • Flue turn completed through private gateway.
  • Signal + proposed Work created with exact provenance.
  • Persisted across browser refresh.
  • Workspace typechecks, Ultracite, root checks, 12 focused frontend tests pass.

Closes the loop on the Convex-only refactor and the auth race fixes.

## Summary Normalizes the topology so **web/desktop/mobile clients communicate only with Convex**. Convex admits durable commands, dispatches private Flue turns through `FLUE_URL`, and stores the product-facing result before clients observe it. ## Changes **Architecture** - Clients -> Convex only. Flue and future Rivet/AgentOS services are private workers. - Convex admits commands, invokes the worker, and stores results. - `/api/flue` retained through Caddy as the private Convex-to-Flue gateway (no browser use). **Convex backend (normalized relational core)** - `organizations`, `organizationMembers` (tenancy) - `projects`, `projectContextDocuments` - `conversations`, `conversationTurns`, `conversationMessages`, `conversationAttachments` - `signals`, `signalConstraints`, `signalSources`, `works`, `signalWorkAttachments`, `workEvents` - Conversation turns queued in Convex; agent runAction dispatches to Flue and persists assistant response, signals, and proposed work back into Convex. **Web client** - Chat moved off the Flue transport: `use-chat-agent` reads reactive Convex rows and sends through `conversationMessages.send`. - Fixed signed-in blank screen: gate all product queries on `useConvexAuth` (`isAuthenticated && !isRefreshing`) plus personal-org bootstrap. - Pinned `react`/`react-dom` to `19.2.8` via catalog to fix SSR dual-React crash. **Removed (~16.6k net lines)** - Daemon, AgentOS/Orb, project issues/runs/artifacts, todos, browser Flue transport, mobile execution views, smoke scripts. ## Verification End-to-end on cheaptricks (`https://zopu.cheaptricks.puter.wtf`): - Connected repo, sent actionable message. - Flue turn completed through private gateway. - Signal + proposed Work created with exact provenance. - Persisted across browser refresh. - Workspace typechecks, Ultracite, root checks, 12 focused frontend tests pass. Closes the loop on the Convex-only refactor and the auth race fixes.
puter added 3 commits 2026-07-27 16:03:05 +00:00
- Add server-side auth token loader (auth.server.ts) with SSR cookie forwarding
- Add project-requests client for explicit/signal/existing issue dispatch
- Refactor auth layout and app layout for SSR auth gating
- Update auth-client and auth-provider for convex token flow
- Extend project-issue primitives with request result schema
- Wire projectIssues backend mutation for request handling
- Update slice-one page and project-workspace hook
- Adjust routes (remove unused), Caddy config, and env templates
- Fix brand-to-Convex-Id casts in use-project-workspace (as unknown as)
- Extract ProjectsLoading and ConnectProject components to drop SliceOnePage
  complexity below the lint threshold of 20
- Fix formatting in project-requests.ts
- Archive orphaned standalone chat files (route removed, referenced dead env)
- All 8 packages typecheck clean; 31 web tests pass; root check clean
Normalize the topology so web/desktop/mobile clients communicate only with
Convex. Convex admits durable commands, dispatches private Flue turns through
FLUE_URL, and stores the product-facing result before clients observe it.

- Normalized relational schema: organizations, projects, conversations/turns/
  messages/attachments, signals/sources/constraints, works/events/attachments.
- Conversation turns queued in Convex; the agent runAction dispatches to Flue
  and persists assistant response, signals, and proposed work back into Convex.
- Browser chat moved off the Flue transport: use-chat-agent now reads reactive
  Convex rows and sends through conversationMessages.send.
- Fixed signed-in blank screen: gate all product queries on useConvexAuth
  (isAuthenticated && !isRefreshing) plus personal-org bootstrap.
- Pinned react/react-dom to 19.2.8 via catalog to fix SSR dual-React crash.
- Removed ~16.6k net lines: daemon, AgentOS/Orb, project issues/runs/artifacts,
  todos, browser Flue transport, mobile execution views, smoke scripts.

Verified end-to-end on cheaptricks: connect repo, send actionable message,
Flue turn completes, Signal + proposed Work created with exact provenance,
persists across refresh.
puter merged commit cb7484912c into master 2026-07-27 16:03:37 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: puter/zopu-code#20
No description provided.