Skip to content

Add authenticated circuit save and load - #34

Merged
EnderHubris merged 8 commits into
mainfrom
simplify-drizzle
Sep 20, 2026
Merged

EnderHubris merged 8 commits into
mainfrom
simplify-drizzle

Conversation

@YoyoJesus

Copy link
Copy Markdown
Collaborator

Summary

Adds account-backed persistence for circuits, plus the auth flow needed to reach it.

  • Auth: Better Auth username login, LoginPage and RegisterPage, session hydration in authClient, and a hardened auth sidecar deployment pointed at the deployed API.
  • Circuit persistence: api_server/src/circuits.ts serves list, create, open, update, and delete over /api/circuits, scoped to the session owner.
  • Client wiring: src/lib/circuitApi.ts and src/lib/stores/savedCircuits.ts drive a save state machine, surfaced as a Save button in TopNav and MobileTopBar and a SavedCircuitsPage listing recently opened circuits.
  • Schema: Drizzle migrations 0001 through 0003 and a substantially reduced db/schema.ts, with reference/postgresql.md and reference/schema.sql.md updated to match.

Known gaps

Two endpoints exist server-side but are not reachable from the UI yet:

  • Rename: activeSavedCircuitName is never set from any component, so every save is stored as Untitled circuit.
  • Delete: DELETE /api/circuits/:id is implemented, but circuitApi.ts has no client function and the saved list has no delete control.

Risks

The branch is 46 commits behind main, so expect conflicts on merge. The schema changes remove a large amount of db/schema.ts and the older circuit modules under api_server/src/circuit/; those deletions should be reviewed against whatever has landed on main since the merge base.

Validation

Not performed in this session. No test suite was run and the flow was not exercised against a live API.

AI assistance

  • Tool: Claude
  • Used for: Drafting this pull request description only. The commits on this branch were not authored in that session, so their provenance is not asserted here.
  • Human review: Pending review by @YoyoJesus

EnderHubris and others added 7 commits September 20, 2026 04:17
Add the Bun auth sidecar, isolated Drizzle auth schema, generated migration, credentialed CORS, proxy authorization endpoint, and Svelte login, registration, and logout flows.

AI-Assisted-By: OpenAI Codex <https://openai.com/codex/>
Bind the Bun service to loopback, trust the edge client IP headers, and record the systemd and Caddy deployment configuration.

AI-Assisted-By: OpenAI Codex <https://openai.com/codex/>
Fix cross-origin session persistence for the Tauri and local web clients, add owner-scoped circuit CRUD, and expose save actions in the app.

AI-Assisted-By: OpenAI Codex <https://openai.com/codex/>
Persist recognized circuits for signed-in users and order saved-circuit summaries by an explicit last-opened timestamp.

AI-Assisted-By: OpenAI Codex <https://openai.com/codex/>
@vercel

vercel Bot commented Sep 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
holotrace Ready Ready Preview Sep 20, 2026 2:14pm UTC

@EnderHubris
EnderHubris merged commit e68b695 into main Sep 20, 2026
2 of 4 checks passed

This branch was successfully deployed

1 active deployment
Preview — c02dcf88 Deployed Sep 20, 2026 by vercel[bot]
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.

2 participants