Skip to content

fix(viewer): hotfix missing message_utils in image#201

Merged
GeiserX merged 2 commits into
GeiserX:mainfrom
charys117:codex/fix-viewer-message-utils
Jun 25, 2026
Merged

fix(viewer): hotfix missing message_utils in image#201
GeiserX merged 2 commits into
GeiserX:mainfrom
charys117:codex/fix-viewer-message-utils

Conversation

@charys117

@charys117 charys117 commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

Summary

Hotfix for the current viewer image startup failure.

The current viewer container can fail to start because Dockerfile.viewer does not copy src/message_utils.py into the image, while the viewer startup path now imports it through src.db.adapter.

This PR adds the missing file to the viewer image and updates the viewer image publish path filters so future changes to this dependency rebuild the viewer image.

Changes

  • Copy src/message_utils.py into the standalone viewer image.
  • Add src/message_utils.py to the viewer Docker publish workflow path filters.
  • Add src/realtime.py to the same path filters because it is also copied by Dockerfile.viewer.

Validation

Tested with a fork GHCR build workflow:

  • Built the viewer image from this branch.
  • Ran smoke test:
python -c "import src.web.main"
  • Confirmed the test viewer image can start in deployment.
  • Published test image successfully:
ghcr.io/charys117/telegram-archive-viewer:viewer-message-utils-fix

Workflow run:

https://github.com/charys117/Telegram-Archive/actions/runs/28196710712

Summary by CodeRabbit

  • Chores
    • Updated the viewer container image to include the latest messaging-related updates.
    • Broadened the “Docker Publish Viewer” workflow trigger so it runs when realtime or messaging source files change.
    • Adjusted the “Docker Publish Dev” workflow so the build-and-push job runs only for manual triggers or same-repository pull requests (excluding forks/dependabot).

@charys117 charys117 requested a review from GeiserX as a code owner June 25, 2026 20:20
@coderabbitai

coderabbitai Bot commented Jun 25, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e17e2fb8-f0e2-470d-be38-c1f113fa7ae9

📥 Commits

Reviewing files that changed from the base of the PR and between df90f05 and 8be33c4.

📒 Files selected for processing (1)
  • .github/workflows/docker-publish-dev.yml
✅ Files skipped from review due to trivial changes (1)
  • .github/workflows/docker-publish-dev.yml

📝 Walkthrough

Walkthrough

The viewer publish workflow now runs when src/realtime.py or src/message_utils.py changes. The viewer Docker image now includes src/message_utils.py. The dev Docker publish job now skips forked pull requests.

Changes

Docker publish inputs and dev gating

Layer / File(s) Summary
Viewer trigger and image contents
.github/workflows/docker-publish-viewer.yml, Dockerfile.viewer
The viewer publish workflow path filter now includes src/realtime.py and src/message_utils.py, and the viewer image copies src/message_utils.py into /app/src/.
Dev publish job condition
.github/workflows/docker-publish-dev.yml
The build-and-push-dev job now runs only for manual dispatches or same-repo pull requests.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description has a summary, changes, and validation, but omits most required template sections. Add the Type of Change, Database Changes, Data Consistency Checklist, Testing checkboxes, Security Checklist, and Deployment Notes sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states the viewer image hotfix for the missing message_utils dependency.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@GeiserX GeiserX merged commit c26a75a into GeiserX:main Jun 25, 2026
8 checks passed
GeiserX added a commit that referenced this pull request Jun 25, 2026
Carries the viewer-image hotfix (#201) so the standalone viewer container starts again (it was missing src/message_utils.py). Also tightens viewer rebuild triggers (pyproject.toml/uv.lock, src/__init__.py) and drops the unused requirements-viewer.txt path filter.
@GeiserX

GeiserX commented Jun 25, 2026

Copy link
Copy Markdown
Owner

Merged and shipped in v7.17.1 — thank you, @charys117! 🙏

Great catch: the standalone viewer image was missing src/message_utils.py (pulled in transitively via src/db/adapter.py), so the v7.16.0–v7.17.0 viewer containers were failing to start. Your COPY fix and the fork-guard on Docker Publish Dev are both in, and the viewer image now correctly starts again. While here I also extended the viewer rebuild triggers to pyproject.toml/uv.lock + src/__init__.py. Appreciate the clean, well-validated hotfix! 🚀

@charys117 charys117 deleted the codex/fix-viewer-message-utils branch June 26, 2026 14:05
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.

2 participants