Skip to content

Fix :ide AOT segfault and bare Esc; dashboard node Info tab; terminal-escape hardening (v1.65.0) - #144

Merged
gmpassos merged 4 commits into
masterfrom
fix/ide-render-crash
Oct 25, 2026
Merged

gmpassos merged 4 commits into
masterfrom
fix/ide-render-crash

Conversation

@gmpassos

@gmpassos gmpassos commented Oct 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Fixed: omnyshell ide segfault on first frame

Fixed: a bare Esc did nothing in :ide and the dashboard

  • A lone ESC byte stayed buffered in KeyDecoder until another key arrived. A new LoneEscapeTimer, shared by both apps, delivers it as Escape after 50 ms with no more input. Escape sequences split across two reads still decode.

Added: node Info tab in the dashboard

  • An opened node has Sessions · Info · Credentials tabs (s / i / c). i on the node list opens a node straight onto Info. Esc on any of them goes back to the node list.
  • Info shows identity, OS, OS version, arch, CPUs, hostname, agent version compared with this client, Dart runtime, capabilities, labels and the connection. It scrolls, wraps long values by column (emoji-safe), and r refreshes it.
  • Sessions shows a one-line node summary instead of duplicating Info, and only loads sessions when they haven't been loaded yet.
  • PlatformInfo gains optional osVersion, cpuCount and runtimeVersion, left out of the JSON when unknown. Older nodes and Hubs keep working, and the tab shows "not reported" for them. :info shows the new fields too.

Security: node-supplied text can't inject terminal escapes

  • ScreenBuffer paints control characters (C0, DEL, C1) as � and :info strips them. Before this, a hostile node's hostname, labels or OS version could clear the screen, set the window title or write to the clipboard on the user's terminal.

Review fixes

I ran a high-effort review of the branch and addressed 9 of its 10 findings:

  • a stale background credentials load could land on another node or tab
  • Esc on Info triggered an RPC instead of going back
  • long label keys were truncated
  • a label keyed Status was colored like the node's status
  • wrapping split surrogate pairs
  • switching back to Sessions re-fetched sessions every time
  • node detail was built in two places
  • the Esc-timer logic was duplicated in both apps
  • the terminal-escape issue above

I skipped one: tagging the AOT test as opt-in. It runs in about 2 s, and a tag would stop default CI from running it.

Bumps to 1.65.0 (1.64.2 was tagged) with CHANGELOG entries.

Test plan

  • The AOT regression test fails on the 1.64.2 code and passes on the fix
  • Dashboard: Info content and wrapping, "not reported" for older agents, scroll plus refresh, a node dropping out of the list, tab navigation with sessions loaded once, Esc leaving from Info and Credentials with no RPC, a stale credentials load dropped, long label keys, emoji wrapping, no Status color on labels, a split arrow key not taken for Escape
  • ScreenBuffer control-character tests, :info stripping, LoneEscapeTimer unit tests, PlatformInfo round-trip and wire shape
  • format, analyze --fatal-infos, dependency_validator and pub publish --dry-run all clean
  • test/unit (1231) and test/integration (298) pass locally

🤖 Generated with Claude Code

renderDiff promoted `previous` through a `reusable` boolean; the Dart
3.13 AOT compiler hoisted `previous._cells` past that guard, reading
from null on the first frame. Resolve the previous cells to a nullable
local before the loop instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.22064% with 5 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...rc/application/client/dashboard/dashboard_app.dart 98.14% 4 Missing ⚠️
lib/src/application/client/ide/ide_app.dart 92.85% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

…runtime (v1.65.0)

An opened node now has Sessions / Info / Credentials tabs (s / i / c; i
on the node list opens Info directly). Info shows identity, OS and OS
version, arch, CPU count, hostname, agent version vs. this client, Dart
runtime, capabilities, labels and the connection.

PlatformInfo gains optional osVersion, cpuCount and runtimeVersion,
omitted from the JSON when unknown so older nodes and Hubs interoperate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gmpassos gmpassos changed the title Fix :ide segfault on first frame under AOT (v1.64.3) Fix :ide AOT segfault; add dashboard node Info tab (v1.65.0) Oct 25, 2026
gmpassos and others added 2 commits October 25, 2026 00:36
A lone ESC byte stayed buffered in KeyDecoder until another key arrived,
so a bare Esc did nothing in :ide or the dashboard until the next
keypress. Both apps now flush it after KeyDecoder.escapeTimeout (50 ms)
when nothing follows; a sequence split across reads still decodes.

Tests: an integration test AOT-compiles a renderDiff driver (it crashes
on the 1.64.2 code), node-tab navigation and Esc, a node dropping out on
refresh, mid-word wrapping, split arrow keys, and :info's new fields.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- ScreenBuffer paints control characters as U+FFFD and :info strips
  them, so node-reported text (hostname, labels, OS version) cannot
  inject terminal escape sequences.
- Dashboard: a background credentials load that settles after the user
  left the tab or node is dropped instead of landing on another screen;
  Esc on Info/Credentials leaves the node with no RPC; returning to
  Sessions only fetches when never loaded.
- Info rows are typed (no colouring by label text); label keys go whole
  into the wrapping column; wrapping measures runes, not UTF-16 units.
- The Sessions tab shows a one-line summary instead of duplicating Info.
- The lone-ESC timeout lives in one LoneEscapeTimer used by both apps.
- Reference the upstream VM bug (dart-lang/sdk#63413, backport request
  dart-lang/sdk#64723) in the renderDiff comment and CHANGELOG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gmpassos gmpassos changed the title Fix :ide AOT segfault; add dashboard node Info tab (v1.65.0) Fix :ide AOT segfault and bare Esc; dashboard node Info tab; terminal-escape hardening (v1.65.0) Oct 25, 2026
@gmpassos
gmpassos merged commit dbfa9f6 into master Oct 25, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant