dev@bfd:~/dev-diary$ git show 2026-02
commit 2026-02-22-stabilize-ai-windows-and-unify-terminal-theming
Author: MJ
Date: Feb 22, 2026

2026-02-22 - Stabilize AI windows and unify terminal theming

Timeline

  • (Context) Continued follow-up stabilization work on the public VVOS branch after the shared UI/top-bar integration pass.
  • (Action) Reworked Navigator/Engine webview lifecycle handling, permissions, recall/sever behavior, and provider switching flows.
  • (Observation) Confirmed AI window failures were caused by missing Tauri window permissions and unreliable native close semantics on Windows.
  • (Action) Moved AI-specific provider settings into a dedicated AI settings modal and left global settings as a placeholder for future VVOS controls.
  • (Action) Implemented no-decision fixes: moved reset progress to global settings, added Reader/Native help baseline, and synced Console /read /write commands with shell state.
  • (Action) Ran a colorization cleanup pass to remove the extra write-view per-element override system and unify Reader/Native/Console on a single global theme path.
  • (Action) Iterated on integrated terminal startup and fit behavior (runtime readiness gate, PowerShell execution policy bypass, xterm fit/resize tuning, terminal color zone support).
  • (Observation) Found a state persistence race in shell saves where delayed full-state writes could overwrite newer terminal open/close changes.
  • (Open Thread) Integrated terminal close/open behavior and width persistence still require live verification after recent race and fit fixes.
  • (Open Thread) Reader read-view color drift after interaction likely improved, but needs explicit manual validation against the updated single-source theme flow.

Context

  • Public VVOS refinement work continued after manual porting of shared UI changes from the private branch.
  • Focus shifted from AI window UX wiring to stabilization and regression cleanup across terminal, settings, console commands, and colorization behavior.
  • Multiple bugs were discovered during live testing, including AI window lock states, terminal rendering/fit issues, and theme synchronization conflicts.

Actions

  • Added Tauri window permissions required for AI webview control (show, hide, set-focus) and instrumented deep AI-window runtime logging to trace summon/recall/close lifecycle behavior.
  • Reworked AI window management in the shell to use controlled summon/recall flows, persistent bounds, provider-sync resets, and safer Windows close interception behavior.
  • Simplified the AI panel to SUMMON/RECALL + SEVER CONNECTION, and gated sever actions when windows are actively open.
  • Split AI-specific provider configuration into a new AI settings modal and preserved provider-change save behavior with forced window refresh logic.
  • Removed the stray reset-progress control from the Reader backpack area and moved reset handling into the global settings modal with confirmation flow.
  • Renamed console commands to /write and /read (with backward-compatible aliases) and wired them to update the shared shell read/write mode state.
  • Added baseline [HELP] handling for Reader and Native modes via the shell-level help modal path.
  • Removed the Colorize panel’s write-view per-element override layer and deleted the extra event/listener path that was competing with the global VVOS palette system.
  • Normalized Reader, Native, and Console color behavior around the single vvos-theme-change event and shared global palette keys.
  • Added a TERMINAL colorize option to control the integrated terminal viewport background.
  • Hardened integrated terminal startup by ensuring runtime readiness first and launching PowerShell with execution-policy bypass.
  • Moved terminal setup into PowerShell launch arguments to avoid echoing a long setup command into the visible terminal session.
  • Improved xterm fit behavior with a cleaner fit host, ResizeObserver-driven re-fit, and removal of a CSS padding hack that caused measured/rendered width mismatches.
  • Patched shell save paths to use the latest stateRef in delayed or callback-driven saves to reduce stale-state overwrites.
  • Repeatedly validated changes with npm run build after each patch cluster.

Observations

  • The AI window “locked open” behavior was not a single UI bug; it was a combination of denied Tauri window permissions and Windows/Tauri close-event semantics that did not reliably destroy webviews.
  • Deep runtime logging was essential for isolating the AI lifecycle issue and remains a useful pattern for future shell-level debugging.
  • The colorization conflict was caused by two competing theme systems operating simultaneously (global palette updates plus hidden per-element overrides), which produced inconsistent read/write rendering after interactions.
  • ReaderPane was still acting as a global theme broadcaster, which likely contributed to post-interaction color drift in read view.
  • The integrated terminal clipping and early wrapping behavior matched an xterm FitAddon measurement mismatch caused by CSS/padding changes in the measured terminal area.
  • The terminal close/open inconsistency appears to involve full-state save races, especially when layout changes trigger delayed anchor persistence writes.
  • Build validation stayed green throughout the stabilization sequence, but several fixes still depend on live runtime verification in tauri dev to confirm behavior under real windowing conditions.

Open Threads

  • Verify integrated terminal close/open behavior after the latest stale-state save fixes, especially at mid-range terminal widths.
  • Confirm terminal width persistence across toggle and full app relaunch using non-min/max widths.
  • Validate integrated terminal prompt/path rendering after the xterm fit host and ResizeObserver changes (no clipped edge characters or premature wraps).
  • Re-test Reader read-view color consistency after removing the duplicate theme broadcaster path from ReaderPane.
  • Decide the future global edit-view theme model (preset-based Monaco themes) now that the conflicting per-element override layer has been removed.
  • Continue the planned console follow-up work (directory sync from VVOS navigation and remaining console UX alignment issues already noted in follow-up bug notes).

Boundary Reminder:
Seeds. No maintenance. No roadmap.