Skip to content

Commit ea15c70

Browse files
edwardbrclaude
andcommitted
Fix telemetry visualizer with hierarchical tree layout
Major visualization improvements: - Replaced force-directed layout with D3 tree layout - Implemented SVG viewBox coordinate system for infinite canvas - Fixed zone hierarchy building from events (not pre-computed) - Fixed parent normalization bug (parent=0 now handled correctly) - Fixed infinite recursion on ensureZoneNode(0) - Added virtual root zone to support multiple root zones - Removed error rings (passthroughs without wiring are acceptable) Zone rendering: - Service boxes at zone center - Transport ports (IN at top, OUT at bottom) - Passthrough circles with routing wires - Trunk lines connecting parent-child zones - Port registry with absolute coordinates Bug fixes: - Zone metadata now built from events at startup - Parent updates when zone created before service_creation event - Prevented zone from becoming its own parent - All 8 zones now render correctly in hierarchy Issues closed: canopy-5bb, canopy-p8k, canopy-7zk Issues created: canopy-aly (P0), canopy-jm1, canopy-hku, canopy-r7j, canopy-uwp, canopy-335, canopy-a1l Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 37309d3 commit ea15c70

File tree

13 files changed

+703
-334
lines changed

13 files changed

+703
-334
lines changed

.beads/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# This setting persists across clones (unlike database config which is gitignored).
4343
# Can also use BEADS_SYNC_BRANCH env var for local override.
4444
# If not set, bd sync will require you to run 'bd config set sync.branch <branch>'.
45-
# sync-branch: "beads-sync"
45+
sync-branch: "beads-sync"
4646

4747
# Multi-repo configuration (experimental - bd-307)
4848
# Allows hydrating from multiple repositories and routing writes to the correct JSONL
@@ -59,4 +59,4 @@
5959
# - linear.url
6060
# - linear.api-key
6161
# - github.org
62-
# - github.repo
62+
# - github.repo

.beads/issues.jsonl

Lines changed: 16 additions & 0 deletions
Large diffs are not rendered by default.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,5 @@ node_modules
1515
demos/websocket/client/websocket_proto.js
1616
demos/websocket/server/www/websocket_proto.js
1717
.cache
18-
venv
18+
venv
19+
rpc_test_diagram

demos/websocket/client/client.js

100755100644
File mode changed.

demos/websocket/client/interactive.js

100755100644
File mode changed.

demos/websocket/client/test.js

100755100644
File mode changed.

demos/websocket/client/test_calculator.js

100755100644
File mode changed.

demos/websocket/client/test_rest.js

100755100644
File mode changed.

rpc/include/rpc/internal/service.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -456,15 +456,23 @@ namespace rpc
456456
zone zone_id,
457457
destination_zone parent_zone_id,
458458
const std::shared_ptr<coro::io_scheduler>& io_scheduler)
459-
: service(name, zone_id, io_scheduler)
459+
: service(name, zone_id, io_scheduler, child_service_tag{})
460460
, parent_zone_id_(parent_zone_id)
461461
{
462+
#ifdef CANOPY_USE_TELEMETRY
463+
if (auto telemetry_service = rpc::get_telemetry_service(); telemetry_service)
464+
telemetry_service->on_service_creation(name, zone_id, parent_zone_id);
465+
#endif
462466
}
463467
#else
464468
explicit child_service(const char* name, zone zone_id, destination_zone parent_zone_id)
465-
: service(name, zone_id)
469+
: service(name, zone_id, child_service_tag{})
466470
, parent_zone_id_(parent_zone_id)
467471
{
472+
#ifdef CANOPY_USE_TELEMETRY
473+
if (auto telemetry_service = rpc::get_telemetry_service(); telemetry_service)
474+
telemetry_service->on_service_creation(name, zone_id, parent_zone_id);
475+
#endif
468476
}
469477
#endif
470478

0 commit comments

Comments
 (0)