Commit Graph

201 Commits

Author SHA1 Message Date
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
MarekWo
9180aa4ac9 docs: Refactor installation documentation and fix typos
- Fix typos in README.md installation section:
  - "Chose" -> "Choose"
  - "prepeare" -> "prepare"
  - Fix code block formatting (line 156-158)
  - Fix markdown formatting (line 254)
- Add COMMON_ISSUES.md for troubleshooting (separate from README)
- Add DOCKER_INSTALL.md with Docker installation guide
- Add installation guide images
- Remove FRESH_INSTALL.md (consolidated into README)
- Remove MIGRATION.md (no longer needed)
- Update version date to 2026-01-06 in COMMON_ISSUES.md

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-06 17:42:39 +01:00
MarekWo
4bd6a681db feat: Add local emoji picker for complete offline independence
Complete the offline support implementation by hosting emoji-picker-element locally, eliminating the last external CDN dependency. Application now works 100% offline without any internet connection.

Changes:
- Download and host emoji-picker-element 1.28.1 locally (~100 KB)
  - index.js, picker.js, database.js
- Download and host emoji data JSON (~429 KB)
  - en/emojibase/data.json with full emoji database
- Update index.html and dm.html:
  - Replace CDN emoji picker import with local version
  - Also migrate Bootstrap CSS/JS to local in dm.html (was missed before)
- Configure emoji picker to use local data source in app.js and dm.js
  - Set picker.dataSource to local JSON path
- Update Service Worker (v2 → v3):
  - Add emoji picker files to pre-cache list
  - Total offline cache size: ~1.2 MB
- Update documentation:
  - README.md: Add emoji picker to offline support features
  - CLAUDE.md: Document emoji picker implementation and file structure

Total offline package breakdown:
- Bootstrap CSS/JS: ~307 KB
- Bootstrap Icons: ~398 KB
- Emoji Picker: ~100 KB
- Emoji Data: ~429 KB
- Total: ~1.2 MB

Benefits:
- Zero external dependencies (no CDN calls)
- Full emoji picker functionality offline
- Faster page load (no external requests)
- Perfect for air-gapped mesh network deployments

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 21:26:26 +01:00
MarekWo
964d88a14a feat: Add full offline support with local Bootstrap libraries
Implement complete offline functionality by hosting Bootstrap CSS/JS and icons locally, eliminating dependency on external CDNs. This ensures the application works reliably in internet-free environments, perfect for mesh networks in remote or emergency scenarios.

Changes:
- Download and host Bootstrap 5.3.2 CSS/JS locally (~307 KB total)
- Download and host Bootstrap Icons 1.11.2 CSS and fonts (~300 KB)
- Update base.html to use local library paths instead of CDN URLs
- Enhance Service Worker with hybrid caching strategy:
  - Cache-first for vendor libraries (static, unchanging)
  - Network-first for app code (dynamic, needs updates)
- Bump Service Worker cache version to v2
- Add vendor libraries to pre-cache list for instant offline availability
- Update README.md with offline support documentation
- Update project structure documentation

Benefits:
- Works without internet connection (no CDN dependency)
- Faster initial page load (no external requests)
- Reliable operation during internet outages
- Perfect for air-gapped and remote mesh network deployments

File sizes:
- Bootstrap CSS: ~227 KB
- Bootstrap JS: ~80 KB
- Bootstrap Icons CSS: ~98 KB
- Bootstrap Icons Fonts: ~300 KB (woff2 + woff)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 20:46:27 +01:00
MarekWo
e0a946233d add: Diagram 2026-01-05 17:44:59 +01:00
MarekWo
4d51942548 chore: Update image gallery 2026-01-05 16:55:34 +01:00
MarekWo
5ceb6f638a docs: Add PWA notifications documentation to README
Updates README.md for the new PWA notification feature:

- Added PWA notifications to Key Features list with platform support notes
- Created comprehensive "PWA Notifications (Experimental)" section in Usage:
  - How to enable/disable notifications
  - Platform support (tested on Windows/Firefox, Android requires testing)
  - Installing as PWA instructions for Android and Desktop
  - Troubleshooting guide
- Added to Completed Features checklist
- Updated Project Structure to include sw.js and manifest.json

Testing status:
-  Windows Desktop (Firefox) - working correctly
- ⚠️ Android Mobile - requires further testing (PWA via Chrome)

Note: .claude/CLAUDE.md also updated but excluded from git (in .gitignore)

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 15:28:13 +01:00
MarekWo
a74ed136ce fix: Implement proper toggle logic for notification enable/disable
Previous implementation always disabled notifications when permission
was granted, regardless of current state. This made it impossible to
re-enable notifications after disabling them.

Now properly checks localStorage state and toggles:
- If currently enabled → disable (show "Notifications disabled")
- If currently disabled → enable (show "Notifications enabled")

This fixes the issue where clicking the toggle when disabled would
show "Notifications disabled" instead of enabling them.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 15:05:48 +01:00
MarekWo
e0fe04e339 fix: Remove maskable purpose from icons to prevent cropping
The "purpose": "any maskable" property caused Android to apply
adaptive icon treatment (circular/rounded square mask) to icons
that were not designed with safe zones for maskable display.

