Skip to content

feat(web): video thumbnails, lightbox fix, and review hardening#171

Merged
GeiserX merged 5 commits into
mainfrom
feat/video-thumbnails
May 24, 2026
Merged

feat(web): video thumbnails, lightbox fix, and review hardening#171
GeiserX merged 5 commits into
mainfrom
feat/video-thumbnails

Conversation

@GeiserX
Copy link
Copy Markdown
Owner

@GeiserX GeiserX commented May 24, 2026

Summary

  • Fix gallery lightbox black screen: openMediaItem() was setting lightboxMedia to array instead of single object
  • Add video thumbnail generation via ffmpeg frame extraction
  • Add ffmpeg to Docker image
  • Consolidate extension lists into media_utils.py (single source of truth)
  • Separate video semaphore (limit 2) to prevent resource pressure
  • Fix ffmpeg to seek before input and fallback to first frame for short videos

Test plan

  • Gallery lightbox displays photos/videos correctly
  • Prev/next navigation works in gallery and chat mode
  • Video files show thumbnail previews in gallery
  • 72 tests pass locally, CI green

GeiserX added 3 commits May 25, 2026 00:40
Lightbox from gallery was setting lightboxMedia to an array instead of a
single object. Introduced lightboxList ref for gallery navigation while
keeping lightboxMedia as a single item.

Video thumbnails: added ffmpeg to Docker image and extended thumbnail
generation to extract frames from video files (mp4, mkv, avi, mov, webm).
Gallery endpoint now assigns thumb_url for video extensions too.
…, tests

- Add separate video semaphore (limit 2) to prevent CPU/memory pressure
- Consolidate extension lists into media_utils.py (single source of truth)
- Fix ffmpeg to seek before input and fallback to first frame for short videos
- Remove absolute path from video thumbnail log warning (PII guideline)
- Add tests for _is_video, _check_ffmpeg, _generate_video_sync
- Update test_rejects_non_image_file to reflect video acceptance
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 24, 2026

Warning

Review limit reached

@GeiserX, we couldn't start this review because you've used your available PR reviews for now.

Your plan includes 2 reviews of capacity. Refill in 9 minutes and 3 seconds.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more review capacity refills, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b55f9bdd-b458-495a-aa53-f9f897d76ebd

📥 Commits

Reviewing files that changed from the base of the PR and between a0bf1d5 and 57443ab.

📒 Files selected for processing (8)
  • Dockerfile
  • pyproject.toml
  • src/__init__.py
  • src/web/main.py
  • src/web/media_utils.py
  • src/web/templates/index.html
  • src/web/thumbnails.py
  • tests/test_web_thumbnails.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/video-thumbnails

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link
Copy Markdown

🐳 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

@codecov
Copy link
Copy Markdown

codecov Bot commented May 24, 2026

Codecov Report

❌ Patch coverage is 88.67925% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 92.55%. Comparing base (a0bf1d5) to head (57443ab).

Files with missing lines Patch % Lines
src/web/thumbnails.py 86.95% 6 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #171      +/-   ##
==========================================
- Coverage   92.61%   92.55%   -0.06%     
==========================================
  Files          23       23              
  Lines        6557     6599      +42     
==========================================
+ Hits         6073     6108      +35     
- Misses        484      491       +7     
Files with missing lines Coverage Δ
src/__init__.py 100.00% <100.00%> (ø)
src/web/main.py 86.53% <100.00%> (-0.08%) ⬇️
src/web/media_utils.py 100.00% <100.00%> (ø)
src/web/thumbnails.py 77.86% <86.95%> (+2.86%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

GeiserX added 2 commits May 25, 2026 00:50
Fixes ruff F401 lint failure in CI.
Strip file paths and folder identifiers from log lines per project
logging guidelines — chat IDs are PII.
@github-actions
Copy link
Copy Markdown

🐳 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

1 similar comment
@github-actions
Copy link
Copy Markdown

🐳 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 3180d1c into main May 24, 2026
9 of 12 checks passed
@GeiserX GeiserX deleted the feat/video-thumbnails branch May 24, 2026 23:18
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