mirror of
https://github.com/robcholz/vibebox.git
synced 2026-05-20 06:54:40 +02:00
feat: added tui
This commit is contained in:
+21
-2
@@ -1,5 +1,7 @@
|
||||
# Tasks
|
||||
|
||||
## SessionManager
|
||||
|
||||
1. [x] Confirm requirements and scope from `implementations.md`.
|
||||
2. [x] Define `SessionManager` responsibilities and public API (create, load, list, update, delete, bump last_active, refcount handling, cleanup orphaned index entries).
|
||||
3. [x] Choose 3rd-party crates for UUIDv7, TOML persistence, and error handling (e.g., `uuid` with v7, `serde` + `toml`, `thiserror`).
|
||||
@@ -8,5 +10,22 @@
|
||||
6. [x] Add tests for edge cases (missing index, invalid TOML, duplicate sessions, refcount transitions, cleanup on missing instance dir).
|
||||
7. [ ] Run tests and coverage; target >=80% line/branch coverage using a Rust coverage tool (e.g., `cargo llvm-cov`).
|
||||
8. [x] Refactor for clarity and reliability while keeping tests green.
|
||||
9. [ ] Add TUI interface.
|
||||
10. [ ] Integrate VM and SessionManager together.
|
||||
|
||||
## TUI
|
||||
|
||||
1. [x] Review `docs/tui.md` requirements and translate into concrete UI sections and state model.
|
||||
2. [x] Add required dependencies for ratatui/crossterm/tokio/color-eyre/futures and pick a text input widget crate.
|
||||
3. [x] Write unit tests for layout calculations (header/terminal/input/status/completions), completion state transitions, and CLI argument parsing.
|
||||
4. [x] Implement TUI state model (header info, terminal history, input area, completion list, status bar visibility).
|
||||
5. [x] Implement rendering functions for header, terminal area, input area, completions, and status bar.
|
||||
6. [x] Implement async event loop (keyboard, resize, tick) with crossterm EventStream + tokio.
|
||||
7. [x] Add a standalone TUI CLI binary (no main.rs wiring) with placeholder VM info and TODOs for VM integration.
|
||||
8. [ ] Run tests and validate coverage for the new module.
|
||||
|
||||
## TUI
|
||||
|
||||
|
||||
|
||||
## Integration
|
||||
|
||||
1. [ ] Integrate VM and SessionManager together.
|
||||
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
# TUI
|
||||
|
||||
The end-user ui for the vibebox
|
||||
|
||||
## TUI header
|
||||
|
||||
- This is a welcome header.
|
||||
- Shows text: "Welcome to Vibebox vX.X.XX"
|
||||
- Shows the ASCII banner
|
||||
- An outlined box
|
||||
- Shows the current directory
|
||||
- Shows current vm version and max memory, cpu cores
|
||||
- The position is flex, so this will move with the VM terminal history.
|
||||
|
||||
## Terminal Area
|
||||
|
||||
- Shows all the VM terminal history
|
||||
|
||||
## Vibebox input area
|
||||
|
||||
- A text input area, user can input text in it, it can vertically expand depending on the text length, by default it
|
||||
is a line high.
|
||||
- it should be able to switch to auto-completion mode, which will display a list of available commands. When in this mode, the bottom
|
||||
status bar will disappear. The auto completions are displayed right below the text input area.
|
||||
|
||||
## Bottom status bar
|
||||
|
||||
- Display texts in gray, a line high. on the left it shows `:help` for help.
|
||||
Reference in New Issue
Block a user