Repository navigation
feat: interactive (touch) web assets with idle reset - #3533
vpetersson-bot wants to merge 9 commits into
Conversation
- Per-asset `interactive` + `idle_timeout_s` (5-3600, default 60) in metadata; v2 API fields, edit-modal switch, controller mirror - Webview: application-wide input gate, closed unless the current asset is interactive; setInteractive / msSinceInput / resetSession D-Bus slots; navigation pinned to the asset's origin; no context menu, file picker or pinch-zoom; auto-refresh held while in use - Viewer: holds rotation while the page is in use, resets the session (cookies, cache, Web Storage, back to the asset URL) after idle - Container: copy the host udev db's input entries into the viewer and give the viewer user the host input group so libinput sees touch - Mirror drift check ignores fields an older screen doesn't report - Docs page and hardware notes Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.
- Write a libinput calibration matrix for the rotation into the copied touchscreen udev entries; a host-set matrix is kept - Restart the viewer when the rotation changes with a touchscreen attached, since libinput reads the matrix only at device add - Split the interactive wait's per-poll decision out of the loop and share the D-Bus missing-method check (SonarCloud) - Docs and hardware notes: rotation is supported Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.
…loop Addresses SonarCloud on this PR: the idle-reset signal was a 0.0 sentinel compared with ==, and _wait_interactive was over the cognitive-complexity limit. The idle check now happens in the loop directly, with the reset and in-use logging pulled into helpers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.
Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.
- The viewer opens the input gate right after loadPage, so the asset's own redirect (http -> https, a sign-in hop) was judged against the pre-redirect origin and blocked: the page never loaded. Follow the redirects that directly follow our load and treat the origins that chain lands on as the asset's site; a visitor's link that redirects off-site is still blocked. - Finish a session reset after 5 s if QWebEngineProfile never reports clearHttpCacheCompleted, instead of queueing every asset command forever. - Regression test for a redirecting asset; docs updated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.
…tings - Touch chip next to interactive web assets in the schedule table - Advanced section opens by default for interactive assets, so the touch settings aren't hidden Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.
- metadata.allowed_sites: hosts, *.host (host and subdomains) or full origins; normalised on read, strict 400 in the v2 API, lenient in the edit form (one per line) - Edit dialog: Allowed sites textarea under the touch switch - Webview: setAllowedSites D-Bus slot (queued during a reset); the navigation guard also accepts listed sites - Viewer sends the list before opening the input gate; mirrored to managed screens - Tests (Python + QtWebEngine) and docs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
There was a problem hiding this comment.
Copilot encountered an error: Your billing is not configured or you have Copilot licenses from multiple standalone organizations or enterprises. To use premium requests, select a billing entity via the GitHub site, under Settings > Copilot > Features.
|



Issues Fixed
Adds touchscreen support for kiosk-style web pages (internal tracker SIRI-2498).
Description
A web page asset can now be marked interactive. On a screen with a touchscreen, people can use the page; everything else in the playlist ignores input.
interactiveandidle_timeout_s(5-3600, default 60), stored inmetadata. Exposed as v2 API fields, a switch in the edit modal, and in the controller mirror. All additive.setInteractive,msSinceInputandresetSession.resetSessionclears cookies, the HTTP cache and Web Storage, then reloads the asset's URL.idle_timeout_s. Then the page's session is reset and rotation resumes./run/udev-host:ro, and only the input (c13:*) entries are copied into the container's/run/udev. Mounting it wholesale would change how cage and GStreamer pick DRM/V4L2 devices.viewerjoins the host'sinputGID, using the same pattern ashost-render.screen_rotationinto the touchscreen's copied udev entry, and keeps any matrix the host already set. libinput reads it only when the device is added, so changing the rotation with a touchscreen attached restarts the viewer.website/content/docs/touchscreens.md, plus hardware notes in theanthias-hardwareskill.Known limits (documented):
Reviewer guide: the core logic is
InputGateandView::resetSessioninview.cpp,_wait_interactiveand_maybe_reapply_rotationinsrc/anthias_viewer/__init__.py, andviewer_setup_touch_inputinbin/lib/viewer/common.sh.Allowed sites (per asset)
metadata.allowed_sitesholds extra sites an interactive page may open beyond its own. Each entry is ahost, a*.host(the host and its subdomains) or a fullscheme://host[:port], up to 50 per asset.allowed_sites, strict (a 400 for invalid entries).setAllowedSitesslot, sent before the gate opens and queued during a reset.Review follow-ups
A second-opinion review raised four issues. All four are fixed:
clearHttpCacheCompleted(Qt 6.7+) before any navigation, and asset commands that arrive meanwhile are queued and replayed in order. Older Qt turns off HTTP caching on interactive pages instead. If Qt never reports completion, the reset finishes after 5 s rather than queueing commands forever.bin/test_webview_interactive.sh. All 6 pass on Qt 6.8.2 (x86 viewer image). The redirecting-asset test fails on the version without the fix.Testing
pytest -m "not integration": 3404 passed. That includestests/test_interactive_assets.pyand new v2 API tests.ruff check,ruff format --checkandmypyare clean apart from two missing optional build-tool stubs.latest-pi5image). The Qt 5 build was not compiled. The APIs used exist in Qt 5.15.vieweruser got the input group.upgrade_containers.shfrom this branch rendered the compose file with the/run/udev-hostmount.Checklist
🤖 Generated with Claude Code