Skip to content

feat: v7.3.0 — gap-fill recovery, token URL auto-login, UX improvements#94

Merged
GeiserX merged 5 commits intomainfrom
ai/v7.3.0-features
Mar 15, 2026
Merged

feat: v7.3.0 — gap-fill recovery, token URL auto-login, UX improvements#94
GeiserX merged 5 commits intomainfrom
ai/v7.3.0-features

Conversation

@GeiserX
Copy link
Owner

@GeiserX GeiserX commented Mar 14, 2026

Summary

Implements the genuinely useful features from #88 and #91 (by @PhenixStar — thanks for the ideas and the initial implementation work), with all code review feedback applied.

Gap-fill: detect and recover skipped messages

  • SQL LAG() window function detects gaps in message ID sequences per chat
  • iter_messages(min_id, max_id) recovers missing messages from Telegram
  • FILL_GAPS=true / GAP_THRESHOLD=50 env vars for automated post-backup runs
  • CLI subcommand: fill-gaps --chat-id --threshold
  • Scheduler integration: runs automatically after each backup when enabled

Review fixes applied (from #88):

  • if chat_id is not None: instead of if chat_id: (falsy check bug)
  • get_chats_with_messages() queries the chats table, not SELECT DISTINCT chat_id FROM messages (performance)
  • 31 real functional tests with async SQLite + mocked Telegram client (not the source-code-inspection tests from the original PR)

Frontend UX improvements

  • Token URL auto-login (?token=XXX): one-click shareable access, token stripped from URL after login
  • Shareable link UI: admin panel shows both raw token and full URL with copy buttons
  • @username display: shows @channelname in chat list

Review fixes applied (from #91):

  • Both copy buttons clear the token display (consistent "shown once" security)
  • No hardcoded version comments in code

Test plan

  • 165 tests pass (134 existing + 31 new gap-fill tests)
  • Gap detection: real SQLite tests with known gaps, edge cases (empty chat, single message, threshold boundaries, cross-chat isolation)
  • Fill logic: mocked tests for chat_id=0 handling, inaccessible chat skipping, batch commits, summary aggregation
  • Config: env var parsing with defaults
  • Manual: enable FILL_GAPS=true, verify post-backup gap scan
  • Manual: visit /?token=XXX, verify auto-login and URL cleanup
  • Manual: verify @username and shareable link UI in admin panel

Gap-fill: detect and recover skipped messages from interrupted backups
- SQL LAG() window function detects gaps in message ID sequences
- iter_messages(min_id, max_id) recovers missing messages from Telegram
- FILL_GAPS=true / GAP_THRESHOLD=50 env vars for automated post-backup runs
- CLI subcommand: fill-gaps --chat-id --threshold
- Scheduler integration: runs automatically after each backup when enabled
- 31 functional tests (real SQLite + mocked Telegram client)

Frontend UX improvements:
- Token URL auto-login (?token=XXX) for shareable one-click access
- Shareable link UI in admin panel (copy token or full URL)
- @username display in chat list
@github-actions
Copy link

🐳 Dev images published!

  • drumsergio/telegram-archive:dev
  • drumsergio/telegram-archive-viewer:dev

The dev/test instance will pick up these changes automatically (Portainer GitOps).

To test locally:

docker pull drumsergio/telegram-archive:dev
docker pull drumsergio/telegram-archive-viewer:dev

@github-actions
Copy link

🐳 Dev images published!

  • drumsergio/telegram-archive:dev
  • drumsergio/telegram-archive-viewer:dev

The dev/test instance will pick up these changes automatically (Portainer GitOps).

To test locally:

docker pull drumsergio/telegram-archive:dev
docker pull drumsergio/telegram-archive-viewer:dev

@github-actions
Copy link

🐳 Dev images published!

  • drumsergio/telegram-archive:dev
  • drumsergio/telegram-archive-viewer:dev

The dev/test instance will pick up these changes automatically (Portainer GitOps).

To test locally:

docker pull drumsergio/telegram-archive:dev
docker pull drumsergio/telegram-archive-viewer:dev

- Gap-fill now continues on per-chat/per-gap errors instead of aborting
- Scheduler accurately reports gap-fill errors in completion message
- Gap-fill respects backup config (CHAT_IDS, CHAT_TYPES, excludes)
- Token URL share dialog warns about server access log exposure
- Stats recalculated after gap-fill recovers messages
@github-actions
Copy link

🐳 Dev images published!

  • drumsergio/telegram-archive:dev
  • drumsergio/telegram-archive-viewer:dev

The dev/test instance will pick up these changes automatically (Portainer GitOps).

To test locally:

docker pull drumsergio/telegram-archive:dev
docker pull drumsergio/telegram-archive-viewer:dev

@github-actions
Copy link

🐳 Dev images published!

  • drumsergio/telegram-archive:dev
  • drumsergio/telegram-archive-viewer:dev

The dev/test instance will pick up these changes automatically (Portainer GitOps).

To test locally:

docker pull drumsergio/telegram-archive:dev
docker pull drumsergio/telegram-archive-viewer:dev

@GeiserX GeiserX merged commit a915c69 into main Mar 15, 2026
7 checks passed
@GeiserX GeiserX deleted the ai/v7.3.0-features branch March 15, 2026 11:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant