1
0
forked from iarv/mc-webui

281 Commits

Author SHA1 Message Date
MarekWo
01fc9edf24 feat: Add tap-to-show path popup for mobile devices
Tooltips don't work on touchscreens. Added a popup that appears on
tap/click, shows the full path, and auto-dismisses after 4 seconds.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:41:33 +01:00
MarekWo
ddb69f1a18 fix: Deduplicate echo paths and improve incoming path matching
- Deduplicate 2-char repeater codes in echo badge (same repeater via
  different routes was shown twice, e.g., "3 (d1, 5e, 5e)")
- Use deduplicated count for unique repeaters, not unique full paths
- Improve incoming path correlation: widen window to 10s, prefer
  path_len match but fall back to timestamp-only if needed
- Add debug logging for incoming path correlation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 16:29:23 +01:00
MarekWo
b9a9436271 feat: Enhance echo tracking with paths, incoming routes, and persistence
- Show repeater path codes in sent message echo badge (e.g., "2 (5e, d1)")
- Capture and display route path for incoming messages in message meta
- Persist all echo data to .echoes.jsonl (survives container restarts)
- Load echo data from disk on startup with 7-day retention and compaction
- Combine sent echo and incoming path data in single /echo_counts response

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-07 15:59:41 +01:00
MarekWo
33aad637a5 upg: Meshcore-cli upgrade to 1.3.21 2026-02-07 14:22:43 +01:00
MarekWo
a822d94317 fix: Align sender name baseline with timestamp in own messages
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 21:13:36 +01:00
MarekWo
db6915f53f feat: Improve chat message display
- Add sender name above outgoing messages in group chat
- Display emoji-only messages in larger font size
- Fix leading space before text in quoted replies

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-06 20:42:27 +01:00
MarekWo
2c17c83253 feat: Add clickable #channel links in chat messages
- Auto-detect #channel names in messages and convert to clickable links
- Click existing channel: switch to it via channel selector
- Click non-existing channel: join via API, then switch
- Green styling to distinguish from blue @mentions
- Only active in channel context (not in DMs)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 08:54:50 +01:00
MarekWo
d37326c261 feat: Add chat filter functionality for channel and DM messages
- Add filter-utils.js with diacritic-insensitive search and text highlighting
- Add FAB filter button (gray funnel icon) to channel chat and DM
- Filter bar slides in as overlay at top of chat area
- Real-time filtering with debounce (150ms) as user types
- Matched text highlighted with yellow background
- Support for Polish characters (wol matches wół)
- Keyboard shortcuts: Ctrl+F to open, Escape to close
- Match counter shows X / Y filtered messages
- Filter persists during auto-refresh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 21:29:44 +01:00
MarekWo
aa788d7a0b feat: Add auto-start for stopped containers in watchdog
- Added AUTO_START option (default: true) to automatically start
  stopped containers, not just restart unhealthy ones
- Added handle_stopped_container() function
- Updated documentation with new configuration option

Set AUTO_START=false to disable automatic starting of stopped containers.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 14:05:51 +01:00
MarekWo
bb292b1a1d docs: Clarify watchdog configuration is optional
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 13:53:09 +01:00
MarekWo
96efc2a716 docs: Add watchdog documentation and fix executable flags
- Added docs/watchdog.md with installation and usage guide
- Added watchdog reference to README.md documentation table
- Fixed executable permissions on watchdog scripts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 13:43:17 +01:00
MarekWo
73e1c63083 feat: Add container watchdog service
New systemd service that monitors Docker containers and automatically
restarts unhealthy ones. Features:

- Checks container health every 30 seconds
- Captures logs before restart for diagnostics
- Saves diagnostic files to /tmp/mc-webui-watchdog-*.log
- HTTP status endpoint on port 5051
- Restart history tracking

Install with: sudo ./scripts/watchdog/install.sh

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-31 13:39:08 +01:00
MarekWo
a7af271d1f fix: Update meshcore-cli to version 1.3.16 2026-01-31 07:04:38 +01:00
MarekWo
2bb2d02476 fix: Force connection close to prevent stale connections in scheduler
Added 'Connection: close' header to bridge requests to prevent
connection pooling issues when running from APScheduler background
thread context.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 12:28:41 +01:00
MarekWo
2a187133ec fix: Add throttling and retry logic to cleanup job
Fixes "Broken pipe" errors on slower hardware (single CPU) by:
- Adding 0.5s delay between contact deletions
- Retrying failed deletions up to 2 times with longer delay
- Special handling for Broken pipe errors

This prevents overwhelming meshcore-bridge on resource-constrained systems.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-30 08:26:29 +01:00
MarekWo
c18863c903 docs: Add echo tracking feature to README
- Added "Echo tracking" to Key Features section
- Added "Echo Tracking" to Completed Features checklist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 21:50:53 +01:00
MarekWo
a2515c5372 fix: Add delayed reloads to update echo counts after sending
Echo counts weren't appearing until sending another message because
auto-refresh only triggers when new messages arrive. Added 6s and 15s
delayed reloads after sending to catch echoes as they arrive.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 21:16:08 +01:00
MarekWo
07040dd6d0 feat: Add "Heard X repeats" echo tracking for sent messages
Track how many repeaters heard and forwarded sent channel messages,
similar to the Meshcore mobile app's "Heard X repeats" feature.

