Skip to content

Interactive Rebase Webview remains blank due to unawaited includeBootstrap in WebviewReadyRequest #5797

Description

@Ichunjo

Description

The description below has been written by an AI agent as I don't fully understand what's the root issue myself:

In GitLens 19.x, opening the Interactive Rebase Editor frequently results in a blank Webview (or fallback to text editor) when other active extensions / Webviews are present in the shared Extension Host.

  1. In WebviewController.onMessageReceivedCore (gitlens.js):

    case S.Ix.is(e): {
        this.respond(S.Ix, e, {
            // BUG: includeBootstrap(!1) returns a Promise, but is not awaited before serialization
            state: e.params.bootstrap ? this.provider.includeBootstrap?.(!1) : void 0,
        })
    }

    Because includeBootstrap(!1) is asynchronous (parseState()), JSON.stringify({ state: Promise }) serializes into {"state": {}}. The Webview frontend receives an empty state object with no entries, causing GlRebaseEditor.render() to return empty/blank.

  2. In webview-rebase.js, includeBootstrap(true) withholds the rebase state from the initial HTML generation, forcing full reliance on the broken deferred IPC handshake above.

Suggested Fix

  1. Await includeBootstrap:
    state: e.params.bootstrap ? await this.provider.includeBootstrap?.(!1) : void 0
  2. In RebaseWebviewProvider.includeBootstrap, return this.parseState() so initial HTML is populated immediately.

GitLens Version

19.0.1

VS Code Version

Version: 1.135.0 (user setup)
Commit: 08d4889f9ec4a1685d257b9b95de036c8e1ce1e5
Date: 2026-08-25T14:26:52Z
Electron: 42.8.1
ElectronBuildId: 14906494
Chromium: 148.0.7778.280
Node.js: 24.18.1
V8: 14.8.178.38-electron.0
@github/copilot: 1.0.81-0
@github/copilot-sdk: 1.0.11
OS: Windows_NT x64 10.0.26200

Git Version

git version 2.55.0.windows.3

Logs, Screenshots, Screen Captures, etc

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

pending-releaseResolved but not yet released to the stable editionverified ✔Verified

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions