mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 16:03:47 +00:00
* Access the Floating Workspace from mobile (#8405) Surface the desktop Floating Workspace (the global, repo-less scratchpad of terminal tabs under the synthetic `global-floating-terminal` id) on the mobile app so a Claude session left running there is reachable from a phone. Adds a terminal-icon button to the mobile host header (phone + tablet sidebar) that opens the existing Session screen for the floating id. The sentinel already had host-side RPC support (#5946: local runtime, homedir cwd, explicit-id fast paths in session.tabs.*); this wires up the mobile surface and gates it on a new `floatingWorkspaceEnabled` status flag so the entry hides on hosts that predate it or where the feature is disabled. The Session screen learns an `isFloatingWorkspaceRoute` flag (mirroring the existing `folder:` route pattern) that hides repo-backed surfaces — Files, Source Control, PR/checks, agent history — skips the diff-comment and GitHub probes, routes terminal URL taps to the phone browser, and limits the New Tab drawer to terminals + agents (browser/markdown creation resolves a real worktree host-side and stays desktop-only). useLiveWorktreeName short-circuits for the sentinel so it no longer polls worktree.show forever. Extracted the host status.get gating into a useHostStatusGates hook to keep the host screen under the max-lines ratchet. * Harden mobile Floating Workspace routing * Fix mobile host gate reuse race * Harden floating mobile session polling * fix(mobile): harden floating workspace route reuse * fix(mobile): skip floating workspace repo lookup * fix(mobile): clarify floating workspace header action
23 lines
869 B
TypeScript
23 lines
869 B
TypeScript
import { describe, expect, it } from 'vitest'
|
|
import {
|
|
FLOATING_WORKSPACE_WORKTREE_ID,
|
|
floatingWorkspaceSessionPath,
|
|
isFloatingWorkspaceWorktreeId
|
|
} from './floating-workspace'
|
|
|
|
describe('floating workspace routing', () => {
|
|
it('matches only the desktop sentinel id', () => {
|
|
expect(isFloatingWorkspaceWorktreeId('global-floating-terminal')).toBe(true)
|
|
expect(isFloatingWorkspaceWorktreeId('repo-1::/worktree')).toBe(false)
|
|
expect(isFloatingWorkspaceWorktreeId('folder:group-1')).toBe(false)
|
|
expect(isFloatingWorkspaceWorktreeId(undefined)).toBe(false)
|
|
expect(isFloatingWorkspaceWorktreeId(null)).toBe(false)
|
|
})
|
|
|
|
it('builds the session route with an explicit title seed', () => {
|
|
expect(floatingWorkspaceSessionPath('host-1')).toBe(
|
|
`/h/host-1/session/${FLOATING_WORKSPACE_WORKTREE_ID}?name=Floating%20Workspace`
|
|
)
|
|
})
|
|
})
|