Commit Graph

724 Commits

Author SHA1 Message Date
MarekWo 84d08e47ff Merge branch 'dev' v2.4.2 2026-07-31 13:07:43 +02:00
MarekWo 44d14d7c34 chore(release): finalize 2.4.2
Only a fix since 2.4.1, so PATCH per the project's SemVer rule.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 13:07:36 +02:00
MarekWo 20e1a67dc9 fix: show unread counts as badges in the narrow-screen channel list
The dropdown already rendered a .sidebar-unread-badge element, but the
styling rule was scoped to .channel-sidebar-item, so on narrow screens the
count fell back to plain text in the row's own colour. Extend the selector
to .channel-selector-item so both views share one badge style.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 13:06:05 +02:00
MarekWo 569e519007 chore: open 2.5.0 development
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 09:38:53 +02:00
MarekWo 47b477d167 Merge branch 'dev' v2.4.1 2026-07-31 09:37:14 +02:00
MarekWo 6e180e8d45 chore(release): finalize 2.4.1
Only fixes since 2.4.0, so PATCH per the project's SemVer rule.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 09:37:08 +02:00
MarekWo fd054a95bd perf: let the realtime socket upgrade to a WebSocket
Three tabs open made every endpoint answer in ~20s, which two sessions read as
contention on a shared server-side lock. It wasn't the server. With 3 tabs open,
/health - which touches neither the database nor the device - measured a 14.7s
median from inside a tab and 11ms from a client outside the browser at the same
instant. The server was idle throughout.

Socket.IO clients pinned transports: ['polling'], upgrade: false, so each tab
held one HTTP connection open for its whole lifetime. Browsers allow six
concurrent HTTP/1.1 connections per origin, shared across every tab, so three
tabs consumed the pool and everything else queued in the browser waiting for a
free connection. /proc/net/tcp in the container confirmed it: pinned at exactly
6 established connections, unmoving.

The pin dates from 1d47c9c, when werkzeug had no WebSocket support and every
upgrade attempt returned HTTP 500. python-engineio==4.8.1 (pinned five weeks
later, in d3590f9) pulls in simple-websocket, which fixed that; the workaround
had outlived its premise. Drop it and use the default transports, which open on
polling and upgrade. A WebSocket is not part of the HTTP pool, so the pool is
released. Where the upgrade is blocked - a proxy that drops the Upgrade header -
the client stays on polling by itself, which is exactly today's behaviour.

Measured with 3 tabs, in-page medians: /health 14664ms -> 12ms, /api/status
19282ms -> 64ms, both now matching what the same probes read from outside the
browser. All three tabs report transport "websocket", server pushes still
arrive over it, and the log no longer fills with "Session is disconnected"
(0 occurrences, 0 tracebacks across the run).

Also corrects the earlier diagnosis in the docs: the per-endpoint timings that
looked like a lock were measured request->requestfinished in the browser, which
includes connection-queue time, so every endpoint flattened to the same figure
regardless of its own cost.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 09:31:40 +02:00
MarekWo ab64ef72f2 perf: answer /api/status with one targeted query
/api/status is polled by every open page (on load, every 60s, and on
visibility resume) and cost ~266-450ms in-container while doing no device
I/O at all — check_connection() is just an attribute read, and /health
returns in ~1ms, so all of it was SQLite.

Two calls were over-fetching:

- get_stats() ran COUNT(*) over 11 tables to answer a question about 2.
  COUNT(*) FROM echoes alone was ~200ms over 19k rows and the result was
  discarded. That table only grows, so the endpoint kept getting slower.
- get_channel_messages(limit=1) was a SELECT * fetching every column,
  raw_packet included, to read one timestamp. ORDER BY timestamp has no
  usable index (idx_cm_channel_ts leads with channel_idx), so the plan
  was a full SCAN through two temp B-trees. MAX(timestamp) is served off
  that index as a covering scan instead.

