Fix log streaming, drawing double-clicks, selection races, and 3D model fallback - #185
Merged
Merged
Conversation
…hars, lines=0 Read output-file content in binary so offsets are real byte positions: text-mode tell() cookies plus newline translation delivered a trailing \r as \n twice when a CRLF log was polled mid-line, injecting spurious blank lines into the stream viewer. Hold back an incomplete trailing UTF-8 sequence so a character split across polls isn't rendered as replacement characters, and make lines=0 mean "no history, stream from the end" instead of returning the whole file. Also simplifies the health endpoint and hoists the re/sqlite3 imports. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The second click of a double-click (originalEvent.detail > 1) is a repeat of the first, not a deliberate placement: it dropped duplicate vertices, instantly finished two-click shapes with degenerate geometry, and created aircraft with a meaningless heading. All drawing modes now skip it and disable MapLibre's double-click zoom while drawing (restored on stop). Aircraft creation also rejects a heading click on the exact spawn position (e.g. both clicks snapped to the same navaid), mirroring the circle tool's zero-radius guard. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…t handoff The empty-map-click unselect deferred its hit test by 50 ms, letting the select-triggered flyTo (or a data update) move the aircraft off the clicked point and misread an aircraft click as an empty-map click, instantly unselecting the aircraft that was just clicked. The hit test is now synchronous with the click dispatch. When selection switches directly between aircraft, the old aircraft's route broadcast is now toggled off; before, it kept streaming ROUTEDATA that got re-interpreted as an implicit selection stealing the new selection back. Unsolicited ROUTEDATA only becomes an implicit selection while nothing is selected. Drops the now-unused sendExplicitPos wrapper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BlueSky resolves an empty positional arg to "no constraint", so a speed-only waypoint constraint now emits an empty altitude slot (<lat>,<lon>,,<spd>) instead of discarding the speed with a warning. Command building is collapsed into one arg-list path, and the private unit-label helpers move to DataProcessor.altitudeUnitLabel alongside the existing speedUnitLabel. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A saved model no longer in the catalog is now reset to Auto in storage and state — not just displayed as Auto — so the renderer stops forcing the missing file (re-picking Auto in an already-Auto select fires no change event to recover). usableModelPath gains a default-model fallback tier for when a globally forced model fails to load: the configured fallback path IS the forced path in that case and couldn't serve as the fallback. Extracts isKnownModelSelection for the shared catalog check. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
A renderer destroyed (or re-initialized on another map) while polling for the map style to load could still add its layer afterwards, leaving a zombie route-3d-layer that kept rendering the last-seeded route with the 3D overlay off and forced a continuous repaint loop. The style wait now aborts when the renderer no longer manages the map it was started on, with a lifecycle test suite mirroring the Aircraft3DRenderer one. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
A batch of bug fixes across the log stream backend and the map frontend, one commit per fix:
Backend
WebATM/server/routes.py): output-file content is now read in binary so offsets are real byte positions. Fixes a CRLF log polled mid-line delivering its line ending twice (spurious blank lines in the stream viewer), holds back a UTF-8 character split across polls instead of rendering replacement characters, and makeslines=0mean "no history" instead of returning the whole file. Also simplifies the health endpoint.Frontend
lat,lon,,spd) instead of dropping the speed with a warning.🤖 Generated with Claude Code