185 Commits

Author SHA1 Message Date
Louis King
a251f3a09f Added map to node detail page, made title consistent with emoji 2025-12-08 16:37:53 +00:00
Louis King
0fdedfe5ba Tidied Advert/Node search 2025-12-08 16:22:08 +00:00
Louis King
243a3e8521 Added truncate CLI command 2025-12-08 15:54:32 +00:00
Louis King
57f51c741c Fixed Member model 2025-12-08 15:13:24 +00:00
Louis King
65b8418af4 Fixed last seen issue 2025-12-08 00:15:25 +00:00
Louis King
64ec1a7135 Receiver nodes now sync contacts to MQTT on every advert received 2025-12-07 23:34:33 +00:00
Louis King
fbd29ff78e Removed friendly name support and tidied tags 2025-12-07 23:02:19 +00:00
Louis King
40dc6647e9 Updates 2025-12-07 22:02:42 +00:00
Louis King
278d102064 Fixed version display 2025-12-07 21:55:10 +00:00
JingleManSweep
f0cee14bd8 Merge pull request #48 from ipnet-mesh/feature/mqtt-tls
Added support for MQTT TLS
2025-12-07 21:16:13 +00:00
Louis King
5ff8d16bcb Added support for MQTT TLS 2025-12-07 21:15:05 +00:00
Louis King
3bc47a33bc Added data retention and node cleanup 2025-12-06 21:27:19 +00:00
claude[bot]
deb307c6ae feat: Add MESHCORE_DEVICE_NAME config to set node name on startup
- Add meshcore_device_name field to InterfaceSettings
- Implement set_name() method in device interface (real and mock)
- Update receiver to set device name during initialization if configured
- Add --device-name CLI option with MESHCORE_DEVICE_NAME env var support
- Device name is set after time sync and before advertisement broadcast

Fixes #37

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: JingleManSweep <jinglemansweep@users.noreply.github.com>
2025-12-06 19:00:56 +00:00
JingleManSweep
d310a119ed Update src/meshcore_hub/interface/receiver.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-06 18:48:03 +00:00
claude[bot]
2b307679c9 Send flood advertisement on receiver startup
Changed the startup advertisement from flood=False to flood=True
so that the device name is broadcast to the mesh network.

Fixes #38

Co-authored-by: JingleManSweep <jinglemansweep@users.noreply.github.com>
2025-12-06 18:42:53 +00:00
claude[bot]
55443376be Use full display name in map node labels
Update map node labels to show the full display name (friendly_name tag
→ advertised node name → public key prefix) instead of just the 2-char
public key prefix. This makes node labels consistent with the rest of
the site and easier to identify at a glance.

The backend already computes the correct display name in map.py:96-101,
so this change just uses that computed name in the label.

Co-authored-by: JingleManSweep <jinglemansweep@users.noreply.github.com>
2025-12-06 17:12:50 +00:00
claude[bot]
ed7a46b1a7 Add last seen time to map node labels
Display relative time since last seen (e.g., '2m', '1h', '2d') in node
labels on the map page. This makes it easier to quickly identify how
recently nodes were active without opening the popup.

- Add formatRelativeTime() function to calculate time difference
- Update createNodeIcon() to include relative time in label
- Adjust icon size to accommodate additional text
- Format: keyPrefix (timeAgo) e.g., 'ab (5m)'

Fixes #33

Co-authored-by: JingleManSweep <jinglemansweep@users.noreply.github.com>
2025-12-06 17:05:30 +00:00
claude[bot]
4916ea0cea fix: Handle empty channel_idx parameter in messages filter
Fixed parse error when clicking the filter button on messages screen
with "All Channels" selected. The form was sending an empty string
for channel_idx, but FastAPI expected either a valid integer or None.

Changes:
- Accept channel_idx as string in query parameter
- Parse and validate channel_idx before passing to API
- Treat empty strings as None to prevent validation errors
- Add error handling for invalid integer values

Fixes #25

Co-authored-by: JingleManSweep <jinglemansweep@users.noreply.github.com>
2025-12-06 16:49:23 +00:00
Louis King
beb471fcd8 Switched to Git versioning 2025-12-06 16:28:13 +00:00
Louis King
8597052bf7 Fixed table overflows 2025-12-06 16:07:13 +00:00
Louis King
dd0b4c73c5 More fixes 2025-12-06 15:10:03 +00:00
Louis King
78a086e1ea Updates 2025-12-06 14:51:47 +00:00
Louis King
d715e4e4f0 Updates 2025-12-06 13:33:02 +00:00
Louis King
2ea04deb7e Updates 2025-12-06 12:53:29 +00:00
Claude
6e3b86a1ad Add collector-level event deduplication using content hashes
Replace presentation-layer deduplication with collector-level approach:
- Add event_hash column to messages, advertisements, trace_paths, telemetry tables
- Handlers compute content hashes and skip duplicate events at insertion time
- Use 5-minute time buckets for advertisements and telemetry
- Include Alembic migration for schema changes
2025-12-06 12:23:14 +00:00
Claude
c80986fe67 Add event deduplication at presentation layer
When multiple receiver nodes are running, the same mesh events (messages,
advertisements) are reported multiple times. This causes duplicate entries
in the Web UI.

Changes:
- Add hash_utils.py with deterministic hash functions for each event type
- Add `dedupe` parameter to messages and advertisements API endpoints (default: True)
- Update dashboard stats to use distinct counts for messages/advertisements
- Deduplicate recent advertisements and channel messages in dashboard
- Add comprehensive tests for hash utilities

Hash strategy:
- Messages: hash of text + pubkey_prefix + channel_idx + sender_timestamp + txt_type
- Advertisements: hash of public_key + name + adv_type + flags + 5-minute time bucket
2025-12-06 12:08:07 +00:00
Louis King
23f6c290c9 Updates 2025-12-05 21:17:34 +00:00
Claude
a4b13d3456 Add member-node association support
Members can now have multiple associated nodes, each with a public_key
and node_role (e.g., 'chat', 'repeater'). This replaces the single
public_key field on members with a one-to-many relationship.

Changes:
- Add MemberNode model for member-node associations
- Update Member model to remove public_key, add nodes relationship
- Update Pydantic schemas with MemberNodeCreate/MemberNodeRead
- Update member_import.py to handle nodes list in seed files
- Update API routes to handle nodes in create/update/read operations
- Add Alembic migration to create member_nodes table and migrate data
- Update example seed file with new format
2025-12-05 20:34:09 +00:00
Louis King
0016edbdac Updates 2025-12-05 20:03:14 +00:00
Louis King
0b8fc6e707 Charts 2025-12-05 19:50:22 +00:00
Louis King
d1181ae4f9 Updates 2025-12-05 19:27:06 +00:00
Claude
995b066b0d Remove sender name from channel messages summary, keep only timestamp 2025-12-05 18:23:33 +00:00
Claude
0d14ed0ccc Add latest channel messages to Network dashboard
Replace the channel counts table with actual recent messages per channel:
- Added ChannelMessage schema for channel message summaries
- Dashboard API now fetches latest 5 messages for each channel with sender name lookups
- Network page displays messages grouped by channel with sender names and timestamps
- Only shows channels that have messages
2025-12-05 18:20:49 +00:00
Claude
e3ce1258a8 Fix advertisements Type column by falling back to source node's adv_type
The adv_type from the Advertisement record is often null, but the linked
Node has the correct adv_type. Now falls back to source_node.adv_type
when adv.adv_type is null.
2025-12-05 18:14:16 +00:00
Claude
087a3c4c43 Messages list: swap Time/Type columns, add receiver node links
- Swap Time and Type columns (Type now first)
- Add receiver_name and receiver_friendly_name to MessageRead schema
- Update messages API to fetch receiver node names and tags
- Make Receiver column a link showing name with public key prefix
2025-12-05 18:09:29 +00:00
Claude
5077178a6d Add Type column with emoji to Advertisements list 2025-12-05 18:04:04 +00:00
Claude
a44d38dad6 Update Nodes list to match Advertisements style
- Rename Name column to Node
- Remove separate Public Key column
- Show name with public key prefix below (like Advertisements list)
- Add whitespace-nowrap to Last Seen column
2025-12-05 18:03:14 +00:00
Claude
3469278fba Add node name lookups to advertisements list
- Join with Node table to get node names and tags for both source
  and receiver nodes
- Display friendly_name (from tags), node_name, or advertised name
  with priority in that order
- Show name with public key preview for both Node and Received By columns
2025-12-05 17:58:52 +00:00
Claude
89c81630c9 Link 'Powered by MeshCore Hub' to GitHub repository 2025-12-05 17:55:59 +00:00
Claude
ab4a5886db Simplify advertisements table: Node, Received By, Time columns
- Remove Name and Type columns (usually null)
- Reorder columns: Node first, then Received By, then Time
- Link both Node and Received By to their node detail pages
- Show node name with public key preview when available
2025-12-05 17:53:54 +00:00
Claude
ec7082e01a Fix message text indentation in messages list
Put message content inline with td tag to prevent whitespace-pre-wrap
from preserving template indentation.
2025-12-05 17:43:09 +00:00
Claude
b4e7d45cf6 UI improvements: smaller hero, stats bar, advertisements page, messages fixes
- Reduce hero section size and add stats bar with node/message counts
- Add new Advertisements page with public key filtering
- Update hero navigation buttons: Dashboard, Nodes, Advertisements, Messages
- Add Advertisements to main navigation menu
- Remove Hops column from messages list (always empty)
- Display full message text with proper multi-line wrapping
2025-12-05 17:14:26 +00:00
Claude
84e83a3384 Rename receiver_public_key to received_by
Shorter, cleaner field name for the receiving interface node's
public key in API responses.
2025-12-05 16:57:24 +00:00
Claude
796e303665 Remove internal UUID fields from API responses
Internal database UUIDs (id, node_id, receiver_node_id) were being
exposed in API responses. These are implementation details that should
not be visible to API consumers. The canonical identifier for nodes
is the 64-char hex public_key.

Changes:
- Remove id, node_id from NodeTagRead, NodeRead schemas
- Remove id from MemberRead schema
- Remove id, receiver_node_id, node_id from MessageRead, AdvertisementRead,
  TracePathRead, TelemetryRead schemas
- Update web map component to use public_key instead of member.id
  for owner filtering
- Update tests to not assert on removed fields
2025-12-05 16:50:21 +00:00
Louis King
d7152a5359 Updates 2025-12-04 19:34:18 +00:00
Claude
bb0b9f05ec Add debug info to map data endpoint for troubleshooting
- Return total_nodes, nodes_with_coords, and error in response
- Display meaningful messages when no nodes or no coordinates found
- Log API errors and node counts for debugging
2025-12-04 18:37:50 +00:00
Claude
fe744c7c0c Fix map markers to use inline styles and center on nodes
- Use inline styles for marker colors instead of CSS classes for reliable rendering
- Center map on node locations when data is first loaded
- Refactor filter logic to separate recentering behavior
- Update legend to use inline styles
2025-12-04 18:34:24 +00:00
Claude
cf4e82503a Add filters to map page for node type, infrastructure, and owner
- Enhanced /map/data endpoint to include node role tag and member ownership
- Added client-side filtering for node type (chat, repeater, room)
- Added toggle to filter for infrastructure nodes only (role: infra)
- Added dropdown filter for member owner (nodes linked via public_key)
- Color-coded markers by node type with gold border for infrastructure
- Added legend showing marker types
- Dynamic count display showing total vs filtered nodes
2025-12-04 18:29:43 +00:00
Louis King
cf2c3350cc Updates 2025-12-04 18:10:29 +00:00
Louis King
110c701787 Updates 2025-12-04 16:37:59 +00:00