Skip to content

feat(workstation): add configurable directory sharing - #1828

Merged
Harry19081 merged 4 commits into
developfrom
dev/workstation-sharing-and-naming
Sep 15, 2026
Merged

Harry19081 merged 4 commits into
developfrom
dev/workstation-sharing-and-naming

Conversation

@FresnelR27

@FresnelR27 FresnelR27 commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

My Station always selected a workspace by chat session, so chats in the same working directory had separate station tabs.

Solution

  • Add Settings → General → Workstation sharing in its own container. Working directory is the default; Chat tab keeps a workspace per session ID.
  • Resolve one workspace identity for tabs, saved tab data, ordering, selection, recents, editor caches, terminal selection, delayed opens, and target-session file context. Unknown/non-local paths and guest imports remain session-scoped; when no chat is selected, the Global workspace is used.
  • Persist directory workspaces alongside existing session workspaces. Switching policies preserves each policy’s separate configuration; deleting a chat preserves its shared directory workspace and clears deleted agent terminal references.
  • Use Workstation sharing only for the new sharing settings row and its localized copy. Preserve existing My Station labels elsewhere, comments, historical notes, action/search aliases, and test captions.

The final change covers 27 files focused on the sharing resolver, tab persistence, terminal selection, settings integration, localization, and supporting tests/audits.

Potential risks

  • Each sharing policy has a separate saved configuration; a newly selected workspace starts empty. Existing per-session layouts remain accessible through Chat tab. The additive v4 directory partition/manifest field is necessary for directory persistence; existing v4 data remains readable. Select Chat tab to roll back behavior without deleting saved layouts. No database, IPC, dependency, or lockfile changes.
  • This does not yet make every formatting detail follow the policy. Panel sizes/collapse remain generally shared, and some temporary view state is keyed by tab ID alone. The resolver uses the session’s saved repoPath, not a separate worktreePath; it normalizes separators/trailing slashes but does not resolve symlinks or case aliases.
  • Live Browser/Terminal resources keep their existing global ownership. Explicitly closing one removes its references across workspaces. Persistent workspace storage grows with configured workspaces; large collections and live cross-window lifecycle have not been measured.
  • No live Tauri screenshots, visual theme/viewport checks, rendered E2E, or idle/hidden/restart/detached-window CPU/RSS checks were run because computer control is not authorized.

Verification

Scope follow-up

  • Removed the broad naming sweep at the author's request; all 184 files from that sweep match the pre-feature base exactly
  • Re-ran the exact targeted test command below: 54 files / 417 tests passed
  • pnpm run typecheck:fast — passed
  • git diff --check — passed
  • Commit hooks ran: lint-staged and tsgo passed; scoped Clippy reported issues outside staged Rust files and allowed the commit, so this is not a clean Clippy result
  • Kept the previous CI promise-handling fix; no sharing behavior changed in this follow-up

CI follow-up

The initial type-aware lint run identified one new no-floating-promises finding in the Workstation sharing settings adapter. The adapter now handles rejected saves with the shared logger, preserving its synchronous control interface. No lint baseline or suppression was changed.

  • pnpm exec vitest run --config config/vitest.config.ts src/store/workstation/tabs src/store/settings/settingsWatcherEcho.test.ts — 143 tests across 13 files passed
  • pnpm test:typed-lint — all 6 lint-harness tests passed
  • NODE_OPTIONS=--max-old-space-size=6144 pnpm check:typed-lint — passed: 1,102 existing findings, 0 new or increased findings
  • pnpm run typecheck:fast — passed
  • pnpm exec prettier --check src/store/workstation/tabs/workspaceScope.ts and pnpm exec eslint --max-warnings 0 src/store/workstation/tabs/workspaceScope.ts — passed
  • Commit hooks explicitly enabled with git -c core.hooksPath=.husky commit; lint-staged (Oxlint, ESLint, Prettier) and tsgo passed
  • git diff --check origin/develop...HEAD — passed

Original feature verification

On the isolated branch based on develop:

  • Targeted tests: 54 files / 417 tests passed (exact command below)
  • pnpm run typecheck:fast — passed. Earlier shared-checkout errors were not present on the isolated branch
  • pnpm exec eslint $(git diff --name-only --diff-filter=ACM origin/develop -- '*.ts' '*.tsx') --max-warnings 0 — passed after staging the complete change
  • git diff --cached --check — passed
  • Reviewed the full scope and added lines for unrelated changes, secrets, personal paths, artifacts, and lockfile churn
  • Localization keys are preserved; new sharing-row strings exist in all 13 locales. Existing labels elsewhere are restored
  • No Rust files remain in the final PR diff
  • Architecture layers 1–10 reviewed; runtime performance verdict remains blocked by the unexecuted live lifecycle checks
Exact targeted test command
pnpm test \
  src/config/mainAppPaths.test.ts \
  src/config/routes.test.ts \
  src/config/settingsSchema/__tests__/chatPanelPosition.test.ts \
  src/engines/ChatPanel/ChatPanelTabContextMenu.test.ts \
  src/engines/ChatPanel/blocks/ToolCallBlock/cards/OrgtrackEnvelopeCard.test.ts \
  src/engines/ChatPanel/components/SessionHeaderActionsMenu.test.ts \
  src/hooks/navigation/useAppNavigation.test.ts \
  src/hooks/navigation/useRoutineResultNavigation.test.ts \
  src/modules/MainApp/WorkManagement/GitHubWorkItemControls.test.ts \
  src/modules/ProjectManager/Projects/components/ProjectsPageHeader/ProjectsPageHeader.test.ts \
  src/modules/ProjectManager/WorkItems/components/WorkItemsPageHeader/__tests__/WorkItemsHeaderContent.test.ts \
  src/modules/WorkStation/AppShell/AgentStationTopHeader.test.ts \
  src/modules/WorkStation/AppShell/AppShell.caption.test.ts \
  src/modules/WorkStation/AppShell/PinnedWorkbenchChrome.test.ts \
  src/modules/WorkStation/AppShell/WorkstationTabHeader.test.ts \
  src/modules/WorkStation/AppShell/hooks/useAppShellSimulatorPanelSync.test.ts \
  src/modules/WorkStation/AppShell/statusBarVisibility.test.ts \
  src/modules/WorkStation/AppShell/useWorkstationTrailingSlot.visibility.test.ts \
  src/modules/WorkStation/shared/SessionReplay/useSimulatorReplaySidebar.test.ts \
  src/modules/WorkStation/shared/StationModePill/index.test.ts \
  src/modules/WorkStation/shared/TabBar/components/SortableTab/__tests__/index.test.ts \
  src/modules/shared/layouts/FocusedChatWorkstationRail/FocusedChatWorkstationRail.test.ts \
  src/scaffold/NavigationSidebar/connectors/WorkstationSidebarConnector/cloudSessionNativeMenuItems.test.ts \
  src/store/chatPanel/__tests__/chatPanelTabPlacementAtom.test.ts \
  src/store/session/__tests__/viewAtom.test.ts \
  src/store/workstation/stationWindowAtoms.test.ts \
  src/store/workstation/tabRegistry/atoms.test.ts \
  src/store/workstation/tabs/__tests__/workspaceScope.test.ts \
  src/config/settingsSearch.test.ts \
  src/modules/shared/layouts/blocks/SettingsSearchDropdown/settingsSearchIndex.test.ts \
  src/features/Onboarding/OnboardingModal.test.ts \
  src/store/workstation/tabs \
  src/store/workstation/codeEditor/terminal/__tests__/terminalTargetAtom.test.ts \
  src/services/context/collectors/AdeContextCollector.test.ts \
  src/hooks/tabHost/useWorkStationTabs \
  src/config/settingsSchema

Conflict-resolution follow-up

  • Merged latest develop (13f5caa4274ab016e12be155e6b0c6ca3a638c3c) into the PR head and resolved the sole conflict in GeneralSection.tsx by preserving both the Workstation sharing atom and the license-modal state
  • pnpm test src/store/workstation/tabs src/config/settingsSchema src/config/settingsSearch.test.ts src/modules/shared/layouts/blocks/SettingsSearchDropdown/settingsSearchIndex.test.ts — 23 files / 184 tests passed
  • pnpm run typecheck:fast — passed after refreshing the isolated worktree from the committed lockfile with pnpm install --frozen-lockfile
  • pnpm exec prettier --check src/modules/MainApp/Settings/sections/GeneralSection.tsx — passed
  • pnpm exec eslint --max-warnings 0 src/modules/MainApp/Settings/sections/GeneralSection.tsx — passed
  • git diff --check and git diff --cached --check — passed before the merge commit
  • Merge-commit hooks: lint-staged and staged-file TypeScript checks passed; scoped Clippy reported issues only in inherited Rust files and did not gate the merge commit
  • GitHub checks passed: PR contract, AI attribution, queue authority, dependency boundaries, typed lint, frontend typecheck/lint/tests, secret scan, and JavaScript/TypeScript CodeQL. The first CodeQL attempt failed during SARIF upload with no annotations; the failed job was rerun and passed

Handle rejection from the settings write using the shared logger, matching other synchronous settings controls and satisfying the type-aware no-floating-promises gate.

Verified 143 workstation/settings tests, six typed-lint harness tests, whole-project tsgo, and targeted formatting and ESLint checks.
Restore existing My Station comments, historical notes, UI labels, search aliases, and test captions. Keep Workstation naming in the new sharing settings row and preserve the directory-sharing implementation and promise-handling fix.

Verification: 417 targeted tests across 54 files passed and whole-project tsgo passed. Bulk naming files match the pre-feature base exactly.
@FresnelR27 FresnelR27 changed the title feat(workstation): add directory sharing and clarify naming feat(workstation): add configurable directory sharing Sep 15, 2026
@FresnelR27
FresnelR27 marked this pull request as ready for review September 15, 2026 08:57
@Harry19081
Harry19081 merged commit 7d6a293 into develop Sep 15, 2026
16 of 17 checks passed
@Harry19081 Harry19081 added enhancement New feature or request workstation Workstation, editor, source control, LSP, or status bar labels Sep 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request workstation Workstation, editor, source control, LSP, or status bar

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants