Skip to content

feat: link hosted cloud workspaces to remote profiles#209

Closed
parsakhaz wants to merge 10 commits into
phase4-hosted-cloud-state-contractfrom
phase4-cloud-remote-workspace-link
Closed

feat: link hosted cloud workspaces to remote profiles#209
parsakhaz wants to merge 10 commits into
phase4-hosted-cloud-state-contractfrom
phase4-cloud-remote-workspace-link

Conversation

@parsakhaz
Copy link
Copy Markdown
Member

Summary

  • link hosted cloud workspace state to remote daemon connection profiles
  • add cloud IPC/preload endpoints to connect and disconnect the linked hosted workspace
  • extend CloudVmManager, tests, and the maintained Electron mock so Phase 4 can route through the existing remote client path

Testing

  • pnpm typecheck
  • pnpm lint
  • CI=1 pnpm --filter main exec vitest run
  • PANE_DIR=/tmp/pane-phase4-task2-cloud-link xvfb-run -a pnpm test:ci

Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown
Member Author

@claude review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Keep it up!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown
Member Author

@claude review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 660c66c097

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread frontend/src/components/CloudWidget.tsx
Comment thread frontend/src/components/CloudWidget.tsx Outdated
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown
Member Author

@claude review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f9ac89d5d9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread frontend/src/components/CloudWidget.tsx Outdated
Comment thread frontend/src/components/CloudWidget.tsx
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown
Member Author

@claude review

@parsakhaz parsakhaz force-pushed the phase4-hosted-cloud-state-contract branch from 6297a57 to 28af91a Compare May 17, 2026 20:02
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 10603051eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread frontend/src/components/CloudWidget.tsx
Comment thread frontend/src/components/CloudWidget.tsx
@parsakhaz parsakhaz force-pushed the phase4-cloud-remote-workspace-link branch from 1060305 to 7884ec5 Compare May 17, 2026 20:05
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown
Member Author

@claude review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7884ec5994

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread main/src/services/cloudVmManager.ts
Comment thread frontend/src/components/CloudWidget.tsx
@parsakhaz parsakhaz force-pushed the phase4-cloud-remote-workspace-link branch from 7884ec5 to d01e371 Compare May 17, 2026 20:11
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown
Member Author

@claude review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d01e371dd3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread frontend/src/components/CloudWidget.tsx Outdated
Comment thread frontend/src/components/CloudWidget.tsx
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown
Member Author

@claude review

@parsakhaz parsakhaz force-pushed the phase4-hosted-cloud-state-contract branch from 24debe8 to e10285f Compare May 17, 2026 20:19
@parsakhaz parsakhaz force-pushed the phase4-cloud-remote-workspace-link branch from 76af9ef to 6e3ded9 Compare May 17, 2026 20:19
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 76af9ef36b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread main/src/ipc/cloud.ts
Comment thread frontend/src/components/CloudWidget.tsx Outdated
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown
Member Author

@claude review

Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown
Member Author

@claude review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@parsakhaz parsakhaz force-pushed the phase4-hosted-cloud-state-contract branch from 2195052 to 72ae2b7 Compare May 17, 2026 20:51
@parsakhaz parsakhaz force-pushed the phase4-cloud-remote-workspace-link branch from d58c5ee to d79e8cf Compare May 17, 2026 20:51
Copy link
Copy Markdown
Member Author

@codex review

Copy link
Copy Markdown
Member Author

@claude review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d79e8cf410

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread main/src/services/cloudVmManager.ts Outdated
Comment on lines +744 to +745
if (!linkedProfile) {
return 'available';
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Do not mark missing profiles as connectable

When cloud.linkedRemoteProfileId is set but the corresponding remote profile has been deleted or failed to load, this returns available, so CloudWidget renders the “Connect Cloud” action even though connectWorkspace() immediately rejects the same state with Hosted cloud workspace linked profile ... does not exist (see the lookup/throw in connectWorkspace). This leaves users with a connect button that cannot succeed after profile cleanup or config drift; report an unlinked/error state or recreate the profile before exposing the action.

Useful? React with 👍 / 👎.

@parsakhaz parsakhaz force-pushed the phase4-hosted-cloud-state-contract branch from 72ae2b7 to fe10352 Compare May 17, 2026 21:01
@parsakhaz parsakhaz force-pushed the phase4-cloud-remote-workspace-link branch from d79e8cf to 93366be Compare May 17, 2026 21:03
@parsakhaz parsakhaz force-pushed the phase4-hosted-cloud-state-contract branch from fe10352 to 36bf687 Compare May 17, 2026 21:13
@parsakhaz parsakhaz force-pushed the phase4-cloud-remote-workspace-link branch from 93366be to 1c97d0a Compare May 17, 2026 21:13
@parsakhaz
Copy link
Copy Markdown
Member Author

@codex review

@parsakhaz
Copy link
Copy Markdown
Member Author

@claude review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1c97d0a5a3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<>
{canManageCloudVmLifecycle && (
<button
onClick={handleStop}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Disconnect the remote runtime before stopping

When a managed VM is connected through the hosted daemon and also has a noVNC URL, this Stop button calls handleStop/cloud:stop-vm while leaving remoteDaemon.client.mode in remote and the active profile connected. After the VM is powered off, daemon-owned renderer calls such as sessions:get-all are still routed through remotePaneClientController.invoke to the now-dead cloud daemon, so the app remains pointed at the stopped workspace until the user separately switches back to local. Please disconnect the workspace before/inside the stop path for this connected-cloud case.

Useful? React with 👍 / 👎.

@parsakhaz parsakhaz force-pushed the phase4-cloud-remote-workspace-link branch from 1c97d0a to 42405db Compare May 17, 2026 21:21
@parsakhaz parsakhaz force-pushed the phase4-hosted-cloud-state-contract branch from 36bf687 to 4dc2aa6 Compare May 17, 2026 21:21
@parsakhaz
Copy link
Copy Markdown
Member Author

@codex review

@parsakhaz
Copy link
Copy Markdown
Member Author

@claude review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 42405db324

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +376 to +379
{daemonConnectionUnavailable && !loading && (
<>
<button
onClick={handleDisconnectWorkspace}
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Offer recovery when linked cloud profile is missing

When the saved linkedRemoteProfileId no longer exists (for example after the user deletes the remote profile in Settings), CloudVmManager reports remoteConnectionStatus: 'error', so this branch renders only the “Use Local Runtime” action. That action calls disconnectWorkspace(), but because the profile is not active/present it returns the same error state without changing anything, leaving the widget stuck on “Cloud Connection Error” with no way to reconnect or rerun setup from the cloud widget.

Useful? React with 👍 / 👎.

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.

1 participant