feat: keyword highlighting, server monitor, network discovery, import sources (v0.1.34)#58
Conversation
Render-layer overlay approach via xterm fork — scans only visible lines at paint time, no data mutation, recordings unaffected.
…implementation plan
… and verbose defaults
…tRules persistence
…ncation, Color.toARGB32 - Error/Fail/Warning/Warn default backgrounds: 0xFF→0xCC (80% opacity) so text stays legible under the background rect (opaque colors painted post-glyph would cover the matched text entirely) - _paintKeywordHighlights lineY: add .truncateToDouble() to match paintLine's coordinate rounding and avoid sub-pixel vertical misalignment - Color serialization: foreground?.value → toARGB32() to silence deprecation
Per-host live monitoring panel — CPU/mem/disk/uptime/ports/firewall via draggable bottom sheet on the Hosts Dashboard. Covers models, two polling services (SystemStatsService 5s, FirewallStatusService 30s), UI layout, error handling, and test plan.
…em/disk/ports/firewall
- local_terminal_pane + recording_player_widget: pass keywordRules so local shells and recording playback actually show highlights - split_terminal_view + main_screen: thread onNavigateToSettings so the 'Manage rules in Settings →' link in the config panel is reachable - terminal_view: remove redundant context.select (context.watch already subscribes; select was a no-op and produced a new list identity each build) - render.dart: build a string-index → cell-column map before matching so highlights land on the correct pixel column when wide (CJK) chars are present - keyword_highlight_rule: guard toXtermRule against both-null fg+bg (avoids a no-op rule scanning every visible line); treat missing 'id' in fromJson as null so constructor auto-generates a UUID instead of throwing TypeError - keyword_highlight_settings: re-read provider state after await showDialog to avoid stale-snapshot overwrites; re-check rule cap before add() to close the sync-race window that could push count past kMaxKeywordHighlightRules
- fix #1: Connect button broken — move Navigator.pop() after await addHost so context.mounted is true and connectAny actually fires - fix #2: hostsInSubnet now respects CIDR prefix length (was always 254); /25 → 126 hosts, /23 → 510, /16 → 65534 - fix #3: mDNS service types scanned in parallel via Future.wait (max 5s instead of sequential 3x5s = 15s freeze) - fix #4: per-scan _ScanToken replaces shared _cancelled field; restarting a scan no longer resets the old scan's cancellation state - fix #5: onSave checks context.mounted before context.read<HostProvider> - fix #6: _onAdd passes builder context (panelCtx) to onClose so close targets the panel route, not potentially an open sub-dialog - fix #7: subnetFromAddress guards against <4-part addresses (IPv6/empty) - fix #8: _mdnsCount/_tcpCount derived from _results (not separate mutable counters that diverge when hosts are merged from two sources) - fix #9: DiscoveredHost.preferredPort extracted; removes duplication between _onAdd and _onConnect - fix #10: SubnetInfo.interfaceDisplayName is single source of truth; P2PSyncService.NetworkInterfaceInfo.displayName delegates to it
…CRT XML + Ansible parsers; fix xml extension import
…er monitor, network discovery, import expansion
Add ImportSource enum and ImportSourceDef registry (9 sources) to import_panel.dart, and wire a 3-column grid source-picker as the new first step of the import flow. Selecting a source shows the existing file/paste UI scoped to that source's file extensions, hint text, and parser; the back arrow returns to the picker. Legacy exported functions (parseSshConfig, parseCsvHosts, parseJsonHosts, detectAndParse) are unchanged for backward compat.
…line.dart import in xterm render
…olling services SystemStatsService and FirewallStatusService now guard against overlapping poll() calls with _inFlight, surface errors via optional onError callback, and log failures with debugPrint instead of swallowing them silently.
Wire onError callbacks from both polling services into _statsError / _firewallError fields; show inline error text when the first poll fails instead of a perpetual spinner. Update the widget test's fake SSH to use a never-completing future so the loading-state test remains valid.
…rvice
Replace bare catch(_){} with catch(e) + debugPrint in: mDNS bind failure,
mDNS A-record lookup, DNS fallback, per-service-type timeout, and the
top-level run().catchError handler. TCP scan is unaffected by mDNS errors.
… NetworkDiscoverySheet _loadSubnets now catches interface enumeration failures and surfaces them via _subnetsError. The stream onError handler now logs via debugPrint and sets _scanError shown in the result list. Both error strings render in the UI instead of being silently discarded.
…cel test DiscoveredHost.merge() now preserves the source when both sides share the same source (e.g. two TCP hits) instead of always upgrading to 'both'. The cancel-stops-emitting test now asserts emitted < 254 (scan interrupted before completion) instead of the vacuously-true >= 0.
RenderTerminal.keywordRules setter now performs a structural comparison (pattern source, case-sensitivity, foreground, background) when identity differs, preventing unnecessary repaints every build() due to a freshly allocated list with identical contents.
…aceDisplayName, toXtermRule - KnownHostsImporter: 10 cases covering happy path, bracket format, comma-separated hosts, @cert-authority skip, hashed-line skip, !negation strip, malformed base64 skip, empty input, comments, and short lines - DiscoveredHost.preferredPort: 4 cases (RDP, port 22, port 2222, fallback) - DiscoveredHost.merge source: same-source preserves source; mixed → both - SubnetInfo.interfaceDisplayName: 6 cases (en0, wlan0, eth0, utun0, bridge0, unknown) - AppKeywordHighlightRule.toXtermRule: null when both colors null - FirewallStatusService: stop() cancels timer; onError callback fires on exec exception
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.reg, MobaXterm.mxtsessions, SecureCRT XML, Ansible INI, WinSCP.ini, Termius JSON, SSH URI (one per line)Fixes (post-review)
debugPrinton all silent catches in NetworkDiscoveryService_loadSubnetserror handling in NetworkDiscoverySheetDiscoveredHost.merge()source field fixed (was alwaysboth)Test Plan
flutter test— 1333 tests passflutter analyze— no issues~/.ssh/known_hosts