Skip to content

Feat/desktop run durability - #1838

Open
4pmtong wants to merge 55 commits into
mainfrom
feat/desktop-run-durability
Open

Feat/desktop run durability#1838
4pmtong wants to merge 55 commits into
mainfrom
feat/desktop-run-durability

Conversation

@4pmtong

@4pmtong 4pmtong commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Pull Request

Related Issue

Closes #

Description

Testing Evidence (REQUIRED)

  • I have included human-verified testing evidence in this PR.
  • This PR includes frontend/UI changes, and I attached screenshot(s) or screen recording(s).
  • No frontend/UI changes in this PR.

What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Contribution Guidelines Acknowledgement

4pmtong added 29 commits August 5, 2026 15:36

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

Comment thread backend/app/controller/run_controller.py Fixed

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Claude Code Review

Claude Code Review is paused for this repository. To reconnect it, an admin of this repository's GitHub organization (or the account owner, for personal repositories) who can also manage your Claude organization's Code Review settings needs to re-link GitHub in Code Review settings. This is a one-time step.

Tip: disable this comment in your organization's Code Review settings.

Comment thread backend/app/controller/run_controller.py Fixed
4pmtong and others added 5 commits August 10, 2026 22:01
- record_timeout_outcome APPROVAL_EXPIRY now rejects an outcome whose run_id
  does not own the approval, matching the TOOL scope guard.
- Cloud history bootstrap isolates per project: one poisoned project is logged
  and retried on the next cycle instead of aborting restore for all projects.
- Startup reconciliation keeps waiting_for_user runs' status and emits a
  non-status-bearing runtime.attempt_detached event, so the cloud replica no
  longer contradicts local truth; the run is not reported as interrupted.
- list_project_runs fires cloud bootstrap in the background (single-flight)
  instead of blocking the first Project read on full-history download.
- Browser tab budget recycles tabs owned by dead sessions (weakref liveness),
  so a session that dies without cleanup no longer pins the endpoint budget.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Frontend state/lifecycle:
- useInterruptedRunStatus: run a single trailing refresh when one is already
  in flight, so the t=0/t=300ms interruption double-notify is not swallowed.
- projectStore: a transient /runs failure no longer deletes a valid IDB cache
  (distinct 'unavailable' sentinel skips staleness, never persisted as anchor).
- Expose cloud_restore runs so the read-only banner renders (no Resume).
- Label retryable interruptions 'interrupted', not 'failed'.
- Bridge: drop queued command results on 404/409, keep retrying 5xx/network.
- desktopIdentity: atomically repair a corrupted id file instead of bricking.
- workspaceFileTree: tree-unique React keys for same-display-path files.
- Reset folder expansion state on project switch.

Preview subsystem:
- Aggregate 64MB inline-asset budget for HTML previews with truncation notice.
- Binary sniff for unknown types -> download card instead of a 20MB <pre> dump.
- Sibling JS/CSS use an 8MB bounded read with a visible over-limit notice.
- previewTextFile honors caller limits up to the class ceiling (richHtmlBytes).
- Visible preview-error card with a retry button instead of a blank pane.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

2 participants