fix: Shifting persistence mechanisms from json to local Sql db for better session management - #6
Merged
Merged
Conversation
… 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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Co-authored-by: Tempest <tempestai.dev@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.