Skip to content

Add preset-backed workspace run#4335

Merged
Kitenite merged 4 commits into
mainfrom
run-script-presets-design
May 10, 2026
Merged

Add preset-backed workspace run#4335
Kitenite merged 4 commits into
mainfrom
run-script-presets-design

Conversation

@Kitenite
Copy link
Copy Markdown
Collaborator

@Kitenite Kitenite commented May 10, 2026

Summary

  • add a shared workspace-run definition resolver that bridges project config run scripts and terminal presets marked as workspace run
  • wire v1 and v2 Run buttons to the resolver, with v2 storing run state per terminal id and starting each run in a fresh tab/pane
  • add host-service config/run support, terminal write-input for Ctrl-C, preset settings UI, and the v2 Project Settings Run script editor

Validation

  • bun run lint:fix
  • bun run lint
  • bun run typecheck in apps/desktop
  • bun run typecheck in packages/host-service
  • bun test apps/desktop/src/shared/workspace-run-definition.test.ts apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.test.ts apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/withReadHeal.test.ts packages/host-service/src/trpc/router/config/config.test.ts

Summary by cubic

Adds a shared resolver for the workspace Run button that selects a run command from project config or a preset marked “Use as workspace run,” with validated cwd support. Updates v1 and v2 to start runs in a fresh terminal, handle Ctrl‑C and Force Stop, deep‑link to the right editor (preset or project), and place the v2 Run button at the end of the presets bar with a muted style.

  • New Features

    • Resolver precedence: project‑targeted preset › project config run › global preset; ignores empty commands; carries cwd. Implemented in shared/workspace-run-definition with tests.
    • v2: New Workspace Run button with hotkey, fresh tab per run, per‑terminal run state in local workspace data, and Force Stop. Presets bar gets a trailing Run button or a slim bar when hidden. Terminal dropdown shows a run indicator and status.
    • v1: Run button now uses the resolver and shows “Edit Run Preset” when sourced from a preset.
    • Settings UI: Added “Use as workspace run” toggle and “Run” badge for presets. Project Scripts adds a Run tab. Settings search includes “run.”
    • Host service: config.updateConfig accepts optional setup/teardown/run and preserves omitted keys; new config.getWorkspaceRunDefinition. terminal.writeInput sends Ctrl‑C. Terminal session creation accepts cwd (absolute or worktree‑relative), and exit events include precise timestamps.
    • API: New workspaces.getWorkspaceRunDefinition; getResolvedRunCommands now uses it. Query invalidations added for preset and script changes. Local workspace state stores workspaceRunTerminals keyed by terminalId.
  • Migration

    • To enable Run: mark a matching terminal preset with “Use as workspace run,” or add a run script (and optional absolute or worktree‑relative cwd) in .superset/config.json. No breaking changes.

Written for commit d8bd4bd. Summary will update on new commits.

Summary by CodeRabbit

  • New Features

    • Workspace Run button added to v2 dashboard (Run/Stop/Force Stop, hotkey, fresh terminal per start).
    • Terminal presets can be marked "Use as workspace run" and toggled in the preset editor; presets list shows a "Run" badge.
    • Project settings include a "Run" script tab; run commands are considered when resolving the workspace Run.
    • Presets bar can host an optional trailing element for the run control.
  • Documentation

    • Script descriptions updated to include run scripts.

Review Change Stack

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 10, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9e415122-ee3d-4f3e-8ea5-dba4d4cb80f1

📥 Commits

Reviewing files that changed from the base of the PR and between ec88eab and d8bd4bd.

📒 Files selected for processing (5)
  • apps/desktop/src/lib/trpc/routers/workspaces/utils/setup.test.ts
  • apps/desktop/src/lib/trpc/routers/workspaces/utils/setup.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts
  • packages/host-service/src/runtime/setup/config.test.ts
  • packages/host-service/src/runtime/setup/config.ts

📝 Walkthrough

Walkthrough

Workspace run definitions now resolve from terminal presets (flagged by useAsWorkspaceRun) and project config run with clear precedence. The v2 workspace adds a useV2WorkspaceRun hook managing start/stop/force-stop via persisted local state and TRPC terminal I/O; UI includes a V2 run button, preset editor toggle, and project "Run" scripts tab. Host-service accepts cwd overrides and safe PTY input.

Changes

Workspace Run Definition System

Layer / File(s) Summary
Core Types & Schemas
apps/desktop/src/shared/workspace-run-definition.ts, apps/desktop/src/renderer/.../schema.ts, packages/local-db/src/schema/zod.ts, packages/host-service/src/runtime/setup/config.ts
Discriminated union WorkspaceRunDefinition; WorkspaceRunPresetLike; workspaceRunTerminals persisted schema and types; terminalPresetSchema adds useAsWorkspaceRun; SetupConfig adds optional cwd.
Selection Logic
apps/desktop/src/shared/workspace-run-definition.ts
configRunToWorkspaceRun(), presetToWorkspaceRun(), selectWorkspaceRunDefinition() implement precedence and normalize commands/cwd.
TRPC & Settings
apps/desktop/src/lib/trpc/routers/settings/index.ts, apps/desktop/src/lib/trpc/routers/workspaces/procedures/query.ts
Settings router create/update accept useAsWorkspaceRun; workspaces router adds getWorkspaceRunDefinition(workspaceId); getResolvedRunCommands derives from selected definition.
Host Service Config & API
packages/host-service/src/trpc/router/config/config.ts, packages/host-service/src/runtime/setup/config.ts
SetupConfig supports optional cwd; updateConfig accepts partial updates and preserves unspecified keys; getWorkspaceRunDefinition returns filtered run commands and optional cwd.

Host Terminal Runtime

Layer / File(s) Summary
Terminal Runtime & I/O
packages/host-service/src/terminal/terminal.ts, packages/host-service/src/trpc/router/terminal/terminal.ts
Added writeInputToSession helper and terminal.writeInput TRPC mutation for safe PTY writes; create-session supports optional cwd and resolves it; PTY onExit uses a single computed timestamp for DB update and lifecycle broadcast.

V2 Dashboard Runtime

Layer / File(s) Summary
Workspace Run Hook
apps/desktop/src/renderer/.../useV2WorkspaceRun/useV2WorkspaceRun.ts
useV2WorkspaceRun derives definition from presets/config, exposes start/stop/force-stop/toggle, persists workspaceRunTerminals, sends Ctrl‑C via TRPC, handles terminal-gone errors, and registers exit listeners.
Run Button Component
apps/desktop/src/renderer/.../V2WorkspaceRunButton/V2WorkspaceRunButton.tsx
Split Run/Stop/Configure button with dropdown; labels and configure navigation vary by definition.source; shows hotkey when assigned.
Dashboard Integration
apps/desktop/src/renderer/.../v2-workspace/$workspaceId/page.tsx, .../V2PresetsBar/V2PresetsBar.tsx
Page passes resolvePresetCommands into useV2WorkspaceRun, registers RUN_WORKSPACE_COMMAND hotkey, and renders run button as trailing in PresetsBar or in a fallback toolbar.
Launcher
apps/desktop/src/renderer/.../useV2TerminalLauncher/useV2TerminalLauncher.ts
Terminal launcher create accepts optional cwd and forwards it to session creation.
Terminal State Tracking
apps/desktop/src/renderer/.../usePaneRegistry/usePaneRegistry.tsx, .../TerminalSessionDropdown/TerminalSessionDropdown.tsx
Live queries read workspaceRunTerminals; dropdown shows workspace-run indicator and session status "Run" for mapped terminals; pane cleanup clears workspace-run entries.

Preset & Config UI

Layer / File(s) Summary
Preset Editor & Sections
apps/desktop/src/renderer/.../PresetEditorDialog.tsx, .../PresetsSection/PresetsSection.tsx, .../V2PresetsSection/V2PresetsSection.tsx, .../PresetRow/PresetRow.tsx
Editor dialog adds "Use as workspace run" toggle with onToggleWorkspaceRun/isWorkspaceRun props; sections persist useAsWorkspaceRun; inserted/updated presets store flag; preset rows render a "Run" badge when enabled.
Scripts Editor
apps/desktop/src/renderer/.../V2ScriptsEditor/V2ScriptsEditor.tsx
Config parser reads run array, editor tracks runValue, adds a "Run" tab and ScriptField support, and includes run in save/flush logic.
Settings Search & Copy
apps/desktop/src/renderer/.../settings-search.ts, apps/desktop/src/renderer/.../V2ProjectSettings/V2ProjectSettings.tsx
Project scripts metadata & copy updated to mention Run; keywords include "run".

V1 & Cache Wiring

Layer / File(s) Summary
V1 Run Command
apps/desktop/src/renderer/.../workspace/$workspaceId/hooks/useWorkspaceRunCommand.ts
START now queries workspaces.getWorkspaceRunDefinition, computes initial cwd, always creates a fresh run pane and persists running workspace-run metadata, and selects active run pane preferring workspaceRun.state === "running".
Cache Invalidation
apps/desktop/src/renderer/lib/project-scripts.ts, apps/desktop/src/renderer/react-query/presets/index.ts
Preset mutation hooks and project script invalidations include invalidation of getWorkspaceRunDefinition and getResolvedRunCommands caches.

Tests & Documentation

Layer / File(s) Summary
Tests
apps/desktop/src/shared/workspace-run-definition.test.ts, packages/host-service/src/trpc/router/config/config.test.ts, apps/desktop/src/renderer/.../schema.test.ts, packages/host-service/src/runtime/setup/config.test.ts
Added/updated tests covering selection precedence, config partial-update behavior, getWorkspaceRunDefinition behavior (commands filtering and cwd preservation), and schema healing for workspaceRunTerminals defaults.
Design Doc
plans/done/20260509-run-script-presets-design.md
Design doc documents precedence, lifecycle semantics (fresh terminal per start, Ctrl‑C stop, force‑stop kills), local-state model, and deferred items.

🎯 4 (Complex) | ⏱️ ~45 minutes

