Skip to content

Fix ECHO dispatch, connect-time shape broadcast, and 3D ghost mesh - #183

Merged
amorfinv merged 3 commits into
mainfrom
fix/echo-shape-sync-3d-ghost
Aug 22, 2026
Merged

Fix ECHO dispatch, connect-time shape broadcast, and 3D ghost mesh#183
amorfinv merged 3 commits into
mainfrom
fix/echo-shape-sync-3d-ghost

Conversation

@amorfinv

Copy link
Copy Markdown
Collaborator

Summary

  • BlueSky client: normalize ECHO payloads (list/dict/bare string) to (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 duplicated REQUEST send on node discovery (which doubled POLY/STACKCMDS re-send traffic) and simplifies safe_decode.
  • Socket handlers: on connect, send the active node's poly/polyline envelopes only to the connecting client instead of broadcasting to everyone — other clients no longer get their shape state re-sent (or cleared) whenever a browser connects. The reconnecting client still receives complete envelopes so it can prune shapes deleted while it was away. The POLY handler broadcast now honors the standard connected_clients guard, and the duplicated hex→binary node ID lookup is factored into a helper.
  • 3D aircraft layer: an empty aircraft batch (last aircraft deleted) no longer early-returns before the removal loop, so the deleted aircraft's mesh is torn down instead of lingering as a ghost. Drops the unused selected/inconf mesh-data fields and the never-read lastUpdate timestamp.

🤖 Generated with Claude Code

amorfinv and others added 3 commits August 22, 2026 08:18
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>
@amorfinv
amorfinv merged commit 07c67dd into main Aug 22, 2026
2 checks passed
@amorfinv
amorfinv deleted the fix/echo-shape-sync-3d-ghost branch August 22, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant