feat(scenario): multi-agency-sar scenario with vendor-tinted chassis - #9
Conversation
First slice of the multi-agency coordination demo (#1 in the polish plan). Adds end-to-end vendor tagging — scenario config → simulation service → viz frame → client rendering — and a new `multi-agency-sar` preset with 12 drones across 3 vendors (skydio / autel / anzu, 4 each). Changes: * `Models/VizFrame.cs` — optional `Vendor` on `DroneVizState` * `Services/SimulationService.cs` — new `AddDrone(id, pos, vendor)` overload; sidecar `_droneVendors` dict cleared on `Reset()`; `DroneSnapshot.Vendor` populated from dict in `GetSnapshot()` * `Services/VizFrameBuilder.cs` — propagate vendor to frame * `Services/ScenarioService.cs` — public `Entry(Id, Pos, Vendor?)` record struct; parse `vendor` from appsettings * `appsettings.json` — `multi-agency-sar` scenario with 12 entries * `client/types.ts` — `DroneState.vendor?: string` * `client/drones.ts` — `VENDOR_COLORS` map + `bodyColor` param on `_buildQuadrotor`; top-plate tinted by vendor (subtle, silhouette preserved: skydio steel-blue, autel oxblood, anzu forest) Deferred to follow-ups (kept scope tight): * Kill-comms REST endpoint + `Mesh.Partitioned` signal * Partition status banner (client) * Scenario intro overlay (HURRICANE MELISSA toast) Verified: tsc clean, vite build green, `dotnet build -c Release` green, `dotnet format --verify-no-changes` clean, 82 / 82 tests passing. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 8 minutes and 3 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces vendor-specific branding for drones in the visualization. It adds a Vendor property to drone state models and configuration, allowing the client to render unique chassis tints for different agencies (e.g., Skydio, Autel, Anzu). Key changes include updating the ScenarioService to parse vendor tags, modifying SimulationService to track this metadata, and updating the Three.js client to apply vendor-specific colors. Feedback suggests using string.IsNullOrWhiteSpace for more robust configuration parsing and considering a more comprehensive lifecycle management for drone metadata to prevent potential memory leaks if dynamic drone removal is implemented in the future.
Per review: `IsNullOrEmpty` accepts whitespace-only strings from appsettings (e.g. `"vendor": " "`) which would then become a dictionary key and flow into the viz frame. Swap to `IsNullOrWhiteSpace` so the parser is consistent with normal IConfiguration handling. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Thanks for the review — pushed 5518d68 to address the |
Item #9 of the polish plan. The meta copy still framed the product as "Drone Simulation Visualizer" — old framing from before the coordination story. Aligns title, description, Open Graph, and Twitter card metadata with the current positioning: title "ResQ Viz — Live Coordination" description "Real-time 3D coordination across autonomous drone swarms — mesh topology, hazard fusion, and decentralized consensus for disaster response." Shipped as copy-only change. Existing OG setup (summary_large_image, canonical, theme-color, emoji-placeholder favicon) unchanged — the proper ResQ OG banner and logo favicon are a separate asset swap. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(meta): align title + description with coordination narrative Item #9 of the polish plan. The meta copy still framed the product as "Drone Simulation Visualizer" — old framing from before the coordination story. Aligns title, description, Open Graph, and Twitter card metadata with the current positioning: title "ResQ Viz — Live Coordination" description "Real-time 3D coordination across autonomous drone swarms — mesh topology, hazard fusion, and decentralized consensus for disaster response." Shipped as copy-only change. Existing OG setup (summary_large_image, canonical, theme-color, emoji-placeholder favicon) unchanged — the proper ResQ OG banner and logo favicon are a separate asset swap. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * fix(meta): restore trailing copy on twitter:description Per review: twitter:description was truncated. Spec is that it matches the primary description and og:description verbatim; Twitter's 200-char limit has plenty of room. Restore the trailing "for disaster response.". Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
First slice of the multi-agency coordination demo (item #1 in the polish plan). End-to-end vendor tagging — scenario config → simulation service → viz frame → client rendering — plus a new
multi-agency-sarpreset with 12 drones across 3 vendors (4 each:skydio,autel,anzu).Why
The coordination narrative is "ten agencies show up with different drones and one shared air picture." To show that without narration, drones need to be visibly differentiated while remaining silhouette-consistent. Chassis top-plate tint per vendor delivers the signature without disturbing the swarm read.
What changed
Backend
Models/VizFrame.csVendoronDroneVizStateServices/SimulationService.csAddDrone(id, pos, vendor)overload. Sidecar_droneVendorsdict keyed by id.Reset()clears.GetSnapshot()populatesDroneSnapshot.Vendor.Services/VizFrameBuilder.csServices/ScenarioService.csEntry(Id, Pos, Vendor?)record struct; parses optionalvendorfield from configappsettings.jsonmulti-agency-sarscenario (12 entries, 3 vendors)Client
client/types.tsDroneState.vendor?: stringclient/drones.tsVENDOR_COLORSmap +bodyColorparam on_buildQuadrotor. Top-plate tinted by vendor.Colors (subtle — silhouette preserved):
skydio→ steel-blue#2b3a55autel→ deep oxblood#5a2a30anzu→ dark forest#2a4a36BODY_COLOR#161b22Backwards compat
Purely additive at every layer:
DroneVizState.Vendordefaults tonullDroneSnapshot.Vendordefaults tonullAddDrone(id, pos)overload preserved; forwards toAddDrone(id, pos, null)DroneState.vendoris optional in the TS interfacesingle,swarm-5,swarm-20,sar) load unchangedDeferred to follow-up PRs (kept scope tight)
Mesh.Partitionedsignalrequiredstatus gate #4 — LED state-machine)Local verification
Test plan
multi-agency-sarfrom the scenarios list🤖 Generated with Claude Code