"🐰 A tiny rabbit hops to start and stop,
With presets flagged, it runs without a flop.
Start a fresh terminal, Ctrl‑C to end the show,
Force‑stop when needed, and the local state will know.
Hooray—run buttons make my rabbit heart glow!"

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 6.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add preset-backed workspace run' is concise, clear, and directly summarizes the primary feature addition—enabling workspace run commands via presets or project config.
Description check ✅ Passed The PR description includes a Summary section covering key features, a Validation section listing test commands, and detailed autogenerated summaries. However, the description lacks explicit Related Issues, Type of Change, Testing details, and Screenshots sections from the template.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch run-script-presets-design

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps
Copy link
Copy Markdown

greptile-apps Bot commented May 10, 2026

Greptile Summary

This PR wires up a unified workspace run system across v1 and v2 workspaces, backed by either a project config run script or a terminal preset marked with useAsWorkspaceRun. A shared selectWorkspaceRunDefinition resolver handles priority (project-targeted preset → config → global preset), and new host-service endpoints expose config-backed run definitions and terminal writeInput for Ctrl-C.

  • New useV2WorkspaceRun hook manages per-terminal run state in workspace local state, starts each run in a fresh tab/pane, stops via Ctrl-C, and exposes Force Stop via session kill.
  • useAsWorkspaceRun flag added to preset schemas, settings UI (v1 + v2), and the local-db Zod schema, with cache invalidation wired into all preset mutations.
  • v1 useWorkspaceRunCommand updated to consume getWorkspaceRunDefinition instead of getResolvedRunCommands, and always starts runs in a fresh tab.

Confidence Score: 3/5

The v2 run hook has two issues that could manifest in real use: broad error string matching could silently swallow non-terminal errors and mark a running process as stopped, and the working directory from presets/config is never forwarded to the terminal launcher, diverging from v1 behavior.

The core resolver logic and schema changes are solid, but useV2WorkspaceRun — the most critical new file — has a fragile error-detection pattern that could misclassify unrelated errors as terminal-gone and a missing cwd pass-through that silently diverges from v1. Both affect the run/stop hot path.

useV2WorkspaceRun.ts deserves the most scrutiny — the error matching logic and the cwd omission are in the hot path for every stop and start operation.

Important Files Changed

Filename Overview
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts New v2 workspace run hook — contains overly broad error matching in isTerminalGoneError, silently drops definition.cwd when launching, and loses Force Stop capability after optimistic Ctrl-C stop.
apps/desktop/src/shared/workspace-run-definition.ts New shared resolver for workspace run definitions — clean three-level priority (project-targeted preset → config → global preset) with well-typed discriminated union return.
packages/host-service/src/terminal/terminal.ts Adds writeInputToSession for Ctrl-C support and fixes a timestamp inconsistency in the terminal exit handler — both changes are correct.
packages/host-service/src/trpc/router/config/config.ts Makes setup/teardown optional in updateConfig and adds run support; adds getWorkspaceRunDefinition query — backwards compatible and well-tested.
apps/desktop/src/lib/trpc/routers/workspaces/procedures/query.ts Refactors getResolvedRunCommands to use shared resolver and adds getWorkspaceRunDefinition endpoint — logic is correct, though getResolvedRunCommands now silently expands to include preset commands.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/V2WorkspaceRunButton/V2WorkspaceRunButton.tsx New v2 run button component — mirrors v1 structure with correct disabled/pending states and configure routing based on definition source.
apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts Adds workspaceRunTerminals map to workspace local state schema with full lifecycle state enum — well-structured with proper Zod defaults and heal logic.
apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/useWorkspaceRunCommand.ts Updates v1 hook to use new getWorkspaceRunDefinition endpoint and correctly passes runDefinition?.cwd as initialCwd — parity gap with v2 noted.
packages/host-service/src/trpc/router/terminal/terminal.ts Adds writeInput mutation that delegates to writeInputToSession and converts errors to TRPC NOT_FOUND — straightforward and safe.
packages/local-db/src/schema/zod.ts Adds optional useAsWorkspaceRun field to the terminal preset schema — non-breaking additive change.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Run Button Clicked] --> B{v1 or v2?}
    B -->|v1| C[electronTrpc.workspaces\n.getWorkspaceRunDefinition]
    B -->|v2| D[workspaceTrpc.config\n.getWorkspaceRunDefinition\n+ client presets]
    C --> E[selectWorkspaceRunDefinition\nserver-side]
    D --> F[selectWorkspaceRunDefinition\nclient-side]
    E --> G{Priority Resolution}
    F --> G
    G -->|1 - project-targeted preset| H[Terminal Preset\nWorkspaceRunDefinition]
    G -->|2 - config run| I[Project Config\nWorkspaceRunDefinition]
    G -->|3 - global preset| J[Global Preset\nWorkspaceRunDefinition]
    G -->|4 - none| K[Toast: No run command]
    H --> L[Build command]
    I --> L
    J --> L
    L -->|v1| M[addTab + launchWorkspaceRunInPane\npane metadata tracking]
    L -->|v2| N[launcher.create\nnew tab + pane\nworkspaceRunTerminals state]
    N --> O{Stop requested?}
    O -->|Ctrl-C| P[writeInput TRPC\nmark stopped-by-user]
    O -->|Force Stop| Q[killSession TRPC\nmark stopped-by-user]
    R[terminal:lifecycle exit event] --> S[updateWorkspaceRunTerminals\nmark stopped-by-exit]