This resulted in the icon being incorrectly cropped on Android home screen.

Removed maskable purpose while keeping useful PWA enhancements:
- description field
- categories
- start_url and scope

Icons now display correctly without cropping.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 14:56:35 +01:00
MarekWo
77c0a33da6 fix: Change UI language to English and fix notification toggle bug
Changes:
- Convert all Polish UI text to English (buttons, labels, messages)
  - Menu: "Powiadomienia" → "Notifications"
  - Status badges: "Włączone/Wyłączone/Zablokowane" → "Enabled/Disabled/Blocked"
  - Toast messages: all notification messages translated to English
  - Notification bodies: "Nowe: X kanały" → "New: X channels"

- Fix notification toggle UI bug
  - Badge now correctly shows "Disabled" when user turns off notifications
  - Previously showed "Enabled" whenever permission was granted (ignoring localStorage)
  - Now checks both permission AND localStorage state

This ensures the UI respects the international nature of the project
and fixes the toggle state display issue found during Android testing.

Files modified:
- app/templates/base.html
- app/static/js/app.js
- app/static/js/dm.js

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 14:45:38 +01:00
MarekWo
ecb3618da7 feat: Add PWA notification support with badge counters
Implements Progressive Web App notification capabilities:

- Service Worker foundation for PWA installability and offline support
- Browser notification toggle in side menu with permission management
- Local notifications triggered on new messages (channels, DMs, pending)
- App Badge API integration showing total unread count on app icon
- Smart notification logic (only when app hidden, only for NEW messages)
- Graceful degradation for unsupported browsers

Technical details:
- Service Worker with network-first fetch strategy for dynamic content
- Notification permission stored in localStorage (mc_notifications_enabled)
- Delta-based notification tracking (prevents spam on page load)
- Notification tag prevents duplicate alerts
- App badge auto-clears when user returns to app

Limitations (documented):
- Android may freeze background JS after 5-10 minutes (OS behavior)
- Full "wake device" support requires Web Push API (future enhancement)
- Works best for active users who check app regularly

Files modified:
- app/static/js/sw.js (new)
- app/templates/base.html
- app/static/js/app.js
- app/static/js/dm.js
- app/static/manifest.json
- app/static/css/style.css

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-05 12:29:17 +01:00
MarekWo
34ab437390 feat: Remember last selected DM conversation
Add localStorage persistence for Direct Messages page to remember and restore the last selected conversation when user returns to the page.

Changes:
- Save selected conversation to localStorage when user selects a conversation
- Restore last conversation on page load (if no URL parameter provided)
- Clear localStorage when user returns to empty state
- Updated README.md with persistence documentation
- Priority: URL parameter > localStorage > empty state

This improves UX by maintaining conversation context across page navigation, similar to how the main page remembers the selected channel.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 13:29:04 +01:00
MarekWo
16a76f5f71 style: Change FAB badges to red for better contrast
- Change .fab-badge-pending from orange to red
- Change .fab-badge-dm from green to red
- Use same color as notification bell badge (#dc3545)
- Improves visibility especially on green DM button

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 12:05:36 +01:00
MarekWo
7cee262971 feat: Add notification badges to FAB buttons
- Add badge for pending contacts on Contact Management FAB button (orange)
- Move DM badge from notification bell to Direct Messages FAB button (green)
- Add universal updateFabBadge() function for all FAB badges
- Add updatePendingContactsBadge() function with localStorage type filter support
- Update badges every 10 seconds with auto-refresh
- Update badges when modals are closed

Frontend changes:
- New CSS classes: .fab-badge, .fab-badge-pending, .fab-badge-dm
- position: relative added to .fab for badge positioning
- Removed DM badge code from notification bell
- Added modal event handlers for badge updates

Backend: No changes (uses existing /api/contacts/pending endpoint with types parameter)

This improves UX by showing notification counts directly on relevant FAB buttons
instead of crowding the notification bell. DM badge moved from bell to DM button,
and new pending contacts badge added to Contact Management button.

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 11:51:07 +01:00
MarekWo
009d3254b8 feat: Add persistent type filter for pending contacts
- Add query parameter 'types' to GET /api/contacts/pending endpoint
- Save user's type filter selection to localStorage (pendingContactsTypeFilter)
- Restore filter on page reload (Pending Contacts page)
- Contact Management badge shows count based on saved filter
- Default filter: CLI only (type=1)

Frontend changes:
- Add localStorage functions (save/load/set checkboxes)
- Modify loadPendingContacts() to use types from checkboxes
- Modify loadContactCounts() to use filter from localStorage
- Checkbox changes trigger save to localStorage + API reload

Backend changes:
- Add 'types' query parameter to GET /api/contacts/pending
- Filter pending contacts by type before returning
- Validate types parameter (must be 1-4)

This allows users to customize which contact types they want to see
in pending contacts list, and the selection persists across sessions.
The same filter is used consistently across all pages (Pending Contacts
page and Contact Management page).

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

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-04 11:07:31 +01:00