- Bridge: Detect GRP_TXT echoes from stdout, track unique paths
- Bridge: New /register_echo and /echo_counts API endpoints
- API: Register messages for echo tracking after send
- API: Merge echo counts into /api/messages response
- Frontend: Display green badge with broadcast icon next to Resend button
- CSS: Echo badge styling with dark mode support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 20:57:10 +01:00
MarekWo
1ac76f107d feat: Add persistent command history to console
- Add server-side API for console history (GET/POST/DELETE)
- Add history dropdown button with clock icon
- Save commands to server after execution
- Load history from server on page load
- History persists between sessions and works across devices
- Max 50 commands stored, duplicates moved to end
- Dropdown shows most recent commands first

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-29 13:44:44 +01:00
MarekWo
ed8cab6dc5 feat: Add repeater commands to slow commands list
Added req_status, req_neighbours, and trace commands with 15s timeout
as they communicate with repeaters and need time for responses.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 17:18:07 +01:00
MarekWo
136bcd28e1 fix: Handle leading whitespace in JSON packet line filtering
Strip leading whitespace before checking if line starts with '{' to
ensure JSON packet lines are properly filtered regardless of indentation.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 15:55:05 +01:00
MarekWo
4709ecc771 fix: Suppress werkzeug WebSocket handshake errors in logs
The werkzeug development server produces "write() before start_response"
errors during WebSocket upgrade. These are cosmetic - the connection
still works via Socket.IO retry. Added a logging filter to suppress
these errors for cleaner logs.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 15:50:34 +01:00
MarekWo
251dbf0359 fix: Filter out JSON packet lines from console output
JSON lines with payload_typename (internal mesh protocol data like
CONTROL packets) are now filtered out from console output, showing
only the human-readable results.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 15:46:02 +01:00
MarekWo
9740fe3746 fix: Wait for slow commands before declaring no output in console
Commands like node_discover that take 10-15 seconds without producing
any intermediate output were being marked as completed after 300ms of
silence, resulting in "(no output)" being shown to the user.

Now the monitor waits for at least 80% of the command timeout before
applying the silence detection, ensuring slow commands have time to
complete and return their results.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-27 15:35:40 +01:00
MarekWo
3f6c87398d refactor: Move action buttons inside message bubbles
- Move Reply, Quote, Map, Resend buttons inside message bubbles
- Unify Map button style (outline-secondary like others)
- Add subtle separator line between message and buttons
- Slightly smaller buttons (28px) for better fit inside bubbles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 21:10:16 +01:00
MarekWo
6eb63ccbda feat: Add scroll-to-bottom button in DM view
Reuses the same CSS styling as channel chat button.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 21:02:09 +01:00
MarekWo
5f0151a691 feat: Add floating scroll-to-bottom button in channel chat
- Semi-transparent button appears when user scrolls up
- Positioned at bottom-right of messages container
- Clicking scrolls to latest messages and hides button
- Smooth fade-in/out animation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:59:38 +01:00
MarekWo
01823f6315 fix: Move timestamp above message bubble for own messages
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:51:41 +01:00
MarekWo
38f51b909a feat: Add resend button and adjust message byte limits
- Add Resend button under own messages in channel chat and DM
  (allows easy re-sending of failed messages)
- Change channel chat limit from 140 to 135 bytes
- Change DM limit from 140 to 150 bytes
  (experimentally verified Meshcore limits)
- Remove misleading Hops info from DM message bubbles
- Update README with new byte limits

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 20:46:03 +01:00
MarekWo
2ef9e94ab8 docs: Add @mentions autocomplete to README
- Add to Key Features section
- Add to Completed Features checklist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 08:31:34 +01:00
MarekWo
3e1537fdde feat: Add @mentions autocomplete in channel chat
When user types @ in the message input, a dropdown appears with contacts
list. The list filters as user types (matches any part of name, not just
prefix). User can navigate with arrow keys, select with Enter/Tab/click,
or dismiss with Escape.

- Add mentions popup HTML to index.html
- Add mentions CSS styling (responsive, scrollable)
- Add JavaScript logic: detection, filtering, keyboard nav, insertion
- Contacts cached for 60s, loaded on input focus
- Closes emoji picker when mentions opens (avoid overlap)
- Inserts selected contact as @[username] format

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-26 08:14:25 +01:00
MarekWo
98e4482054 fix: Remove extra argument from _filter_contacts_by_criteria call
The function internally fetches protected contacts, so passing it
as a third argument was incorrect and caused TypeError.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 19:54:13 +01:00
MarekWo
f65b35709f debug: Add detailed logging to cleanup job
Added more logging to track:
- When fetching contacts starts
- Result from get_contacts_with_last_seen (success, count, error)
- Filter criteria being used
- Protected contacts count

This will help diagnose why cleanup job is not finding contacts.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:46:42 +01:00
MarekWo
0ce7d676cd fix: Use cli module functions in cleanup job
Changed _cleanup_job() to use:
- cli.get_contacts_with_last_seen() instead of direct bridge API call
- cli.delete_contact() for reliable contact deletion

This matches the same approach used in preview-cleanup endpoint.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 17:40:40 +01:00
MarekWo
ecf3b42751 fix: Use correct bridge URL in cleanup job
Changed config.BRIDGE_URL to config.MC_BRIDGE_URL and GET to POST
for bridge API calls in _cleanup_job().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 15:03:34 +01:00
MarekWo
a4ef0fd497 feat: Use local timezone for scheduled cleanup instead of UTC
The scheduler now uses the timezone configured in .env (TZ variable)
instead of hardcoded UTC:
- Add get_local_timezone_name() helper to manager.py
- BackgroundScheduler uses system local timezone
- API returns timezone field in cleanup-settings response
- Frontend displays timezone next to hour selector and in status text
- Updated documentation to reflect timezone behavior

This makes the cleanup hour more intuitive for users in non-UTC timezones.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:46:08 +01:00
MarekWo
da31ab8794 feat: Add configurable hour for scheduled contact cleanup
Allow users to select the hour (0-23 UTC) when automatic contact
cleanup runs:
- Add hour selector dropdown in Advanced Filters (disabled until enabled)
- Hour field saved to .webui_settings.json with cleanup_settings
- API validates hour (0-23), scheduler uses CronTrigger with hour param
- Status text shows configured hour (e.g., "Enabled (runs daily at 03:00 UTC)")
- Documentation updated in user-guide.md

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-25 10:22:02 +01:00
MarekWo
a23eb2a5f4 feat: Add automatic scheduled contact cleanup
Add auto-cleanup feature that runs daily at 01:00 UTC using APScheduler:
- New cleanup settings stored in .webui_settings.json (enabled, types, date_field, days, name_filter)
- API endpoints: GET/POST /api/contacts/cleanup-settings
- Scheduler functions: _cleanup_job(), schedule_cleanup(), init_cleanup_schedule()
- UI toggle in Advanced Filters with validation (requires days > 0)
- Debounced auto-save for filter criteria changes
- Protected contacts are excluded from auto-cleanup

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-24 21:49:27 +01:00
MarekWo
a4baa438c5 docs: Minor update of README 2026-01-24 21:13:39 +01:00
MarekWo
884707f020 docs: Add funding link to buycoffee.to 2026-01-24 10:14:34 +01:00
MarekWo
d726407bcc docs: Add support link to buycoffee.to 2026-01-24 10:04:54 +01:00
MarekWo
fb94c62f63 docs: Add contact protection to Key Features
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 21:00:26 +01:00
MarekWo
bbc8b1db25 ui: Replace Copy Key button with clickable key
- Remove separate "Copy Key" button
- Make public key prefix clickable to copy
- Add fallback for HTTP contexts (execCommand)
- Add hover and copied state styling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 20:16:12 +01:00
MarekWo
51c05f7794 feat: Add contact protection feature
Add ability to protect contacts from accidental deletion via Contact
Cleanup tool. Protected contacts are stored locally in settings file.

Changes:
- Add GET /api/contacts/protected endpoint
- Add POST /api/contacts/<key>/protect toggle endpoint
- Add is_protected field to /api/contacts/detailed response
- Exclude protected contacts from cleanup preview and deletion
- Add Protect toggle button to Existing Contacts list
- Show lock icon for protected contacts
- Disable Delete button for protected contacts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 14:30:38 +01:00
MarekWo
d0f1aae963 ui: Replace map filter checkboxes with clickable badges
Convert type filter checkboxes to clickable toggle badges on the Map
modal (accessible from main menu). Same UX pattern as pending contacts:
- Active: colored background, white text
- Inactive: colored text/border, white background

Updated in both base.html and contacts_base.html for consistency.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 08:58:32 +01:00
MarekWo
a9dd31b86e ui: Optimize Contact Management for mobile screens
- Replace type filter checkboxes with clickable toggle badges in Pending
  Contacts (CLI/REP/ROOM/SENS) - more compact and better mobile UX
- Make Pending Contacts buttons (Approve, Map, Copy Key) smaller and
  uniform, matching Existing Contacts button style
- Optimize Existing Contacts filter toolbar to fit in one row on mobile
  (narrower dropdown, more compact sort buttons)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-23 08:44:55 +01:00
MarekWo
6f1b61a488 docs: Minor README.md update (gallery) 2026-01-22 08:40:24 +01:00
MarekWo
7f99d9886a docs: Add remote update screenshots to Gallery
Add 3 new screenshots showing the remote update workflow:
- Update Available, Remote Update, Updated Successfully

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 08:35:42 +01:00
MarekWo
baf338ae27 docs: Cosmetic change in README.md 2026-01-22 08:23:18 +01:00
MarekWo
a764c66070 fix: Improve update UI and install script
- Add sudo to journalctl command in install.sh help text
- Move "Update now" link below version number to prevent line wrap
- Add "What's new?" link in update modal pointing to GitHub commits

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-22 08:18:14 +01:00