Skip to content

Conversation

@Dimillian
Copy link
Owner

Motivation

  • Provide a per-workspace “run” capability that lets users launch a workspace-specific script from the header without touching the user workspace files.

Description

  • Persist a launchScript field on each workspace and mirror it in the Tauri backend types and storage so scripts are saved with workspace metadata (src/types.ts, src-tauri/src/types.rs, src-tauri/src/workspaces.rs).
  • Add a small header UI with a play and edit button and inline editor popover (LaunchScriptButton) wired into the main header so the control sits next to the existing Open/In button (src/features/app/components/LaunchScriptButton.tsx, src/features/app/components/MainHeader.tsx, src/styles/main.css).
  • Implement useWorkspaceLaunchScript hook to manage the editor, saving to workspace settings, and orchestrating runs via the app terminal API; it schedules runs and writes the script to a dedicated terminal tab when the session is ready (src/features/app/hooks/useWorkspaceLaunchScript.ts).
  • Run scripts in a dedicated, named terminal tab for the workspace and always restart/kill the prior launch session before starting a new run by extending terminal tab helpers and controller (useTerminalTabs, useTerminalController) and by adding a title-aware ensureTerminalWithTitle + restartTerminalSession flow (src/features/terminal/hooks/*).
  • Small modifications to layout/visibility wiring to allow opening the terminal programmatically and to reset terminal session state on cleanup (src/features/layout/hooks/*, src/App.tsx, src/features/terminal/hooks/useTerminalSession.ts).
  • Add unit tests covering the new terminal-tab helper and the launch-script hook behavior, and include minimal styles and editor UX for the popover (src/features/terminal/hooks/useTerminalTabs.test.tsx, src/features/app/hooks/useWorkspaceLaunchScript.test.tsx).

Testing

  • Ran npm run lint with no linter errors.
  • Ran npm run test and all automated tests passed, including the new tests (useWorkspaceLaunchScript and useTerminalTabs) — full test suite reported success (all tests passed).
  • Ran npm run typecheck and TypeScript checks completed successfully.

Codex Task

@Dimillian
Copy link
Owner Author

@codex review

@Dimillian Dimillian changed the title Add per-workspace launch script with dedicated terminal tab feat: add per-workspace launch script with dedicated terminal tab Jan 25, 2026
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce43e6eaa1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Dimillian Dimillian merged commit a07f15c into main Jan 26, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants