Refactor aircraft flags and enhance TUI breadcrumbs with route info - #16
Open
frankea wants to merge 2 commits into
Open
Refactor aircraft flags and enhance TUI breadcrumbs with route info#16frankea wants to merge 2 commits into
frankea wants to merge 2 commits into
Conversation
Concrete gaps between the concept mock and the running TUI, page by page: - Top bar: concept uses flex-gap between items; we were emitting a middle-dot separator between them. Drop the dot, keep a double-space. - Page headers: concept uses '›' as the crumb prefix on scope pages (aircraft, events, spoof) and '·' on attribute pages (flights, map, status). Add a `crumb_prefix` kwarg to PageHeader and pass '›' from the three scope views. - Aircraft FLAGS column: concept lists MIL / SPF / HOVER / TYP. We had MIL / SPF / HELI. Drop HELI; add HOVER (any flight with hover >= 5 min) and TYP (cross-ref disagrees with registry on type code). Pull both via the existing aircraft-list SELECT. - Event feed column order: concept is ts / hex / callsign / pill / summary. We had pill in column 2; move it to column 4. - Spoof table: concept has a trailing 24px column showing '+' / '−' for collapse/expand state. Add the column, track `_expanded_key`, flip the glyph and re-render on each toggle. - Map crumb: concept reads `date · KSPG → KHKY`. Resolve the origin/destination airports from the matching flight row on that date and include them when both are clean ICAO codes. All 552 existing tests pass unchanged; no new tests required since none of the assertions pin column order or flag wording. https://claude.ai/code/session_01STmuGvn8xHQeqoWyFKgRxM
Ruff flagged the cursor-state capture in _rerender as E501. Pull the cursor row lookup into a local and read .icao/.takeoff_date off it instead of indexing twice. https://claude.ai/code/session_01STmuGvn8xHQeqoWyFKgRxM
Owner
Author
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
This PR refactors the aircraft flags system to better align with the UI design concept and enhances several TUI views with improved breadcrumb navigation and detail expansion handling.
Key Changes
Aircraft Flags Refactoring (
adsbtrack/tui/queries.py):type_code-based "HELI" badge with two new boolean fields:has_hover(flights with ≥5 min hover time) andhas_type_override(cross-ref type differs from FAA registry)_render_flags()to generate "MIL / SPF / HOVER / TYP" badges based on these new fieldsMap View Enhancement (
adsbtrack/tui/views/map.py):_route_for()method to fetch origin/destination airport codes for the first flight on a given dateSpoof View Improvements (
adsbtrack/tui/views/spoof.py):crumb_prefix="›"to match scope-level breadcrumb stylingAircraft View Updates (
adsbtrack/tui/views/aircraft.py):has_hoverandhas_type_overridefieldscrumb_prefix="›"for consistent scope breadcrumb stylingEvents View Refinements (
adsbtrack/tui/views/events.py):crumb_prefix="›"for scope-level breadcrumbsWidget Styling (
adsbtrack/tui/widgets.py):crumb_prefixparameter toPageHeaderto support both scope (›) and attribute (·) breadcrumb stylesChecklist
uv run pytestpassesuv run ruff check .passesuv run ruff format --check .passeshttps://claude.ai/code/session_01STmuGvn8xHQeqoWyFKgRxM