Loading

Comments Outside Diff (4)

  1. apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts, line 668-676 (link)

    P1 isTerminalGoneError overly broad "not found" match

    message.includes("not found") will match any TRPC 404 or networking error whose message contains that substring, not just terminal-specific errors. For example, a transient "Resource not found" proxy error or a future endpoint renaming could satisfy this check, silently eating the exception and marking the run as stopped-by-user even though the terminal process is still alive.

    The actual errors returned by writeInputToSession are: "Terminal session not found", "Terminal session does not belong to this workspace", and "Terminal session has exited". The second one does NOT contain "not found", so it would fall through and show a toast instead. The pattern is both over-broad (catches unrelated errors) and under-specific (misses the workspace-ownership error). The "not alive" branch also has no matching error string in the current writeInputToSession implementation.

    Consider checking the TRPC error code instead of the message, or matching only the exact strings produced by writeInputToSession.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts
    Line: 668-676
    
    Comment:
    **`isTerminalGoneError` overly broad "not found" match**
    
    `message.includes("not found")` will match any TRPC 404 or networking error whose message contains that substring, not just terminal-specific errors. For example, a transient "Resource not found" proxy error or a future endpoint renaming could satisfy this check, silently eating the exception and marking the run as `stopped-by-user` even though the terminal process is still alive.
    
    The actual errors returned by `writeInputToSession` are: `"Terminal session not found"`, `"Terminal session does not belong to this workspace"`, and `"Terminal session has exited"`. The second one does NOT contain "not found", so it would fall through and show a toast instead. The pattern is both over-broad (catches unrelated errors) and under-specific (misses the workspace-ownership error). The `"not alive"` branch also has no matching error string in the current `writeInputToSession` implementation.
    
    Consider checking the TRPC error code instead of the message, or matching only the exact strings produced by `writeInputToSession`.
    
    How can I resolve this? If you propose a fix, please make it concise.
  2. apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts, line 793-833 (link)

    P1 definition.cwd silently dropped on v2 start

    startWorkspaceRun calls launcher.create({ command }) but never passes definition?.cwd. Both WorkspaceRunDefinition sources — project-config (via configRunToWorkspaceRun) and terminal-preset (via presetToWorkspaceRun) — carry an optional cwd field that will be ignored here.

    The v1 counterpart in useWorkspaceRunCommand.ts explicitly uses runDefinition?.cwd as initialCwd before creating the tab. Any preset or config that sets a cwd will behave correctly in v1 but silently start in the default directory in v2, creating a hard-to-debug discrepancy.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts
    Line: 793-833
    
    Comment:
    **`definition.cwd` silently dropped on v2 start**
    
    `startWorkspaceRun` calls `launcher.create({ command })` but never passes `definition?.cwd`. Both `WorkspaceRunDefinition` sources — `project-config` (via `configRunToWorkspaceRun`) and `terminal-preset` (via `presetToWorkspaceRun`) — carry an optional `cwd` field that will be ignored here.
    
    The v1 counterpart in `useWorkspaceRunCommand.ts` explicitly uses `runDefinition?.cwd` as `initialCwd` before creating the tab. Any preset or config that sets a `cwd` will behave correctly in v1 but silently start in the default directory in v2, creating a hard-to-debug discrepancy.
    
    How can I resolve this? If you propose a fix, please make it concise.
  3. apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts, line 835-879 (link)

    P2 Force Stop disappears after optimistic Ctrl-C

    stopWorkspaceRun immediately marks the terminal state as stopped-by-user after writing the Ctrl-C byte, before the process actually exits. Because canForceStop = Boolean(runningState) and runningState only includes entries with state === "running", the "Force Stop" menu item vanishes the moment the Ctrl-C is written.

    If the process ignores SIGINT (e.g., a process that traps or blocks Ctrl-C), the terminal is still running but the UI shows it as stopped and the "Force Stop" option is gone. The user would have to navigate to the terminal pane manually to kill it. Consider keeping a brief intermediate "stopping" state (or leaving canForceStop available for a terminal that is still alive) until an exit event confirms the process actually exited.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts
    Line: 835-879
    
    Comment:
    **Force Stop disappears after optimistic Ctrl-C**
    
    `stopWorkspaceRun` immediately marks the terminal state as `stopped-by-user` after writing the Ctrl-C byte, before the process actually exits. Because `canForceStop = Boolean(runningState)` and `runningState` only includes entries with `state === "running"`, the "Force Stop" menu item vanishes the moment the Ctrl-C is written.
    
    If the process ignores SIGINT (e.g., a process that traps or blocks Ctrl-C), the terminal is still running but the UI shows it as stopped and the "Force Stop" option is gone. The user would have to navigate to the terminal pane manually to kill it. Consider keeping a brief intermediate `"stopping"` state (or leaving `canForceStop` available for a terminal that is still alive) until an `exit` event confirms the process actually exited.
    
    How can I resolve this? If you propose a fix, please make it concise.
  4. apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts, line 752-772 (link)

    P2 configRunDefinition.cwd also dropped when building client-side definition

    selectWorkspaceRunDefinition is called with configRunCommands: configRunDefinition?.commands but the cwd carried by the config definition is not forwarded as configCwd. Even if the host-service starts returning cwd for config-backed runs, the v2 flow would drop it. Since v1 (useWorkspaceRunCommand.ts) uses runDefinition?.cwd, this is a persistent parity gap.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts
    Line: 752-772
    
    Comment:
    **`configRunDefinition.cwd` also dropped when building client-side definition**
    
    `selectWorkspaceRunDefinition` is called with `configRunCommands: configRunDefinition?.commands` but the `cwd` carried by the config definition is not forwarded as `configCwd`. Even if the host-service starts returning `cwd` for config-backed runs, the v2 flow would drop it. Since v1 (`useWorkspaceRunCommand.ts`) uses `runDefinition?.cwd`, this is a persistent parity gap.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 4 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 4
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts:668-676
**`isTerminalGoneError` overly broad "not found" match**

