Skip to content

docs: sync ARCHITECTURE.md section 9 with reality - #248

Merged
EVWorth merged 1 commit into
mainfrom
fix/architecture-md-sync
Jul 22, 2026
Merged

EVWorth merged 1 commit into
mainfrom
fix/architecture-md-sync

Conversation

@EVWorth

@EVWorth EVWorth commented Jul 22, 2026

Copy link
Copy Markdown
Owner

docs: sync ARCHITECTURE.md section 9 with reality

The "Local Storage Architecture" section claimed directories and
schema that don't exist. Replace fiction with the actual state of
the codebase.

Old claims that were wrong (all removed):

  • config.toml — does not exist. Settings are in localStorage via
    zustand stores. Section replaced with a localStorage-key table.
  • history.db — does not exist. Query history is in localStorage
    via historyStore.ts + zustand/middleware::persist. Removed
    the entire history.db schema section.
  • themes/, snippets/, backups/, cache/schema/, cache/ai/
    — none of these directories exist. Replaced with a one-paragraph
    note pointing to the actual storage locations (theme localStorage
    key, favoritesStore, in-memory schema cache, in-memory AI cache).
  • connections.db schema listed password_ref, sort_order,
    pool_config — none of these columns exist. Replaced with the
    ACTUAL schema: 19 columns with their real migration chain (env,
    connect_timeout_secs, query_timeout_secs, charset). The password
    column gets emptied after keyring migration; password is held in
    OS keyring via apple-native-keyring-store, not in the SQL row.
  • query_history table — does not exist. Replaced with a
    paragraph on the in-memory + persist-middleware implementation
    and the future-SQLite migration scope.

The corrected doc has:

  • File tree: connections.db (+ wal/shm) and logs/ only. Two
    text files. No config.toml, no history.db, no themes, no snippets.
  • localStorage keys table (theme, sqlpilot-formatter-settings,
    sqlpilot-query-settings, mas-query-history, mas-query-favorites,
    sqlpilot-editor-session) with their owners and formats.
  • Password storage section explaining the keyring + migration +
    why the SQL password column gets emptied.
  • Actual connection_profiles SQL with the real 19 columns and a
    migration chain table.
  • A short paragraph on the missing password_ref / sort_order /
    pool_config so future contributors don't assume they exist.

No code changes. Pure doc.

Cross-linked to #241 (SQLite migration framework) — the .ok()-
swallowed ALTER TABLE approach flagged as needing replacement with
a PRAGMA user_version-gated runner.

The "Local Storage Architecture" section claimed directories and
schema that don't exist. Replace fiction with the actual state of
the codebase.

Old claims that were wrong (all removed):
- `config.toml` — does not exist. Settings are in localStorage via
  zustand stores. Section replaced with a localStorage-key table.
- `history.db` — does not exist. Query history is in localStorage
  via `historyStore.ts` + `zustand/middleware::persist`. Removed
  the entire history.db schema section.
- `themes/`, `snippets/`, `backups/`, `cache/schema/`, `cache/ai/`
  — none of these directories exist. Replaced with a one-paragraph
  note pointing to the actual storage locations (theme localStorage
  key, favoritesStore, in-memory schema cache, in-memory AI cache).
- `connections.db` schema listed `password_ref`, `sort_order`,
  `pool_config` — none of these columns exist. Replaced with the
  ACTUAL schema: 19 columns with their real migration chain (env,
  connect_timeout_secs, query_timeout_secs, charset). The `password`
  column gets emptied after keyring migration; password is held in
  OS keyring via `apple-native-keyring-store`, not in the SQL row.
- `query_history` table — does not exist. Replaced with a
  paragraph on the in-memory + persist-middleware implementation
  and the future-SQLite migration scope.

The corrected doc has:
- File tree: `connections.db` (+ wal/shm) and `logs/` only. Two
  text files. No config.toml, no history.db, no themes, no snippets.
- localStorage keys table (theme, sqlpilot-formatter-settings,
  sqlpilot-query-settings, mas-query-history, mas-query-favorites,
  sqlpilot-editor-session) with their owners and formats.
- Password storage section explaining the keyring + migration +
  why the SQL `password` column gets emptied.
- Actual `connection_profiles` SQL with the real 19 columns and a
  migration chain table.
- A short paragraph on the missing `password_ref` / `sort_order` /
  `pool_config` so future contributors don't assume they exist.

No code changes. Pure doc.

Cross-linked to #241 (SQLite migration framework) — the `.ok()`-
swallowed ALTER TABLE approach flagged as needing replacement with
a `PRAGMA user_version`-gated runner.
@EVWorth
EVWorth merged commit d91005f into main Jul 22, 2026
10 checks passed
@EVWorth
EVWorth deleted the fix/architecture-md-sync branch July 22, 2026 01:17
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