Replaced with Database.get_status_summary(): three scalar subqueries on
one connection. ~371ms -> ~46ms for the DB work; endpoint median ~57ms
in-container, ~78ms from the page. Response verified byte-identical.

This does not address the multi-tab congestion — at one poll per tab per
60s /api/status was never that cause — but it removes a recurring cost
and re-baselines the probe those measurements are taken with.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 08:35:53 +02:00
MarekWo 1e82a1ed7c docs: correct the multi-tab claim in the whatsnew entry
Testing after the batching fix showed three tabs still push /api/status from
~600ms to a ~13s median, from a different cause (every endpoint degrades
together under load, so a shared lock rather than a request storm). The entry
claimed multiple windows were no longer a problem; scope it to the load
reduction that was actually measured.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 07:57:29 +02:00
MarekWo 0e524ddbc1 perf: resolve message metadata in one batched request
Every incoming echo triggers a sweep of the whole rendered message list, and
refreshMessagesMeta() awaited one /api/messages/<id>/meta per message inside
the loop. Messages that never gain a route (nothing heard them) never stop
qualifying for the sweep, so the same ~180 messages were re-fetched every few
seconds: 7,500 requests in nine minutes on a single tab, each opening its own
SQLite connections. The single-threaded werkzeug server — the same one
production runs — had no room left for anything else, so the UI hung on
"Loading messages..." / "Connecting..." while the device was in fact connected.

Add GET /api/messages/meta?ids=... resolving the whole sweep with a handful of
queries, batching the row and echo lookups, and have the client collect ids
first and fetch them in chunks. The per-message endpoint stays for forced
single refreshes; both now share _build_message_meta() and the existing
_build_channel_secrets / _get_row_pkt_payload helpers, so the payload is
unchanged (verified byte-identical against the old response).

Measured on the local container, 500 messages rendered / 181 needing meta:
one 273 ms request in place of 181 sequential ones at ~82 ms each.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 07:44:48 +02:00
MarekWo ebd2e95fe1 fix: refill the message gap left by a backgrounded app
The chat view only ever grew by socket push, so anything that arrived
while the connection was down was never drawn. Android tears the
connection down behind a locked screen, and the wrapper keeps the same
page alive for days, so the list stopped at the last message that got
through until the app was force-stopped. A browser tab hid the same bug
by reloading the page on resume.

Every way back from a gap now re-reads the list from the server: the
socket reconnecting, the page becoming visible after more than a glance
away, a heartbeat noticing its own tick arrived far too late (the page
was frozen), a new Refresh item in the menu, and window.__mcAppResumed,
which the wrapper calls from onResume since a WebView is not guaranteed
to report the page as hidden at all. Direct messages get the same
treatment.

Verified in Chrome against the local container: all five triggers fire a
resync, with no page errors and the list intact afterwards.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-30 18:19:52 +02:00
MarekWo dc685348f9 chore: open 2.5.0 development
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 21:17:05 +02:00
MarekWo c43e13e0ec Merge dev into main for 2.4.0
Android wrapper 1.1: working notifications via a native bridge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v2.4.0
2026-07-29 21:16:28 +02:00
MarekWo 8695017af5 chore(release): 2.4.0
Also corrects the app-vs-PWA table in the user guide: it claimed QR
scanning and file downloads were unavailable in the Android app, which
contradicted the Android App guide from the start - both have always
worked there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 21:16:18 +02:00
MarekWo 80eba5bbc1 feat(android): publish wrapper 1.1 with notification support
The signed release build of the notification work from 954e99b, signed
with the same key as 1.0 (certificate SHA-256 425857b3...d230), so it
installs straight over the previous version and users keep their saved
server address.

Verified against the packaged APK: versionCode 2 / versionName 1.1,
POST_NOTIFICATIONS present, and assets/notification_shim.js included.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 20:50:52 +02:00
MarekWo 954e99b42c feat(android): give the wrapper working notifications
Android's WebView ships no Web Notifications API, so window.Notification
was undefined, mc-webui detected that and greyed its toggle out as
"Unavailable". The app also declared no POST_NOTIFICATIONS and created no
channel, so it never even appeared in Android's notification settings.

A shim injected at document start puts window.Notification back and
forwards it to a @JavascriptInterface bridge that posts through Android's
NotificationManager. mc-webui itself is untouched - the page keeps using
the standard API.

- onPageStarted is early enough: mc-webui reads the permission on
  DOMContentLoaded, a whole parse and script pass later
- web permission states map onto Android's, with
  shouldShowRequestPermissionRationale separating "ask again" from
  "blocked for good" after a refusal
- tags replace notifications the way the web API expects; a tap returns to
  the running app (singleTop) and fires the page's onclick
- notifications only arrive while the process is alive, same as the PWA

versionCode 2 / versionName 1.1. Verified: debug and release both build
clean (lintVitalRelease included), shim and drawable land in the APK, and
the shim's contract is covered by a Node harness against a fake bridge.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-29 08:48:01 +02:00
MarekWo 6ecdfd6033 chore: open 2.4.0 development
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 21:21:29 +02:00
MarekWo f5a797968b docs(whatsnew): link 2.3.0 with absolute URLs so the GitHub release resolves them
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v2.3.0
2026-07-28 21:19:57 +02:00
MarekWo f6e427be5d chore(release): 2.3.0
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 21:19:13 +02:00
MarekWo 28d74476e7 feat(android): publish the signed release build of the wrapper
Replaces the debug APK with a release build signed with the project key
(CN=Marek Wojtaszek, valid to 2081, v1+v2 schemes, not debuggable), so
every later version installs over this one instead of forcing a reinstall.

Docs catch up with what the app can now do: QR scanning works on https
instances, downloads land in the phone's Downloads folder, and the address
form is a non-destructive screen you can reach deliberately. New SHA-256,
size, permission list and the signing fingerprint to verify against.

Also silences the Kotlin warning for the deprecated shouldOverrideUrlLoading
overload kept for Android 5.x - source-only, the APK is unaffected.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 21:17:57 +02:00
MarekWo 0cbab03ab8 feat(android): add wrapper sources and fix the address, camera and downloads
The wrapper is what users sideload, so its source belongs next to the APK -
they can read what they install, or build it themselves.

Behaviour fixes on the way in (APK rebuild pending):

- The saved server address survives. Back on the first page and connection
  errors used to delete it, so a stray tap or a moment without signal meant
  typing the address again; the form now opens pre-filled and only a save
  replaces what is stored. Back at the top level asks: exit, change server,
  or cancel
- QR scanning works: the page's camera request is mirrored to an Android
  permission request (CAMERA, on an https instance - getUserMedia needs a
  secure context, as in any browser)
- Downloads work: a DownloadListener hands database backups and other files
  to DownloadManager, which puts them in the phone's Downloads folder
- Links to other hosts and non-http schemes open in the system browser, so
  a URL in a message no longer navigates the app away from the instance
- Rotating the screen no longer reloads the page

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 21:05:42 +02:00
MarekWo f71cac8b2e feat(android): ship the Android companion app with an install guide
A thin WebView wrapper that opens a user's own mc-webui instance full
screen, without the browser address bar. It asks once for the server
address and remembers it; all logic stays on the server.

- android/mc-webui-wrapper.apk (1.0, it.wojtaszek.mc.wrapper, minSdk 21)
- docs/android-app.md: download + checksum, "unknown sources" permission,
  the Play Protect notice, first connection, and the limitations that come
  with a WebView (no notifications, no QR camera, no file downloads)
