Skip to content

webxr client: add clear button to Server IP field#685

Open
jiwenc-nv wants to merge 1 commit into
NVIDIA:mainfrom
jiwenc-nv:jiwenc/clear-hostname
Open

webxr client: add clear button to Server IP field#685
jiwenc-nv wants to merge 1 commit into
NVIDIA:mainfrom
jiwenc-nv:jiwenc/clear-hostname

Conversation

@jiwenc-nv

@jiwenc-nv jiwenc-nv commented Jun 13, 2026

Copy link
Copy Markdown
Collaborator

The Server IP field prefills from the last connected server with no way to clear it, which suppressed the browser's autocomplete dropdown of previously used servers. Add an inline circular 'x' button that appears when the field has a value; clicking it clears the value (including the persisted localStorage entry) and refocuses the field so the dropdown can show again.

Description

Fixes #(issue)

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

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
    • Added a dedicated clear button for the server IP input field. The button appears when a value is entered and clears the field when clicked, immediately updating the configuration.

The Server IP field prefills from the last connected server with no way
to clear it, which suppressed the browser's autocomplete dropdown of
previously used servers. Add an inline circular 'x' button that appears
when the field has a value; clicking it clears the value (including the
persisted localStorage entry) and refocuses the field so the dropdown
can show again.
@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a dedicated "clear" button for the server IP input field in the CloudXR 2D UI. The button appears inline next to the input, displaying a × symbol with accessibility labels. The TypeScript class now declares a DOM reference, initializes it during element setup, and wires event listeners to conditionally show the button based on input value and clear the input while triggering configuration updates and persistence on click.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a clear button to the Server IP field in the WebXR client.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@github-actions

Copy link
Copy Markdown
Contributor

📝 Docs preview is not auto-deployed for fork PRs.

A maintainer with write access to NVIDIA/IsaacTeleop can deploy a preview by
commenting /preview-docs on this PR. Once deployed, the preview
will live at:

https://nvidia.github.io/IsaacTeleop/preview/pr-685/

@jiwenc-nv jiwenc-nv requested a review from yanziz-nvidia June 13, 2026 06:55

@yanziz-nvidia yanziz-nvidia 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.

Reviewed by yanziz-reviewer-bot

Summary

Adds a circular "×" clear button to the Server IP input so users can wipe a localStorage-prefilled value and restore browser autocomplete. No CI state visible from the diff; no dep changes.

Legend: 🚫 Blocker · 💡 Suggestion · 🔍 Nit

Finding
🚫 deps/cloudxr/webxr_client/src/CloudXR2DUI.tsx:557The click handler dispatches a synthetic input then a change, causing updateConfiguration() to fire twice per clear. Both 'input' and 'change' have updateConfig registered; the synthetic dispatch hits both. Fix: call updateServerIpClearButton() and updateConfig() directly, then dispatch only 'change' (for localStorage persistence).
💡 deps/cloudxr/webxr_client/src/index.html:662 — Button has aria-label="Clear server IP" but some screen readers will also read the bare × text. Wrap glyph: <span aria-hidden="true">&times;</span>.
🔍 DCO sign-off checkbox in the PR description is unchecked.

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

Fix if it makes sense in context — these are agent-generated suggestions, not human-vetted obligations. Skip anything that's wrong, already addressed, or not worth the churn.

  • CloudXR2DUI.tsx:557–563 — Replace the two dispatchEvent calls in the serverIpClearButton click handler with direct calls to updateServerIpClearButton() and updateConfig(), keeping only dispatchEvent(new Event('change', { bubbles: true })) for localStorage persistence.
  • index.html:662 — Wrap &times; in <span aria-hidden="true">&times;</span> inside serverIpClearButton.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants