Skip to content

Fix mobile folder workspace visibility - #5679

Merged
Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/bug-this-gg-folder-workspace-is-not-visible-on-m
Jun 18, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
Jinwoo-H/bug-this-gg-folder-workspace-is-not-visible-on-m

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • include folder workspaces in the runtime worktree.ps feed with an explicit workspaceKind
  • allow mobile session terminal creation for folder: workspace selectors
  • render folder workspace rows on mobile and hide git-only actions for them

Fixes #5665

Verification

  • pnpm exec vitest run --config config/vitest.config.ts src/main/runtime/orca-runtime.test.ts
  • pnpm run typecheck:node
  • pnpm --dir mobile exec tsc --noEmit
  • pnpm --dir mobile exec oxlint 'app/h/[hostId]/index.tsx' 'app/h/[hostId]/session/[worktreeId].tsx' src/components/WorktreeListRow.tsx src/worktree/workspace-list-sections.ts
  • pnpm --dir mobile exec vitest run src/worktree

Made with Orca 🐋


Open in Stage

@ghost

ghost commented Jun 18, 2026 •

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Jun 18, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: a6d8f6da-25fe-45fa-bc25-86b2be8a6f01

📥 Commits

Reviewing files that changed from the base of the PR and between 63cb910d38053fa10e379fc26ea9c457398269d4 and d082496.

📒 Files selected for processing (7)
  • mobile/app/h/[hostId]/index.tsx
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/src/components/WorktreeListRow.tsx
  • mobile/src/worktree/workspace-list-sections.ts
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/orca-runtime.ts
  • src/shared/runtime-types.ts
💤 Files with no reviewable changes (4)
  • mobile/src/worktree/workspace-list-sections.ts
  • src/shared/runtime-types.ts
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/orca-runtime.ts
🚧 Files skipped from review as they are similar to previous changes (3)
  • mobile/app/h/[hostId]/index.tsx
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/src/components/WorktreeListRow.tsx

📝 Walkthrough

Walkthrough

This pull request adds folder-workspace as a first-class workspace kind across the codebase. The shared RuntimeWorktreePsSummary, mobile Worktree, and WorktreeListRowItem types gain an optional workspaceKind: 'git' | 'folder-workspace' discriminator. On the backend, getWorktreePs now emits summary entries for persisted folder workspaces, TerminalWorkspaceLaunchScope is extended with a repo field for platform and trust detection, and a new getAgentLaunchPlatformForWorkspace helper selects the correct command-quoting platform. createMobileSessionTerminal and resolveMobileSessionTerminalCommand are updated to accept and use the enriched scope. In the mobile UI, WorktreeListRow renders a "Folder" badge and folder-derived metadata text, with long-press disabled for folder items; the session screen suppresses the "Open source control" button for folder routes.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers the main changes, verification steps, and references the fixed issue, but lacks sections for Screenshots, AI Review Report, Security Audit, and platform-specific Notes required by the template. Add missing template sections: Screenshots (no visual change confirmation), AI Review Report (with cross-platform compatibility confirmation), Security Audit, and Notes.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Fix mobile folder workspace visibility' clearly and directly summarizes the main objective of the PR: making folder workspaces visible on the mobile application.
Linked Issues check ✅ Passed The PR successfully addresses issue #5665 by including folder workspaces in the runtime feed, enabling mobile terminal creation for folder workspaces, and rendering folder workspace rows on mobile with git-specific actions hidden.
Out of Scope Changes check ✅ Passed All changes in the PR directly support the primary objective of making folder workspaces visible and functional on mobile, with no unrelated modifications detected.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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 and usage tips.

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

🧹 Nitpick comments (3)
mobile/app/h/[hostId]/session/[worktreeId].tsx (2)

797-797: ⚡ Quick win

Document the folder workspace ID format convention.

The folder: prefix detection is correct, but a brief comment explaining this format would help maintainability if the convention ever changes.

📝 Suggested comment
+  // Why: folder workspace routes use the format 'folder:<id>' per the backend
+  // mobile session terminal creation (see TerminalWorkspaceLaunchScope).
   const isFolderWorkspaceRoute = worktreeId.startsWith('folder:')

4175-4189: ⚡ Quick win

Add comment explaining why git controls are hidden for folder workspaces.

This conditional rendering is driven by a non-obvious constraint (folder workspaces are not git repositories and don't support git operations). As per coding guidelines, adding a short comment would help future developers understand why this button is conditionally rendered.

📝 Suggested comment
+            {/* Why: folder workspaces are not git repositories, so hide git-specific
+                actions for those routes. */}
             {!isFolderWorkspaceRoute && (
               <Pressable

As per coding guidelines: "When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does."

Source: Coding guidelines

mobile/src/components/WorktreeListRow.tsx (1)

67-69: 💤 Low value

Consider adding a brief comment to document the folder metadata fallback strategy.

The metadata derivation logic for folder workspaces uses a fallback chain (comment → path → 'Folder'), which is non-obvious from the surrounding code. A brief one-liner would improve maintainability.

📝 Suggested comment
  const isFolderWorkspace = item.workspaceKind === 'folder-workspace'
+ // Why: folder workspaces display comment or path as meta; git workspaces show branch
  const folderMeta = item.comment?.trim() || item.path || 'Folder'
  const metaText = isFolderWorkspace ? folderMeta : displayBranch(item.branch)

As per coding guidelines: "When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does."

Source: Coding guidelines


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: eedc6a98-90a0-4e0f-9435-d6667ef042d7

📥 Commits

Reviewing files that changed from the base of the PR and between 62fc723 and 63cb910d38053fa10e379fc26ea9c457398269d4.

📒 Files selected for processing (7)
  • mobile/app/h/[hostId]/index.tsx
  • mobile/app/h/[hostId]/session/[worktreeId].tsx
  • mobile/src/components/WorktreeListRow.tsx
  • mobile/src/worktree/workspace-list-sections.ts
  • src/main/runtime/orca-runtime.test.ts
  • src/main/runtime/orca-runtime.ts
  • src/shared/runtime-types.ts

@Jinwoo-H
Jinwoo-H force-pushed the Jinwoo-H/bug-this-gg-folder-workspace-is-not-visible-on-m branch from 63cb910 to d082496 Compare June 18, 2026 05:55
@Jinwoo-H
Jinwoo-H merged commit 06d674b into main Jun 18, 2026
7 checks passed
@Jinwoo-H
Jinwoo-H deleted the Jinwoo-H/bug-this-gg-folder-workspace-is-not-visible-on-m branch June 18, 2026 06:18
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.

[Bug] this GG Folder Workspace is not visible on Mobile why?

1 participant