- README, user guide and whatsnew entries, incl. an app-vs-PWA comparison
- *.apk marked binary so the text=auto rule can never touch it

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-28 20:55:04 +02:00
MarekWo 0c10640e28 chore: open 2.3.0 development
Marks dev as ahead of the 2.2.0 release, so tester builds report
2.3.0-dev instead of claiming to be the released version. The final
number is decided when the release is cut - a cycle that turns out to
carry only fixes ships as 2.2.1 instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 12:13:17 +02:00
MarekWo 0fc73ec760 chore(release): 2.2.0
Drop the -dev suffix and date the whatsnew section so release.sh can find
its notes. Also make the build-string example in the whatsnew header read
as an example, instead of naming one particular build that goes stale the
moment it ships.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v2.2.0
2026-07-27 12:11:55 +02:00
MarekWo 17398e8e41 feat(chat): quote with the '>' line prefix instead of guillemets
The Quote button produced `@[user] »text« ` — a shape mc-webui invented back
when it could not send newlines, and one that other MeshCore clients neither
write nor understand. It now writes the quote on its own line behind a '>'
and leaves the cursor underneath it, matching the plain-text convention some
users already type by hand.

processQuotes() styles both syntaxes, so messages sent by older builds keep
their formatting. The '>' match is anchored to a line start or a leading
@[mention] badge and looks for the escaped '&gt;', so neither "5 > 3" in
prose nor the brackets of generated tags can trigger it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 11:58:53 +02:00
MarekWo 993013e0f5 docs: say which version a branch is showing
The Releases panel on GitHub is repository-wide, so browsing dev still
shows the latest stable release in the sidebar - which reads as "dev is
2.1.0" when dev is actually preparing 2.2.0. A note at the top of the
README points at the VERSION file, which is per-branch and therefore
always right.

Deliberately carries no version number of its own: it explains how to
read the two sources rather than duplicating them, so it needs no upkeep
and merges between branches without conflicting.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-27 08:22:15 +02:00
MarekWo 9899f58ae7 chore: open 2.2.0 development
Marks dev as ahead of the 2.1.0 release, so tester builds report
2.2.0-dev instead of claiming to be the released version. The final
number is decided when the release is cut - a cycle that turns out to
carry only fixes ships as 2.1.1 instead.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 19:57:13 +02:00
MarekWo ed2cf07e73 fix(release): refuse to tag when main has not been pushed
Pushing the tag drags the commit objects to GitHub, so the release page
looks correct while the main branch still points at older code - exactly
what happened on the 2.1.0 release, where origin/main stayed on the
previous merge. The script now fetches origin/main and refuses unless the
local HEAD matches it, naming the push command.

Also spells out what to do when VERSION still carries a -dev suffix,
since the format check alone did not say which way to resolve it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 19:41:39 +02:00
MarekWo 4c6857a00f feat: numbered releases (2.1.0) with git tags and GitHub releases
The app already knew exactly which build was running - a calendar version
of commit date plus short hash - but nothing gave a release a name users
could quote, and the repo had no tags at all.

Adds a VERSION file as the single source of truth for a SemVer release
number, read by app/version.py alongside the existing build string rather
than replacing it: the number is for people, the build is for pinning down
a deploy, and both ship in /api/version and the template context. The menu
shows the release first with the build underneath. #versionText still holds
the build string, because the remote-update poller compares it to detect
that the server came back on a new build.

Resolution order is unchanged (frozen file > git > fallback), and a frozen
file written before this change still yields a correct release number, so
an already-deployed server does not need re-freezing to stay sane. The
container has no git, hence COPY VERSION into the image - otherwise a plain
'docker compose build' reports 0.0.0.

scripts/release.sh cuts a release from main: it refuses a dirty tree, a
wrong branch, a malformed number or an existing tag, extracts the notes
from the matching whatsnew section, then tags, pushes and publishes via gh.

