Skip to content

Load a preview in the webview first - #9009

Merged
Alex Ross (alexr00) merged 5 commits into
mainfrom
alexr00/passive-chameleon
Oct 2, 2026
Merged

Alex Ross (alexr00) merged 5 commits into
mainfrom
alexr00/passive-chameleon

Conversation

@alexr00

Copy link
Copy Markdown
Member

No description provided.

@alexr00 Alex Ross (alexr00) self-assigned this Oct 2, 2026
@alexr00
Alex Ross (alexr00) marked this pull request as ready for review October 2, 2026 10:26
Copilot AI balanced review requested due to automatic review settings October 2, 2026 10:26
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) October 2, 2026 10:26

Copilot AI left a comment

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.

Copilot review overview

🟡 Changes recommended

Missing-PR fallback is retried and the preview can be suppressed before full initialization completes.

Review effort: Balanced
Findings: 2 Medium severity

Open (2)
What changed in this PR

Adds a lightweight PR preview to reduce perceived cold-load latency while the full overview data resolves.

Changes:

  • Adds preview GraphQL data and read-only preview UI.
  • Parallelizes loading and defers expensive assignable-user work.
  • Adds comprehensive webview and async-loading tests.
File Description
webviews/​editorWebview/​test/​overview.test.tsx Updates asynchronous overview tests.
webviews/​editorWebview/​test/​app.test.tsx Tests preview rendering and layout.
webviews/​editorWebview/​overview.tsx Adds the preview composition.
webviews/​editorWebview/​index.css Styles preview placeholders.
webviews/​editorWebview/​app.tsx Selects preview while the PR loads.
webviews/​components/​sidebar.tsx Adds preview sidebar placeholders.
webviews/​components/​header.tsx Adds a read-only preview header.
webviews/​components/​comment.tsx Renders preview descriptions.
webviews/​common/​context.tsx Handles preview state and messages.
tsconfig.webviews.json Includes webview test setup sources.
src/​test/​webviews/​setup.ts Configures the JSDOM test environment.
src/​test/​mocks/​mockWebviewEnvironment.ts Adds mock-state reset support.
src/​test/​github/​pullRequestOverview.test.ts Covers preview and deferred-loading behavior.
src/​test/​github/​githubRepository.test.ts Tests preview queries and overview loading.
src/​test/​github/​folderRepositoryManager.test.ts Tests concurrent repository resolution.
src/​test/​github/​externalUriOpener.test.ts Tests early panel creation and cancellation.
src/​github/​views.ts Defines the preview data contract.
src/​github/​queriesShared.gql Adds the lightweight preview query.
src/​github/​pullRequestOverview.ts Coordinates preview and deferred initialization.
src/​github/​overviewRestorer.ts Uses overview-specific resolution.
src/​github/​issueOverview.ts Supports promised models and safer polling.
src/​github/​githubRepository.ts Implements preview and optimized overview fetches.
src/​github/​folderRepositoryManager.ts Parallelizes PR and metadata loading.
src/​github/​externalUriOpener.ts Opens the webview before resolution completes.
src/​commands.ts Selects optimized overview loading.
scripts/​test-webviews.js Adds a bundled webview test runner.
package.json Integrates webview tests into the test command.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/github/externalUriOpener.ts
Comment thread src/github/pullRequestOverview.ts Outdated
@alexr00
Alex Ross (alexr00) marked this pull request as draft October 2, 2026 10:52
auto-merge was automatically disabled October 2, 2026 10:52

Pull request was converted to draft

@alexr00
Alex Ross (alexr00) marked this pull request as ready for review October 2, 2026 14:49
Copilot AI balanced review requested due to automatic review settings October 2, 2026 14:49
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) October 2, 2026 14:49

Copilot AI left a comment

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.

Copilot review overview

🔵 Needs a closer look

Existing repository fast paths bypass requested metadata validation, preventing intended retries after transient failures.

Review effort: Balanced
Findings: None

Resolved since last review (2)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Retry metadata resolution for retained GitHub repositories

src/​github/​folderRepositoryManager.ts:2485

The new resolveMetadata flag is skipped for repositories already in _githubRepositories. After a transient or SAML metadata failure, validateGitHubRepositoryAccess intentionally retains that repository, so the next default resolvePullRequest/resolveIssue call returns it without retrying getMetadata(). Honor the flag on this fast path so retained failures are actually retried.

This issue also appears on line 3083 of the same file.

@alexr00
Alex Ross (alexr00) merged commit f87a7b6 into main Oct 2, 2026
7 checks passed
@alexr00
Alex Ross (alexr00) deleted the alexr00/passive-chameleon branch October 2, 2026 15:09
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.

3 participants