Update dev-servers extension#28419
Conversation
- fix(start): focus new server and ignore stale Finder selection - fix(dashboard): stop render-loop warning and fix Cmd+N hijacking a spawn - style: normalize dash formatting in docs, comments, and UI strings - docs: document Start Dev Server in README; sync changelog - refactor: shared Terminal App preference + dashboard/start polish - perf(recents): cap the favicon data URI persisted per project - fix(start): harden spawn by passing the dev script as an argv - feat(dashboard): surface startup logs when a server fails to start - fix(dashboard): dedupe fetchServers result to avoid wasted re-renders - docs: changelog — empty-state action, ⌘N row action, native folder picker - feat(start): replace ChooseFolderForm with native osascript folder picker - feat(dashboard): surface Start Dev Server from empty state and every row - chore: post-review cleanup - docs: changelog entry for Start Dev Server release - feat: add Start Dev Server command - refactor(dashboard): own the spawn flow via launchContext state machine - chore: extract shared helpers for the upcoming spawn flow - Changelog formatting - Pull contributions
|
Thank you for the update! 🎉 We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days. |
Greptile SummaryThis PR adds a full Start Dev Server command to the dev-servers extension: Finder-selection probe (gated on Finder being frontmost), a recents picker backed by a new LRU store (
Confidence Score: 5/5Safe to merge. The spawn state machine, recents store, and Finder-probe gating are all well-reasoned; error paths are handled throughout. The code is structurally sound: the state machine transitions are correct, the 15 s timeout properly cleans up after the success path, positional-arg spawn prevents shell injection, No files require special attention; the one observation is in Important Files Changed
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
extensions/dev-servers/src/start.tsx:121-128
The auto-open hint counter is incremented inside `launchSpawn` before the dashboard ever shows its confirmation dialogs. If the user cancels at the "already running — restart?" prompt (or at the multi-folder confirm), the toast that would display the CTA is never created, but the counter has already advanced. After three cancelled spawns the hint is silently exhausted without the user having seen it once.
```suggestion
async function launchSpawn(
targets: Array<{ cwd: string; name: string }>,
options: { autoOpen: boolean; confirmMulti: boolean },
): Promise<void> {
// Consume the hint only after the launch has been handed off, so a
// cancelled confirm in the dashboard doesn't silently exhaust the counter
// before the user has ever seen the CTA.
const showAutoOpenHint = !options.autoOpen && (await maybeConsumeAutoOpenHint());
try {
await launchCommand({
```
Reviews (3): Last reviewed commit: "Update dev-servers extension" | Re-trigger Greptile |
- fix(servers): close log fd after child spawns to prevent descriptor leak - fix(dashboard): exclude failed spawns from the expecting set
Adds a
Start Dev Servercommand for spinning up dev servers without leaving Raycast. Works from a Finder selection, from a list of recently-seen projects, or from a native folder picker.Start Dev Server
package.json, detects the package manager (npm / pnpm / yarn / bun), picks the right script, and spawns it with the same PATH-aware login-shell pattern used by Restart. The dashboard opens immediately and shows a "Starting…" toast that transitions to "X is running" the moment the server binds a port.↵from a fresh dashboard to land in the picker). Each running-server row's action panel also carriesStart Dev Server(⌘N), so spinning up another project never requires bouncing back to root search.package.jsondependencies. Cached favicons appear inline once the dashboard has seen the project running, so even stopped projects keep their real icon. Per-row actions: Start, Open in Terminal (⌘T), Show in Finder (⌘⇧F), Copy Path (⌘C), Remove from Recents (⌃X).⌘L) for inspecting output on demand.Behavior
dev→start→developfirst, then scans script values for known dev-server tools (Vite, Next, Astro, Nuxt, Webpack, Parcel, Gatsby, Remix, Turbo, Bun watch/hot, nodemon, tsx watch, ts-node-dev, serve, http-server, live-server). Monorepo conventions likedev:webandstart:devresolve out of the box.X is already running. Restart?for a single target,All 3 already running. Restart them?when every selected folder is running, or2 of 3 already running. Restart these, then start the other one?for the mixed case. No more N-alert cascades for N-folder selections.already running. Restart?. Now, unless you're actually in Finder, the command goes straight to the recents picker, where you can start whatever project you meant.↵acts on the server you just launched rather than re-opening whatever was previously selected. Restart (⌘⇧R) likewise re-focuses the replacement once it binds.Under the hood
launchContext, which lets the user land on the dashboard immediately and watch the spawn happen there, rather than waiting on a blank loading view for a pre-spawnfetchServerscall.idle → pending → confirming → spawning → done. The "Starting…" toast lives on the dashboard so it's visible the whole time the user is waiting, and transitions to a green "running" state the moment every expected cwd appears in the polling loop.canonicalCwd(arealpathSyncwrapper) so symlinked project paths compare equal between Finder selections, the recents store, andlsof's view of running processes.startDevServer(cwd)andkillServer(pid)so the new command and the existing restart flow share one spawn path. Restart is nowkillServer + startDevServer.tool-display.tsso the framework tag styling stays consistent across the dashboard and the picker.Preferences
⌘Topens once, and both commands honor it.Checklist
npm run buildand tested this distribution build in Raycastassetsfolder are used by the extension itselfREADMEare placed outside of themetadatafolder