Skip to content

fix(screenote): publish existing images without browser - #34

Merged
ivankuznetsov merged 1 commit into
mainfrom
fix/screenote-existing-image-upload-v2
Jul 31, 2026
Merged

fix(screenote): publish existing images without browser#34
ivankuznetsov merged 1 commit into
mainfrom
fix/screenote-existing-image-upload-v2

Conversation

@ivankuznetsov

Copy link
Copy Markdown
Owner

Summary

Allow /screenote to publish explicitly named PNG/JPEG files without starting
browser automation or requiring viewport verification.

Fresh page captures still use the verified browser workflow. Existing files use
a separate fail-closed preparation path because there is no browser viewport to
verify.

What changed

  • Add existing_image as a supported Screenote input mode.
  • Add a browser-free prepare-existing-image helper that:
    • accepts only an explicit user-named PNG/JPEG path;
    • rejects missing, empty, oversized, malformed, extension-mismatched,
      symlinked, changing, and non-regular sources;
    • validates PNG chunk checksums or JPEG frame/scan structure;
    • copies bytes to a unique mode-0600 file in a mode-0700 directory;
    • never modifies or deletes the user-owned source.
  • Pass only the prepared private path to the allowlisted screenshot create
    command.
  • Prevent the source path or basename from leaking through title, page, comment,
    or other remote metadata.
  • Keep browser viewport verification mandatory for new captures.
  • Update canonical docs, generated Pi/OpenClaw adapters, package locks, trigger
    evaluations, and lint mutation fixtures.

Why

Viewport verification proves that a newly captured page matches the requested
desktop, tablet, or mobile dimensions before publication. An existing image has
already been captured, so forcing browser startup adds no integrity signal and
can block a valid upload when the browser runtime is unavailable.

The replacement check is deterministic local validation plus an isolated
private copy. This preserves the original safety goal without coupling existing
image publication to Browser Use startup.

Validation

  • python3 -m unittest discover -s tests -q (72 tests)
  • bash plugins/screenote/evals/lint-skills.sh
  • bash plugins/screenote/evals/lint-skills-test.sh
  • python3 scripts/generate-agent-packages.py --check
  • python3 scripts/validate-agent-packages.py --inventory
  • python3 -m py_compile plugins/screenote/scripts/screenote_flow.py
  • bash -n for changed Screenote shell scripts

@ivankuznetsov
ivankuznetsov had a problem deploying to screenote-integration July 30, 2026 18:30 — with GitHub Actions Failure
@ivankuznetsov
ivankuznetsov merged commit be4d432 into main Jul 31, 2026
11 of 12 checks passed
@ivankuznetsov
ivankuznetsov deleted the fix/screenote-existing-image-upload-v2 branch July 31, 2026 00:19
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