Skip to content

feat: implement disconnect detection, cancel pushes on disconnect#1641

Draft
jescalada wants to merge 1 commit into
mainfrom
cancel-push-on-disconnect
Draft

feat: implement disconnect detection, cancel pushes on disconnect#1641
jescalada wants to merge 1 commit into
mainfrom
cancel-push-on-disconnect

Conversation

@jescalada

@jescalada jescalada commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Description

Implements disconnect detection which marks pushes as canceled if the connection to the client is lost (such as when sending SIGINT after calling git push, or internet disconnection).

Originally developed in Fogwall, and explained here. This PR demonstrates that implementing persistent clones isn't necessary for detecting client disconnects.

A new step called clientDisconnected is added if the connection was lost - so the UI clearly reports the canceled status and reason for canceling:

image

Client-side

image

Server-side

Note that clearBareClone runs in the finally block (right after clientDisconnected "step" is logged.

image

Related Issue

Resolves #

Checklist

General

Documentation

  • Documentation has been added/updated for any new features

Tests

  • Tests have been added/updated for new functionality
  • Unit tests pass (npm test)
  • Linting and formatting pass (npm run lint and npm run format:check)
  • Type checks pass (npm run check-types)

@netlify

netlify Bot commented Jul 9, 2026

Copy link
Copy Markdown

Deploy Preview for endearing-brigadeiros-63f9d0 canceled.

Name Link
🔨 Latest commit 648e492
🔍 Latest deploy log https://app.netlify.com/projects/endearing-brigadeiros-63f9d0/deploys/6a4f33846b483f0008fb0dca

@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@codecov

codecov Bot commented Jul 9, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.76%. Comparing base (3186da2) to head (648e492).

Files with missing lines Patch % Lines
src/proxy/routes/index.ts 11.11% 6 Missing and 2 partials ⚠️
src/proxy/ssh/server.ts 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1641      +/-   ##
==========================================
- Coverage   85.87%   85.76%   -0.12%     
==========================================
  Files          84       84              
  Lines        8109     8143      +34     
  Branches     1376     1384       +8     
==========================================
+ Hits         6964     6984      +20     
- Misses       1117     1129      +12     
- Partials       28       30       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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