`message.includes("not found")` will match any TRPC 404 or networking error whose message contains that substring, not just terminal-specific errors. For example, a transient "Resource not found" proxy error or a future endpoint renaming could satisfy this check, silently eating the exception and marking the run as `stopped-by-user` even though the terminal process is still alive.

The actual errors returned by `writeInputToSession` are: `"Terminal session not found"`, `"Terminal session does not belong to this workspace"`, and `"Terminal session has exited"`. The second one does NOT contain "not found", so it would fall through and show a toast instead. The pattern is both over-broad (catches unrelated errors) and under-specific (misses the workspace-ownership error). The `"not alive"` branch also has no matching error string in the current `writeInputToSession` implementation.

Consider checking the TRPC error code instead of the message, or matching only the exact strings produced by `writeInputToSession`.

### Issue 2 of 4
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts:793-833
**`definition.cwd` silently dropped on v2 start**

`startWorkspaceRun` calls `launcher.create({ command })` but never passes `definition?.cwd`. Both `WorkspaceRunDefinition` sources — `project-config` (via `configRunToWorkspaceRun`) and `terminal-preset` (via `presetToWorkspaceRun`) — carry an optional `cwd` field that will be ignored here.

The v1 counterpart in `useWorkspaceRunCommand.ts` explicitly uses `runDefinition?.cwd` as `initialCwd` before creating the tab. Any preset or config that sets a `cwd` will behave correctly in v1 but silently start in the default directory in v2, creating a hard-to-debug discrepancy.

### Issue 3 of 4
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts:835-879
**Force Stop disappears after optimistic Ctrl-C**

`stopWorkspaceRun` immediately marks the terminal state as `stopped-by-user` after writing the Ctrl-C byte, before the process actually exits. Because `canForceStop = Boolean(runningState)` and `runningState` only includes entries with `state === "running"`, the "Force Stop" menu item vanishes the moment the Ctrl-C is written.

If the process ignores SIGINT (e.g., a process that traps or blocks Ctrl-C), the terminal is still running but the UI shows it as stopped and the "Force Stop" option is gone. The user would have to navigate to the terminal pane manually to kill it. Consider keeping a brief intermediate `"stopping"` state (or leaving `canForceStop` available for a terminal that is still alive) until an `exit` event confirms the process actually exited.

### Issue 4 of 4
apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts:752-772
**`configRunDefinition.cwd` also dropped when building client-side definition**

`selectWorkspaceRunDefinition` is called with `configRunCommands: configRunDefinition?.commands` but the `cwd` carried by the config definition is not forwarded as `configCwd`. Even if the host-service starts returning `cwd` for config-backed runs, the v2 flow would drop it. Since v1 (`useWorkspaceRunCommand.ts`) uses `runDefinition?.cwd`, this is a persistent parity gap.

Reviews (1): Last reviewed commit: "Add preset-backed workspace run" | Re-trigger Greptile

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 4

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/desktop/src/lib/trpc/routers/settings/index.ts (1)

410-420: ⚠️ Potential issue | 🟠 Major | 🏗️ Heavy lift

Keep useAsWorkspaceRun unique per resolution scope.

Both create and update can leave multiple presets marked as workspace-run candidates. The resolver then picks the first matching preset by stored order, so turning a later preset on can be a no-op from the user's perspective. Please clear conflicting flags here, or reject the write when another preset in the same project/global scope is already enabled.

