4runr-os 2.9.21 → 2.9.23

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.
@@ -1720,7 +1720,8 @@ impl App {
1720
1720
  self.add_log("[ERROR] WebSocket not connected".to_string());
1721
1721
  }
1722
1722
 
1723
- self.request_render("portal_connect");
1723
+ // CRITICAL: Use immediate render for instant status update
1724
+ self.request_immediate_render("portal_connect");
1724
1725
  }
1725
1726
 
1726
1727
  // Typing - edit focused field (immediate render for responsiveness)
@@ -317,7 +317,8 @@ fn main() -> Result<()> {
317
317
  }
318
318
 
319
319
  // CRITICAL: Request render after state change to update UI
320
- app.request_render("gateway_connect_success");
320
+ // CRITICAL: Use immediate render for instant success display
321
+ app.request_immediate_render("gateway_connect_success");
321
322
 
322
323
  // Phase 1.3: Portal will show success state (user closes with ESC)
323
324
  // Don't auto-close - let user see success message
@@ -446,8 +447,8 @@ fn main() -> Result<()> {
446
447
  app.state.connection_portal.error = Some(error_msg.clone());
447
448
  app.add_log(format!("✗ [{}] Gateway connection failed: {}", short_id, error_msg));
448
449
 
449
- // CRITICAL: Request render after state change to update UI
450
- app.request_render("gateway_connect_error");
450
+ // CRITICAL: Use immediate render for instant error display
451
+ app.request_immediate_render("gateway_connect_error");
451
452
  }
452
453
  // Check if this is a response to setup.detect command
453
454
  else if Some(&resp.id) == app.state.pending_setup_detect_id.as_ref() {
@@ -60,7 +60,7 @@ pub fn render(f: &mut Frame, state: &AppState) {
60
60
  Constraint::Length(3), // Header
61
61
  Constraint::Length(2), // Description
62
62
  Constraint::Length(9), // Input fields
63
- Constraint::Min(6), // Content area (error/success/connecting)
63
+ Constraint::Min(10), // Content area (error/success/connecting) - increased for bordered boxes
64
64
  Constraint::Length(3), // Actions
65
65
  ])
66
66
  .split(portal_area);
@@ -157,6 +157,26 @@ fn render_content_area(f: &mut Frame, area: Rect, state: &AppState) {
157
157
  // CRITICAL FIX: Clear the content area before rendering to prevent artifacts
158
158
  f.render_widget(Clear, area);
159
159
 
160
+ // Ensure minimum area size for bordered boxes
161
+ if area.height < 8 || area.width < 20 {
162
+ // Area too small - just show simple text
163
+ let text = if portal.connection_success {
164
+ "✓ Connected"
165
+ } else if portal.error.is_some() {
166
+ "✗ Error"
167
+ } else if portal.connecting {
168
+ "⏳ Connecting..."
169
+ } else {
170
+ "Enter Gateway URL and press Enter to connect"
171
+ };
172
+
173
+ let paragraph = Paragraph::new(text)
174
+ .alignment(Alignment::Center)
175
+ .style(Style::default().fg(if portal.connection_success { NEON_GREEN } else if portal.error.is_some() { ERROR_RED } else if portal.connecting { AMBER_WARN } else { TEXT_DIM }));
176
+ f.render_widget(paragraph, area);
177
+ return;
178
+ }
179
+
160
180
  if portal.connection_success {
161
181
  render_success(f, area, state);
162
182
  } else if let Some(error) = &portal.error {
@@ -170,6 +190,7 @@ fn render_content_area(f: &mut Frame, area: Rect, state: &AppState) {
170
190
  }
171
191
 
172
192
  fn render_connecting(f: &mut Frame, area: Rect) {
193
+ // Clean connecting box
173
194
  let block = Block::default()
174
195
  .title(" ⏳ CONNECTING ")
175
196
  .borders(Borders::ALL)
@@ -180,7 +201,6 @@ fn render_connecting(f: &mut Frame, area: Rect) {
180
201
  f.render_widget(block, area);
181
202
 
182
203
  let lines = vec![
183
- Line::from(""),
184
204
  Line::from(""),
185
205
  Line::from(Span::styled(
186
206
  "Connecting to Gateway server...",
@@ -222,6 +242,7 @@ fn render_error(f: &mut Frame, area: Rect, error: &str) {
222
242
  ("Connection Error", error_msg)
223
243
  };
224
244
 
245
+ // Clean, prominent error box
225
246
  let block = Block::default()
226
247
  .title(format!(" ✗ {}", display_title))
227
248
  .borders(Borders::ALL)
@@ -231,28 +252,25 @@ fn render_error(f: &mut Frame, area: Rect, error: &str) {
231
252
  let inner = block.inner(area);
232
253
  f.render_widget(block, area);
233
254
 
234
- let lines: Vec<Line> = display_msg
255
+ // Clean message formatting - no duplicate title
256
+ let message_lines: Vec<Line> = display_msg
235
257
  .split('\n')
258
+ .filter(|line| !line.is_empty())
236
259
  .map(|line| Line::from(Span::styled(
237
- line,
260
+ line.trim(),
238
261
  Style::default().fg(TEXT_PRIMARY)
239
262
  )))
240
263
  .collect();
241
264
 
242
265
  let mut all_lines = vec![
243
266
  Line::from(""),
244
- Line::from(Span::styled(
245
- display_title,
246
- Style::default().fg(ERROR_RED).bold()
247
- )).alignment(Alignment::Center),
248
- Line::from(""),
249
267
  ];
250
- all_lines.extend(lines);
268
+ all_lines.extend(message_lines);
251
269
  all_lines.extend(vec![
252
270
  Line::from(""),
253
271
  Line::from(Span::styled(
254
272
  "Press Enter to retry or ESC to cancel",
255
- Style::default().fg(TEXT_MUTED).italic()
273
+ Style::default().fg(TEXT_DIM)
256
274
  )).alignment(Alignment::Center),
257
275
  ]);
258
276
 
@@ -274,6 +292,7 @@ fn render_success(f: &mut Frame, area: Rect, state: &AppState) {
274
292
  ("Verifying...", AMBER_WARN)
275
293
  };
276
294
 
295
+ // Clean success box
277
296
  let block = Block::default()
278
297
  .title(" ✓ CONNECTED ")
279
298
  .borders(Borders::ALL)
@@ -284,25 +303,20 @@ fn render_success(f: &mut Frame, area: Rect, state: &AppState) {
284
303
  f.render_widget(block, area);
285
304
 
286
305
  let lines = vec![
287
- Line::from(""),
288
- Line::from(Span::styled(
289
- "Connection Successful!",
290
- Style::default().fg(NEON_GREEN).bold()
291
- )).alignment(Alignment::Center),
292
306
  Line::from(""),
293
307
  Line::from(vec![
294
- Span::styled(" Gateway: ", Style::default().fg(TEXT_DIM)),
308
+ Span::styled("Gateway: ", Style::default().fg(TEXT_DIM)),
295
309
  Span::styled(gateway_url, Style::default().fg(CYBER_CYAN).bold()),
296
310
  ]),
297
311
  Line::from(""),
298
312
  Line::from(vec![
299
- Span::styled(" Status: ", Style::default().fg(TEXT_DIM)),
313
+ Span::styled("Status: ", Style::default().fg(TEXT_DIM)),
300
314
  Span::styled(health_status.0, Style::default().fg(health_status.1).bold()),
301
315
  ]),
302
316
  Line::from(""),
303
317
  Line::from(Span::styled(
304
318
  "Press ESC to close",
305
- Style::default().fg(TEXT_MUTED).italic()
319
+ Style::default().fg(TEXT_DIM)
306
320
  )).alignment(Alignment::Center),
307
321
  ];
308
322
 
@@ -143,8 +143,8 @@ fn render_header(f: &mut Frame, area: Rect, state: &AppState) {
143
143
  };
144
144
 
145
145
  // Line 1: Brand + version + mode + uptime - Bug 3 fix: Use "4Runr." with dot (matches brand logo)
146
- // Use npm package version (2.9.21) - matches package.json
147
- const PACKAGE_VERSION: &str = "2.9.21";
146
+ // Use npm package version (2.9.23) - matches package.json
147
+ const PACKAGE_VERSION: &str = "2.9.23";
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)),
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "4runr-os",
3
- "version": "2.9.21",
3
+ "version": "2.9.23",
4
4
  "type": "module",
5
- "description": "4Runr AI Agent OS - Secure terminal interface for AI agents. v2.9.21: Improved Connection Portal status display - clear bordered boxes for connecting/connected/error states. v2.9.20: Fixed Setup Portal navigation. v2.9.17: Portals are now standalone base screens. ⚠️ Pre-MVP / Development Phase",
5
+ "description": "4Runr AI Agent OS - Secure terminal interface for AI agents. v2.9.23: Cleaned up Connection Portal status displays - removed duplicates, improved spacing, cleaner formatting. v2.9.22: Status fixes with immediate render. v2.9.21: Improved status display. ⚠️ Pre-MVP / Development Phase",
6
6
  "main": "dist/index.js",
7
7
  "bin": {
8
8
  "4runr": "dist/index.js",