Respect Ghostty window-inherit-working-directory for new workspaces

Closed
AU
1mo ago
+89-1

Summary

  • parse Ghostty's window-inherit-working-directory setting in GhosttyConfig
  • make TabManager.addWorkspace() respect this setting when choosing the startup cwd for new workspaces
  • keep explicit addWorkspace(workingDirectory:) overrides unchanged
  • add regression tests for config parsing and workspace cwd inheritance logic

Verification

  • ./scripts/setup.sh
  • ./scripts/reload.sh --tag fix-working-dir-177
  • xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux -configuration Debug -destination 'platform=macOS' build
  • attempted: xcodebuild -project GhosttyTabs.xcodeproj -scheme cmux-unit -configuration Debug -destination 'platform=macOS' -only-testing:cmuxTests/GhosttyConfigTests -only-testing:cmuxTests/TabManagerWorkingDirectoryInheritanceTests test (fails in existing cmuxTests/CmuxWebViewKeyEquivalentTests.swift due unresolved UpdateChannelSettings under cmux-unit)

Issue: https://github.com/manaflow-ai/cmux/issues/177

Fixes #177