Also applies to: 441-468

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/desktop/src/lib/trpc/routers/settings/index.ts` around lines 410 - 420,
When a preset is created or updated with useAsWorkspaceRun=true, ensure
uniqueness per resolution scope by finding other TerminalPreset entries that
share the same scope (use normalizePresetProjectIds(input.projectIds) to
determine project/global scope) and either (a) clear their useAsWorkspaceRun
flags before saving this preset or (b) reject the write with a clear error;
implement this logic inside the create mutation (the mutation building
TerminalPreset with crypto.randomUUID) and the corresponding update mutation
(the one around lines 441-468) so that only one preset per scope can have
useAsWorkspaceRun=true.
🧹 Nitpick comments (1)
packages/host-service/src/trpc/router/config/config.ts (1)

137-139: ⚡ Quick win

Normalize run commands before returning them.

Line 137-139 currently filters by trim() but returns untrimmed strings. Trimming here prevents whitespace-only drift from leaking into UI/execution paths.

Suggested patch
-			const commands = (config?.run ?? []).filter(
-				(command) => command.trim().length > 0,
-			);
+			const commands = (config?.run ?? [])
+				.map((command) => command.trim())
+				.filter((command) => command.length > 0);
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@packages/host-service/src/trpc/router/config/config.ts` around lines 137 -
139, The current construction creates `commands` from `config?.run` but only
filters by trimmed length and returns untrimmed strings; change the creation of
`commands` (the variable in this module) to first normalize each entry by
trimming whitespace (e.g., map each run string to its trimmed form) and then
filter out empty strings, so that the `commands` array contains no
leading/trailing whitespace and no blank entries when returned from the router
function.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@apps/desktop/src/lib/trpc/routers/workspaces/procedures/query.ts`:
- Around line 70-80: The call to selectWorkspaceRunDefinition is dropping the
configured run working directory; update the call site after loadSetupConfig so
you pass the configured cwd into selectWorkspaceRunDefinition via its configCwd
parameter (e.g. use config?.run?.cwd or the project-level cwd from
loadSetupConfig) in addition to the existing configRunCommands, keeping the
existing presets (getTerminalPresetsForWorkspaceRun()) and projectId arguments;
locate this in the code around loadSetupConfig and selectWorkspaceRunDefinition
to add the configCwd argument.

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/WorkspaceRunButton/WorkspaceRunButton.tsx`:
- Around line 75-90: handleConfigureClick currently returns early if projectId
is falsy, preventing the terminal-preset branch from navigating to the preset
editor; change the logic so the early return happens only for the project
settings path. Specifically, in handleConfigureClick inspect
runDefinition?.source first and, if it's "terminal-preset", call navigate to
"/settings/terminal" with search { editPresetId: runDefinition.presetId }
regardless of projectId; otherwise (non-preset)
setSettingsSearchQuery("scripts") and then require projectId before calling
navigate to "/settings/projects/$projectId" with params { projectId } so
projectId is only enforced for the project-config route.

In
`@apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/`$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts:
- Around line 147-178: startWorkspaceRun currently creates a terminal with
launcher.create({ command }) but never passes the resolved working directory
from the selected definition; update startWorkspaceRun to include the
definition's resolved cwd when creating the terminal (e.g. call
launcher.create({ command, cwd: definition.cwd || resolvedCwd }) so
preset-backed runs and project-config cwd are honored). Locate startWorkspaceRun
and the launcher.create call and thread the appropriate cwd value from the
definition (or the upstream resolved workspace cwd) into the create options;
keep existing behavior if cwd is undefined.
- Around line 106-126: The current call to selectWorkspaceRunDefinition only
forwards configRunDefinition?.commands and drops the configured working
directory; update the call to pass the config's working directory as well (e.g.
include configRunDefinition?.cwd or the run-directory field returned by the
host-service) so selectWorkspaceRunDefinition receives both configRunCommands
and the config cwd. Locate the invocation of selectWorkspaceRunDefinition (using
symbols selectWorkspaceRunDefinition, configRunDefinition,
resolvedMatchedPresets, projectId) and add the configRunDefinition's
cwd/run-directory property to the argument object so the v2 run definition
preserves the configured working directory.

---

Outside diff comments:
In `@apps/desktop/src/lib/trpc/routers/settings/index.ts`:
- Around line 410-420: When a preset is created or updated with
useAsWorkspaceRun=true, ensure uniqueness per resolution scope by finding other
TerminalPreset entries that share the same scope (use
normalizePresetProjectIds(input.projectIds) to determine project/global scope)
and either (a) clear their useAsWorkspaceRun flags before saving this preset or
(b) reject the write with a clear error; implement this logic inside the create
mutation (the mutation building TerminalPreset with crypto.randomUUID) and the
corresponding update mutation (the one around lines 441-468) so that only one
preset per scope can have useAsWorkspaceRun=true.

---

Nitpick comments:
In `@packages/host-service/src/trpc/router/config/config.ts`:
- Around line 137-139: The current construction creates `commands` from
`config?.run` but only filters by trimmed length and returns untrimmed strings;
change the creation of `commands` (the variable in this module) to first
normalize each entry by trimming whitespace (e.g., map each run string to its
trimmed form) and then filter out empty strings, so that the `commands` array
contains no leading/trailing whitespace and no blank entries when returned from
the router function.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 99745e8e-b838-4ada-8c90-17d197f5efcf

📥 Commits

Reviewing files that changed from the base of the PR and between 0fb3414 and 2dd387b.

📒 Files selected for processing (34)
  • apps/desktop/src/lib/trpc/routers/settings/index.ts
  • apps/desktop/src/lib/trpc/routers/workspaces/procedures/query.ts
  • apps/desktop/src/renderer/lib/project-scripts.ts
  • apps/desktop/src/renderer/react-query/presets/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/WorkspaceRunButton/WorkspaceRunButton.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/V2PresetsBar/V2PresetsBar.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/V2WorkspaceRunButton/V2WorkspaceRunButton.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/V2WorkspaceRunButton/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/TerminalPane/components/TerminalSessionDropdown/TerminalSessionDropdown.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/usePaneRegistry.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2PresetExecution/useV2PresetExecution.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/useWorkspaceRunCommand.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.test.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/withReadHeal.test.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/PresetRow/PresetRow.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/PresetsSection/PresetsSection.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/PresetsSection/components/PresetEditorDialog/PresetEditorDialog.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/V2PresetsSection/V2PresetsSection.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/utils/settings-search/settings-search.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/v2-project/$projectId/components/V2ProjectSettings/V2ProjectSettings.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/v2-project/$projectId/components/V2ProjectSettings/components/V2ScriptsEditor/V2ScriptsEditor.tsx
  • apps/desktop/src/shared/workspace-run-definition.test.ts
  • apps/desktop/src/shared/workspace-run-definition.ts
  • packages/host-service/src/runtime/setup/config.test.ts
  • packages/host-service/src/terminal/terminal.ts
  • packages/host-service/src/trpc/router/config/config.test.ts
  • packages/host-service/src/trpc/router/config/config.ts
  • packages/host-service/src/trpc/router/terminal/terminal.ts
  • packages/local-db/src/schema/zod.ts
  • plans/done/20260509-run-script-presets-design.md

Comment thread apps/desktop/src/lib/trpc/routers/workspaces/procedures/query.ts
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

1 issue found across 34 files

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts">

<violation number="1" location="apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts:199">
P1: Don’t mark the run as stopped immediately after writing Ctrl-C; wait for terminal exit (or terminal-gone error) to avoid false stopped state and duplicate concurrent runs.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

workspaceId,
data: CTRL_C_INPUT,
});
const stoppedAt = Date.now();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1: Don’t mark the run as stopped immediately after writing Ctrl-C; wait for terminal exit (or terminal-gone error) to avoid false stopped state and duplicate concurrent runs.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts, line 199:

<comment>Don’t mark the run as stopped immediately after writing Ctrl-C; wait for terminal exit (or terminal-gone error) to avoid false stopped state and duplicate concurrent runs.</comment>

<file context>
@@ -0,0 +1,306 @@
+				workspaceId,
+				data: CTRL_C_INPUT,
+			});
+			const stoppedAt = Date.now();
+			updateWorkspaceRunTerminals((states) => {
+				const state = states[runningState.terminalId];
</file context>

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 10, 2026

🚀 Preview Deployment

🔗 Preview Links

Service Status Link
Neon Database (Neon) View Branch
Vercel API (Vercel) Open Preview
Vercel Web (Vercel) Open Preview
Vercel Marketing (Vercel) Open Preview
Vercel Admin (Vercel) Open Preview
Vercel Docs (Vercel) Open Preview

Preview updates automatically with new commits

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/desktop/src/shared/workspace-run-definition.test.ts (1)

75-75: 💤 Low value

Consider consistent representation of global presets.

Test 2 (line 37) explicitly sets projectIds: null for global presets, while this test omits the field. Both likely work, but using a consistent representation (preferably explicit projectIds: null) would improve readability.

♻️ Suggested consistency fix
 			{
 				id: "preset-global",
 				name: "Global dev",
 				commands: ["npm run dev"],
+				projectIds: null,
 				useAsWorkspaceRun: true,
 			},
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@apps/desktop/src/shared/workspace-run-definition.test.ts` at line 75, The
test omits the explicit projectIds field for the global preset object (it
currently has useAsWorkspaceRun: true); add projectIds: null to that object to
match the other test's representation of global presets for consistency—locate
the object literal in workspace-run-definition.test.ts where useAsWorkspaceRun:
true is set and add projectIds: null alongside it.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/host-service/src/runtime/setup/config.ts`:
- Around line 59-67: The cwd validation currently only checks type but allows
empty or whitespace-only strings; update the check in the block that inspects
obj.cwd to reject strings where obj.cwd.trim().length === 0 (use the existing
nonEmptyStrings behavior as reference), log the same error when
blank/whitespace-only, and assign a trimmed value to result.cwd (e.g.,
result.cwd = obj.cwd.trim()) so stored cwd is non-empty and normalized.

---

Nitpick comments:
In `@apps/desktop/src/shared/workspace-run-definition.test.ts`:
- Line 75: The test omits the explicit projectIds field for the global preset
object (it currently has useAsWorkspaceRun: true); add projectIds: null to that
object to match the other test's representation of global presets for
consistency—locate the object literal in workspace-run-definition.test.ts where
useAsWorkspaceRun: true is set and add projectIds: null alongside it.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 417ac689-3433-492d-8157-75e85ef9affb

📥 Commits

Reviewing files that changed from the base of the PR and between 2dd387b and 599839a.

📒 Files selected for processing (38)
  • apps/desktop/src/lib/trpc/routers/settings/index.ts
  • apps/desktop/src/lib/trpc/routers/workspaces/procedures/query.ts
  • apps/desktop/src/lib/trpc/routers/workspaces/utils/setup.ts
  • apps/desktop/src/renderer/lib/project-scripts.ts
  • apps/desktop/src/renderer/react-query/presets/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/WorkspaceRunButton/WorkspaceRunButton.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/V2PresetsBar/V2PresetsBar.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/V2WorkspaceRunButton/V2WorkspaceRunButton.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/V2WorkspaceRunButton/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/TerminalPane/components/TerminalSessionDropdown/TerminalSessionDropdown.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/usePaneRegistry.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2PresetExecution/useV2PresetExecution.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2TerminalLauncher/useV2TerminalLauncher.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/useWorkspaceRunCommand.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.test.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/withReadHeal.test.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/PresetRow/PresetRow.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/PresetsSection/PresetsSection.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/PresetsSection/components/PresetEditorDialog/PresetEditorDialog.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/V2PresetsSection/V2PresetsSection.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/utils/settings-search/settings-search.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/v2-project/$projectId/components/V2ProjectSettings/V2ProjectSettings.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/v2-project/$projectId/components/V2ProjectSettings/components/V2ScriptsEditor/V2ScriptsEditor.tsx
  • apps/desktop/src/shared/types/config.ts
  • apps/desktop/src/shared/workspace-run-definition.test.ts
  • apps/desktop/src/shared/workspace-run-definition.ts
  • packages/host-service/src/runtime/setup/config.test.ts
  • packages/host-service/src/runtime/setup/config.ts
  • packages/host-service/src/terminal/terminal.ts
  • packages/host-service/src/trpc/router/config/config.test.ts
  • packages/host-service/src/trpc/router/config/config.ts
  • packages/host-service/src/trpc/router/terminal/terminal.ts
  • packages/local-db/src/schema/zod.ts
  • plans/done/20260509-run-script-presets-design.md
✅ Files skipped from review due to trivial changes (9)
  • apps/desktop/src/shared/types/config.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/V2WorkspaceRunButton/index.ts
  • packages/local-db/src/schema/zod.ts
  • packages/host-service/src/runtime/setup/config.test.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/v2-project/$projectId/components/V2ProjectSettings/V2ProjectSettings.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/index.ts
  • packages/host-service/src/trpc/router/config/config.test.ts
  • plans/done/20260509-run-script-presets-design.md
  • apps/desktop/src/renderer/routes/_authenticated/settings/utils/settings-search/settings-search.ts
🚧 Files skipped from review as they are similar to previous changes (24)
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/V2PresetsBar/V2PresetsBar.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/withReadHeal.test.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2PresetExecution/useV2PresetExecution.ts
  • apps/desktop/src/renderer/lib/project-scripts.ts
  • packages/host-service/src/trpc/router/terminal/terminal.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/components/TerminalPane/components/TerminalSessionDropdown/TerminalSessionDropdown.tsx
  • apps/desktop/src/lib/trpc/routers/settings/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/usePaneRegistry/usePaneRegistry.tsx
  • packages/host-service/src/trpc/router/config/config.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/TopBar/components/WorkspaceRunButton/WorkspaceRunButton.tsx
  • apps/desktop/src/renderer/react-query/presets/index.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/workspace/$workspaceId/hooks/useWorkspaceRunCommand.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/PresetRow/PresetRow.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/PresetsSection/components/PresetEditorDialog/PresetEditorDialog.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/PresetsSection/PresetsSection.tsx
  • apps/desktop/src/renderer/routes/_authenticated/settings/terminal/components/TerminalSettings/components/V2PresetsSection/V2PresetsSection.tsx
  • apps/desktop/src/shared/workspace-run-definition.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/page.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.test.ts
  • apps/desktop/src/renderer/routes/_authenticated/settings/v2-project/$projectId/components/V2ProjectSettings/components/V2ScriptsEditor/V2ScriptsEditor.tsx
  • apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/components/V2WorkspaceRunButton/V2WorkspaceRunButton.tsx
  • apps/desktop/src/renderer/routes/_authenticated/_dashboard/v2-workspace/$workspaceId/hooks/useV2WorkspaceRun/useV2WorkspaceRun.ts
  • apps/desktop/src/lib/trpc/routers/workspaces/procedures/query.ts

Comment thread packages/host-service/src/runtime/setup/config.ts
Move V2WorkspaceRunButton from the leading slot of V2PresetsBar to the
trailing end via ml-auto, and refine the bar, preset items, and run
button toward Linear's flatter, lower-chroma aesthetic — softer borders,
muted defaults, fill-on-hover.
@Kitenite Kitenite merged commit ac2dd46 into main May 10, 2026
15 of 16 checks passed
@Kitenite Kitenite deleted the run-script-presets-design branch May 10, 2026 04:15
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