515 Commits

Author SHA1 Message Date
MarekWo
2de09811ce fix: Improve chat avatar styling and layout
- Reduce horizontal padding in messages container
- Add colored circle background to emoji avatars
- Fix vertical alignment of avatar with sender name

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 07:52:25 +01:00
MarekWo
5582f85ad0 feat: Add avatar circles to channel messages
- Add mini avatars next to sender names in channel chat
- Extract emoji from username for avatar (first emoji only)
- Use initials for users without emoji (1-2 letters)
- Generate consistent colors based on username hash
- Move sender name outside message bubble (MeshCore style)
- Add responsive styles for mobile devices

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-20 07:38:15 +01:00
MarekWo
731d4a9d9b refactor: Remove colon from quote format
Format changed from @[User]: »text« to @[User] »text«
Guillemets alone are sufficient to separate the quote.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 11:01:50 +01:00
MarekWo
5d01f90ba1 refactor: Hide guillemets and add line break after quote
- Guillemets (» «) no longer displayed - styling is sufficient
- Added line break after quoted text for better readability
- Raw message still contains guillemets for compatibility

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 10:43:45 +01:00
MarekWo
b2418a50d3 feat: Improve quote format with guillemets and styling
- Changed quote format to: @[Username]: »quoted text«
- Added processQuotes() to detect and style »text« patterns
- Quote styling: italic, gray background, left border
- Different styling for own messages vs others

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 10:29:59 +01:00
MarekWo
936698ca46 feat: Add Quote button to chat messages
Adds a Quote button next to Reply that allows quoting a message.
- Messages ≤20 bytes are quoted in full
- Longer messages are truncated with "..."
- Format: @[Username] "quoted text"
- Uses UTF-8 byte counting for accurate truncation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 10:15:35 +01:00
MarekWo
ffbcd8eead fix: Remove whitespace from image thumbnail template literal
The template literal had newlines and spaces that were preserved by
white-space: pre-wrap CSS, causing unwanted gaps before and after
image previews in chat messages.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 09:48:17 +01:00
MarekWo
039433a8a2 fix: Remove extra spacing before image preview in group chat
Changed message content container from <p> to <div> to fix invalid HTML
when image previews are embedded. The <p> tag cannot contain block-level
elements like <div>, causing browsers to auto-close the paragraph and
create unwanted spacing between text and image preview.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-19 09:40:14 +01:00
MarekWo
b5cdce18f2 feat: Replace Settings with Device Info modal
- Rename Settings to Device Info with new cpu icon
- Display device parameters in readable table format
- Add copy-to-clipboard buttons for Name and Public Key
- Add map button for device location coordinates
- Show human-readable parameter names and values
- Hide telemetry parameters (not commonly needed)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 17:02:42 +01:00
MarekWo
9bc27042da fix: Re-render messages after geo cache loads to show Map buttons
Messages are now displayed immediately, then re-rendered once geo cache
is ready so Map buttons appear for contacts with GPS coordinates.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 16:28:30 +01:00
MarekWo
7d0fb61533 perf: Don't block UI on geo cache loading
Geo cache now loads fully in background without blocking setupAutoRefresh().
UI is ready as soon as messages are displayed.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 13:25:01 +01:00
MarekWo
9e36c17f77 perf: Optimize channel chat loading time
- Add 60s cache for /api/contacts/detailed (reduces 4 USB calls to 0)
- Optimize /api/messages/updates to read file once instead of N×2 times
- Parallelize initialization: timestamps loaded together, messages and
  geo cache loaded in parallel
- Defer checkForUpdates() to after messages are displayed
- Remove blocking checkForUpdates() from loadChannels()
- Add cache invalidation for contacts on add/delete operations
- Add performance timing logs to browser console

Expected improvement: ~10-20s → ~2-3s initial load time

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 13:05:03 +01:00
MarekWo
1e6f47dcde docs: Add version freeze to installation instructions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 12:10:35 +01:00
MarekWo
cd165415e9 docs: Add version freeze step to update instructions
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 11:56:26 +01:00
MarekWo
7ca3f4d2dd feat: Add dynamic Git-based versioning system
- Add app/version.py module generating version from Git metadata
- Format: YYYY.MM.DD+<commit_hash> (e.g., 2025.01.18+576c8ca9)
- Add +dirty suffix for uncommitted changes (ignores .env, technotes/)
- Add /api/version endpoint for monitoring
- Display version in hamburger menu
- Add freeze mechanism for Docker builds

Deploy command updated:
git push && ssh ... "cd ~/mc-webui && git pull && python -m app.version freeze && docker compose up -d --build"

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-18 11:47:22 +01:00
MarekWo
7a626ba105 chore: Remove technotes/ from repository
Keep folder local only, already in .gitignore

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:47:13 +01:00
MarekWo
d395656445 feat: Add colored markers and type filtering on contact map
- Use CircleMarker with different colors per contact type:
  - CLI (blue), REP (green), ROOM (purple), SENS (orange)
- Add type filter checkboxes in map modal header
- Dynamically update markers when filters change
- Hide filter panel for single contact view
- Reduce message action buttons to 32x32px

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 08:21:11 +01:00
MarekWo
f00234af88 style: Make message action buttons icon-only with uniform size
- Remove text labels from Reply and Map buttons
- Add consistent 36x36px square buttons with icons only
- Add tooltips for accessibility
- Prepare for adding more action buttons in the future

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 07:59:18 +01:00
MarekWo
6cb777e90c fix: Map buttons not working in contacts page and message bubbles
- Add Leaflet CSS/JS and map modal to contacts_base.html
- Add showContactOnMap function to contacts.js (contacts page has separate template)
- Load contactsGeoCache before messages to ensure Map buttons appear on bubbles

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-16 07:51:00 +01:00
MarekWo
72da96e647 feat: Add Leaflet map for contact locations
- Replace Google Maps with Leaflet + OpenStreetMap (free, no API key)
- Add Map button in main menu to show all contacts with GPS
- Add Map button on message bubbles (next to Reply) for senders with GPS
- Contact Management Map buttons now open modal instead of new tab
- Lazy map initialization with proper Bootstrap modal handling

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 22:46:36 +01:00
MarekWo
61bd4b41ae chore: Remove unused MC_INACTIVE_HOURS config variable
This variable was defined but never used in the code.
Contact cleanup threshold is controlled directly in the UI.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 17:09:32 +01:00
MarekWo
45e96b9bb7 docs: Simplify installation - auto-detect works by default
Most users don't need to edit .env anymore. Serial port and device
name are auto-detected. Troubleshooting section collapsed by default.

Reduced installation from 8 steps to 7.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:27:49 +01:00
MarekWo
c3d0d3cbdb fix: Add cgroup rule for ttyACM devices (ESP32-S3)
ttyACM uses major 166, not 188 like ttyUSB.
Needed for Espressif ESP32-S3 based devices (Heltec V3, etc.)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:21:11 +01:00
MarekWo
b2496b17b0 feat: Auto-detect serial port from /dev/serial/by-id/
When MC_SERIAL_PORT=auto, bridge scans /dev/serial/by-id/ and:
- Uses the device if exactly one found
- Fails with helpful message if multiple devices (list provided)
- Fails if no devices found

docker-compose.yml now uses device_cgroup_rules instead of explicit
device mapping, allowing auto-detection inside the container.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 15:18:07 +01:00
MarekWo
b8a77285ab docs: Add MC_DEVICE_NAME=auto as recommended setting
Updated README.md and .env.example to recommend auto-detection
of device name from meshcli prompt instead of manual configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 12:26:58 +01:00
MarekWo
4814b43566 fix: Handle status prefixes in meshcli prompt detection
Meshcli outputs status lines like "Fetching channels ....DeviceName|*".
Updated detection to extract device name after dot sequences.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 12:16:07 +01:00
MarekWo
c7163aa035 feat: Auto-detect device name from meshcli prompt
Bridge now detects device name from meshcli prompt ("DeviceName|*")
and exposes it via /health endpoint. mc-webui fetches this at startup
and uses RuntimeConfig for dynamic device name throughout the app.

Fallback chain: prompt detection → .infos command → MC_DEVICE_NAME env var

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-15 07:48:10 +01:00
MarekWo
6000750e6c docs: Add update instructions and testing guidelines for mc-webui 2026-01-12 09:51:37 +01:00
MarekWo
d1edbf850d docs: Add Repeater management manual 2026-01-12 09:38:36 +01:00
MarekWo
b00419ce25 fix: Update filtered count badge when type filter returns empty results
The filteredCountBadge in "Add Filtered" button was not updating when
unchecking type filter checkboxes resulted in zero matching contacts.
Now resets badge to '0' and clears filteredPendingContacts array.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 19:23:40 +01:00
MarekWo
672fb2d1ad fix: Add allow_unsafe_werkzeug for threading mode
Flask-SocketIO in threading mode requires explicit permission
to use Werkzeug dev server.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:49:45 +01:00
MarekWo
51f64be025 perf: Switch SocketIO from gevent to threading mode
gevent async_mode requires monkey-patching at startup and was causing
6-12s page load times (vs 1-2s before). Threading mode doesn't require
special setup and is sufficient for occasional Console commands.

- Change async_mode from 'gevent' to 'threading'
- Remove gevent/gevent-websocket from requirements (bridge has its own)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 14:44:43 +01:00
MarekWo
195eb10ad9 docs: Update docs/architecture.md with Console feature
- Add Flask-SocketIO to Tech Stack
- Add WebSocket support to mc-webui container description
- Add console.js and socket.io to Project Structure
- Add console.html to templates list
- Add WebSocket API section with Console events and features

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 21:51:26 +01:00
MarekWo
1e22041d42 docs: Add Interactive Console to features and usage
- Add Console to Key Features list
- Add Console to Basic Usage section
- Add Console to Completed Features checklist

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 21:49:00 +01:00
MarekWo
cfa748c5c0 docs: Update diagram 2026-01-09 21:40:44 +01:00
MarekWo
67724ed237 fix: Set COLUMNS/LINES env vars without TERM=dumb
Previous fix with TERM=dumb caused Public channel to disappear.
Only setting COLUMNS and LINES as fallback for os.get_terminal_size().

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 19:38:44 +01:00
MarekWo
85d42d9ffe fix: Set terminal env vars to prevent os.get_terminal_size() errors
meshcli calls os.get_terminal_size() which fails without a TTY.
Setting COLUMNS, LINES, and TERM=dumb provides fallback values.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 18:56:57 +01:00
MarekWo
2412df1d01 fix: Strip leading whitespace from first output line
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 14:01:14 +01:00
MarekWo
1c33ea7b31 fix: Simpler regex to match any prompt line with |*
Previous regex was too specific with \[\d+\] pattern.
New pattern ^[^|]+\|\* matches any line starting with <name>|*

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:58:09 +01:00
MarekWo
dd8b174e20 fix: Clean console output and handle slow commands
1. Remove prompt lines (e.g., "MarWoj|*") from output
2. Remove echoed command from response
3. Strip leading/trailing whitespace
4. Longer timeout for slow commands: node_discover (15s),
   recv (60s), send/send_msg (15s)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:53:17 +01:00
MarekWo
30163173b0 fix: Use correct bridge API format (args list, not command string)
Bridge expects {"args": ["infos"], "timeout": 30}
Returns {"success": true, "stdout": "..."}

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:36:24 +01:00
MarekWo
024cbdd7f6 fix: Use MC_BRIDGE_URL config instead of non-existent host/port
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:33:02 +01:00
MarekWo
30f286a813 fix: Use socketio.emit with room=sid in background task
Background tasks lose socket context, so emit() doesn't work.
Fixed by capturing socket ID and using socketio.emit(room=sid).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:28:12 +01:00
MarekWo
c376ecff30 fix: Proxy console WebSocket through main app for HTTPS compatibility
Browser blocks mixed content (HTTPS page -> HTTP WebSocket on port 5001).
Solution: Route WebSocket through main Flask app which goes through
existing HTTPS reverse proxy.

- Add Flask-SocketIO to main mc-webui app
- WebSocket handler proxies commands to bridge via HTTP
- Remove port 5001 external exposure (no longer needed)
- Remove duplicate title from console header

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 13:18:56 +01:00
MarekWo
a5f7fd59e6 feat: Add interactive meshcli console with WebSocket support
- Add Flask-SocketIO backend with gevent for real-time communication
- Create chat-style console UI showing only user's command responses
- WebSocket commands tracked separately from HTTP API (ws_ prefix)
- Console accessible from main menu as fullscreen modal
- Command history navigation with arrow keys
- Auto-reconnection on disconnect
- Update service worker cache for offline support

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-09 08:27:42 +01:00
MarekWo
783a00c798 feat: Increase channel limit to 40 with soft warning at 7+
- Changed hard limit from 8 to 40 channels (most LoRa devices support up to 40)
- Added soft warning when exceeding 7 channels (some devices may have lower limits)
- Warning displayed in UI after successful channel creation/join
- Updated error message to reflect new 40-channel maximum

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 10:39:52 +01:00
MarekWo
bcc12fdd38 update: meshcore-cli updated to 1.3.15 2026-01-07 15:44:26 +01:00
MarekWo
0a44a9d792 docs: Reorganize and simplify documentation structure
- Simplify README.md from ~925 to ~217 lines
- Create docs/user-guide.md with detailed feature documentation
- Create docs/architecture.md with technical details and API reference
- Create docs/troubleshooting.md (merged from COMMON_ISSUES.md + README)
- Move DOCKER_INSTALL.md to docs/docker-install.md
- Remove COMMON_ISSUES.md (content merged into troubleshooting.md)
- Add Documentation section with links to all docs

The README now focuses on quick start and installation,
while detailed documentation is organized in docs/ folder.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 10:21:55 +01:00
MarekWo
f6b858195b chore: Remove unused installation guide images
Remove images/installation guide/ folder and its contents:
- 01-02. Flashing - selecting role.png
- 01-03. Flashing - connecting to device.png
- 01-04. Flashing - flashing process.png
- 01. Flashing.png
- manual approval.png

These screenshots were originally planned for the installation guide
but are no longer needed.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 17:50:51 +01:00
MarekWo
a5c00e2329 docs: Reorganize Prerequisites section and fix references
- Move device preparation from Installation step 0 to Prerequisites
- Restructure Prerequisites into logical sections:
  1. Meshcore Device setup (flashing and configuration)
  2. Linux Server requirements (git, Docker)
- Replace wiki.wojtaszek.it link with local DOCKER_INSTALL.md reference
- Remove Installation step 0, renumber steps to start from 1
- Fix typo: "can used" -> "can use" (line 121)
- Improve readability with "Before starting, ensure you have:" intro

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 17:48:41 +01:00