4runr-os 2.9.54 → 2.9.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,7 +2,7 @@ use anyhow::Result;
2
2
  use crossterm::cursor;
3
3
  use crossterm::event::{self, Event, KeyEventKind, MouseEventKind};
4
4
  use crossterm::execute;
5
- use crossterm::terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen, Clear, ClearType, size as terminal_size};
5
+ use crossterm::terminal::{disable_raw_mode, enable_raw_mode, EnterAlternateScreen, LeaveAlternateScreen, Clear, ClearType};
6
6
  use ratatui::prelude::*;
7
7
  use std::time::{Duration, Instant};
8
8
 
@@ -597,14 +597,9 @@ fn main() -> Result<()> {
597
597
  (None, _) => true,
598
598
  };
599
599
 
600
- // When opening Setup Portal in windowed mode, terminal size can be stale → corruption/duplicates.
601
- // Force OS to report current size and redraw once so layout uses correct dimensions.
602
- let switching_to_setup = is_switching && current_screen == crate::screens::Screen::SetupPortal;
603
- if switching_to_setup {
604
- let _ = terminal_size(); // sync terminal dimensions (e.g. after restore-down)
605
- }
606
-
607
600
  if is_switching {
601
+ #[cfg(debug_assertions)]
602
+ eprintln!("[MAIN] SCREEN SWITCH: {:?} -> {:?} (clearing)", previous_screen, current_screen);
608
603
  terminal.clear()?;
609
604
  }
610
605
 
@@ -612,11 +607,6 @@ fn main() -> Result<()> {
612
607
  terminal.draw(|f| app.render(f))?;
613
608
  let render_duration = render_start.elapsed().as_millis() as u64;
614
609
  app.record_render(render_duration);
615
-
616
- // Second frame when opening Setup Portal: ensures correct layout when windowed (no stale size).
617
- if switching_to_setup {
618
- app.request_immediate_render("setup_portal_second_frame");
619
- }
620
610
 
621
611
  // Update previous screen tracking
622
612
  previous_screen = Some(current_screen);
@@ -144,7 +144,7 @@ fn render_header(f: &mut Frame, area: Rect, state: &AppState) {
144
144
 
145
145
  // Line 1: Brand + version + mode + uptime - Bug 3 fix: Use "4Runr." with dot (matches brand logo)
146
146
  // Use npm package version (2.9.24) - matches package.json
147
- const PACKAGE_VERSION: &str = "2.9.54";
147
+ const PACKAGE_VERSION: &str = "2.9.56";
148
148
  let brand_line = Line::from(vec![
149
149
  Span::styled("4Runr.", Style::default().fg(BRAND_PURPLE).add_modifier(Modifier::BOLD)),
150
150
  Span::styled(" AI AGENT OS", Style::default().fg(BRAND_VIOLET)),
@@ -27,9 +27,23 @@ pub fn render(f: &mut Frame, state: &mut AppState) {
27
27
 
28
28
  let area = f.size();
29
29
 
30
+ // Debug: log dimensions when building with debug_assertions (cargo run / debug build)
31
+ #[cfg(debug_assertions)]
32
+ {
33
+ static mut LAST_DIMS: Option<(u16, u16)> = None;
34
+ unsafe {
35
+ let changed = LAST_DIMS.map_or(true, |(w, h)| w != area.width || h != area.height);
36
+ if changed {
37
+ eprintln!("[SETUP_PORTAL] R#{} DIMS: {}x{} (prev: {:?})", render_id, area.width, area.height, LAST_DIMS);
38
+ LAST_DIMS = Some((area.width, area.height));
39
+ }
40
+ }
41
+ }
42
+
30
43
  // CRITICAL: Validate terminal size before rendering
31
- // This prevents character corruption when terminal size is wrong on initial render
32
44
  if area.width == 0 || area.height == 0 {
45
+ #[cfg(debug_assertions)]
46
+ eprintln!("[SETUP_PORTAL] R#{} INVALID DIMS: {}x{} - skip", render_id, area.width, area.height);
33
47
  return;
34
48
  }
35
49
 
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "4runr-os",
3
- "version": "2.9.54",
3
+ "version": "2.9.56",
4
4
  "type": "module",
5
- "description": "4Runr AI Agent OS - Secure terminal interface for AI agents. v2.9.54: Setup Portal - fix open-while-windowed (size sync + second frame). v2.9.53: Clear + padded details. ⚠️ Pre-MVP / Development Phase",
5
+ "description": "4Runr AI Agent OS - Secure terminal interface for AI agents. v2.9.56: Setup Portal debug logs only in debug builds. v2.9.55: Bump for republish. ⚠️ Pre-MVP / Development Phase",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
8
  "4runr": "dist/index.js",