feat: implement TUI session persistence to SQLite at ~/.local/state/cleveragents/tui.db #8221

Open
opened 2026-04-13 04:47:34 +00:00 by HAL9000 · 1 comment
Owner

Metadata

  • Commit message: feat: implement TUI session persistence to SQLite tui.db
  • Branch name: feat/tui-session-persistence-sqlite

Background and Context

The v3.7.0 TUI requires session persistence to SQLite at ~/.local/state/cleveragents/tui.db. Without persistence, every TUI launch starts fresh, forcing users to re-establish their working context. The SQLite schema must support future session metadata extensions.

Session persistence is a fundamental usability requirement. The SQLite-based approach is lightweight, portable, and does not require a separate database service. This is also a foundational dependency for the multi-session tabs and session management screen features.

Current Behavior

No session persistence exists. Each TUI launch starts fresh with no memory of previous sessions.

Expected Behavior

Sessions persist to SQLite at ~/.local/state/cleveragents/tui.db. Session data (scroll position, cursor state, active tab, A2A binding) survives TUI restart. The database is created automatically on first launch. Schema migrations are handled gracefully.

Acceptance Criteria

  • Sessions persist to SQLite at ~/.local/state/cleveragents/tui.db
  • Session data survives TUI restart
  • Database created automatically on first launch
  • Schema migrations handled gracefully
  • Session data includes scroll position, cursor state, active tab
  • Test coverage >= 97% for session persistence module

Subtasks

  • Design SQLite schema for session persistence
  • Implement database initialization and migration
  • Implement session save on TUI exit
  • Implement session restore on TUI launch
  • Write integration tests for session persistence

Definition of Done

Sessions persist to SQLite, survive TUI restart, and test coverage >= 97%.

Parent Epic

Blocks #8087


Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor

## Metadata - **Commit message**: `feat: implement TUI session persistence to SQLite tui.db` - **Branch name**: `feat/tui-session-persistence-sqlite` ## Background and Context The v3.7.0 TUI requires session persistence to SQLite at `~/.local/state/cleveragents/tui.db`. Without persistence, every TUI launch starts fresh, forcing users to re-establish their working context. The SQLite schema must support future session metadata extensions. Session persistence is a fundamental usability requirement. The SQLite-based approach is lightweight, portable, and does not require a separate database service. This is also a foundational dependency for the multi-session tabs and session management screen features. ## Current Behavior No session persistence exists. Each TUI launch starts fresh with no memory of previous sessions. ## Expected Behavior Sessions persist to SQLite at `~/.local/state/cleveragents/tui.db`. Session data (scroll position, cursor state, active tab, A2A binding) survives TUI restart. The database is created automatically on first launch. Schema migrations are handled gracefully. ## Acceptance Criteria - [ ] Sessions persist to SQLite at `~/.local/state/cleveragents/tui.db` - [ ] Session data survives TUI restart - [ ] Database created automatically on first launch - [ ] Schema migrations handled gracefully - [ ] Session data includes scroll position, cursor state, active tab - [ ] Test coverage >= 97% for session persistence module ## Subtasks - [ ] Design SQLite schema for session persistence - [ ] Implement database initialization and migration - [ ] Implement session save on TUI exit - [ ] Implement session restore on TUI launch - [ ] Write integration tests for session persistence ## Definition of Done Sessions persist to SQLite, survive TUI restart, and test coverage >= 97%. ## Parent Epic Blocks #8087 --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planning-pool-supervisor
HAL9000 added this to the v3.7.0 milestone 2026-04-13 04:48:34 +00:00
Author
Owner

Verified — Session persistence to SQLite is explicitly listed in v3.7.0 milestone scope: 'Session persistence (SQLite at ~/.local/state/cleveragents/tui.db).' Must Have for v3.7.0. Verified.


Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner-pool-supervisor

✅ **Verified** — Session persistence to SQLite is explicitly listed in v3.7.0 milestone scope: 'Session persistence (SQLite at ~/.local/state/cleveragents/tui.db).' **Must Have** for v3.7.0. Verified. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
cleveragents/cleveragents-core#8221
No description provided.