Skip to content

fix: dashboard plugin FFI bindings, JSON parsing, flake.nix, and tests (#132)#161

Open
jimmy-claw wants to merge 3 commits intomasterfrom
jimmy/lmao-issue-132-20260416
Open

fix: dashboard plugin FFI bindings, JSON parsing, flake.nix, and tests (#132)#161
jimmy-claw wants to merge 3 commits intomasterfrom
jimmy/lmao-issue-132-20260416

Conversation

@jimmy-claw
Copy link
Copy Markdown
Owner

Summary

  • Fix FFI function name: lmao_get_infolmao_get_node_info (matching actual Rust FFI export — previous code would fail at link time)
  • Fix JSON parsing: refreshInfo() now correctly reads nested info object; refreshMetrics()/getMetrics() now correctly read nested metrics object
  • Use shared FFI header: Replace inline extern "C" declarations in DashboardBackend.h with #include "lmao_ffi.h" (adds missing lmao_get_peers/lmao_get_sessions)
  • Add flake.nix: Dashboard plugin can now be built via Nix (matching logos-core-module)
  • Add test suite: test_dashboard.cpp with 7 Qt Test cases covering FFI string lifecycle, null safety, and JSON error responses

Test plan

  • cargo test --workspace --exclude logos-messaging-a2a-execution — all 996+ tests pass
  • Build dashboard plugin with Qt6/CMake and verify FFI links correctly
  • Verify metrics and info display correctly in logos-app

Fixes #132

🤖 Generated with Claude Code

jimmy-claw and others added 3 commits April 15, 2026 04:10
Add a dashboard UI plugin for logos-app that provides real-time monitoring
of LMAO agent status, metrics, and identity information.

Changes:
- Add lmao_get_metrics() and lmao_get_info() FFI functions to expose
  MetricsSnapshot and agent identity/topics via the C interface
- Create logos-dashboard-plugin/ with IComponent implementation:
  - DashboardComponent: plugin entry point with QQuickWidget
  - DashboardBackend: C++ bridge exposing FFI calls as Q_PROPERTY/Q_INVOKABLE
  - DashboardView.qml: dashboard with identity, topics, and 17 metric cards
  - MetricCard.qml: reusable metric display component
  - Dark theme consistent with logos-app styling
- Add unit tests for new FFI functions (metrics serialization, info structure)

Fixes #132

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…et tabs (#132)

Add tabbed navigation to the LMAO logos-core-module plugin with three views:
- Dashboard: agent identity, encryption status, Waku topics, connected peers, sessions
- Fleet: existing agent discovery and task sending (refactored from original LmaoView)
- Metrics: real-time operational counters with auto-refresh (tasks, messaging, discovery, encryption)

New FFI functions: lmao_get_metrics, lmao_get_node_info, lmao_get_peers, lmao_get_sessions
New C++ backend methods: getMetrics, getNodeInfo, getPeers, getSessions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix lmao_get_info → lmao_get_node_info (matching actual FFI export)
- Fix JSON parsing: info nested under "info" key, metrics under "metrics" key
- Replace inline extern declarations with shared lmao_ffi.h header
- Add missing lmao_get_peers/lmao_get_sessions to dashboard FFI header
- Add flake.nix for Nix-based builds of dashboard plugin
- Add test suite (test_dashboard.cpp) with FFI validation tests
- Enable testing in CMakeLists.txt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

feat: logos-app IComponent UI plugin for LMAO agent

1 participant