Numbering starts at 2.1.0 rather than 1.x: the v2 line has been in
production since March and 'v1' is the archived pre-migration branch, so
1.x would have been ambiguous. Sections in whatsnew before 2.1.0 keep
their date-only headings - they were never tagged.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
v2.1.0
2026-07-26 19:20:57 +02:00
MarekWo 95d96ecbd3 docs: Path Analyzer map overlays and remembered filters
user-guide: the Map view now opens showing only the selected route, with
the two opt-in checkboxes (All repeaters, Alternative paths) described
alongside how alternatives are coloured and why only their diverging
stretches are drawn. The Filters section gains a paragraph on settings
being remembered per browser, including the deep-link exception.

architecture: added map layer ordering, the segment de-duplication that
keeps alternatives visible, the no-refit re-render on toggle, and the
localStorage filter persistence contract (user-driven writes only, skip
restore on deep link).

whatsnew: three user-facing entries under the pending release section.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 18:47:38 +02:00
MarekWo 233b967032 feat(pathanalyzer): remember filter settings between visits
Time range and the filter bar reset on every open, so a working set like
"Last 1 day + 2/3-byte" had to be re-entered each time. The controls are
now stored in localStorage - a personal working set, not device state,
so it stays out of the database.

Only user-driven changes are stored: programmatic ones, such as the
deep-link widening the range to 7 days to find an older message, must not
overwrite the saved set. Restoring is skipped entirely when arriving via
a deep link, where a saved filter could hide the very message the user
clicked through to.

The Routes segment length rides along - same "set it again every visit"
annoyance. A stored value for an option that no longer exists is ignored.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 18:45:17 +02:00
MarekWo f31e4e160c feat(pathanalyzer): map overlay toggles for repeaters and alternative paths
The map used to plot every located repeater on top of the selected route,
which buried the path the user actually asked for. Both extras are now
opt-in, via a Leaflet control in the map corner - the shared filter bar
would be the wrong place, since these apply to the Map view only.

- "All repeaters": the purple contact markers, off by default (also saves
  plotting ~650 markers on every render)
- "Alternative paths": the selected message's other echoes, each in its
  own light hue, keyed to a swatch on the matching sidebar row

Echoes of one message usually share a long prefix, so a segment is drawn
once only - the primary route claims it, and an alternative then shows
exactly where it diverges instead of hiding underneath. Each alternative
also gets a dot at its last resolved hop, since the difference is often
just the final one.

Toggling re-renders without refitting the bounds, so it never throws away
the viewport the user panned or zoomed to.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-26 18:35:06 +02:00
MarekWo fbbd1fa019 Merge branch 'dev' 2026-07-24 10:11:44 +02:00
MarekWo 4963dd6a32 docs: chat-route deep link into Path Analyzer; date the 2026-07-22 release
Cover the two changes on dev since the last main merge (c6d2367):
- d8d3427: clicking a route under a channel message now opens the Path
  Analyzer map deep-linked to that message + echo (user-guide new Group
  Chat Message Routes section, Path Analyzer to-open note, whatsnew New
  features, architecture deep-link URL contract).
- bb67c4d: exact sent-message echo matching fix (whatsnew Reliability).

Also finalize the previously-merged Unreleased-since-debb711 section by
dating it 2026-07-22 (the c6d2367 merge), and open a fresh
Unreleased-since-c6d2367 for the current changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 09:49:22 +02:00
MarekWo d8d3427dc9 feat(pathanalyzer): chat route click opens the analyzer map deep-linked
Clicking a route in the chat path popup now opens Path Analyzer on the
Map view with that message selected and that exact echo path drawn,
instead of copying the route to the clipboard. Copy stays available as
a small per-route clipboard icon in the popup.

Deep link flow: popup click stores {packet_hash, path hex} in
window.paDeepLink; the modal show handler builds the iframe URL with
?hash=&path=; the analyzer resolves the message after load (widening
the time range once to 7 days if needed), matches the echo by raw path
hex (fallback: shortest), and switches to the map. A plain menu open
still loads the analyzer without any deep link.

Verified live via Playwright: clicked the 3rd (non-shortest) route of a
multi-route message - the map opened with exactly that echo selected,
including the 3-to-7-day widening retry (message was 4 days old).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-23 07:10:31 +02:00
MarekWo bb67c4d3ea fix: duplicate _refresh_channel_secret silently disabled exact echo matching
The class defined _refresh_channel_secret twice. The second definition
(legacy, returns None) shadowed the first one added in 77c3ffa, so
send_channel_message never got the channel secret, expected_payloads was
always empty, and every sent-message echo correlation fell through to the
loose 60s channel-hash-byte fallback. Any foreign GRP_TXT echo on the same
channel inside that window could then be mis-assigned to our sent message
(wrong hash + physically impossible path on the badge and in Path Analyzer).

Drop the legacy definition and let set_channel use the surviving one, which
also re-reads the secret and updates cache + DB.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-22 07:05:52 +02:00
MarekWo c6d2367ab9 Merge branch 'dev' 2026-07-22 06:42:27 +02:00
MarekWo c5a0fa8fd1 docs: Path Analyzer Routes view + mobile polish, repeater login/location
Path Analyzer now documents its fourth view (Routes — consecutive
hop-segment stats with an "as path end" count) and the `>`-chained
sequence filter, the map's instant shortest-route draw and channel
label, and the mobile collapsible filter bar / 45vh map. My Repeaters
gains the Settings -> Location "Pick from map" picker and the
saved-password prefill on login retry; architecture.md adds the new
GET /api/repeaters/<pk>/password endpoint and a four-views note.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 06:35:15 +02:00
MarekWo afb305a61e feat(pathanalyzer): Routes view - hop segment statistics + sequence filter
New 4th view counting consecutive hop segments (n-grams) across all
routed echo paths, regardless of position in the path:
- segment length selector (2/3/4 hops), table sorted by echo count by
  default; columns: Echoes, distinct Messages, As path end (how often
  the segment is the final part of the path reaching us)
- resolved contact names shown under the hash chips (ambiguous/unknown
  marked like elsewhere)
- row click fills the repeater filter with the segment and jumps to the
  message list
- the repeater filter now accepts consecutive sequences chained with
  > or an arrow (e.g. AFE6>6E9A or hash>name); single values behave
  exactly as before, spaces stay usable inside contact names
- view switcher buttons show icons only on xs screens so 4 buttons fit

Idea by Daniel - group paths by recurring hop sequences to see which
routes carry the most traffic.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 21:38:47 +02:00
MarekWo 0d9d9ecd57 feat(pathanalyzer): map view polish - channel label, auto path, 45vh map
- Show the channel name (dimmed, next to the sender) on map-view tiles
- Clicking a message now auto-selects and draws its shortest routed echo
  (fewest hops, ties -> first); re-clicking keeps the user's echo choice
- Mobile: map takes a fixed 45% of the viewport height and the path list
  gets the remaining space (was min 300px map / max 40% list)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 21:08:19 +02:00
MarekWo 944493a56e feat(pathanalyzer): collapsible filter panel on small screens
On viewports below 768px the toolbar collapses to a single line (view
switcher + Filters toggle + counter); filters expand on demand and an
active-filter count badge shows on the toggle when collapsed. Desktop
layout is unchanged (the panel renders with display: contents). Frees
most of the vertical space for the path list on the mobile Map view.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-21 20:50:11 +02:00
MarekWo f54dc1d481 feat(repeaters): prefill saved password on login retry, map location picker, tidy list
- Login retry prompt now prefills the saved password (a wrong stored
  password and an unreachable repeater are indistinguishable, so a
  connection-caused failure no longer forces retyping). Adds
  GET /api/repeaters/<pk>/password for the trusted local UI.
- Repeater list: "last login" moves to its own line so a long path keeps
  the full row width on narrow phones.
- Settings -> Location: "Pick from map" button opens a Leaflet picker;
  clicking the map fills lat/lon and marks the section dirty.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-21 20:27:13 +02:00
MarekWo 3af605504a docs: mention the combined 2/3-byte HB filter option
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 12:15:12 +02:00
MarekWo 19c35f4a2b feat(pathanalyzer): combined 2/3-byte option in the HB filter
The path-hash-size filter accepts a comma list of sizes; a new
'2/3-byte' option matches messages with any routed echo using a 2- or
3-byte hash.

Verified live: 2/3-byte returns exactly the union of the 2-byte and
3-byte sets (220 = 208 + 12 with zero overlap misses on live data).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 12:14:50 +02:00
MarekWo 91b959aae4 docs: map path colors, numbered hop points, pick undo
Update the Path Analyzer map descriptions in user-guide.md and
whatsnew.md for the red numbered/name-labeled path points and the
reversible candidate assignments (per-hop undo + Reset picks).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 11:47:06 +02:00
MarekWo c1853fe8d7 feat(pathanalyzer): map path styling and manual-pick undo
- Drawn paths now use red (#dc3545) for hop markers and polylines,
  clearly distinct from the purple base repeater dots (origin stays
  green, ambiguous candidates amber)
- Resolved hops render as numbered badges matching the legend order,
  with a permanent name label next to each point (origin included)
- Manual candidate assignments are reversible: a picked hop shows an
  undo icon in the legend, and a 'Reset picks' button clears every
  manual assignment on the current path

Verified live via Playwright: line/marker colors, badge numbers and
name labels, pick -> per-hop undo -> re-pick -> reset-all flow, no
page errors.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-20 11:46:32 +02:00
MarekWo 743969291e perf(api): batch echo enrichment in /api/messages
Replace per-message get_echoes_for_message() calls (N+1, up to 500
queries per request) with a single get_echoes_for_payloads() batch
query. With connection-per-call over a Windows bind mount each query
cost ~66 ms, making the endpoint take 33 s and time out in the UI;
now it completes in ~0.5 s.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 22:37:29 +02:00
MarekWo e95b16780f Merge branch 'dev' into main 2026-07-19 22:07:28 +02:00
MarekWo 7bcd0ef46b docs: cover the Path Analyzer feature
- user-guide.md: new Path Analyzer section (opening, filters, the
  Messages/Repeaters/Map views, phone layout notes, local-view caveat);
  TOC entry; per-item placement action count 12 -> 13 with Path
  Analyzer added to the enumeration
- architecture.md: /api/path-analyzer/messages added to the Messages
  endpoint table plus a Path Analyzer design section (batched echo
  fetch, client-side filtering rationale, SNR attribution, hash ->
  contact resolution, legacy-row degradation)
- whatsnew.md: three user-facing bullets under Unreleased (the tool,
  the combined filters, phone support)

No deploy notes needed: no new dependencies, no schema changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 22:00:53 +02:00
MarekWo 0ad26a66f8 fix(pathanalyzer): Messages and Repeaters views fit narrow screens
Rather than a card-per-row transform (too much scrolling for 400+
messages), narrow viewports (<=576px) keep the table but shed
secondary width:
- Hash, HB and Echoes columns hidden; packet hash + HB surface as a
  line at the top of the expanded detail row instead (still copyable)
- time renders as short date/time stacked on two lines (full timestamp
  on wide screens)
- sender/channel/message-preview columns capped with ellipsis, tighter
  cell padding, headers allowed to wrap
- stats view: Messages and As-last-hop columns hidden on phones
  (Repeater, Contact, Relayed, Avg SNR remain), contact names truncated
- expanded echo paths now wrap fully within the viewport, keeping every
  hop chip and the jump-to-map button reachable

Root cause of the first attempt failing: the media block sat mid-
stylesheet, so later equal-specificity base rules overrode it - it now
sits last, with a comment pinning it there.

Verified live via Playwright at 390px: zero horizontal overflow in
Messages (incl. an expanded 20-hop path, map button on-screen) and
Repeaters; desktop 1280px layout unchanged.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-19 21:53:57 +02:00