Skip to content

chore: port upstream server and desktop fixes (2026-10-09 round 3) - #272

Merged
TheDarkPhantom merged 6 commits into
mainfrom
chore/upstream-server-desktop-fixes-2026-10-09
Oct 9, 2026
Merged

TheDarkPhantom merged 6 commits into
mainfrom
chore/upstream-server-desktop-fixes-2026-10-09

Conversation

@TheDarkPhantom

Copy link
Copy Markdown
Owner

Several upstream server and desktop fixes had not reached the fork: a logged-out Claude CLI still showed as signed in, the backend could hang on shutdown, the desktop sent an invalid User-Agent, GitHub Enterprise remotes were not recognized, and several browser tab problems remained. This PR hand-ports them against the fork's code, since the fork has not merged upstream since 2026-07-30.

Ported

Skipped

Verification

  • vp test run on every touched test file: 18 files, 168 passed. The one failure is ClaudeCapabilitiesProbe.test.ts, which hits a Windows EBUSY temp-dir cleanup and passes on rerun.
  • ProviderRegistry.test.ts: 56 passed, 2 failed. The failures are in ProviderRegistryLive (a known-flaky file), and the same tests fail on unmodified main locally.
  • New tests fail without their fixes: the logged-out Claude test, the telemetry pipe hang (reproduced on Windows), the GHE registry test, and the iframe loading test.
  • vp lint and vp fmt --check on the changed files are clean.
  • tsgo --noEmit for apps/server, apps/desktop, apps/web and packages/contracts shows no errors.
  • vp run check:avicode and vp run test:avicode pass.

🤖 Generated with Claude Code

TheDarkPhantom and others added 6 commits October 9, 2026 14:09
…ed (pingdotgg#15459)

Port of upstream 563645c. The capability probe completes for a logged-out
CLI, so when `claude auth status` gives no answer the account payload now has
to disprove authentication (`tokenSource: "none"` with no API key, email or
subscription). An explicit `loggedIn: true` from the CLI stays authoritative
in the fork, which still runs `claude auth status`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…otgg#17386)

Port of upstream c9fa136. The server read the desktop telemetry pipe with
a filesystem read stream, whose pending read kept the backend process alive
after its scope closed while the desktop held the write end open. Reading it
through a socket makes the read cancellable.

The fork has no desktop browser channel, so only the telemetry pipe applies;
the lifecycle fixture and test are trimmed to that pipe.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nes (pingdotgg#17264)

Port of upstream a0066d5. Electron builds the native User-Agent product
token from the runtime app name with spaces removed, so "Avi Code (Alpha)"
produced an invalid "AviCode(Alpha)" token. The runtime name is now
"<AVICODE_IDENTITY.productName> <stage>" ("Avi Code Alpha"), while the About
panel and the macOS application menu keep the "Avi Code (Alpha)" display name.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…gg#11059)

Port of upstream cdd331b. A remote on a custom host whose name does not
contain "github" was classified as an unknown provider, so pull request
features were unavailable for GitHub Enterprise. GitHub discovery now claims
an unknown remote's host when `gh auth status --json hosts` reports an
authenticated account for it, the same way GitLab already does for glab.

Upstream's credential layer (Settings tokens, GH_TOKEN, disabled hosts) and
its API-based repository resolution do not exist in the fork, so recognition
reads gh's auth status only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ding (pingdotgg#16961)

Partial port of upstream d9f7c0c, re-expressed against the fork's preview:

- Fullscreen: a page's Fullscreen API request is granted and fills its own
  webview instead of turning the whole app window fullscreen.
- Links: a target="_blank" link opens a new focused browser tab (middle-click
  and Ctrl/Cmd-click keep opening a background tab); a blank window.open()
  is denied instead of blanking the page; a form POST stays in place.
- Custom-scheme links (slack://, zoommtg://) ask before opening the OS app,
  attached to the app window; file/javascript/data schemes stay denied.
- View > Reload, Force Reload and Toggle Developer Tools always target the
  app window, not a focused browser page.
- A late cross-origin iframe load no longer leaves a tab's loading bar stuck.
- A desktop-local (WSL) or primary backend's loopback dev server keeps its
  localhost URL in the server picker.
- Browser surfaces follow the sidebar opening or closing.

Skipped (upstream-only or not applicable): forwarded layout shortcuts out of
a focused browser page (the fork has no forwarded-shortcut system), the
server-tab download copy (no server browser host), the annotation crop from
a retried full-page capture (no capture retry helper), the composer crop
preview (no composerContextPresentation), the device toolbar height (the
fork's inputs are 24px), per-profile link tabs and the Electron 44 bump.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…#16956)

Partial port of upstream dbd8343. preview_snapshot no longer attaches the
PNG to every tool result: providers replay images on every later request, and
some reject inline images outright. Agents pass includeImage=true when they
need to see the page; the flag is stripped before the request reaches the
desktop browser.

The rest of the upstream change (fallback to the tab the user is viewing,
tab ownership for the server browser, browser profiles, attachment and
device toolkit changes) builds on the upstream-only server browser and
session control, which the fork does not have.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. size:L labels Oct 9, 2026
@TheDarkPhantom
TheDarkPhantom merged commit a2439a9 into main Oct 9, 2026
12 checks passed
@TheDarkPhantom
TheDarkPhantom deleted the chore/upstream-server-desktop-fixes-2026-10-09 branch October 9, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant