Skip to content

ci(webclient): Multi version client /client/<slug>/#460

Merged
yanziz-nvidia merged 5 commits into
mainfrom
yanziz/multi-versioning
May 3, 2026
Merged

ci(webclient): Multi version client /client/<slug>/#460
yanziz-nvidia merged 5 commits into
mainfrom
yanziz/multi-versioning

Conversation

@yanziz-nvidia
Copy link
Copy Markdown
Contributor

@yanziz-nvidia yanziz-nvidia commented May 3, 2026

And adds ?showVersion=1 overlay in the web url.

The docs workflow runs on every push to main and release/* and was unconditionally writing the freshly-built web client to gh-pages /client/. Whichever branch deployed last won, so a release-branch backport could silently overwrite the canonical /client/ URL with an older build. Mirror the docs sphinx-multiversion layout: each ref lands at /client// (slashes -> dashes), and /client/index.html is a thin redirect to ./main/ so existing bookmarks keep working.

Bundle now embeds teleop version, CloudXR SDK version, git ref, sha, and build time via webpack DefinePlugin; the values are logged on startup and exposed by an opt-in overlay (append ?showVersion=1 to the URL).

Summary by CodeRabbit

  • New Features

    • Build information overlay: Display client version, build timestamp, and deployment details by appending ?showVersion=true to the URL. The overlay remains visible across application modes and can be dismissed.
  • Infrastructure

    • Client deployment now uses versioned URLs to enable improved version tracking and access to historical builds.

…n=1 overlay

The docs workflow runs on every push to main and release/* and was
unconditionally writing the freshly-built web client to gh-pages /client/.
Whichever branch deployed last won, so a release-branch backport could
silently overwrite the canonical /client/ URL with an older build. Mirror
the docs sphinx-multiversion layout: each ref lands at /client/<slug>/
(slashes -> dashes), and /client/index.html is a thin redirect to ./main/
so existing bookmarks keep working.

Bundle now embeds teleop version, CloudXR SDK version, git ref, sha, and
build time via webpack DefinePlugin; the values are logged on startup and
exposed by an opt-in overlay (append ?showVersion=1 to the URL).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 3, 2026

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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: ed6db3b5-ad2c-492b-910d-6896fe33b59a

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
📝 Walkthrough

Walkthrough

The pull request implements a build version identification system for the CloudXR WebXR client. Build metadata—including teleop version, git reference, git SHA, and build timestamp—is collected during webpack compilation and injected into the bundle as environment variables. A GitHub Action passes git context during the build. The deployment workflow now versioning builds into separate subdirectories by branch/tag slug, with a redirect maintained at the canonical path. At runtime, the client optionally displays this metadata in a dismissible overlay when the showVersion query parameter is present.

Sequence Diagram

sequenceDiagram
    participant GHA as GitHub Actions
    participant WBP as Webpack Build Process
    participant Bundle as Generated Bundle
    participant Client as WebXR Client
    participant Browser as Browser/DOM

    GHA->>WBP: Pass CLIENT_GIT_REF, CLIENT_GIT_SHA
    WBP->>WBP: Read VERSION file, package.json
    WBP->>WBP: Execute git commands for ref/sha
    WBP->>Bundle: Inject metadata via DefinePlugin<br/>(CLIENT_TELEOP_VERSION, etc.)
    Client->>Client: Import BuildInfoOverlay module
    Client->>Client: Log BUILD_INFO on startup
    Client->>Client: Call mountBuildInfoOverlayIfRequested()
    alt showVersion param present
        Client->>Browser: Check for existing overlay element
        Browser-->>Client: Not found
        Client->>Browser: Create fixed-position overlay div
        Client->>Browser: Populate with BUILD_INFO content
        Client->>Browser: Attach dismiss click handler
        Browser-->>Client: Overlay mounted and visible
    else showVersion absent
        Client->>Client: Skip overlay mounting
    end
    Browser->>Browser: User clicks overlay to dismiss
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the primary objective: implementing multi-versioned client deployment under /client// paths with a redirect strategy.
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.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch yanziz/multi-versioning

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get your free trial and get 200 agent minutes per Slack user (a $50 value).


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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@deps/cloudxr/webxr_client/webpack.common.js`:
- Line 27: Replace using the package.json version as the SDK value and instead
use the build-provided SDK_VERSION: update where PKG_VERSION and
CLIENT_SDK_VERSION are set in webpack.common.js to source the value from the
environment/build constant SDK_VERSION (falling back to package.json.version
only if SDK_VERSION is undefined), and apply the same change to the other
occurrences around the CLIENT_SDK_VERSION usage (the references at the later
block around lines 123-124) so the overlay and build-info use SDK_VERSION as the
source of truth.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 455b8a03-9219-4678-8914-bdda11080668

📥 Commits

Reviewing files that changed from the base of the PR and between a939dd1 and 778a326.

📒 Files selected for processing (5)
  • .github/actions/build-cloudxr-web-client/action.yml
  • .github/workflows/docs.yaml
  • deps/cloudxr/webxr_client/src/BuildInfoOverlay.tsx
  • deps/cloudxr/webxr_client/src/index.tsx
  • deps/cloudxr/webxr_client/webpack.common.js

Comment thread deps/cloudxr/webxr_client/webpack.common.js Outdated
The overlay had a click-to-dismiss handler, so a single tap (deliberate
or stray) made it disappear. With ?showVersion=1 being an explicit
opt-in, the overlay should stay until the URL changes. Drop the click
handler and switch the element to pointer-events:none so it never
intercepts clicks on the underlying UI either.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
yanziz-nvidia and others added 2 commits May 2, 2026 19:05
Add a `changes` job that diffs the push/PR ref against its base and
exports two booleans (`docs`, `webapp`). `build-docs` and `build-app`
are now conditional on the relevant flag, and `deploy-docs` tolerates
either upstream being skipped — gh-pages `keep_files: true` keeps the
previously deployed copy of whichever artifact wasn't rebuilt. Cuts
~minutes off PRs that touch only docs or only the web client.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…code

Drop SSR guards and idempotency checks from BuildInfoOverlay (browser
bundle, called once), inline the TELEOP_VERSION read in webpack, replace
the multi-line comment blocks with one-liners, and condense the
deploy-docs `if` clause via !cancelled().

No behavior change; bundle still ships the same metadata and overlay,
verified headlessly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The overlay was reading CLIENT_SDK_VERSION from package.json.version,
which is the web-client app's own version and incidental to the actual
CloudXR SDK that gets linked. Use the build-provided SDK_VERSION
instead — same value the action derives from .env.default and that
`npm install ../nvidia-cloudxr-${SDK_VERSION}.tgz` consumes — so the
overlay always reflects what's really shipped, with package.json as
a local-dev fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@yanziz-nvidia yanziz-nvidia merged commit a94d1d8 into main May 3, 2026
35 of 47 checks passed
@yanziz-nvidia yanziz-nvidia deleted the yanziz/multi-versioning branch May 3, 2026 16:05
@yanziz-nvidia
Copy link
Copy Markdown
Contributor Author

for #450

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