mirror of
https://github.com/MarekWo/mc-webui.git
synced 2026-08-07 17:22:57 +02:00
Feature: Add message archiving system with browse-by-date selector
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>
This commit is contained in:
@@ -25,6 +25,19 @@ MC_REFRESH_INTERVAL=60
|
||||
# Hours of inactivity before contacts can be cleaned up
|
||||
MC_INACTIVE_HOURS=48
|
||||
|
||||
# ============================================
|
||||
# Archive Configuration
|
||||
# ============================================
|
||||
|
||||
# Directory for storing archived messages
|
||||
MC_ARCHIVE_DIR=/mnt/archive/meshcore
|
||||
|
||||
# Enable automatic daily archiving at midnight
|
||||
MC_ARCHIVE_ENABLED=true
|
||||
|
||||
# Number of days to show in live view (older messages available in archives)
|
||||
MC_ARCHIVE_RETENTION_DAYS=7
|
||||
|
||||
# ============================================
|
||||
# Flask Server Configuration
|
||||
# ============================================
|
||||
|
||||
Reference in New Issue
Block a user