Skip to content

fix(IC-client): collapse video-streaming HUD after connection - #1283

Open
farbod-nv wants to merge 3 commits into
mainfrom
fix/cxr-4298-video-hud
Open

farbod-nv wants to merge 3 commits into
mainfrom
fix/cxr-4298-video-hud

Conversation

@farbod-nv

@farbod-nv farbod-nv commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

The video-streaming preset previously hid the HUD on XR entry, obscuring connection status before video was available.

The HUD now stays open while connecting, hides its details when streaming starts, and reopens on connection loss. The existing Show/Hide controls remain available, and manually reopened details stay open while the connection is unchanged. Other presets retain their existing behavior.

Addresses the HUD feedback in CXR-4298. Camera-workflow naming and documentation links remain separate work.

Includes a separate prerequisite commit fixing existing SPDX scanner false positives in three Python strings. Their parsed code and generated output are unchanged.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Testing

Validated on macOS:

  • npm test -- --runInBand — 125 tests passed.
  • npm run test:playwright -- VideoStreamingHUDTest --workers=1 — passed in Chrome with IWER and MockCloudXR. Covers connection progress, automatic hiding, manual reopening, stream loss, and reconnect.
  • npm run build — passed.
  • npm run lint:check and Prettier checks on changed client files — passed.
  • SKIP=check-copyright-year pre-commit run --all-files — passed.
  • npm run typecheck — reports eight existing recorder errors, reproduced on unchanged main.

Physical-headset validation remains pending.

Checklist

  • I have read and understood the contribution guidelines
  • I have run the linter and formatter with SKIP=check-copyright-year pre-commit run --all-files
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix/feature works (or explained why not)
  • I have signed off all my commits (git commit -s) per the DCO

Summary by CodeRabbit

  • New Features
    • The control panel now shows connection progress and stream-loss details, then hides automatically once video streaming begins. Manual Show/Hide choices are preserved while streaming.
    • The video teleoperation project now starts with its control panel visible.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
Keep the video-streaming HUD open during connection and reconnect attempts, collapse it on stream start, and preserve manual Show/Hide while streaming. Add lifecycle and browser regression coverage for CXR-4298.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/IsaacCapture/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: ab3dd917-4866-4c85-bb9a-1002bd558dfa

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: NVIDIA/IsaacCapture/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 4d379442-a605-4102-9e28-553c37d3a7ab
📥 Commits

Reviewing files that changed from the base of the PR and between ffa42ea and e2a83b8.

📒 Files selected for processing: 9
  • deps/cloudxr/webxr_client/helpers/TeleopProjects.ts
  • deps/cloudxr/webxr_client/helpers/react/useControlPanelVisibility.test.tsx
  • deps/cloudxr/webxr_client/helpers/react/useControlPanelVisibility.ts
  • deps/cloudxr/webxr_client/src/App.tsx
  • deps/cloudxr/webxr_client/src/CloudXRUI.tsx
  • deps/cloudxr/webxr_client/tests/playwright/VideoStreamingHUDTest.spec.js
  • scripts/check_licenses.py
  • src/core/codegen/generate_trackers.py
  • src/core/codegen/templates.py

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.

📝 Walkthrough

The WebXR client now manages control panel visibility using XR mode, startup preference, auto-hide configuration, and streaming status. The video teleoperation path enables auto-hide. New tests cover visibility during connection, streaming, manual toggles, stream loss, and reconnection. License identifier strings are split across adjacent literals without changing their resulting content.

Priority: ⬇️ Low

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant App
  participant CloudXR3DUI
  participant useControlPanelVisibility
  App->>CloudXR3DUI: Pass autoHideOnConnect and isStreaming
  CloudXR3DUI->>useControlPanelVisibility: Pass XR mode, startup preference, and stream status
  useControlPanelVisibility->>CloudXR3DUI: Return panel visibility and setter
Loading
Merge Risk: ⚪ Minimal · up to e2a83

No actionable merge-blocking risk is identified. The HUD change is ready for normal merge checks; physical-headset validation remains pending.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 9 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the main change: collapsing the video-streaming HUD after connection.
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@farbod-nv farbod-nv changed the title fix(webxr): collapse video-streaming HUD after connection fix(IC-client): collapse video-streaming HUD after connection Oct 16, 2026
@farbod-nv farbod-nv self-assigned this Oct 16, 2026
Comment thread scripts/check_licenses.py Outdated
if expected == EGOPOST_LICENSE and expressions == {"Apache-2.0"}:
content = path.read_text()
# Replace only the default header tag, retaining copyright and other notices.
# Split literal SPDX tags in patterns/templates so REUSE only reads real headers.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need to change this? seems some column count configuration is inconsistent?

Comment thread src/core/codegen/generate_trackers.py Outdated
"// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.\n"
"// "
"SPDX-License-Identifier: Apache-2.0\n\n"
"SPDX-License-"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

@gareth-morgan-nv

gareth-morgan-nv commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

🤖 Agent-generated (Claude Code · claude-sonnet-5-5)

Summary

Moves control-panel visibility into a useControlPanelVisibility hook. For the video preset the panel now stays open while connecting, hides when streaming starts, and reopens on stream loss; other presets keep the old hide-on-entry behaviour. The hook logic reads correctly (the two effects don't fight, and manual Show/Hide isn't overridden because only connection transitions write), and the unit and Playwright coverage is good. Overall shape I'd suggest: one preset setting (e.g. hideWhileStreaming), a hook that takes isStreaming plus that setting and owns the XR-entry edge, and CloudXR3DUI as a plain consumer with no extra ref or prop. Findings are about how the preset is detected, docs/readability, and one possible test race. Static review only. A human review already questions the three Python SPDX edits; I agree (below).

Legend: 🚫 Blocker · 💡 Suggestion · 🔍 Nit

Finding
💡 src/App.tsx:1246 — autoHideOnConnect is derived by comparing config.teleopPath to a hard-coded route string, which breaks silently if the route is renamed. Behaviour that varies per preset belongs on the preset's settings in TeleopProjects.ts (where panelHiddenAtStart already lives), not in a string comparison in App.tsx.
💡 src/CloudXRUI.tsx:126-129, src/App.tsx:1246-1247 — autoHideOnConnect and isStreaming together express one idea ("hide while streaming") but add two props that must be kept consistent (isStreaming is meaningless when autoHideOnConnect is false). Collapse them into a single optional prop, e.g. hideWhileStreaming?: boolean plus the streaming state, or pass isStreaming only for presets that opt in.
💡 helpers/react/useControlPanelVisibility.ts:21-35 — two effects both write panelHidden, one per mode, selected by autoHideOnConnect. They don't conflict today, but a later edit that lets both apply would make them fight. Fold into one effect with an explicit mode branch, or comment that the modes are mutually exclusive.
💡 helpers/TeleopProjects.ts:101 — panelHiddenAtStart: false is redundant for this preset: the hook ignores panelHiddenAtStart whenever autoHideOnConnect is true (the Playwright test even forces panelHiddenAtStart=true). Drop it, or fold both into one explicit setting so the two don't appear to compete.
💡 src/CloudXRUI.tsx:126 — the panelHiddenAtStart doc ("hide control panel when immersive XR begins") is now wrong when autoHideOnConnect is set. Update it, or document precedence in one place.
💡 helpers/react/useControlPanelVisibility.ts:12 — the exported hook and its options have no doc comment, and the contract (two modes, and that only connection transitions write visibility) lives inside an effect. Add a short JSDoc on the hook and move that explanation up to it.
💡 tests/playwright/VideoStreamingHUDTest.spec.js:350 — expect(lastVisibility()).toBe(...) right after waitForLog('Reconnecting') is a synchronous read of a value written by a separate log line, so it can race the visibility log. Use expect.poll. It is also already visible from the earlier r press, so it adds little; consider asserting it in the collapsed-then-lost phase only.
💡 scripts/check_licenses.py:116, src/core/codegen/generate_trackers.py:21, src/core/codegen/templates.py:15 — splitting SPDX-License- / Identifier across string literals works around the scanner but is unexplained in two of three files (a later cleanup will re-join them) and unrelated to this fix. Prefer a REUSE-IgnoreStart/REUSE-IgnoreEnd block or a REUSE.toml override if the scanner supports it, or move to its own PR.
💡 PR description — links a tracker a public reader cannot open. Describe the underlying issue in the text instead.
🔍 helpers/react/useControlPanelVisibility.ts:21 and src/CloudXRUI.tsx:~333 — both track the XR-entry edge with their own prevXRMode ref. Consider having the hook own it (e.g. return an enteredXR flag) so the transition is detected once.
🔍 src/App.tsx:74,1061 — import reorder and a prettier re-wrap unrelated to this change; drop them to keep the diff focused.
🔍 tests/playwright/VideoStreamingHUDTest.spec.js:327,345 — seeding localStorage with a different teleopPath than the URL hash is unexplained, and waitForTimeout(500) is a fixed sleep. Add a one-line reason for the first; for the second, poll for stability instead if possible.
🔍 helpers/react/useControlPanelVisibility.ts:7 — prop autoHideOnConnect actually hides on stream start (isStreaming); a name such as hideWhileStreaming would match the behaviour.

Actionables (for bots — copy-paste-ready for AI)

Agent-generated suggestions, not human-vetted obligations. Skip anything wrong, already addressed, or not worth the churn.

  • src/App.tsx:1246, helpers/TeleopProjects.ts:101 — add an autoHideOnConnect (or hideWhileStreaming) field to the project settings for the video preset, read it from config, and remove the route-string comparison and the redundant panelHiddenAtStart: false.
  • src/CloudXRUI.tsx:126 — update the panelHiddenAtStart JSDoc to state it is ignored when autoHideOnConnect is true.
  • src/CloudXRUI.tsx:126-129, src/App.tsx:1246-1247 — replace autoHideOnConnect/isStreaming with one prop (or pass isStreaming only when the preset opts in).
  • helpers/react/useControlPanelVisibility.ts:21-35 — merge the two effects into one with an explicit mode branch, or document that the modes are mutually exclusive.
  • helpers/react/useControlPanelVisibility.ts — add a JSDoc to the hook describing both modes and that only connection transitions change visibility; document the options fields.
  • tests/playwright/VideoStreamingHUDTest.spec.js:350 — replace the synchronous expect(lastVisibility()) with expect.poll(lastVisibility); add a comment for the localStorage seed; replace waitForTimeout(500) if a pollable condition exists.
  • scripts/check_licenses.py:116, src/core/codegen/generate_trackers.py:21, src/core/codegen/templates.py:15 — replace the split-literal workaround with REUSE ignore markers or an override, or move it to a separate PR; if kept, add the same explanatory comment to all three.
  • src/App.tsx:74,1061 — revert the unrelated import reorder and re-wrap.

Signed-off-by: Farbod Motlagh <fmotlagh@nvidia.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ Preview deployed: https://NVIDIA.github.io/IsaacCapture/preview/pr-1283/client/

Built from commit 7c6c7c7. It may take a minute for the updated preview to appear.

@gareth-morgan-nv gareth-morgan-nv left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. See agent review above.

This branch was successfully deployed

1 active deployment
dev — 7c6c7c75 Deployed Oct 17, 2026 by farbod-nv via publish-wheel #5732
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants