Fix reset aircraft clearing, console history drafts, log-stream rendering and 3D model fallback - #177
Merged
Merged
Conversation
BlueSky signals a simulation reset on the dedicated RESET topic, but the clear lived in on_acdata_received, keyed off a context action that the client synthesised from the shared-state wrapper. That mapping made the ACDATA path clear traffic on frames it should only have forwarded, while a real RESET left proxy.traffic_data populated. - bluesky_client: stop rewriting the wire action into Reset/ActChange; record it verbatim and hand handlers the unwrapped data dict. - events.on_reset_received: clear the cached traffic and emit an empty acdata alongside the existing poly/polyline clears, still scoped to the active node. The cache is cleared even with no browser attached, since on_acdata_received only refreshes it while clients are connected and a stale cache would be served verbatim in the next initial_data snapshot. - node_manager: drop the previous node's cached traffic when the active node changes, so it can't be re-served before the new node's first frame. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
ArrowUp discarded whatever was typed on the fresh input line, and ArrowDown back past the newest entry restored an empty string instead of it, so a half-written command was lost by glancing at history. Shells stash the draft; CommandHistory now does too. Also skip consecutive duplicate entries on add(), reset navigation on submit, and fold the two near-identical arrow-key branches in Console into one navigateHistory() call that passes the current input through. Console.historyNav.test.ts drives the real keydown handler end to end so the round trip is pinned at the DOM level, not just on the model. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…nses The tail endpoint returns raw bytes, so a poll can land mid-line and the remainder arrives in the next chunk — one log line rendered as two. The trailing fragment is now buffered and re-rendered in place as later chunks extend it. Two related defects on the same path: - An in-flight fetch that resolved after stopStreaming() or a switch to another file appended the old stream's content and clobbered the offset. A generation counter now discards those responses. - A backwards offset means the file was truncated or rewritten, so the display is replaced instead of appending the new content under the old. - Ctrl+F only opened search on lowercase 'f' (missed with Shift/CapsLock). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…load A model that 404s or fails to parse left its aircraft queued in pendingAircraft forever — invisible in 3D — and the loader re-requested the broken path on every data tick, since only loadingModels was cleared on error. The loader now records failed paths, skips re-requesting them, and reports the failure. Aircraft3DFleet.redirectPending() re-creates the stranded aircraft with the fallback model (queueing again if it hasn't loaded yet) or drops them with a warning when there is no fallback. Aircraft3DCustomLayer also substitutes the fallback at resolve time, so the path stays stable across ticks and the mesh isn't rebuilt. Failures are recorded under the same teardown guard as the success callback and cleared with the cache, so a model reload retries them. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Removes docblocks and inline comments that only repeat the method name
("Initialize header component", "Set scale") in the files touched by the
preceding fixes, and inlines a single-use matrix variable in
Aircraft3DTransforms.
Co-Authored-By: Claude Opus 5 (1M context) <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.
Five independent defects, one commit each.
fix(proxy): clear aircraft on the RESET topic, not on an ACDATA actionBlueSky signals a simulation reset on the dedicated RESET topic, but the clear lived in
on_acdata_received, keyed off a context action thatbluesky_clientsynthesised from the shared-state wrapper. That mapping made the ACDATA path clear traffic on frames it should only have forwarded, while a real RESET leftproxy.traffic_datapopulated.bluesky_clientrecords the wire action verbatim and hands handlers the unwrapped data dict.on_reset_receivedclears the cached traffic and emits an emptyacdataalongside the existing poly/polyline clears, still scoped to the active node. It clears even with no browser attached —on_acdata_receivedonly refreshes the cache while clients are connected, so a stale cache would be served verbatim in the nextinitial_datasnapshot (ghost aircraft on the next page load).node_managerdrops the previous node's cached traffic on an active-node switch, so it can't be re-served before the new node's first frame.fix(console): keep the unsubmitted draft across history navigationArrowUp discarded whatever was typed on the fresh input line, and ArrowDown back past the newest entry restored
''instead of it — a half-written command was lost by glancing at history.CommandHistorynow stashes the draft like a shell. Also skips consecutive duplicates onadd()and folds the two arrow-key branches inConsoleinto onenavigateHistory().fix(log-stream): render split lines whole and ignore stale poll responsesThe tail endpoint returns raw bytes, so a poll can land mid-line and the remainder arrives in the next chunk — one log line rendered as two. The trailing fragment is now buffered and re-rendered in place. Plus: in-flight fetches resolving after
stopStreaming()or a file switch appended the old stream's content and clobbered the offset (fixed with a generation counter); a backwards offset now replaces the display instead of appending under the old content; Ctrl+F only opened search on lowercasef.fix(aircraft-3d): fall back to the default model when a GLB fails to loadA model that 404s or fails to parse left its aircraft queued in
pendingAircraftforever — invisible in 3D — and the loader re-requested the broken path on every data tick, since onlyloadingModelswas cleared on error. The loader now records failed paths and reports them;redirectPending()re-creates stranded aircraft with the fallback model or drops them with a warning. Failures clear with the cache so a model reload retries.chore: drop comments that restate the codeDocblocks that repeat the method name, in the files touched above.
Note
frontend/package-lock.jsonhas an unrelated local change (removal oflibcmetadata from optional platform deps, an npm-version artifact) and is not part of this branch — it is still uncommitted locally.🤖 Generated with Claude Code