Skip to content

fix: polish desktop development and workspace controls - #813

Merged
paperclover merged 1 commit into
mainfrom
push-omrrqoxvltrn
Oct 28, 2026
Merged

paperclover merged 1 commit into
mainfrom
push-omrrqoxvltrn

Conversation

@paperclover

Copy link
Copy Markdown
Contributor

Assisted-by: gpt-6.1-terra

Tested manually

@paperclover paperclover added the auto-merge Queue for automatic merge once all checks pass label Oct 28, 2026
@greptile-apps

greptile-apps Bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The changes affect local desktop development and a bounded set of workspace controls.

Fix the single-run row before merging so a later run does not inherit a disabled Stop button.

Findings

  1. P1 Stop stays disabled ▶
  2. P2 Failed launch stops working session ▶
Fix with agent prompt
### Issue 1
ui/src/components/ExperimentRunBanner.tsx:56
If a cancelled run finishes and another run starts before the next refresh, the list can change directly from `[A]` to `[B]`. The single-run branch reuses the same `RunRow`, so B inherits A's `pending=true`. B then shows “Cancelling” with Stop disabled, even though nobody cancelled it.

Add `key={runs[0].run.id}` to reset the row when the run changes, as the multi-run branch already does.

```suggestion
  if (runs.length === 1) return <div className={BANNER_CLASS}><RunRow key={runs[0].run.id} item={runs[0]} onOpenRun={onOpenRun} onOpenExperiment={onOpenExperiment} /></div>;
```

### Issue 2
scripts/dev-slot.mjs:720-730
With a running `copy` slot, `start --db empty --desktop` now kills the desktop app and stops both servers before `reserveSlot` rejects the database-mode mismatch. Previously, the rejected command left the running slot alone.

Check the requested mode before stopping the existing app and servers so a failed launch does not interrupt the developer's session.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

This PR ties the development desktop app to its servers and polishes workspace controls.

  • The desktop development app stays tied to its dev-slot services.
  • Active experiment runs show their time and controls in separate rows.
  • Reveal controls name the file manager used on the computer.
  • Maximized workspace tabs make room for the desktop window controls.
  • The workspace toolbar has more room beside its controls.
  • Chat controls take less space and hide tooltips when you press them.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Launch development desktop] --> B[Stop previous desktop app]
  B --> C[Stop development servers]
  C --> D[Reserve slot and check database mode]
  D --> E[Start servers and build app]
  E --> F[Launch supervised desktop app]
  F --> G[Wait for desktop app to exit]
  G --> H[Stop development servers]
Loading

Reviews (1) · Last reviewed commit: "fix: polish desktop development and work..." · Reviewed by Greptile


export function ExperimentRunBanner({ runs, onOpenRun, onOpenExperiment }: { runs: ChatActiveRun[]; onOpenRun?: OpenTarget; onOpenExperiment?: OpenTarget }) {
if (runs.length === 0) return null;
if (runs.length === 1) return <div className={BANNER_CLASS}><RunRow item={runs[0]} onOpenRun={onOpenRun} onOpenExperiment={onOpenExperiment} /></div>;

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 Stop stays disabled

If a cancelled run finishes and another run starts before the next refresh, the list can change directly from [A] to [B]. The single-run branch reuses the same RunRow, so B inherits A's pending=true. B then shows “Cancelling” with Stop disabled, even though nobody cancelled it.

Add key={runs[0].run.id} to reset the row when the run changes, as the multi-run branch already does.

Suggested change
if (runs.length === 1) return <div className={BANNER_CLASS}><RunRow item={runs[0]} onOpenRun={onOpenRun} onOpenExperiment={onOpenExperiment} /></div>;
if (runs.length === 1) return <div className={BANNER_CLASS}><RunRow key={runs[0].run.id} item={runs[0]} onOpenRun={onOpenRun} onOpenExperiment={onOpenExperiment} /></div>;
Prompt To Fix With AI
This is a comment left during a code review.
Path: ui/src/components/ExperimentRunBanner.tsx
Line: 56

Comment:
**Stop stays disabled**

If a cancelled run finishes and another run starts before the next refresh, the list can change directly from `[A]` to `[B]`. The single-run branch reuses the same `RunRow`, so B inherits A's `pending=true`. B then shows “Cancelling” with Stop disabled, even though nobody cancelled it.

Add `key={runs[0].run.id}` to reset the row when the run changes, as the multi-run branch already does.

```suggestion
  if (runs.length === 1) return <div className={BANNER_CLASS}><RunRow key={runs[0].run.id} item={runs[0]} onOpenRun={onOpenRun} onOpenExperiment={onOpenExperiment} /></div>;
```

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Comment thread scripts/dev-slot.mjs
Comment on lines +720 to +730
const previous = reservationFor(info)
if (previous?.state?.desktopProcess && processGroupExists(previous.state.desktopProcess.pid)) {
if (!supervisorMatches(previous.state.desktopProcess)) throw new Error('The previous desktop process no longer matches its recorded identity')
process.kill(-previous.state.desktopProcess.pid, 'SIGTERM')
await waitFor('the previous desktop app to close', 10_000, () => !processGroupExists(previous.state.desktopProcess.pid))
}
await stopOwnedProcessesUnlocked(info)
if (interrupted) return
const mode = requestedMode ?? previous?.state?.dbMode ?? 'empty'
started = true
await startUnlocked(info, mode, false)

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.

P2 Failed launch stops working session

With a running copy slot, start --db empty --desktop now kills the desktop app and stops both servers before reserveSlot rejects the database-mode mismatch. Previously, the rejected command left the running slot alone.

Check the requested mode before stopping the existing app and servers so a failed launch does not interrupt the developer's session.

Prompt To Fix With AI
This is a comment left during a code review.
Path: scripts/dev-slot.mjs
Line: 720-730

Comment:
**Failed launch stops working session**

With a running `copy` slot, `start --db empty --desktop` now kills the desktop app and stops both servers before `reserveSlot` rejects the database-mode mismatch. Previously, the rejected command left the running slot alone.

Check the requested mode before stopping the existing app and servers so a failed launch does not interrupt the developer's session.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@paperclover
paperclover merged commit f1eaafe into main Oct 28, 2026
13 checks passed
@paperclover
paperclover deleted the push-omrrqoxvltrn branch October 28, 2026 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge Queue for automatic merge once all checks pass

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant