fix: repair file picker and html preview interactions#1803
Closed
franksong2702 wants to merge 1 commit into
Closed
fix: repair file picker and html preview interactions#1803franksong2702 wants to merge 1 commit into
franksong2702 wants to merge 1 commit into
Conversation
This was referenced May 7, 2026
Collaborator
|
Shipped in v0.51.19 — https://github.com/nesquena/hermes-webui/releases/tag/v0.51.19 Thanks @franksong2702 for "repair file picker and html preview interactions". Closes #1800. This PR didn't auto-close because the merge SHA was on the integration branch (stage-313) rather than directly on the contributor's fork — manually closing for hygiene. The change is on — hermes-agent (release sweep) |
pull Bot
pushed a commit
to JamesWilliam1977/hermes-webui
that referenced
this pull request
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #1800.
This PR repairs the two Docker/browser interaction paths reported in the issue:
display:none, marking the button astype="button", and clearing/re-clicking the input from the user gesture;.htmlattachments and HTML preview "Open full page" links open an inline browser view instead of behaving like inert badges or forced downloads.Root Cause
There were two separate layers involved:
display:nonefile input, which can be brittle in browser shells/container deployments;X-Frame-Options: DENYwould block the workspace iframe path before the CSP sandbox could apply.Changes
btnAttachexplicitly non-submit..click()so re-selecting the same file still triggerschange..htmlattachments as openable sandboxed inline links.inline=1new-tab links./api/media?inline=1fortext/htmlonly withContent-Security-Policy: sandbox allow-scripts.X-Frame-Options: DENYon sandboxed inline file responses so iframe previews can render; non-inline HTML still downloads withX-Frame-Options: DENY.Validation
python -m pytest tests/test_issue1800_file_html_interactions.py tests/test_media_inline.py tests/test_779_html_preview.py tests/test_issue1095_pasted_images.py tests/test_pdf_html_preview.py tests/test_sprint20.py::test_attach_button_still_wired tests/test_sprint20.py::test_file_input_onchange_still_wired tests/test_sprint20.py::test_index_html_still_has_attach_button tests/test_issue1697_multi_image_paste.py tests/test_sprint29.py::TestContentDisposition -qnode -c static/boot.js && node -c static/ui.jspython -m py_compile api/routes.pyConflict Check
Checked file-overlap PRs #1801, #1721, and #1588 with
git merge-tree --write-tree; all merge cleanly with this branch.