Skip to content

Add gateway terminal controls - #597

Merged
kmahone merged 1 commit into
masterfrom
user/ranjeshj/gatewaycontrol
Jun 1, 2026
Merged

kmahone merged 1 commit into
masterfrom
user/ranjeshj/gatewaycontrol

Conversation

@ranjeshj

Copy link
Copy Markdown
Contributor

Summary

  • Add Connection page terminal access for setup-managed WSL gateways and SSH-tunneled gateway hosts
  • Add WSL-only gateway Start, Stop, and Restart actions using openclaw gateway commands inside the managed distro
  • Add pure classifier, terminal command, WSL controller tests, and staged UX polish from review feedback

Validation

  • ./build.ps1
  • dotnet test ./tests/OpenClaw.Shared.Tests/OpenClaw.Shared.Tests.csproj --no-restore
  • dotnet test ./tests/OpenClaw.Tray.Tests/OpenClaw.Tray.Tests.csproj --no-restore

Adds Connection page terminal access for setup-managed WSL gateways and SSH-tunneled gateway hosts. Adds WSL-only Start, Stop, and Restart actions that run gateway CLI commands in the managed distro.

Validation: .\build.ps1; dotnet test .\tests\OpenClaw.Shared.Tests\OpenClaw.Shared.Tests.csproj --no-restore; dotnet test .\tests\OpenClaw.Tray.Tests\OpenClaw.Tray.Tests.csproj --no-restore.

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

clawsweeper Bot commented May 30, 2026 •

Copy link
Copy Markdown

Codex review: needs maintainer review before merge. Reviewed May 29, 2026, 11:43 PM ET / 03:43 UTC.

Summary
The PR adds Connection page terminal access for setup-managed WSL and SSH-tunneled gateways, WSL Start/Stop/Restart actions, supporting launcher/controller services, and focused tray tests.

Reproducibility: not applicable. this is a feature PR rather than a bug report. Source inspection of the diff and current master is enough to identify the new terminal and lifecycle behavior.

Review metrics: 3 noteworthy metrics.

  • Diff size: 9 files changed, +984/-0. The PR adds a new Connection page process-control surface plus tests, so reviewers should treat it as a feature review rather than a tiny polish patch.
  • New tests: 3 test files added. The branch covers classifier, terminal command, and WSL controller logic, but those tests do not prove the real terminal/WSL desktop path.
  • External process targets: 2 launch targets: wsl.exe and ssh.exe. These process-launch paths are the main behavior that needs Windows smoke validation beyond pure unit tests.

Merge readiness
Overall: 🐚 platinum hermit
Proof: 🌊 off-meta tidepool
Patch quality: 🐚 platinum hermit
Result: ready for maintainer review.

Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch.

Rank-up moves:

  • [P2] Add or link a short Windows smoke showing WSL terminal open and Start/Stop/Restart behavior before marking the draft ready.

Mantis proof suggestion
A visible Windows desktop proof would materially help review because the feature is a Connection page UI plus terminal/WSL launch flow. A maintainer can ask Mantis to capture proof by posting a new PR comment that starts with the OpenClaw Mantis account mention, followed by:

visual task: verify Connection page shows WSL gateway Terminal/Start/Stop/Restart controls and opens a WSL terminal for a setup-managed gateway.

Risk before merge

  • [P1] The PR launches external terminal processes and controls the WSL gateway service, but the discussion currently provides validation commands rather than a visible WSL/SSH terminal smoke; maintainers should verify the real Windows path before merge.

Maintainer options:

  1. Decide the mitigation before merge
    Finish human review of the draft, verify the WSL and SSH terminal paths on Windows, and land the feature if the lifecycle UX is intentional.
  2. Pause or close
    Do not merge this PR until maintainers decide whether the risk is worth taking.

Next step before merge

  • This draft collaborator PR needs normal maintainer review and real Windows smoke validation, not an automated repair lane.

Security
Cleared: The diff adds local wsl.exe/ssh.exe process launch paths but no dependency, workflow, secret, credential storage, or permission broadening issue was found in the patch.

Review details

Best possible solution:

Finish human review of the draft, verify the WSL and SSH terminal paths on Windows, and land the feature if the lifecycle UX is intentional.

Do we have a high-confidence way to reproduce the issue?

Not applicable; this is a feature PR rather than a bug report. Source inspection of the diff and current master is enough to identify the new terminal and lifecycle behavior.

Is this the best way to solve the issue?

Yes, broadly: the implementation keeps connection ownership with GatewayConnectionManager/IAppCommands and isolates command construction in tray services. The main remaining question is maintainer acceptance of the new lifecycle UX plus real Windows WSL/SSH proof.

AGENTS.md: found and applied where relevant.

Codex review notes: model gpt-5.5, reasoning high; reviewed against 7485ce2af9da.

Label changes

Label changes:

  • add P2: This is a normal-priority user-facing gateway management feature with limited blast radius but real connection/WSL surface area.
  • add rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • add status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a repository collaborator, so the external-contributor proof gate does not apply; the PR body lists validation commands but no separate WSL/SSH media proof.

Label justifications:

  • P2: This is a normal-priority user-facing gateway management feature with limited blast radius but real connection/WSL surface area.
  • rating: 🐚 platinum hermit: Overall readiness is 🐚 platinum hermit; proof is 🌊 off-meta tidepool and patch quality is 🐚 platinum hermit.
  • status: 👀 ready for maintainer look: ClawSweeper has no concrete contributor-facing blocker left for this PR. Not applicable: The author is a repository collaborator, so the external-contributor proof gate does not apply; the PR body lists validation commands but no separate WSL/SSH media proof.
Evidence reviewed

What I checked:

Likely related people:

  • Scott Hanselman: Blame and history show the current ConnectionPage, WslCommandRunner, GatewayRecord, and SSH/WSL-adjacent baseline behavior largely came from commit 51c4b4f. (role: introduced behavior; confidence: high; commits: 51c4b4fd4704, 0d4fcbd50ad5; files: src/OpenClaw.Tray.WinUI/Pages/ConnectionPage.xaml.cs, src/OpenClaw.Tray.WinUI/Services/WslCommandRunner.cs, src/OpenClaw.Connection/GatewayRecord.cs)
  • ranjeshj: The PR author also appears in current-main history for a warning-clean build change touching ConnectionPage, so this is not only proposal authorship. (role: recent area contributor; confidence: medium; commits: a727197dd709; files: src/OpenClaw.Tray.WinUI/Pages/ConnectionPage.xaml.cs)
  • Vincent Koc: Recent current-main gateway record/auth hardening added RequiresV2Signature near the GatewayRecord metadata consumed by connection and setup flows. (role: adjacent owner; confidence: low; commits: 64b650cb3313; files: src/OpenClaw.Connection/GatewayRecord.cs)
What the crustacean ranks mean
  • 🦀 challenger crab: rare, exceptional readiness with strong proof, clean implementation, and convincing validation.
  • 🦞 diamond lobster: very strong readiness with only minor maintainer review expected.
  • 🐚 platinum hermit: good normal PR, likely mergeable with ordinary maintainer review.
  • 🦐 gold shrimp: useful signal, but proof or patch confidence is still limited.
  • 🦪 silver shellfish: thin signal; proof, validation, or implementation needs work.
  • 🧂 unranked krab: not merge-ready because proof is missing/unusable or there are serious correctness or safety concerns.
  • 🌊 off-meta tidepool: rating does not apply to this item.

Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

How this review workflow works
  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@clawsweeper clawsweeper Bot added rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR. P2 Normal priority bug or improvement with limited blast radius. labels May 30, 2026
@kmahone
kmahone marked this pull request as ready for review June 1, 2026 21:07
@kmahone
kmahone merged commit 0b2f9fe into master Jun 1, 2026
29 checks passed
@kmahone
kmahone deleted the user/ranjeshj/gatewaycontrol branch June 1, 2026 21:07
RBrid added a commit to RBrid/openclaw-windows-node that referenced this pull request Jun 4, 2026
Resolves conflicts between PR openclaw#624 (localize remaining tray strings) and the
PR openclaw#558 / PR openclaw#597 / openclaw#686 localization work landed in master.

Conflict resolutions
- 6 XAML files (AgentEventsPage, ConnectionPage, CronPage, SandboxPage,
  SessionsPage, HubWindow): took master versions
- CronPage.xaml.cs: master + re-applied 2 openclaw#624 hunks (JobCompletedInfoBar,
  ShowDisconnected)
- 5 Resources.resw files: reset to master and re-injected 80 unique openclaw#624 keys
  via text injection so XML entities (&quot;) are preserved verbatim
- LocalizationValidationTests.cs: pruned 17 obsolete and 7 over-deferred
  entries from InvariantOrDeferredResourceKeys

Regression caught by adversarial review
- AgentEventsPage / SkillsPage runtime code overrides XAML defaults with
  LocalizationHelper.GetString / Format calls. The 7 corresponding keys were
  seeded English-only across all locales so fr/nl/zh users would have seen
  English status badges and skill counters at runtime
- Translated those 7 keys in fr-fr, nl-nl, zh-cn, zh-tw using the existing
  XAML translations as canonical source (28 strings total)
- nl-nl AgentEventsPage_Status_Offline = "Niet verbonden" (matches the
  Status == Connected runtime check) so the all-or-none parity test passes
- Stripped UTF-8 BOM from nl-nl/Resources.resw introduced by the rewrite so
  all 5 locales share the same encoding

Validation
- ./build.ps1 clean
- OpenClaw.Shared.Tests: 2045 passed / 29 skipped
- OpenClaw.Tray.Tests: 936 passed / 0 failed
- Key parity: 1885 entries per locale across all 5 locales

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Normal priority bug or improvement with limited blast radius. rating: 🐚 platinum hermit Good normal PR readiness with ordinary maintainer review expected. status: 👀 ready for maintainer look ClawSweeper has no concrete contributor-facing blocker left for this PR.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants