Skip to content

fix(frontend): missing provider configuration right after adding it#5032

Open
jog1t wants to merge 1 commit into
05-11-refactor_frontend_datacenter_aware_provider_configurationfrom
05-11-fix_frontend_missing_provider_configuration_right_after_adding_it
Open

fix(frontend): missing provider configuration right after adding it#5032
jog1t wants to merge 1 commit into
05-11-refactor_frontend_datacenter_aware_provider_configurationfrom
05-11-fix_frontend_missing_provider_configuration_right_after_adding_it

Conversation

@jog1t
Copy link
Copy Markdown
Contributor

@jog1t jog1t commented May 11, 2026

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 11, 2026

PR Review: fix(frontend): missing provider configuration right after adding it

Overview

This PR fixes a bug where adding a provider configuration immediately after first creating it would fail silently or incorrectly. The root cause: runnerConfigQueryOptions throws a FetchError when the config is not found (i.e., when !config && !opts.safe). The old code caught that error and defaulted to an empty object — but this also swallowed genuine network/auth errors. The fix passes safe: true to suppress the not-found error legitimately, so only real failures propagate.

The change is applied consistently in both connect-manual-serverfull-frame.tsx and connect-manual-serverless-frame.tsx.

What's Good

  • Correct use of the existing API. The safe option was already designed for exactly this case (line 791-795 of engine-data-provider.tsx: if (!config && !opts.safe) throw ...). This PR uses it rather than inventing a new workaround.
  • Removes silent error swallowing. The old catch { existing = {}; } block masked all errors — network failures, 403s, timeouts — not just "not found." The new code lets genuine errors surface correctly.
  • Consistent fix. Both affected call sites are updated in the same change.

Issues & Suggestions

One inconsistency worth checking: edit-runner-config.tsx has several runnerConfigQueryOptions call sites (lines 97, 284, 385, 484, 588, 842) that do not pass safe: true. Those call sites are presumably for editing an existing config (where a not-found error is appropriate), so this is likely intentional — but worth a quick eyeball to confirm none of them could encounter the same "config doesn't exist yet" race.

No test coverage noted. The PR checklist items are all unchecked. Given this is a UI fix, a manual smoke test of the add-provider flow would be sufficient — worth confirming the fix was verified end-to-end before merge.

Summary

Clean, minimal fix that uses the correct abstraction. The change reduces from 10 lines to 4 at each call site while improving correctness. No blocking issues.

@jog1t jog1t force-pushed the 05-11-fix_frontend_missing_provider_configuration_right_after_adding_it branch from f633f55 to c64f1b8 Compare May 11, 2026 18:49
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