Skip to content

[Demo] Complete Sundial demo migration: phases 3-5 (Combine variant, Stream variant, testing) #88

@leogdion

Description

@leogdion

Context

Migrated from Examples/Sundial/Documentation/IMPLEMENTATION_PLAN.md and RESUME_HERE.md (session-state planning docs, removed from the tree — full detail in git history; originally Task Master Task 13 / 13.2).

The Sundial demo showcases v2.0.0: binary Protobuf messaging (BinaryMessagable), latency measurement, and transport-route comparison, in two variants (SundialDemoCombine and SundialDemoStream).

Done

  • Phase 1 — Foundation: Protobuf schemas (color_message/complex_message/latency_test), direct BinaryMessagable conformance (no wrappers), shared models (TransportMethod, LatencyTracker), utilities, Package.swift, Scripts/generate-protos.sh.
  • Phase 2 — Shared UI components: MetricCard, ColorPreview, TransportBadge, ConnectionStatusView, LatencyGraph (SwiftUI Charts), MessageHistoryRow; mise setup for swift-protobuf; generated code.

Remaining

  • Phase 3 — Combine variant: 4 tabs (MessageLab, LatencyDashboard, ProtocolComparison, Diagnostics) with ViewModels wiring ConnectivityObserver/NetworkObserver.
  • Phase 4 — Stream variant: port ViewModels to actor + AsyncStream, identical UI.
  • Phase 5 — Testing & polish: integration tests (protobuf round-trips, transport selection, latency accuracy), UI tests, animations/error states/accessibility.

Success criteria (from the plan)

Protobuf ≥75% size reduction vs dictionary; latency accurate within 5 ms; transport selection correct per reachability; all routes work; both variants behave identically.

Key implementation notes preserved

  • Generate protobuf code before building: cd Examples/Sundial && ./Scripts/generate-protos.shSources/Shared/Generated/*.pb.swift.
  • Direct conformance: extension Sundial_Demo_ColorMessage: BinaryMessagable just forwards to SwiftProtobuf's serializedData() / init(serializedData:).

Metadata

Metadata

Assignees

No one assigned

    Labels

    component:demoDemo applications and examplesenhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions