Repository navigation
Add interactive target selection - #84
Merged
Merged
Conversation
Running ttl with no arguments now opens an empty interactive session; press 'o' to add targets. The input modal resolves hostnames in the background with a loading state and starts probing immediately - no restart needed. Targets can also be added mid-session in any live TUI run, and entering an already-traced host switches to it. A target-manager task owns runtime growth: it resolves the host, validates family constraints (source IP, interface addresses), creates the session, and spawns the probe engine - plus a receiver the first time an IP family appears. The receiver's Echo Reply fallback now reads the live session map instead of a startup snapshot so replies from dynamically added targets correlate correctly.
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
Implements the full Interactive Target Selection roadmap section:
ttlis now a persistent network investigation tool — start empty, add and switch targets without restarting.ttlwith no arguments opens an empty interactive session with an empty-state screen ("Press 'o' to add a target")oopens a target input modal (text input with cursor, background DNS resolution with a "Resolving..." state, inline errors) — available mid-session in any live TUI run, not just the empty stateArgs::validate)Architecture
AddTargetRequestover an unbounded channel and polls a oneshot reply each tick (no locks shared with the render path). The manager resolves viaspawn_blocking, enforces the same family constraints startup does (--source-ipfamily, interface address availability), creates the session with gateway/source-IP detection, and spawns the probe engine. It owns and joins everything it spawnstargets[selected_target]indexing replaced with guarded access; enrichment workers already iterate the session map dynamically and needed no changesVerification
omodal → typed1.1.1.1→ full trace with rDNS/ASN enrichment appeared (proving runtime receiver spawn from a zero-receiver start) → added8.8.8.8mid-session (proving dynamic correlation with a pre-existing receiver) →[2/2]indicator, Tab switching, and theltarget list all correct → invalid hostname showed the resolver error inline →qexited cleanly