Skip to content

fix(sidebar): identify remote server workspaces - #10061

Merged
OrcaWin merged 1 commit into
mainfrom
imrove-remote-server-ui
Jul 23, 2026
Merged

OrcaWin merged 1 commit into
mainfrom
imrove-remote-server-ui

Conversation

@OrcaWin

@OrcaWin OrcaWin commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • show friendly Orca server names in connected and disconnected workspace tooltips
  • add visible host badges when status or flat views mix execution hosts
  • resolve the authoritative runtime transport owner and honor host label overrides
  • localize the new named tooltip copy across supported locales

Validation

  • pnpm exec vitest run --config config/vitest.config.ts src/renderer/src/components/sidebar/WorktreeCard.ssh-reconnect-prompt.test.tsx src/renderer/src/components/sidebar/worktree-list-groups.test.ts src/renderer/src/components/sidebar/sidebar-host-options.test.ts
  • pnpm run typecheck:web
  • focused oxlint checks
  • pnpm run check:max-lines-ratchet
  • pnpm run verify:localization-coverage
  • isolated Electron evidence test with two saved remote servers

Evidence

Status view with distinct server names

Named remote server tooltip

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Worktree cards now resolve runtime ownership from worktree and repository data, use environment status to determine disconnection, and display named runtime host messages. Localization files add host-specific variants across supported languages. Sidebar row construction now supports per-worktree host labels for mixed runtime hosts while retaining repo-based labels for repo grouping. Tests cover disconnected runtime cards, multiple runtime environments, and grouped sidebar rows.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description omits required template sections like Screenshots, AI Review Report, Security Audit, and Notes. Add the missing template sections, including screenshot status, checklist-style testing, AI review notes, security audit, and platform-specific follow-up.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main change: identifying remote server workspaces in the sidebar.
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.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 Checkov (3.3.8)
src/renderer/src/i18n/locales/en.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

src/renderer/src/i18n/locales/ja.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

src/renderer/src/i18n/locales/es.json

Traceback (most recent call last):
File "/usr/local/bin/checkov", line 2, in
from checkov.main import Checkov
ModuleNotFoundError: No module named 'checkov'

  • 2 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@coderabbitai coderabbitai Bot 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.

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3c0dd0ce-1af5-4a23-a614-d6adbe5d8575

📥 Commits

Reviewing files that changed from the base of the PR and between 4fce2de and 7178de1.

📒 Files selected for processing (9)
  • src/renderer/src/components/sidebar/WorktreeCard.ssh-reconnect-prompt.test.tsx
  • src/renderer/src/components/sidebar/WorktreeCard.tsx
  • src/renderer/src/components/sidebar/worktree-list-groups.test.ts
  • src/renderer/src/components/sidebar/worktree-list-groups.ts
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json

let sshConnectionStates = new Map<string, { status: string }>()
let sshTargetLabels = new Map<string, string>()
let runtimeStatusByEnvironmentId = new Map<string, { status?: unknown }>()
let runtimeEnvironments: { id: string; name: string }[] = []

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.

🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Remove the duplicate runtimeEnvironments declaration.

The provided file declares the same let runtimeEnvironments variable twice at Line 17, which causes a TypeScript duplicate block-scoped variable error. Keep only one declaration.

Comment on lines +1428 to +1463
{!repo?.connectionId && parsedRepoHost?.kind === 'runtime' && (
<Tooltip>
<TooltipTrigger asChild>
<span className="shrink-0 inline-flex items-center">
{isRuntimeDisconnected ? (
<ServerOff className="size-3 text-red-400" />
) : (
<Server className="size-3 text-muted-foreground" />
)}
</span>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={8}>
{isRuntimeDisconnected
? runtimeHostLabel
? translate(
'auto.components.sidebar.WorktreeCard.runtimeHostDisconnectedNamed',
'{{hostName}} disconnected',
{ hostName: runtimeHostLabel }
)
: translate(
'auto.components.sidebar.WorktreeCard.runtimeHostDisconnected',
'Server disconnected'
)
: runtimeHostLabel
? translate(
'auto.components.sidebar.WorktreeCard.runtimeHostProjectNamed',
'Project on {{hostName}}',
{ hostName: runtimeHostLabel }
)
: translate(
'auto.components.sidebar.WorktreeCard.runtimeHostProject',
'Project on Orca server'
)}
</TooltipContent>
</Tooltip>
)}
</TooltipContent>
</Tooltip>
)}

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check whether existing tests cover worktree-level runtimeOwnerEnvironmentId
# differing from the repo's parsed execution host kind.

fd 'WorktreeCard.ssh-reconnect-prompt.test.tsx' --exec rg -n -A5 -B5 'runtimeOwnerEnvironmentId' {}

Repository: stablyai/orca

Length of output: 1071


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Locate and inspect the relevant WorktreeCard implementation and tests without running repo code.
file="$(fd 'WorktreeCard\.tsx$' src/renderer/src/components/sidebar | head -n1)"
test_file="$(fd 'WorktreeCard\.ssh-reconnect-prompt\.test\.tsx$' src/renderer/src/components/sidebar | head -n1)"

echo "FILE=$file"
echo "TEST=$test_file"
wc -l "$file" "$test_file"
printf '\n--- outline ---\n'
ast-grep outline "$file" --match 'runtimeOwnerEnvironmentId' --view expanded || true
printf '\n--- relevant implementation lines 340-390 ---\n'
sed -n '340,390p' "$file" | nl -ba -v340
printf '\n--- relevant implementation lines 1400-1470 ---\n'
sed -n '1400,1470p' "$file" | nl -ba -v1400

echo
echo "--- relevant tests around runtime mismatch ---"
sed -n '160,235p' "$test_file" | nl -ba -v160

Repository: stablyai/orca

Length of output: 621


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file="src/renderer/src/components/sidebar/WorktreeCard.tsx"
test_file="src/renderer/src/components/sidebar/WorktreeCard.ssh-reconnect-prompt.test.tsx"

printf '%s\n' '--- relevant implementation lines 330-385 ---'
awk 'NR>=330 && NR<=385 { printf "%d\t%s\n", NR, $0 }' "$file"

printf '\n%s\n' '--- relevant implementation lines 1395-1475 ---'
awk 'NR>=1395 && NR<=1475 { printf "%d\t%s\n", NR, $0 }' "$file"

printf '\n%s\n' '--- relevant test lines 155-230 ---'
awk 'NR>=155 && NR<=230 { printf "%d\t%s\n", NR, $0 }' "$test_file"

printf '\n%s\n' '--- usages of parsedRepoHost, runtimeOwnerEnvironmentId, runtimeHost ---'
rg -n -C3 'parsedRepoHost|runtimeOwnerEnvironmentId|runtimeHostId|runtim.*Disconnected|runtimeHostLabel' "$file" "$test_file"

Repository: stablyai/orca

Length of output: 17678


Gate runtime host rendering on the resolved runtime id.

The runtime status and label are derived from runtimeOwnerEnvironmentId, but the badge is still gated on the repo-level parsedRepoHost?.kind === 'runtime'. That excludes worktree-level runtime hosts when the repo default is local/undefined, so the mixed-host case doesn’t show the badge/tooltip. Gate on runtimeHostId instead.

🐛 Proposed fix
-            {!repo?.connectionId && parsedRepoHost?.kind === 'runtime' && (
+            {!repo?.connectionId && runtimeHostId && (
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{!repo?.connectionId && parsedRepoHost?.kind === 'runtime' && (
<Tooltip>
<TooltipTrigger asChild>
<span className="shrink-0 inline-flex items-center">
{isRuntimeDisconnected ? (
<ServerOff className="size-3 text-red-400" />
) : (
<Server className="size-3 text-muted-foreground" />
)}
</span>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={8}>
{isRuntimeDisconnected
? runtimeHostLabel
? translate(
'auto.components.sidebar.WorktreeCard.runtimeHostDisconnectedNamed',
'{{hostName}} disconnected',
{ hostName: runtimeHostLabel }
)
: translate(
'auto.components.sidebar.WorktreeCard.runtimeHostDisconnected',
'Server disconnected'
)
: runtimeHostLabel
? translate(
'auto.components.sidebar.WorktreeCard.runtimeHostProjectNamed',
'Project on {{hostName}}',
{ hostName: runtimeHostLabel }
)
: translate(
'auto.components.sidebar.WorktreeCard.runtimeHostProject',
'Project on Orca server'
)}
</TooltipContent>
</Tooltip>
)}
</TooltipContent>
</Tooltip>
)}
{!repo?.connectionId && runtimeHostId && (
<Tooltip>
<TooltipTrigger asChild>
<span className="shrink-0 inline-flex items-center">
{isRuntimeDisconnected ? (
<ServerOff className="size-3 text-red-400" />
) : (
<Server className="size-3 text-muted-foreground" />
)}
</span>
</TooltipTrigger>
<TooltipContent side="right" sideOffset={8}>
{isRuntimeDisconnected
? runtimeHostLabel
? translate(
'auto.components.sidebar.WorktreeCard.runtimeHostDisconnectedNamed',
'{{hostName}} disconnected',
{ hostName: runtimeHostLabel }
)
: translate(
'auto.components.sidebar.WorktreeCard.runtimeHostDisconnected',
'Server disconnected'
)
: runtimeHostLabel
? translate(
'auto.components.sidebar.WorktreeCard.runtimeHostProjectNamed',
'Project on {{hostName}}',
{ hostName: runtimeHostLabel }
)
: translate(
'auto.components.sidebar.WorktreeCard.runtimeHostProject',
'Project on Orca server'
)}
</TooltipContent>
</Tooltip>
)}

@OrcaWin
OrcaWin merged commit a2e440b into main Jul 23, 2026
2 checks passed
@OrcaWin
OrcaWin deleted the imrove-remote-server-ui branch July 23, 2026 03:04
enrick-dev pushed a commit to enrick-dev/orca that referenced this pull request Oct 15, 2026
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