Skip to content

Conversation

su0as
Copy link
Contributor

@su0as su0as commented Aug 29, 2025

Summary
Addresses issue #7208, improving error handling of model/network responses and respecting IDE proxy settings.

Changes
VS Code extension:
◦ Auth: WorkOsAuthProvider now respects VS Code proxy and SSL settings (http.proxy, http.proxyStrictSSL) and uses the shared fetch that supports proxies.
◦ YAML: Register JSON schema for YAML only if the Red Hat YAML extension is present (prevents noisy errors).
◦ Manifest: Authentication provider declared to eliminate provider declaration warnings.

GUI:
◦ Error dialog updated to provide actionable guidance for connection/network issues (mentioning proxy settings).

Rationale/Impact
• Reduces failures in proxied/enterprise environments, improves user guidance, and removes spurious warnings. Localized and low-risk; no infra or dependency changes.
• Repro/Verification
• Configure a proxy in VS Code or via environment settings; simulate blocked control-plane access to see improved UX and proxy-awareness.
• Type checks and lint pass. Some tests require API keys; those remain skipped/expected. E2E harness shows environment-specific flakiness but unrelated to these changes.

Notes
• No new dependencies; uses existing @continuedev/fetch.
• Backwards compatible and easy to rollback.


Summary by cubic

Improves connection error handling and proxy support in the VS Code extension and GUI to reduce failures behind corporate proxies and provide clearer guidance. Addresses #7208.

  • Bug Fixes
    • VS Code: WorkOsAuthProvider now respects http.proxy and http.proxyStrictSSL and uses shared fetch with proxy support.
    • VS Code: Register YAML schema only if the Red Hat YAML extension is installed to avoid noisy errors.
    • VS Code: Declare the "continue" authentication provider to remove provider warnings and enable onAuthenticationRequest activation.
    • GUI: Connection error dialog adds actionable tips (proxy settings, invalid apiBase) with quick actions to reconfigure and retry.

@su0as su0as requested a review from a team as a code owner August 29, 2025 09:33
@su0as su0as requested review from RomneyDa and removed request for a team August 29, 2025 09:33
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Aug 29, 2025
@RomneyDa
Copy link
Collaborator

RomneyDa commented Sep 3, 2025

@su0as note failing tests

error,
);
// Only attempt to update YAML schemas if the YAML extension is installed
const yamlExtension = vscode.extensions.getExtension("redhat.vscode-yaml");
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this the standard yaml extension?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. redhat.vscode-yaml is the standard Red Hat YAML extension. I added an inline comment to make that explicit.

);

if (!statusCode && isConnectionError) {
errorContent = (
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think most users seeing a network error would not have proxy configured, and this might point users to the wrong place. In the majority of cases it is probably internet flake or no internet connection. That is, once the proxy is configured correctly, then it should generally work, and it's nice to have configuration errors but a low proportion of users use proxies

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Adjusted. It now leads with internet flake/outage and invalid apiBase; proxy guidance is last and phrased as “If you’re behind a corporate proxy, verify proxy settings in your IDE (http.proxy, http.proxyStrictSSL) or your NO_PROXY configuration."

@github-project-automation github-project-automation bot moved this from Todo to In Progress in Issues and PRs Sep 3, 2025
…; respect VS Code proxy in WorkOsAuthProvider; improve GUI connection error guidance (resolves continuedev#7208)
…sAuthProvider (continuedev#7208)\n\n- Respect VS Code proxy and SSL settings via http config when refreshing tokens\n- Use shared fetch with proxy support\n- Safer access to workspace in tests\n\nRelated: continuedev#7208
…larify Red Hat YAML extension id comment; format files with Prettier
@su0as su0as force-pushed the fix/issue-7208-connection-error-ux branch from 75579a7 to d4c0c1a Compare September 4, 2025 16:58
@su0as su0as closed this Sep 5, 2025
@github-project-automation github-project-automation bot moved this from In Progress to Done in Issues and PRs Sep 5, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 5, 2025
@su0as su0as deleted the fix/issue-7208-connection-error-ux branch September 5, 2025 00:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
size:L This PR changes 100-499 lines, ignoring generated files.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants