fix(meshcore): preserve hop/route/scope info in channel message history - #4475
Conversation
…ry (#4474) MeshCoreManager.getChannelMessages backs the /messages/channel/:idx endpoint used for both the initial channel load and infinite-scroll load-older, but its DB-row-to-API mapping dropped hopCount, routePath, scopeCode, and scopeName even though they're persisted columns. Live messages (in-memory pool, hydrated on connect/receive) carried these fields, so hop/path info was visible on newer messages but vanished for anything paginated in from history. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Wpq1d3ZYDGqgJ4SJ5WrKJG
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
|
The -- Authored by Roger 🤓 Generated by Claude Code |
|
Claude finished @Yeraze's task —— View job PR Review: fix(meshcore): preserve hop/route/scope info in channel message historyTasks:
SummaryThis is a clean, focused fix for a clear bug. The root cause analysis in the PR description is accurate: the Code Changes (
|
Twelve changes since rc4, across all five version files (package.json, package-lock.json, helm Chart.yaml, desktop/package.json, tauri.conf.json). Highlights: - Remote admin no longer holds an HTTP request across mesh round-trips (#4482 → #4485, #4486): commands, session-passkey acquisition, and remote config import all return 202 + an operation id and complete in the background, fixing upstream 502s behind a reverse proxy. Remote ignore/unignore gained routing-ACK confirmation. - Admin messages now use the node's configured LoRa hop limit instead of a hardcoded 3 (#4479), so nodes further than 3 hops away are administrable. - GET /stats no longer 500s when sourceId is omitted (#4470). - MeshCore fixes: anon auth banner, channel-sync data loss, reply/trigger ordering (#4491), channel view scroll/delete (#4488), hop/route/scope preserved in channel history (#4475). - Navigation unified across Meshtastic/MeshCore per-source views (#4481, #4484). Carries the system-test label: this is the first release build to exercise the async remote-admin paths against real hardware — the Configuration Import leg covers /import-config, which has not run on a device until now. Claude-Session: https://claude.ai/code/session_015cgD5kSurLjdeVkZ6PcQD9 Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Fixes #4474
Summary
MeshCoreManager.getChannelMessagesbacks the/api/sources/:id/meshcore/messages/channel/:idxendpoint, used for both the initial per-channel message load and the infinite-scroll "load older" pagination ([BUG] Meshcore scrolling up on channel doesn't load older messages #4460/fix(meshcore): infinite-scroll pagination for channel message history #4461).hopCount,routePath,scopeCode, andscopeName, even though these are persisted columns onmeshcore_messages.connect()), which is why hop/path/scope info showed up on a message right when it arrived, then disappeared once that message was instead paginated in from history — matching the reported "disappears on older messages" behavior.hopCount/routePath/scopeCode/scopeNamefrom the DB row ingetChannelMessages, mirroring the mapping already done inconnect()'s DB rehydration.Test plan
src/server/meshcoreManager.channelMessagesFields.test.ts— regression test assertinggetChannelMessagesforwards these fields (and defaults tonullwhen the DB row has none).npx vitest run src/server/meshcoreManager*.test.ts src/server/routes/meshcoreRoutes.test.ts src/db/repositories/meshcore.test.ts— 43 files / 607 tests passed.npx tsc --noEmit— clean.npm run lint:ci— clean (no new ratchet violations).Generated by Claude Code