Skip to content

fix(cli): list cameras from legacy Windows nodes - #190685

Merged
roboclaw-bot merged 1 commit into
mainfrom
loop/contributor-pr-181411
Nov 1, 2026
Merged

roboclaw-bot merged 1 commit into
mainfrom
loop/contributor-pr-181411

Conversation

@roboclaw-bot

@roboclaw-bot roboclaw-bot commented Nov 1, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Fixes: openclaw nodes camera list reports no cameras for installed Windows companion nodes that return the legacy camera response.

Closes #181348.
Supersedes #181411, thanks @SC-10749.

User Impact

Windows camera names and device IDs appear in both table and JSON output, allowing users to select a camera for capture. No migration or configuration change is required.

Why This Change Was Made

The CLI accepts the existing Windows cameras response and translates DeviceId/Name into the documented id/name fields, preserving other metadata. Canonical devices responses remain authoritative, malformed entries are filtered, and table output keeps terminal sanitization. The adapter is limited to legacy responses; updated nodes can use devices directly.

Removed the duplicate camera-list theme lookup and the one-use table-width variable. Production LOC is +7 net after those deletions. The remaining growth supplies compatibility with released nodes; no unrelated code was deleted to meet a line quota.

Evidence

  • Current-main camera-list source matches the reproduced baseline (34de4be3eff02); the new text and JSON regressions both failed with the expected empty-camera result before the fix (11 existing cases passed).
  • OPENCLAW_VITEST_RUNTIME=node pnpm test src/cli/nodes-cli/register.camera.test.ts --maxWorkers=1: 13/13 passed after the fix, 1.07 seconds Vitest wall time (2.18 seconds wrapper). Fixtures use the serialized response captured in [Bug]: nodes camera list reports "No cameras reported." for the Windows node — CLI reads payload.devices, node returns payload.cameras #181348 with a shortened device ID. No Windows binaries or contributor code were run; no live Windows hardware result is claimed.
  • Touched-file type-aware oxlint, oxfmt, and git diff --check pass. PR CI passed, and the combined CI/security gate passed for 3de37f0525320f76678d2ab7db0722cccececbe5.
  • Shared autoreview, Codex P0–P2: scoped-clean, no actionable findings on the precommit local candidate against 34de4be3eff02. The subsequent equivalent Object.assign rewrite satisfies the map-spread lint rule.
  • The 19 added test lines cover the two user-visible output modes; the separate test-line allocation grants exactly that regression growth. No shared baseline was changed.

Accept the released cameras/DeviceId/Name payload at the camera-list CLI boundary while keeping canonical devices authoritative.

Co-authored-by: songc <[email protected]>
@clawsweeper

clawsweeper Bot commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@roboclaw-bot
roboclaw-bot marked this pull request as ready for review November 1, 2026 21:51
@openclaw-barnacle openclaw-barnacle Bot added cli CLI command changes size: XS labels Nov 1, 2026
@roboclaw-bot
roboclaw-bot enabled auto-merge (squash) November 1, 2026 21:55
@roboclaw-bot
roboclaw-bot merged commit 528aef2 into main Nov 1, 2026
198 checks passed
@roboclaw-bot
roboclaw-bot deleted the loop/contributor-pr-181411 branch November 1, 2026 22:00
@roboclaw-bot

Copy link
Copy Markdown
Collaborator Author

Merged via squash auto-merge.

github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request Nov 2, 2026
Accept the released cameras/DeviceId/Name payload at the camera-list CLI boundary while keeping canonical devices authoritative.

Co-authored-by: songc <[email protected]>
maplel pushed a commit to maplel/openclaw that referenced this pull request Nov 24, 2026
Accept the released cameras/DeviceId/Name payload at the camera-list CLI boundary while keeping canonical devices authoritative.

Co-authored-by: songc <[email protected]>

(cherry picked from commit 528aef2)

Release adaptation: Port only the legacy cameras/DeviceId/Name normalization and two focused CLI regressions. Preserve canonical devices precedence, existing terminal sanitization and command wrappers; omit incidental theme/table rearrangement and obsolete allocation record.

Companion audit: Inspected later cancellation fix 52fd3d8: independent abort propagation, not needed for payload adaptation. Later f6d0c3e only relocates camera tests; preserve target suite. d6ded18 removes allocation record; exclude that obsolete record. No dependency imported.

Private preparation proof: Red on unchanged target owner: two Windows camera cases failed (empty JSON / No cameras reported). Green full register.camera.test.ts 13/13, 1.50s runner. Format and git diff --check pass.

Qualification gaps: Typed lint/typecheck remain blocked by shared-install checkout confinement documented under row19; no bypass/install. Tests invoke real CLI registration with mocked Gateway, not real Windows node or isolated Gateway E2E; native/channel qualification remains parent-owned.

Co-authored-by: RomneyDa <[email protected]>
(cherry picked from commit fd2cdd952f153240fc061150a72f5cf59457c029)
(cherry picked from commit a60ab6c1c26734d7763cc9b92142b4b564ee58fc)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cli CLI command changes size: XS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: nodes camera list reports "No cameras reported." for the Windows node — CLI reads payload.devices, node returns payload.cameras

1 participant