[HYPERSHELL-129] feat(web-console): Adding section to gateway UI with instructions for sandbox connecting - #208
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Central YAML (inherited) Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
…onnections, enables the syntax for displaying sandbox connect to the Hypershell UI
…age, shared naming state between the create and connect setup sections for parity
…ing containers display correctly and the sandbox connect content is shown correctly
argument for gateway name, fixing tests to use positional argument
documentation, adding editor flag to connect command
195101b to
a540bd8
Compare
Amber reviewStatus: Complete VerdictCOMMENT — This is a clean, well-tested UI addition that adds a "Connect to a sandbox" step to the gateway Connection tab, reusing the existing Hi, Amber here. Two-sentence summary: PR #208 adds a copyable, inline-editable FindingsMinor — Docs link points at a Mintlify preview domain, not the canonical docs host ( Minor — Unrelated comment deletion in Minor — New connect command quotes its positional arg; the sibling create command still does not ( Nit / UX question — shared Cross-PR coordinationI reviewed the other open PRs in Material conflict — PR #210
Decision maintainers need: choose a merge order for #208 and #210, agree on the final Connection-tab step ordering (install → setup → create → connect, or otherwise), and have the second PR rebase to (a) set the Not material: #214 and #209 ("HYPERSHELL-112 Dashboard UI"; #214 is #209 "with adjustments" — those two duplicate each other and should be de-duplicated between their authors) touch Findings Summary (highest severity first)
Convention Checklist
|
jsell-rh
left a comment
There was a problem hiding this comment.
Verdict
COMMENT — This is a clean, well-tested UI addition that adds a "Connect to a sandbox" step to the gateway Connection tab, reusing the existing EditableCommand component and shell-quoting helper correctly, with good unit coverage. No blockers or security issues; the actionable items are a docs-link domain inconsistency, an unrelated comment deletion, and — most importantly — a material overlap with PR #210 that maintainers must sequence.
Hi, Amber here. Two-sentence summary: PR #208 adds a copyable, inline-editable openshell sandbox connect <name> --editor <vscode|cursor> step to the Connection tab, wired through the shared EditableCommand and shellArgument quoting, with matching i18n keys and unit tests. The feature is solid; my only substantive concern is coordination with PR #210, which restructures the very same Connection-tab component and test in an incompatible-if-both-merged way.
Findings
Minor — Docs link points at a Mintlify preview domain, not the canonical docs host (packages/gateway-management-ui/src/gateways/gateway-connections.ts:80-81)
The new sandboxConnectDocsUrl resolves to https://nvidia-openshell.mintlify.app/..., whereas the existing installDocsUrl uses the canonical https://docs.nvidia.com/openshell/.... A Mintlify-hosted app subdomain is typically a preview/staging surface and is more likely to move or break than the published docs host. Recommend pointing to the docs.nvidia.com equivalent for consistency and link durability. Confidence: Medium.
Minor — Unrelated comment deletion in editable-command.tsx (packages/gateway-management-ui/src/gateways/editable-command.tsx:90)
This PR removes the comment explaining why the Enter key is swallowed (it would break both the single-line layout and the shell command). That rationale is genuinely useful to future maintainers, and the deletion is unrelated to the connect-sandbox feature. Suggest restoring it (or dropping the change from this PR to keep the diff focused). Confidence: High.
Minor — New connect command quotes its positional arg; the sibling create command still does not (gateway-connections.ts:122-146)
buildSandboxConnectCommand correctly wraps both name and editor in shellArgument(...), but the pre-existing buildSandboxCreateCommand still emits a raw --name ${name}. Both are fed from the same sanitized editable field, so this is not exploitable today, but the inconsistency is worth a follow-up so the two commands quote identically. Confidence: Medium (pre-existing; not introduced here).
Nit / UX question — shared sandboxName state mirrors across the create and connect steps
Editing the "Existing sandbox name" field in the connect step also rewrites the create command above (asserted by the new "mirrors an edited sandbox name" test). This looks intentional (create then reattach to the same name), but confirm it is the desired UX rather than two independent fields. Confidence: Low.
Cross-PR coordination
I reviewed the other open PRs in openshift-online/hypershell for material (design/plan/interface/ordering) conflicts with #208. Open PRs at review time: #216, #214, #212, #211, #210, #209, #207, #206, #201, #200, #194, #189, #188, #185, #182, #179, #151, #150, #148, #135, #109, #75, #73.
Material conflict — PR #210 [HYPERSHELL-259] feat(web-console): add gateway-matched CLI installation.
#210 and #208 independently restructure the same Connection-tab component and its test, and their changes are not composable as-is:
- Both edit
packages/gateway-management-ui/src/gateways/gateway-connection-steps.tsx, adding a new command block to the same<ol>of steps (#208 appends a "Connect to a sandbox" step; #210 prepends a version-matched "Install the OpenShell CLI" command block). This is a design/ordering decision — the combined step order of the tab is undefined until maintainers pick one. - Both edit
gateway-connection-steps.test.tsxand bump the same shared assertioncontainer.querySelectorAll(".shiki").lengthfrom2— #208 sets it to3, #210 sets it to3. If both merge, the tab will render four highlighted command blocks, so the assertion must become4; a naive merge that keeps either literal will produce a failing/incorrect test. This is a logical conflict, not a textual one. - Both add builders + tests to
gateway-connections.ts/gateway-connections.test.tsand both add keys tomessages.ts/components/web-console/locales/en.json. Additionally, #210 repurposes the sharedconnectionInstallLinkmessage (from "Install the OpenShell CLI" to "View installation documentation") and removesapp.gateway.serviceAccounts.manage; #208 leaves these as-is. Whichever lands second must reconcile against the renamed/removed keys, not just merge new ones. - Both modify
editable-command.tsx(#208 deletes a comment; #210 addseditable-command.test.tsxand changes the component). Competing edits to the same shared component.
Decision maintainers need: choose a merge order for #208 and #210, agree on the final Connection-tab step ordering (install → setup → create → connect, or otherwise), and have the second PR rebase to (a) set the .shiki count to the true combined total (4), (b) reconcile the connectionInstallLink rename / serviceAccounts.manage removal, and (c) unify the editable-command.tsx edits.
Not material: #214 and #209 ("HYPERSHELL-112 Dashboard UI"; #214 is #209 "with adjustments" — those two duplicate each other and should be de-duplicated between their authors) touch components/web-console/locales/en.json and CLAUDE.md, but only in the dashboard area; any overlap with #208 is a routine text merge in en.json, not a design conflict. #216 and #201 are control-plane/deploy changes with no overlap in goals, interfaces, or data model with #208. No other open PR conflicts materially with #208.
Findings Summary (highest severity first)
- [Major] Material cross-PR conflict with #210 over the Connection-tab step layout and the shared
.shikicount assertion (combined total must be 4, both PRs hardcode 3) — Cross-PR coordination - [Minor] Docs link uses a Mintlify preview domain instead of canonical
docs.nvidia.com— Security/Config consistency (gateway-connections.ts:80-81) - [Minor] Unrelated deletion of the Enter-swallow rationale comment — Maintainability (editable-command.tsx:90)
- [Minor] Connect command quotes its arg but sibling create command still does not — Consistency (gateway-connections.ts:122-146)
- [Nit] Shared
sandboxNamestate mirrors across create/connect steps — confirm intended UX
Convention Checklist
| Convention | Result |
|---|---|
| Input validated (shell arg quoting/sanitization) | Pass |
| No secrets in logs or responses | Pass (N/A — no secrets handled) |
| Config separate from code (docs URL as constant) | Pass |
i18n keys mirrored in messages.ts and en.json |
Pass |
| Test additions are additive, not silently rewritten guarantees | Pass |
| PatternFly 6 / reuse shared components | Pass (reuses EditableCommand, PF Alert) |
| Accessible labels + new-tab link semantics | Pass |
| "https://docs.nvidia.com/openshell/about/installation"; | ||
|
|
||
| export const sandboxConnectDocsUrl = | ||
| "https://nvidia-openshell.mintlify.app/reference/cli-sandbox#openshell-sandbox-connect"; |
There was a problem hiding this comment.
[Minor] Docs link uses a preview domain. sandboxConnectDocsUrl points at nvidia-openshell.mintlify.app, a Mintlify-hosted preview surface, while the sibling installDocsUrl (line 77-78) uses the canonical docs.nvidia.com/openshell/.... Preview subdomains are more likely to move/break. Recommend the canonical docs.nvidia.com equivalent for durability and consistency.
| @@ -88,8 +88,6 @@ function EditableField({ | |||
| contentEditable="plaintext-only" | |||
| onInput={handleInput} | |||
| onKeyDown={(event) => { | |||
There was a problem hiding this comment.
[Minor] Unrelated comment removal. This PR drops the comment that explained why Enter is swallowed (a newline would break both the single-line layout and the shell command). That rationale is useful and the deletion is unrelated to the connect-sandbox feature — suggest restoring it or leaving it out of this PR to keep the diff focused.
|
|
||
| await waitFor(() => { | ||
| expect(container.querySelectorAll(".shiki").length).toBe(2); | ||
| expect(container.querySelectorAll(".shiki").length).toBe(3); |
There was a problem hiding this comment.
[Major] Cross-PR conflict with #210. #210 also bumps this shared .shiki count from 2 to 3 (it prepends a version-matched install command block); #208 bumps it to 3 for the new connect step. If both merge, the tab renders four highlighted command blocks, so this assertion must become 4 — a naive merge that keeps 3 will be wrong. Maintainers should pick a merge order and have the second PR set the true combined total and reconcile the Connection-tab step ordering. See the Cross-PR coordination section of the review.
Summary
Connectiontab calledConnect to a sandbox, which provides a convenience command for the user to connect to an existing sandbox when they open it in the Gateway UIChanges
gateway-connection-steps.tsx, along with two 2EditableFieldcomponents for the sandbox name and the editor nameConnectiontabTest Plan
make kind-web-console-upto run the local web serveropenshell sandbox connect <SANDBOX_NAME>to connect to the sandboxpnpm --filter @openshift-online/hypershell-gateway-management-ui test:run