Repository navigation
feat(provider-webos): add LG webOS TV provider plugin - #4098
Conversation
|
@alimek is attempting to deploy a commit to the Callstack Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
All reported issues were addressed across 41 files
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
View guided diff | Re-trigger cubic
75ba3f6 to
1cd5272
Compare
|
Thanks for the webOS provider. At 1cd5272 I found three defects in the lease and snapshot paths, and the PR has no live device run yet. Two fixes are needed in code before this can merge, and then a hardware run. The only failing check is Vercel, which is waiting for a team member to authorize the deployment of a fork commit, so no build ran. This does not look related to the code.
When the page socket closes (app exits, tunnel drops, TV sleeps),
This is a new device-facing provider with no CI device lane, and the PR body names no TV or webOS version and shows no command output. I could not run a device, so everything above comes from reading the code. At the fixed head, on a named LG TV and webOS version (Settings > General > About), please paste: (1) Could the lease own the session? Not blocking, take or leave: On the earlier inline threads: the SSAP TLS certificate check still applies as a non-blocking note. The claim is right, but LG TVs serve self-signed certificates and the dispatcher is scoped to SSAP sockets, so one line in the README limitations is enough. These no longer apply and can be resolved: discussion_r4424516045, r4424516057, r4424516090, r4424516102, r4424516113, r4424516119, r4424516127, r4424516145, r4424516148, r4424516158, r4424516165, r4424516171, r4424516178, r4424516187, r4424516194, r4424516200, r4424516228, r4424516237, r4424516248, r4424516274, r4424516281, r4424516288, r4424516299, r4424516306, r4424516318 and r4424516335 are fixed at this head. r4424516260 does not apply because the webOS fixture has no environment, so the CLI cannot reach the server. |
1cd5272 to
3209d66
Compare
|
Thanks for the thorough review. I took the smaller v1 and fixed the three defects. The PR is now one commit at Scope. v1 covers lifecycle, the CDP page, snapshot, input, screenshot, logs and Lease teardown. The lease owns the session. Dead pages. A closed page socket or an exited tunnel detaches the page, so later commands get "No webOS app is attached. Run open first." On the TV, an app that exits leaves the tunnel and socket open, and calls just time out. The plugin therefore also polls the tunnel's Scope, depth, interactive-only. Web channel. I kept the android channel with the shaper rather than checking Evidence on an LG 32LQ63006LA (webOS TV 22, SDK 7.6.0, firmware 04.60.91). Labels in the outputs come from a private app, so I've put counts here instead.
Non-blocking items.
|
There was a problem hiding this comment.
All reported issues were addressed across 45 files
Reply with feedback, questions, or to request a fix.
View guided diff | Re-trigger cubic
|
The earlier review at 1cd5272 asked for live evidence and several fixes. At 3209d66 the code has no defect that stops a merge: the author's summary from an LG 32LQ63006LA (webOS TV 22) covers the live evidence, and the Cubic threads on the DEVICE_IN_USE refusal, the socket open timeout, scroll amounts, ssap removal, reply failure handling, and the other items marked fixed at this head are addressed. I did not run the TV myself, and I did not rerun Not blocking, take or leave: in One design question: does v1 need the separate Of the other open threads, these still apply: the hit test for The only failing check is Vercel, and it shows the fork-deployment authorize link for 3209d66, so no build ran. The diff touches the website route that Vercel builds ( |
|
This conflicts with main now. Please rebase it so review can continue. |
3209d66 to
b4003a6
Compare
b4003a6 to
19e6d44
Compare
|
Thanks for the review. The branch is now at
Threads at the new head:
Vercel: a team member needs to authorize the fork deployment; I can't start it from the fork. |
|
Thanks for the update. The conflict from the earlier review is gone, and the review fixes now in 19e6d44 are in place: cancel handling in the inspect poll, the empty-value fill, the docs TTL steps, the preview log, and the host-kit command runner. One item still needs proof from the TV. The change moves every ares call to host-kit Not blocking, take or leave: Of the open inline threads, the P2 on CI shows no result for this head: the only failing check is Vercel, which is the fork authorization link, so no build ran. The diff touches the website docs it builds, and only 2 checks are attached, so the repo gates ( |
19e6d44 to
b942ccd
Compare
|
The earlier request is partly fixed at b942ccd: the aresError guard is in. The device-facing route is otherwise unchanged since 19e6d44, and it has still not been run on the TV. packages/provider-webos/src/ares.ts:49 still runs ares-* through host-kit runCmd/runCmdBackground, keeps ares-inspect as a background child that close() kills, and fills an empty value with select() plus a text-less Backspace keyDown. No new comment or PR-body update posts a run, and the earlier The Coverage check (run 41450332300) fails on lines this PR adds. Changed-line coverage is 246/401 = 61.35% against the 70% threshold, and the misses are in new files: the whole inspect tunnel in ares.ts (40, 51-109), connectTv in provider-webos runtime.ts, and the tv-cdp scroll, screenshot, hover, longPress, focus and type paths. The CRAP gate also flags four new functions at 0% coverage: page-interactor.ts scroll, the ares.ts:87 inspect probe, provider-webos connectTv and tv-cdp decode. Please fix this with tests, not exemptions. For example, add a fake ares-inspect script that prints localhost: for a fake /json server, plus scroll cases against fakePage. I did not run the new ares cancel test, the cancelled-open test or the empty-fill test; I only read the pre-fix code to confirm they would fail without the fix. The open inline thread on tv-cdp snapshot.ts hittable still stands, with the author's follow-up plan: #4098 (comment). No conflicts are known. Vercel is still waiting for fork authorization, so the website docs build has not run and a team member needs to authorize it. Before merge, the live TV run and a passing Coverage check are needed. |
b942ccd to
bbe772a
Compare
|
Thanks. Both requests are done at Coverage. I added tests rather than exemptions.
Local run at
Earlier review items, at
TV run. Below is the run you asked for. It was made at The CLI was built from the branch and the plugin installed from $ pgrep -fl ares-inspect
$ agent-device connect webos --device living-room
$ agent-device open com.example.app
Opened: com.example.app
$ agent-device snapshot -i # on the app's search screen
Snapshot: 8 nodes
@e8 [input] "Search" [focused]
$ agent-device fill @e8 "fed"
Filled 3 chars
$ agent-device snapshot -i
Snapshot: 16 nodes # the search results appeared
@e8 [input] "Search" [focused]
$ agent-device get attrs @e8
"identifier": "search-screen-input",
"value": "fed",
$ agent-device fill @e8 ""
Filled 0 chars
$ agent-device snapshot -i
Snapshot: 8 nodes # the results are gone
@e8 [input] "Search" [focused]
$ agent-device get attrs @e8
"identifier": "search-screen-input",
"value": "",
$ agent-device open com.example.app --relaunch
$ pgrep -fl ares-inspect # one tunnel, a new pid after the relaunch
98143 node .../bin/ares-inspect -d living-room -a com.example.app
$ agent-device apps
Ares Hosted App (com.sdk.ares.hostedapp)
Example (com.example.app)
$ agent-device close com.example.app
$ agent-device disconnect
Disconnected remote session "adc-ce98ff8581b7265b6b288d6e72b0fc5c".
$ pgrep -fl ares-inspect
$ echo $?
1
Ctrl-C during $ agent-device connect webos --device living-room
$ agent-device open com.example.app & # SIGINT after 3 s, before "Opened"
$ pgrep -fl ares-inspect
98843 node .../bin/ares-inspect -d living-room -a com.example.app
$ kill -INT %1 # open exits 130 and prints nothing
$ pgrep -fl ares-inspect
$ echo $?
1
$ agent-device open com.example.app
Opened: com.example.app
$ agent-device appstate
Foreground app: com.example.app
$ agent-device close com.example.app
$ agent-device disconnect
$ pgrep -fl ares-inspect
$ echo $?
1So TV Chromium does delete a selection on a text-less Backspace Open items:
|
bbe772a to
a9301f3
Compare
|
The
Live on the same LG webOS TV 22, with app labels shortened: $ agent-device snapshot -i # home screen, 16 nodes as before
@e8 [button] "<hero card 1>"
@e9 [button] "Watch" [covered]
@e10 [button] "<hero card 2>"
@e11 [button] "Watch" [covered]
$ agent-device press @e9
Error (COMMAND_FAILED): Ref @e9 is covered by another visible element and cannot be tapped safely
Hint: Covered by the button "<hero card 1>" at (80, 184 1163x675). Dismiss or close that element, scroll the target clear of it, or inspect with snapshot/screenshot before retrying.
Local run at
Still waiting on a team member: authorizing the Vercel deployment, and approving fork CI so Coverage runs on |
|
Thanks for the update. The code looks good at a9301f3. The coverOf hit test now marks covered nodes and refuses press on the covered Watch button, so the earlier covered-element finding is fixed (#4098 (comment)), and that thread is already resolved. Not blocking, take or leave: a text input whose centre sits under its own The coverage numbers and The only check that did not pass is Vercel, which is waiting for a team member to authorize the fork deployment. The diff touches the webOS docs pages it builds, so the docs build is unproven until then. Coverage, unit and layering have not run on this fork head. A maintainer must approve fork CI and authorize the Vercel deployment before merge. |
Add @agent-device/webos, an optional provider plugin that drives web apps on LG webOS TVs, and the private @agent-device/tv-cdp package it bundles, which holds the CDP page layer a later Tizen plugin will share. The TV enters as an Android TV device owned by the plugin (id webos:<ares device>). Lifecycle runs through ares-launch, and the page is driven over the Chrome DevTools Protocol through the ares-inspect tunnel. v1 covers open, close, apps, snapshot, remote keys (directions, select, back), pointer, text, scroll, screenshot, logs and appstate. Releasing a lease closes the page and the tunnel, and a page whose socket, tunnel or app goes away is detached, so later commands ask for open again. - Kernel: add the cdp-dom snapshot producer on the android channel so DOM snapshots do not pose as UIAutomator output. - Capture kit: let shapeDesktopSurfaceSnapshot take an interactive test, since every DOM node carries a rect. - Packed-install smoke: let scripts/check-provider-plugin.mjs run fixtures for providers without credentials, and add the webOS fixture. - Docs: add the LG webOS page, mention it in plugins, commands and the sidebar, and add a webOS flow to help remote.
a9301f3 to
70420cb
Compare
|
Rebased on
No device-facing code changed in this rebase. |
|
The code looks good at 70420cb. Coverage now passes, so the earlier coverage failure is resolved. No conflicts are known. Before merge, a maintainer must authorize the Vercel fork deployment so the webOS docs build can run, and the Apple Smoke Tests job needs a rerun. Vercel reports “Authorization required to deploy” and never built; this diff changes the docs route it builds, including webos.md, so the rendered page remains unverified. Apple Smoke Tests failed in its iOS phase (macOS passed), and this diff changes no Apple provider or iOS runner code, so the failure looks unrelated; a rerun should confirm it. I did not run gates or verify the reported local check:affected result or the claim that the unit failures are unrelated. There was no live TV run at this head; the b942ccd run still applies because the device route is unchanged from a9301f3. There are no open review threads. |
Summary
Adds
@agent-device/webos, an optional provider plugin that drives web apps on LG webOS TVs, and the private@agent-device/tv-cdppackage it bundles, which the Tizen plugin in #4168 shares. The TV enters as a plugin-owned Android TV device (webos:<ares device>): lifecycle throughares-launch, the page over CDP through theares-inspecttunnel.Scope is the smaller v1 from review:
open/close/apps,snapshot(-s,-d,-i), remote keys (directions, select, back), pointer, text, scroll,screenshot,logs,appstate. SSAP system buttons,perf memory,network dump,install/uninstalland the capability-matrix column follow in separate PRs.52 files. Also: kernel
cdp-domproducer, an interactive-test option in capture-kit's desktop shaper, smoke fixtures, docs, a one-line provider-plugin catalog in help sohelp remotekeeps its first-screen rules as plugins are added, and the TV flows ofhelp remotein their own module (cli-help-tv.ts), which keepscli-help.tswithin its line limit. No linked issue.Validation
Tested SHA
70420cb73, rebased onmainbb960da.pnpm check:affected --run: every stage passed except unit, whose failures are unrelated.fill-verificationandcommitted-source-treealso fail intermittently onmain. Two script tests failed under machine load and pass when run alone.pnpm check:coverage-changedata9301f326, before the rebase: changed-line coverage is 370/408 (90.69%) against the 70% threshold.pnpm check:coverage-crapreports no touched function at or above 30.ares-inspecttunnel,connectTv, cancellableopen, a lease that ends whileopenwaits for the page, exit-onlyaresErrorrewrites, emptyfill, pointer, scroll, screenshot, covered controls, Map/Set log previews, and the inspector error in the open timeout.b942ccd96:fill ""clears a filled input, andopen --relaunchkeeps one tunnel.pgrep -fl ares-inspectprints nothing afterdisconnectand after Ctrl-C duringopen.a9301f326: snapshots hit-test interactive nodes. A control under another element is marked[covered],pressrefuses it with the cover named, andsnapshot -istill lists it. The output is in the PR conversation.connect,open,snapshot(41 nodes) /-i(18) /-s <label>(that subtree only), keys,screenshot,logs,appstate,apps,close. Afterdisconnect,pgrep -fl ares-inspectprints nothing. An app closed outside agent-device gives the typed "No webOS app is attached" error in 0.15 s; with the TV unreachable,openreturnsCOMMAND_FAILEDin 2.9 s; without the CLI,TOOL_MISSING.Risks: experimental; no CI device lane.
🤖 Generated with Claude Code