Skip to content

Latest commit

 

History

History
177 lines (147 loc) · 6.66 KB

File metadata and controls

177 lines (147 loc) · 6.66 KB

Slate Development Log

2026-03-06

Session 1

Completed

  • Authored architecture and phased implementation plan in /docs/SLATE_MVP_PLAN.md.
  • Scaffolded a full Tauri + React + TypeScript project in the repository root.
  • Implemented MVP shell UI:
    • dark theme
    • top bar
    • table sidebar
    • spreadsheet-like grid view
    • record detail panel
    • create table modal
    • add column modal
  • Added frontend state/data flow with Zustand for:
    • load workspace
    • select table
    • search current table
    • table CRUD hooks
    • field CRUD hooks
    • record CRUD hooks
  • Implemented Rust backend structure and SQLite services:
    • database initialization/migrations
    • app metadata tables (app_meta, app_tables, app_fields, app_views)
    • generalized link table (record_links)
    • starter table seeding (Contacts, Notes, Projects, Ideas)
    • physical data table strategy (data_<id> per logical table)
    • table/field/record command handlers for frontend invoke calls
  • Added project docs and README bootstrap instructions.

Verification

  • npm install completed successfully.
  • npm run build completed successfully (TypeScript + Vite production build).
  • npm run tauri dev currently fails because cargo is not installed in this environment.

Current Blocker

  • Rust toolchain is missing (cargo not found), so native Tauri/Rust compile and runtime validation is pending.

Next Priority

  1. Install Rust toolchain.
  2. Run npm run tauri dev and resolve any Rust compile errors.
  3. Validate end-to-end SQLite CRUD from UI interactions.
  4. Add targeted tests for backend schema and record operations.

Session 2

Completed

  • Installed Rust toolchain via rustup:
    • cargo 1.94.0
    • rustc 1.94.0
  • Resolved Tauri dev/runtime blockers:
    • fixed Tauri package version mismatch (aligned NPM and Rust crates)
    • updated Vite/Tauri dev URL host to IPv4 (127.0.0.1) to avoid IPv6 binding issues in this environment
    • generated proper app icons with tauri icon from src-tauri/icons/slate-icon.svg
    • fixed Rust setup error typing in src-tauri/src/lib.rs
  • Verified native startup with npm run tauri -- dev (app compiles and launches).
  • Added backend test suite in src-tauri/src/tests.rs covering:
    • metadata/starter seed initialization
    • table/field/record CRUD flows
    • current-table search behavior
    • generalized record link persistence
    • guardrail: cannot delete last remaining field in a table
  • Replaced README with a detailed GitHub-ready project document.

Verification

  • cargo test --manifest-path src-tauri/Cargo.toml passed:
    • 2 tests passed, 0 failed.
  • npm run tauri -- dev now starts successfully.

Notes

  • A broad cargo lockfile was generated for native dependencies (src-tauri/Cargo.lock) during the first successful Rust build.
  • link_service::create_link is currently marked #[allow(dead_code)] because relationship UI wiring is still intentionally deferred.

Session 3

User-Reported Fix

  • Issue: UI showed Failed to create column when adding a field.

Changes

  • Added backend self-healing for metadata/data-table drift:
    • new schema helpers to detect table/column existence
    • new repair_table_storage and repair_all_table_storage
    • automatic repair run during DB init
    • record and field operations now call repair guard before mutating/querying
  • Improved frontend error extraction in Zustand store:
    • backend string/object errors now surface the actual message instead of generic fallback text.
  • Expanded backend tests to simulate corruption:
    • dropped physical table for a logical table
    • verified create_field auto-repairs storage and succeeds.

Verification

  • npm run build passed.
  • cargo test --manifest-path src-tauri/Cargo.toml passed.
  • npm run tauri -- dev startup check passed.

Session 4

Feature Work

  • Added working Link fields in UI:
    • Link field type is now available when adding columns.
    • Link cells now include an Open action in the grid.
    • Link fields in the detail panel include an Open Link action.
  • Added record-level attachments (alternative to attachment columns):
    • New SQLite metadata table: record_attachments.
    • New backend attachment service with native file picker, open, remove, and list behavior.
    • Attachment cleanup on record/table delete.
    • New detail-panel attachment section with Attach File, Open, and delete controls.

Backend Additions

  • New service: src-tauri/src/services/attachment_service.rs.
  • New commands:
    • list_record_attachments
    • attach_file_to_record
    • delete_attachment
    • open_attachment

Verification

  • npm run build passed.
  • cargo test --manifest-path src-tauri/Cargo.toml passed.
  • npm run tauri -- dev startup check passed.

Session 5

Feature Work: Cross-Table Record Linking

  • Implemented generalized record linking UI in the record detail panel:
    • link current record to any record in any table
    • list linked records with target table context
    • remove linked references
    • click/open linked record and jump to target table + record
  • Implemented backend link command surface:
    • list_record_links
    • create_record_link
    • delete_record_link
    • list_record_options (record picker options per table, using primary field labels)
  • Added link cleanup on deletion:
    • when deleting a record, related links are removed
    • when deleting a table, links involving that table are removed

Verification

  • npm run build passed.
  • cargo test --manifest-path src-tauri/Cargo.toml passed.
  • npm run tauri -- dev startup check passed.

Session 6

Launch Reliability

  • Added startup timeout wrapper around init_app invoke in frontend store initialization.
  • Prevents indefinite Loading Slate... state when backend IPC does not respond.
  • New timeout message: Slate backend did not respond during startup. Restart the app and try again.

Verification

  • npm run build passed.

Session 7

Startup Hang Mitigation

  • Added a UI-level startup watchdog in App.tsx to force-exit loading state after 12s.
  • Added forceStartupFailure store action to safely stop loading and surface a clear error.
  • Loading overlay now hides when an error is present (loading && !error) so startup failures are visible.

Verification

  • npm run build passed.
  • npm run tauri -- dev startup check passed.

Session 8

Local State Reset

  • Backed up existing app DB to:
    • ~/Library/Application Support/com.tadpole.slate/slate.db.backup-20260306-123618
  • Reset active DB by removing slate.db (and sidecars).
  • Verified fresh DB re-created on launch and seeded (app_tables count = 4).

Verification

  • npm run tauri -- dev startup check passed after reset.