6 Commits

Author SHA1 Message Date
ruohki 065365662c feat: add idle timeout and parent process death detection
Prevents orphaned bbs-md processes when SSH sessions disconnect
uncleanly. Adds two mechanisms:

- Parent death check: polls getppid() each loop iteration and exits
  when the parent (sshd) dies, detecting session orphaning immediately.
- Idle timeout: configurable idle_timeout_minutes in bbs.toml (default
  0 = disabled) exits after no keyboard/mouse input for the duration.
2026-03-01 18:50:29 +01:00
ruohki 8ef587c163 feat: add inline image rendering and remove bundled vault
- Add ratatui-image and image crates for terminal image support
- Auto-detect terminal protocol (Kitty/iTerm2/Sixel) with halfblocks fallback
- Render inline images with Protocol API, cache decoded images
- Handle partial scroll visibility via temp-buffer rendering
- Support alpha compositing (RGBA→RGB) and dynamic height adjustment
- Add force_halfblocks config option to bypass protocol detection
- Suppress link brackets around image-wrapped links
- Remove bundled vault files (demo content moved to test vault)
- Add .gitignore for target dir and .DS_Store
2026-03-01 15:17:47 +01:00
ruohki 5759ec83e6 feat(quick-3): add ureq dep, allowed_remote_domains config, and fetch_remote_markdown
- Add ureq = "2.12" to Cargo.toml for synchronous HTTP fetching
- Add allowed_remote_domains: Vec<String> field to Config struct with serde default
- Add RemoteDocument enum with Loaded/DomainNotAllowed/FetchError/NotMarkdown variants
- Add fetch_remote_markdown() with domain whitelist, 10s timeout, content-type validation, 5MB body limit
2026-03-01 13:12:27 +01:00
ruohki 6aa5a940f2 chore(04-01): add Phase 4 deps and create splash module
- Add notify = "6.1", ansi-to-tui = "8.0", walkdir = "2.5" to Cargo.toml
- Create src/splash.rs with load_splash() using IntoText trait
- Add mod splash to main.rs module declarations
- Verified single ratatui-core v0.1.0 in dependency tree
2026-02-28 23:46:45 +01:00
ruohki 7622d41496 feat(02-01): add Phase 2 deps and vault file-loading module
- Add pulldown-cmark 0.13.1, syntect 5.3 (default-fancy), syntect-tui 3.0 to Cargo.toml
- Create src/vault.rs with VaultDocument enum (Loaded/Missing/ReadError variants)
- Implement load_document() using std::fs::read_to_string with structured error mapping
- cargo check passes with all new dependencies resolved
2026-02-28 22:11:55 +01:00
ruohki 65313eac31 feat(01-01): add Phase 1 deps and implement config/CLI loading
- Add signal-hook 0.4.3, toml 1.0.3, serde 1.0, clap 4.5 to Cargo.toml
- Create src/config.rs with Config struct (deny_unknown_fields, serde defaults)
- Implement load_config() with vault_path resolution relative to config file dir
- Implement resolve_config_path() using binary-adjacent bbs.toml as default
- Implement print_config_error() with BBS-themed error messages
- Implement detect_login_shell() and parse_cli() with argv[0] dash stripping
- Create src/terminal.rs with init_terminal(), restore_terminal(), install_panic_hook()
- Wire early startup path in src/main.rs before terminal initialization
2026-02-28 21:12:29 +01:00