The MeshCore community uses "companion" not "client" for type 1 nodes.
Rename the CLI label to COM across all UI, API, JS, and docs to align
with official terminology. Includes cache migration for old CLI entries.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The _db reference is set by init_retention_schedule() which runs after
schedule_daily_archiving(). The backup job checks _db at runtime.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- POST /api/backup/create — trigger immediate backup
- GET /api/backup/list — list backups with sizes
- GET /api/backup/download — download backup file
- Backup modal accessible from menu with create/download buttons
- Daily automatic backup via APScheduler (configurable hour/retention)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add daily retention job that deletes old channel messages, DMs, and
advertisements based on configurable age threshold
- Add GET/POST /api/retention-settings endpoints
- Extend cleanup_old_messages() to optionally include DMs and adverts
- Wire up APScheduler in create_app() (also enables existing archiving
and contact cleanup schedulers that were never started in v2)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Implements automatic daily archiving of messages to improve performance
and enable browsing historical chat by date.
Backend changes:
- Add APScheduler for daily archiving at midnight (00:00 UTC)
- Create app/archiver/manager.py with archive logic and scheduler
- Extend parser.py to read from archive files and filter by days
- Add archive configuration to config.py (MC_ARCHIVE_*)
API changes:
- Extend GET /api/messages with archive_date and days parameters
- Add GET /api/archives endpoint to list available archives
- Add POST /api/archive/trigger for manual archiving
Frontend changes:
- Add date selector dropdown in navbar for archive browsing
- Implement archive list loading and date selection
- Update formatTime() to show full dates in archive view
- Live view now shows only last 7 days (configurable)
Docker & Config:
- Add archive volume mount in docker-compose.yml
- Add MC_ARCHIVE_DIR, MC_ARCHIVE_ENABLED, MC_ARCHIVE_RETENTION_DAYS env vars
- Update .env.example with archive configuration section
Documentation:
- Update README.md with archive feature and usage instructions
- Update .claude/instructions.md with archive endpoints
Key features:
- Automatic daily archiving (midnight UTC)
- Live view filtered to last 7 days for better performance
- Browse historical messages by date via dropdown selector
- Archives stored as dated files: {device}.YYYY-MM-DD.msgs
- Original .msgs file never modified (safe, read-only approach)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>