Skip to content

fix: Shifting persistence mechanisms from json to local Sql db for better session management - #6

Merged
gsvprharsha merged 3 commits into
mainfrom
development
Jul 18, 2026
Merged

fix: Shifting persistence mechanisms from json to local Sql db for better session management#6
gsvprharsha merged 3 commits into
mainfrom
development

Conversation

@gsvprharsha

Copy link
Copy Markdown
Collaborator

No description provided.

gsvprharsha and others added 2 commits July 18, 2026 15:50
… SQLite

Replace runtime-state.json with SQLite (tempest.db) as the sole persistence
layer. Sessions gain UUID identity with project/branch/parent foreign keys,
replacing composite path-string keys. Projects, branches, sessions, recents,
tabs, and chat history live in relational tables; app-global preferences live
in an app_state key/value table. Each store keeps a synchronous in-memory
mirror hydrated from SQLite at startup with async write-through.

- Rust: full DB_SCHEMA + command layer (ON CONFLICT upserts, FK-ordered writes,
  transactional chat replace); remove read/write_runtime_state.
- Frontend: db.ts wrappers; relational sessions/openProjects/recents/tabs/chat
  stores; runtimeState backed by app_state kv; theme + chat model prefs moved
  off localStorage.
- No migration/back-compat: DB recreates from the final schema (early-stage).
- BYOK API keys + GitHub PR token stay in localStorage by design (credentials
  belong in an OS keychain, not SQLite).

Verified: cargo check + tsc --noEmit pass. Runtime behavior not yet verified.

Co-authored-by: Tempest <tempestai.dev@gmail.com>
Co-authored-by: Tempest <tempestai.dev@gmail.com>
@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
tempest Ready Ready Preview, Comment Jul 18, 2026 5:36pm

Request Review

Co-authored-by: Tempest <tempestai.dev@gmail.com>
@gsvprharsha
gsvprharsha merged commit 760c2ef into main Jul 18, 2026
5 checks passed
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