Web UI Process Manager #12

Merged
mik-tf merged 9 commits from development_web_ui into development 2026-01-28 01:10:28 +00:00
Member

Web UI Process Manager

Adds an embedded web-based process manager to zinit-server, accessible at http://localhost:3875.

  • Axum-based web server behind the web cargo feature flag (included in full)
  • Bootstrap 5 dark-mode UI with service table, context menu (start/stop/restart/delete), and log viewer
  • Stdout/stderr logs with color coding, auto-refresh every 2 seconds
  • Memory and CPU metrics per service
  • Controlled via --web-port flag (default: 3875, set to 0 to disable)
  • New dependencies: axum, tower-http, mime_guess (all optional)

Bug Fixes

  • TUI socket path mismatch -- TUI was hardcoding $HOME/.zinit/socket instead of using sdk::socket::default_path() ($HOME/hero/var/zinit.sock), causing [DISCONNECTED] state
  • kill_others deadlock -- services with kill_others=true were still blocked by port/process conflict checks before they could kill the conflicting processes. Now bypasses the block when kill_others is enabled
  • Self-kill prevention -- kill_others now skips the current zinit process PID
  • pid1 mount removal -- filesystem mounts moved from Rust code to shell scripts (etc/zinit/scripts/) for cleaner separation

Other Changes

  • Rhai embedded scripts and examples (git, net, os, process, rsync, ssh)
  • Improved Makefile with make run, make stop, make play-web targets
  • Enhanced debug logging in log reader
  • Louder diskless mode warnings in sysvol builtin

No breaking changes. Web UI is entirely additive behind a feature flag. All other changes are bugfixes.

# Web UI Process Manager Adds an embedded web-based process manager to zinit-server, accessible at `http://localhost:3875`. - Axum-based web server behind the `web` cargo feature flag (included in `full`) - Bootstrap 5 dark-mode UI with service table, context menu (start/stop/restart/delete), and log viewer - Stdout/stderr logs with color coding, auto-refresh every 2 seconds - Memory and CPU metrics per service - Controlled via `--web-port` flag (default: 3875, set to 0 to disable) - New dependencies: `axum`, `tower-http`, `mime_guess` (all optional) ## Bug Fixes - **TUI socket path mismatch** -- TUI was hardcoding `$HOME/.zinit/socket` instead of using `sdk::socket::default_path()` (`$HOME/hero/var/zinit.sock`), causing `[DISCONNECTED]` state - **kill_others deadlock** -- services with `kill_others=true` were still blocked by port/process conflict checks before they could kill the conflicting processes. Now bypasses the block when `kill_others` is enabled - **Self-kill prevention** -- `kill_others` now skips the current zinit process PID - **pid1 mount removal** -- filesystem mounts moved from Rust code to shell scripts (`etc/zinit/scripts/`) for cleaner separation ## Other Changes - Rhai embedded scripts and examples (git, net, os, process, rsync, ssh) - Improved Makefile with `make run`, `make stop`, `make play-web` targets - Enhanced debug logging in log reader - Louder diskless mode warnings in sysvol builtin **No breaking changes.** Web UI is entirely additive behind a feature flag. All other changes are bugfixes.
fix: remove mount code from pid1 and fix ZinitClient API
Some checks failed
Build Linux / build-linux (linux-amd64, x86_64-unknown-linux-gnu) (push) Failing after 2m6s
51dca331be
- Remove nix::mount usage from zinit-pid1 (filesystems are mounted by
  init script before exec'ing pid1)
- Fix ZinitClient::connect to ZinitClient::unix (API changed)
- Remove unused imports and error variants
fix: add modprobe btrfs before sysvol operations
Some checks failed
Build Linux / build-linux (linux-amd64, x86_64-unknown-linux-gnu) (push) Failing after 1m43s
e5439ccf22
- Sync service definitions and scripts from mos_builder
- Add explicit modprobe btrfs at start of sysvol::init() to fix race
  condition where btrfs module isn't loaded yet when sysvol runs
- Remove orphaned fuse-mounts.toml template
- Add myfs-modules/myfs-firmware services with health checks
- Make diskless mode (NoDisk) much more visible with ERROR-level
  banner so users know when system is running without storage
Merge pull request 'resolve deadlock in self registering services and prevent selfkill' (#11) from main_killothersOD into main
Some checks failed
Build Linux / build-linux (linux-amd64, x86_64-unknown-linux-gnu) (push) Failing after 1m43s
03b0f96c8a
Reviewed-on: #11
* commit '03b0f96c8a':
  fix: add modprobe btrfs before sysvol operations
  resolve deadlock in self registering services and prevent selfkill
  fix: remove mount code from pid1 and fix ZinitClient API
- Standardize socket path to /Users/despiegk/hero/var/zinit.sock across all targets
- Remove conditional socket paths (Linux vs macOS) for consistency
- Fix logging setup: pass RUST_LOG and --log-level to server correctly
- Improve run target output with clear status banner showing PID and next steps
- Update TUI playground script to use standard socket location
- Add test-rhai-embedded target to list embedded Rhai scripts
- Add debug logging to log streaming for troubleshooting

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
- Auto-load logs when clicking a service row (no need for right-click context menu)
- Fix error toast accumulation: only show the latest error at the top
- Auto-dismiss previous error toasts when new ones appear
- Clean up error toast tracking when dismissed
- Refactor selectService function to load logs automatically

This improves UX by:
- Showing logs immediately when you select a service
- Preventing "Failed to fetch services" messages from stacking up
- Displaying only the latest status/error at the top of the screen

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
mik-tf merged commit 067ebd3fec into development 2026-01-28 01:10:28 +00:00
mik-tf deleted branch development_web_ui 2026-01-28 01:10:29 +00:00
Sign in to join this conversation.
No reviewers
No labels
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
geomind_code/zinit!12
No description provided.