Walkthrough
-
The pull request adds project script execution and run management. It adds terminal startup support for initial commands, persisted run state, terminal monitoring, and sidebar controls and views for run status and details.
Changes: Project Script Runs
Layer / File(s) Summary Run data, utilities, and persistence
apps/web/src/projectScriptRuns.ts,apps/web/src/projectScriptRunsStore.ts,apps/web/src/projectScriptRuns.test.tsAdds run and menu-entry types, command and output helpers, sorting utilities and tests, and a session-persisted run store. Initial command terminal support
packages/contracts/src/terminal.ts,packages/contracts/src/terminal.test.ts,apps/server/src/terminal/Manager.ts,apps/server/src/terminal/Manager.test.ts,apps/web/src/components/terminal/useThreadTerminalActions.ts,apps/web/src/components/chat/useChatTerminalActions.tsAdds an optional terminal-open command and a response field indicating whether the server handled it. POSIX shell startup runs supported commands; the client writes the command when the server does not report handling it. Script launch actions and sidebar menu
apps/web/src/hooks/useProjectScriptRuns.ts,apps/web/src/components/projectScriptRuns/ProjectScriptRunsControl.tsx,apps/web/src/components/Sidebar.tsx,apps/web/src/components/sidebar/SidebarThreadHeader.tsxBuilds sorted project script entries and adds actions to start or stop scripts, select run history, and display the active-run count in the sidebar. Terminal run monitoring
apps/web/src/components/projectScriptRuns/ProjectScriptRunCoordinator.ts,apps/web/src/appInit.tsxStarts terminal watchers for active runs and updates run status and bounded output tails from terminal state and output. Run status and detail views
apps/web/src/components/projectScriptRuns/ProjectScriptRunsBar.tsx,apps/web/src/components/projectScriptRuns/ProjectScriptRunStatusIcon.tsx,apps/web/src/components/projectScriptRuns/ProjectScriptRunDetail.tsx,apps/web/src/components/projectScriptRuns/ProjectScriptRunsHost.tsx,apps/web/src/components/AppSidebarLayout.tsx,apps/web/src/components/sidebar/SidebarChrome.tsxAdds a sidebar run bar and a selected-run dialog with output, recent-run selection, and permission-gated actions. Mounts the host and run bar in the app shell and sidebar. Estimated code review effort: 4 (Complex) | ~60 minutes
Change: Feature · Severity of issue fixed: Medium
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 participant User 3 participant ProjectScriptRunsControl 4 participant useProjectScriptRunActions 5 participant Terminal 6 participant ProjectScriptRunCoordinator 7 participant RunStore 8 User->>ProjectScriptRunsControl: Select a configured script 9 ProjectScriptRunsControl->>useProjectScriptRunActions: Start the script 10 useProjectScriptRunActions->>Terminal: Open terminal with initial command 11 useProjectScriptRunActions->>RunStore: Record the run 12 ProjectScriptRunCoordinator->>Terminal: Observe terminal state and output 13 Terminal->>ProjectScriptRunCoordinator: Send state and output updates 14 ProjectScriptRunCoordinator->>RunStore: Update run status and output tail Possibly related issues
- pingdotgg/t3code#6337: The PR passes the script command when opening the terminal and skips the separate write when the server reports handling it, addressing the reported fresh-shell command race.
- pingdotgg/t3code#25194: The PR adds a run bar, but it does not change draft-thread filtering, so the reported missing draft row is not addressed.
Suggested reviewers:
t3dotgg,juliusmarminge
Merge Risk: External image Low · up to 2dd87
-
Project action run output and error messages may occasionally show echoed shell wrapper text. This is a minor display issue; the run lifecycle and results are unaffected. It can be followed up after merge.
Pre-merge checks: Passed 3 · Failed 1
-
Failed Failed checks: 1 warning
Check name Status Explanation Resolution Description check Warning The description follows the repository template closely and covers Problem, Change, Scope and approval, and Verification. It states the problem (project actions reachable only from a thread header, no… 1) In Scope and approval, link the triaged bug issue #6337and the discussion or comment where a maintainer explicitly approved this direction and scope, and include the approval comment. The template treats a prototype without approval as …Passed Passed checks: 3 passed
-
Check name Status Explanation Title check Passed The title "feat(web): add a global project actions menu with headless runs" matches the main change. The PR adds a global Project actions sidebar menu and runs actions in headless PTYs, and the title … 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. Full details: Title check
-
Explanation
The title "feat(web): add a global project actions menu with headless runs" matches the main change. The PR adds a global Project actions sidebar menu and runs actions in headless PTYs, and the title follows the conventional commit format from the template. The title is specific and does not use vague terms. Some details, such as the run bar, detail dialog, and server-side terminal changes, are not in the title, which is acceptable.
-
Full details: Description check
-
Explanation
The description follows the repository template closely and covers Problem, Change, Scope and approval, and Verification. It states the problem (project actions reachable only from a thread header, no global run view, failures surface only as thread errors) and explains the change, the linked issue
#6337fix, and the sentinel-based exit code handling. Verification lists the commands run, test counts, manual scenarios exercised, and items not verified. Screenshots are provided for UI changes, as the template requires. The Scope and approval section links the related standalone PR and issue#6337but has no maintainer approval comment. The author states plainly that no approval exists yet and asks reviewers to confirm direction first. The template requires either a linked triaged issue or discussion with explicit maintainer approval, so this section is not satisfied. The description also includes a model/harness line, as the template asks. The PR objectives mention 139 tests, while the description states 92 tests for the focused run; these figures refer to different scopes and are not necessarily contradictory, but the description should make the scope clear.Resolution
- In Scope and approval, link the triaged bug issue
#6337and the discussion or comment where a maintainer explicitly approved this direction and scope, and include the approval comment. The template treats a prototype without approval as out of policy for new features, and the author says no approval exists. Either obtain that approval before this PR is reviewed for merge, or split out the initial-command fix that already has a standalone PR and explain why the headless run feature qualifies for an exemption. 2) Clarify the test counts in Verification so they match the scope of the run (92 focused tests versus any broader run). 3) Keep the title in conventional commit form, as the template requests, since the current title was not included in the supplied context and should be checked.
- In Scope and approval, link the triaged bug issue
-
Finishing Touches
-
Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts