Skip to content

feat(floating-workspace): own folder for terminals, agents, and notes - #16

Merged
nplez1 merged 1 commit into
nplez1/mainfrom
nplez1/Floating-Workspace
Sep 22, 2026
Merged

nplez1 merged 1 commit into
nplez1/mainfrom
nplez1/Floating-Workspace

Conversation

@nplez1

@nplez1 nplez1 commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner
Files Added Deleted Net
Test 9 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​252 $\color{#cf222e}{\Huge{\mathbf{−}}}$​56 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​196
Prod 13 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​243 $\color{#cf222e}{\Huge{\mathbf{−}}}$​62 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​181

ELI5

The floating workspace is the global panel you can pull up over any project. But it had no home of its own: whatever you started in it — a shell, an agent, a note — landed wherever the machine happened to be, and the notes lived somewhere else entirely. Now the whole thing has one folder, and that folder is where its agent instructions go.

What Changed

Before

  • Opening a floating terminal or agent started it in ~. On a runtime/paired host the launch resolved the floating sentinel to the host process's own home directory, so a work machine whose home is a checkout opened floating agents inside that project.
  • Floating markdown notes were written to <userData>/floating-workspace — a different place from where anything else in the floating workspace happened.
  • There was nowhere to put floating-workspace agent instructions: an AGENTS.md only applies if the agent actually starts in the folder holding it.

After

  • ~/.orca/floating-workspace is the floating workspace's folder. New terminals and agents start there, on the desktop and on a runtime/paired host alike, and markdown notes live there too — next to the AGENTS.md that carries your floating-workspace instructions (orchestration rules, cross-project setup, whatever you want).
  • Orca seeds a comment-only AGENTS.md there, which adds nothing to an agent's context until you write rules into it, and skips the seed entirely when AGENTS.md or CLAUDE.md already exists.
  • Settings → Floating Workspace → Terminal Directory shows the folder main resolved and gains a platform-correct Show in Finder / Show in Explorer / Show in File Manager button beside the picker.

One function now backs the whole folder. ensureFloatingWorkspaceDirectory() (replacing ensureDefaultFloatingWorkspacePath) is what the start directory, the note picker, and OS-opened markdown all resolve through:

Caller Before After
New floating terminal / agent ~ (or host cwd) ~/.orca/floating-workspace
New note + "Open file" picker default userData/floating-workspace ~/.orca/floating-workspace
OS-opened markdown relative-path root userData/floating-workspace ~/.orca/floating-workspace

How it holds together:

  • floatingTerminalCwd defaults to blank, which means the folder; a directory chosen from the picker still wins. A one-shot load migration rewrites the old ~/blank default onto blank and preserves a real custom path.
  • The PTY spawn resolver returns the folder when a floating spawn arrives with no cwd, and the runtime's floating launch scope reports it as the workspace path — that is the half that fixed paired/mobile launches, which never reach the renderer's value.
  • Notes in the old app-data folder are moved into the new one: rename first, copyFile + unlink across filesystems, never overwriting a file that already exists at the destination, and the old folder is removed only when it ends up empty.

Why

The alternatives were worse for the actual problem:

  • Keep ~ and document it. ~ is exactly what was wrong on a work machine whose home is a checkout — the point is that a floating agent stops inheriting a project.
  • Reuse the app-data notes folder. It is invisible and awkward to edit by hand, which defeats the reason for having the folder at all: dropping an AGENTS.md in it.
  • A new top-level folder in the home directory (~/Orca Workspace). Visible clutter for a folder most people never open, and a new path to explain.

~/.orca/floating-workspace sits with Orca's own config, so it is easy to find, survives uninstall and update, and needs no authorization surface beyond the one app-created folder (which is granted on first use, exactly like the old notes folder was).

This PR also drops ~ as a durable setting value. It was only ever the old default — the picker has always stored absolute paths — so keeping it would have meant a persisted migration flag, a sanitizer round-trip, and a display shorthand to express something the UI cannot produce. Blank now means the folder and the row shows the folder main resolved; to use your home directory, pick it like any other folder.

Linked Issue

No tracking issue — this was requested directly.

Visual Proof

No attachments. This environment has no Electron capture path (the $electron skill is not installed here) and I did not run the app, so I am not writing the template's N/A: the difference is real but described rather than shown.

  • Before: the row read "New floating terminal tabs start here. Markdown notes are saved in Orca's app-owned floating workspace.", the path field read ~, and the only control was the folder picker.
  • After: the row reads "New floating terminals and agents start here. Floating markdown notes always live in the floating-workspace folder, next to its AGENTS.md instructions.", the field shows the resolved folder (~/.orca/floating-workspace by default, a chosen directory otherwise), and there is a second button that reveals it in the file manager.

src/renderer/src/components/settings/FloatingWorkspacePane.test.tsx renders the production pane and asserts both states: the field shows the folder for the blank default and a chosen directory when one is set, and clicking the reveal button calls openInFileManager with the resolved path.

Testing

  • pnpm tc — full typecheck across every project (main, preload, renderer, web, cli).
  • pnpm run check:code-quality:changed — including the casting, design-system, and casting-SAFETY rationale gates.
  • Localization: verify:localization-extraction and verify:localization-catalog.
  • oxlint and oxfmt over every changed file (the pre-commit hook's own path).
  • Vitest: src/main/ipc, src/main/startup, src/main/persistence-floating-terminal-trust, src/main/floating-workspace-launch-directory, src/renderer/src/components/settings, src/renderer/src/components/floating-terminal, plus the runtime and agent-launch suites that resolve the floating scope — 6120 passed, 19 skipped. An earlier run over src/main/runtime, src/main/agent-launch, and src/main/ipc was 12602 passed, 42 skipped, with the known Vitest worker-teardown EnvironmentTeardownError on an unrelated worktree test file that passes alone (the same flake noted on feat(terminal): offer Show in Finder on terminal file link actions #8).

New tests: folder creation + comment-only AGENTS.md seeding (and skipping when instructions already exist), the floating PTY spawn falling back to the folder, the load migration off ~/blank, the legacy-notes move including the no-overwrite case, and the rendered settings row above.

Not run: the full pnpm test sweep and pnpm build (CI covers both), and no manual app run.

  • I manually tested these changes locally
  • Automated tests added/updated, or explained why not below

I did not run the app by hand; the section above lists exactly what I did run, and the manual steps a reviewer can follow are: open the floating workspace on a fresh profile → a new terminal and a new agent both start in ~/.orca/floating-workspace; drop a line in that folder's AGENTS.md → the launched agent sees it.

AI Disclosure

Authored with an AI coding agent (pi, deepseek-flash) under human direction. Every change was reviewed and verified against the repo's gates and tests.

Review

Start with src/main/floating-workspace-launch-directory.ts (the folder, its creation, and the AGENTS.md seed), then src/main/ipc/floating-workspace-directory.ts (the resolvers, the legacy-notes move, and the load-time value migration). The third piece worth checking is src/main/runtime/orca-runtime-resolve-browser-network-execution-host-for-worktree.ts — one line, but it is the one that changed what a paired or mobile launch does. The renderer change is FloatingWorkspacePane.tsx.

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Notes

  • Security: the folder is app-created under the user's home and is granted through the existing authorizeExternalPath boundary; the picker path still goes through the trusted-directory grant check, and the renderer never supplies a trusted path. The notes move never overwrites an existing destination file and never deletes a source it could not copy.
  • Backwards compatibility: floatingTerminalCwd keeps its meaning for a chosen directory; only the legacy ~/blank default changes, once, at load. A new field would have exceeded global-settings-types.ts's 300-line max-lines budget (it sits exactly at 300 now), and the repo forbids a disable or a baseline entry, so the migration is value-driven rather than flag-driven — which is also why ~ stops being a stored value. settings.floatingTerminalTrustedCwds is untouched, and the load path still migrates legacy grants.
  • Cross-platform: no platform-specific paths — path.join(homedir(), '.orca', 'floating-workspace') on macOS/Linux/Windows, with the reveal button's label picked per platform. Not manually tested on Windows or Linux.
  • SSH / remote: the floating workspace is terminal-only and local to its execution host; a runtime/paired host now resolves the folder on its filesystem rather than inheriting its own cwd. No remote wire change.
  • Mobile: a mobile client's floating agent launch goes through the host, so it picks up the host's folder with no client change.
  • Performance: one readdir of a folder that will not exist after the first successful move, plus a small synchronous mkdir/seed guarded by an in-process memo on the spawn path.

The floating workspace had no directory of its own. New tabs and agents started in
`~`, and on a runtime/paired launch the host resolved the sentinel to its own home
directory — so a machine whose home is a checkout opened floating agents inside
that project. Markdown notes went to a separate folder under the app's user data,
and there was nowhere to put floating-workspace agent instructions.

The floating workspace now owns `~/.orca/floating-workspace`.

- Terminals and agents start there, on the desktop and on a runtime/paired host
  alike. `floatingTerminalCwd` defaults to blank (meaning the folder) and a chosen
  directory still wins; a one-shot migration moves existing `~`/blank profiles onto
  the folder, and an omitted cwd at the PTY boundary resolves there instead of the
  host process's own working directory.
- `AGENTS.md` is seeded there, comment-only so it adds no context until the user
  writes rules, and skipped when `AGENTS.md`/`CLAUDE.md` already exist.
- Markdown notes live there too. Notes in the old app-data folder move in without
  overwriting anything, and that folder is removed only when it is empty.
- Settings → Floating Workspace shows the resolved folder and can reveal it in the
  file manager; the directory row's copy now says what the folder is for.

`~` also stops being a durable setting value. It was only ever the old default —
the picker has always stored absolute paths — so blank now means the folder, the
sanitizer no longer keeps a `~` round-trip, and the settings row shows the folder
main resolved rather than a shorthand.

The notes helper is named for what it does now that one function backs the launch
directory, the note picker, and OS-opened markdown: `ensureFloatingWorkspaceDirectory`
replaces `ensureDefaultFloatingWorkspacePath`.
@nplez1
nplez1 force-pushed the nplez1/Floating-Workspace branch from fa5ff06 to 9bbf9a5 Compare September 22, 2026 05:38
@nplez1
nplez1 merged commit 82d785b into nplez1/main Sep 22, 2026
100 of 108 checks passed
nplez1 added a commit that referenced this pull request Sep 22, 2026
…#16)

The floating workspace had no directory of its own. New tabs and agents started in
`~`, and on a runtime/paired launch the host resolved the sentinel to its own home
directory — so a machine whose home is a checkout opened floating agents inside
that project. Markdown notes went to a separate folder under the app's user data,
and there was nowhere to put floating-workspace agent instructions.

The floating workspace now owns `~/.orca/floating-workspace`.

- Terminals and agents start there, on the desktop and on a runtime/paired host
  alike. `floatingTerminalCwd` defaults to blank (meaning the folder) and a chosen
  directory still wins; a one-shot migration moves existing `~`/blank profiles onto
  the folder, and an omitted cwd at the PTY boundary resolves there instead of the
  host process's own working directory.
- `AGENTS.md` is seeded there, comment-only so it adds no context until the user
  writes rules, and skipped when `AGENTS.md`/`CLAUDE.md` already exist.
- Markdown notes live there too. Notes in the old app-data folder move in without
  overwriting anything, and that folder is removed only when it is empty.
- Settings → Floating Workspace shows the resolved folder and can reveal it in the
  file manager; the directory row's copy now says what the folder is for.

`~` also stops being a durable setting value. It was only ever the old default —
the picker has always stored absolute paths — so blank now means the folder, the
sanitizer no longer keeps a `~` round-trip, and the settings row shows the folder
main resolved rather than a shorthand.

The notes helper is named for what it does now that one function backs the launch
directory, the note picker, and OS-opened markdown: `ensureFloatingWorkspaceDirectory`
replaces `ensureDefaultFloatingWorkspacePath`.
nplez1 added a commit that referenced this pull request Sep 25, 2026
…#16)

The floating workspace had no directory of its own. New tabs and agents started in
`~`, and on a runtime/paired launch the host resolved the sentinel to its own home
directory — so a machine whose home is a checkout opened floating agents inside
that project. Markdown notes went to a separate folder under the app's user data,
and there was nowhere to put floating-workspace agent instructions.

The floating workspace now owns `~/.orca/floating-workspace`.

- Terminals and agents start there, on the desktop and on a runtime/paired host
  alike. `floatingTerminalCwd` defaults to blank (meaning the folder) and a chosen
  directory still wins; a one-shot migration moves existing `~`/blank profiles onto
  the folder, and an omitted cwd at the PTY boundary resolves there instead of the
  host process's own working directory.
- `AGENTS.md` is seeded there, comment-only so it adds no context until the user
  writes rules, and skipped when `AGENTS.md`/`CLAUDE.md` already exist.
- Markdown notes live there too. Notes in the old app-data folder move in without
  overwriting anything, and that folder is removed only when it is empty.
- Settings → Floating Workspace shows the resolved folder and can reveal it in the
  file manager; the directory row's copy now says what the folder is for.

`~` also stops being a durable setting value. It was only ever the old default —
the picker has always stored absolute paths — so blank now means the folder, the
sanitizer no longer keeps a `~` round-trip, and the settings row shows the folder
main resolved rather than a shorthand.

The notes helper is named for what it does now that one function backs the launch
directory, the note picker, and OS-opened markdown: `ensureFloatingWorkspaceDirectory`
replaces `ensureDefaultFloatingWorkspacePath`.
nplez1 added a commit that referenced this pull request Sep 27, 2026
…#16)

The floating workspace had no directory of its own. New tabs and agents started in
`~`, and on a runtime/paired launch the host resolved the sentinel to its own home
directory — so a machine whose home is a checkout opened floating agents inside
that project. Markdown notes went to a separate folder under the app's user data,
and there was nowhere to put floating-workspace agent instructions.

The floating workspace now owns `~/.orca/floating-workspace`.

- Terminals and agents start there, on the desktop and on a runtime/paired host
  alike. `floatingTerminalCwd` defaults to blank (meaning the folder) and a chosen
  directory still wins; a one-shot migration moves existing `~`/blank profiles onto
  the folder, and an omitted cwd at the PTY boundary resolves there instead of the
  host process's own working directory.
- `AGENTS.md` is seeded there, comment-only so it adds no context until the user
  writes rules, and skipped when `AGENTS.md`/`CLAUDE.md` already exist.
- Markdown notes live there too. Notes in the old app-data folder move in without
  overwriting anything, and that folder is removed only when it is empty.
- Settings → Floating Workspace shows the resolved folder and can reveal it in the
  file manager; the directory row's copy now says what the folder is for.

`~` also stops being a durable setting value. It was only ever the old default —
the picker has always stored absolute paths — so blank now means the folder, the
sanitizer no longer keeps a `~` round-trip, and the settings row shows the folder
main resolved rather than a shorthand.

The notes helper is named for what it does now that one function backs the launch
directory, the note picker, and OS-opened markdown: `ensureFloatingWorkspaceDirectory`
replaces `ensureDefaultFloatingWorkspacePath`.
nplez1 added a commit that referenced this pull request Sep 29, 2026
…#16)

The floating workspace had no directory of its own. New tabs and agents started in
`~`, and on a runtime/paired launch the host resolved the sentinel to its own home
directory — so a machine whose home is a checkout opened floating agents inside
that project. Markdown notes went to a separate folder under the app's user data,
and there was nowhere to put floating-workspace agent instructions.

The floating workspace now owns `~/.orca/floating-workspace`.

- Terminals and agents start there, on the desktop and on a runtime/paired host
  alike. `floatingTerminalCwd` defaults to blank (meaning the folder) and a chosen
  directory still wins; a one-shot migration moves existing `~`/blank profiles onto
  the folder, and an omitted cwd at the PTY boundary resolves there instead of the
  host process's own working directory.
- `AGENTS.md` is seeded there, comment-only so it adds no context until the user
  writes rules, and skipped when `AGENTS.md`/`CLAUDE.md` already exist.
- Markdown notes live there too. Notes in the old app-data folder move in without
  overwriting anything, and that folder is removed only when it is empty.
- Settings → Floating Workspace shows the resolved folder and can reveal it in the
  file manager; the directory row's copy now says what the folder is for.

`~` also stops being a durable setting value. It was only ever the old default —
the picker has always stored absolute paths — so blank now means the folder, the
sanitizer no longer keeps a `~` round-trip, and the settings row shows the folder
main resolved rather than a shorthand.

The notes helper is named for what it does now that one function backs the launch
directory, the note picker, and OS-opened markdown: `ensureFloatingWorkspaceDirectory`
replaces `ensureDefaultFloatingWorkspacePath`.
nplez1 added a commit that referenced this pull request Oct 1, 2026
…#16)

The floating workspace had no directory of its own. New tabs and agents started in
`~`, and on a runtime/paired launch the host resolved the sentinel to its own home
directory — so a machine whose home is a checkout opened floating agents inside
that project. Markdown notes went to a separate folder under the app's user data,
and there was nowhere to put floating-workspace agent instructions.

The floating workspace now owns `~/.orca/floating-workspace`.

- Terminals and agents start there, on the desktop and on a runtime/paired host
  alike. `floatingTerminalCwd` defaults to blank (meaning the folder) and a chosen
  directory still wins; a one-shot migration moves existing `~`/blank profiles onto
  the folder, and an omitted cwd at the PTY boundary resolves there instead of the
  host process's own working directory.
- `AGENTS.md` is seeded there, comment-only so it adds no context until the user
  writes rules, and skipped when `AGENTS.md`/`CLAUDE.md` already exist.
- Markdown notes live there too. Notes in the old app-data folder move in without
  overwriting anything, and that folder is removed only when it is empty.
- Settings → Floating Workspace shows the resolved folder and can reveal it in the
  file manager; the directory row's copy now says what the folder is for.

`~` also stops being a durable setting value. It was only ever the old default —
the picker has always stored absolute paths — so blank now means the folder, the
sanitizer no longer keeps a `~` round-trip, and the settings row shows the folder
main resolved rather than a shorthand.

The notes helper is named for what it does now that one function backs the launch
directory, the note picker, and OS-opened markdown: `ensureFloatingWorkspaceDirectory`
replaces `ensureDefaultFloatingWorkspacePath`.
nplez1 added a commit that referenced this pull request Oct 6, 2026
…#16)

The floating workspace had no directory of its own. New tabs and agents started in
`~`, and on a runtime/paired launch the host resolved the sentinel to its own home
directory — so a machine whose home is a checkout opened floating agents inside
that project. Markdown notes went to a separate folder under the app's user data,
and there was nowhere to put floating-workspace agent instructions.

The floating workspace now owns `~/.orca/floating-workspace`.

- Terminals and agents start there, on the desktop and on a runtime/paired host
  alike. `floatingTerminalCwd` defaults to blank (meaning the folder) and a chosen
  directory still wins; a one-shot migration moves existing `~`/blank profiles onto
  the folder, and an omitted cwd at the PTY boundary resolves there instead of the
  host process's own working directory.
- `AGENTS.md` is seeded there, comment-only so it adds no context until the user
  writes rules, and skipped when `AGENTS.md`/`CLAUDE.md` already exist.
- Markdown notes live there too. Notes in the old app-data folder move in without
  overwriting anything, and that folder is removed only when it is empty.
- Settings → Floating Workspace shows the resolved folder and can reveal it in the
  file manager; the directory row's copy now says what the folder is for.

`~` also stops being a durable setting value. It was only ever the old default —
the picker has always stored absolute paths — so blank now means the folder, the
sanitizer no longer keeps a `~` round-trip, and the settings row shows the folder
main resolved rather than a shorthand.

The notes helper is named for what it does now that one function backs the launch
directory, the note picker, and OS-opened markdown: `ensureFloatingWorkspaceDirectory`
replaces `ensureDefaultFloatingWorkspacePath`.
@nplez1
nplez1 deleted the nplez1/Floating-Workspace branch October 24, 2026 03:23
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