Fix ECHO dispatch, connect-time shape broadcast, and 3D ghost mesh - #183
Merged
Conversation
Normalize ECHO payloads (list/dict/bare string) to (text, flags, sender_id) in one place; oversized list payloads no longer splat into the handler and silently drop the echo with a TypeError. Also drop the duplicated REQUEST send when a new node is announced, which made every node re-send its POLY shapes and full STACKCMDS dictionary twice, and simplify safe_decode (the ASCII fallback after a UTF-8 failure could never succeed). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
On connect, emit the active node's poly/polyline envelopes only to the new client instead of broadcasting through _emit_active_node_poly_data, which re-sent (or cleared) shape data on every already-connected browser. The reconnecting client still gets complete envelopes so it can prune shapes deleted while it was away. Also add the standard connected-clients guard to the POLY broadcast in the shapes handler, and factor the duplicated hex-to-binary node ID lookup in the socket handlers into a helper. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Aircraft3DCustomLayer.updateAircraft returned early on an empty id array, so the removal loop never ran and the last deleted aircraft's mesh lingered on the map until the next non-empty tick or a reset. Only bail when the id array is missing entirely, and add tests covering the removal path. Also drop the unused selected/inconf fields from AircraftMeshData and the never-read lastUpdate timestamp from Aircraft3DFleet. 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.
Summary
(text, flags, sender_id)in one place — oversized payloads no longer raise a TypeError in the subscriber and silently drop the echo. Also removes the duplicatedREQUESTsend on node discovery (which doubled POLY/STACKCMDS re-send traffic) and simplifiessafe_decode.connected_clientsguard, and the duplicated hex→binary node ID lookup is factored into a helper.selected/inconfmesh-data fields and the never-readlastUpdatetimestamp.🤖 Generated with Claude Code