mirror of
https://github.com/robcholz/vibebox.git
synced 2026-04-02 00:20:13 +02:00
* refactor: cleanup duplicated logic * refactor: cleanup config.rs * refactor: cleanup explain.rs * refactor: cleanup instance.rs * refactor: cleanup * refactor: use UnixStream instead of status file * Refactor vm lifetime (#8) * fix: handle vm supervisor being killed * fix: fixed the loop connection retry * refactor: extracted vm_manager liveness check logic * Script failure report (#9) * feat: added script failure report * feat: vm error report can also report ssh.sh * refactor: liveness check when connecting to ssh * fix: fixed the wrong InstanceError::VMError * fix: fixed the is_lock_stable
3.1 KiB
3.1 KiB
Tasks
SessionManager
- Confirm requirements and scope from
implementations.md. - Define
SessionManagerresponsibilities and public API (create, load, list, update, delete, bump last_active, refcount handling, cleanup orphaned index entries). - Choose 3rd-party crates for UUIDv7, TOML persistence, and error handling (e.g.,
uuidwith v7,serde+toml,thiserror). - Write user journeys and unit test cases first (happy paths + error paths) for session lifecycle and index persistence.
- Implement
SessionManagerand supporting types withResult-based errors, filesystem IO, and atomic writes. - Add tests for edge cases (missing index, invalid TOML, duplicate sessions, refcount transitions, cleanup on missing instance dir).
- Run tests and coverage; target >=80% line/branch coverage using a Rust coverage tool (e.g.,
cargo llvm-cov). - Refactor for clarity and reliability while keeping tests green.
TUI
- Review
docs/tui.mdrequirements and translate into concrete UI sections and state model. - Add required dependencies for ratatui/crossterm/tokio/color-eyre/futures and pick a text input widget crate.
- Write unit tests for layout calculations (header/terminal/input/status/completions), completion state transitions, and CLI argument parsing.
- Implement TUI state model (header info, terminal history, input area, completion list, status bar visibility).
- Implement rendering functions for header, terminal area, input area, completions, and status bar.
- Implement async event loop (keyboard, resize, tick) with crossterm EventStream + tokio.
- Add a standalone TUI CLI binary (no main.rs wiring) with placeholder VM info and TODOs for VM integration.
- Run tests and validate coverage for the new module.
TUI
- Fix the terminal component height issue.
- Fix the input field that does not expand its height (currently, it just roll the text horizontally). The inputfield it should not be scrollable.
Stage 1
- Wire up the vm and tui.
- Use ssh to connect to vm.
- allow multi vibebox to connect to the same vm.
- use vm.lock to ensure process concurrency safety.
- wire up SessionManager.
- VM should be separated by a per-session VM daemon process (only accepts if to shut down vm and itself).
- setup vibebox commands
- setup cli commands.
- Organize all the params.
- Remove old cli.
- add an actual config file.
- set up the cli.
- fix ui overlap, and consistency issue.
purge-cacheto clear the cache.- intensive integration test.
Publish
- write the docs.
- setup quick install link.
- setup website.
Stage 2
- retouch the cli ux.
- refactor the code.
- refactor the mount system.
- refactor the vm process lifetime.
- Redirect vm output to log.
- Redirect vm output to vibebox starting it.
- use anyhow to sync api.
- add support for ipv6.
- use UnixStream instead of status file
- liveness check should also happen when waiting for ssh port