Skip to content

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

Merged
jog1t merged 1 commit into
mainfrom
05-11-fix_frontend_missing_provider_configuration_right_after_adding_it
May 15, 2026
Merged

fix(frontend): missing provider configuration right after adding it#5032
jog1t merged 1 commit into
mainfrom
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

Status: MERGED | Author: jog1t (Kacper Wojciechowski) | Changes: +16 / -22


Overview

This PR fixes a bug where provider configuration was unavailable immediately after being added. The root cause was that the code was using a try/catch block around queryClient.fetchQuery to swallow a "not found" error when no runner config existed yet. The fix replaces this pattern with the safe: true option on runnerConfigQueryOptions, which already supports returning null instead of throwing when a config is not found.


Code Quality

Positive changes:

  • Removes duplicated error-handling boilerplate from two call sites (connect-manual-serverfull-frame.tsx and connect-manual-serverless-frame.tsx).
  • Uses the existing safe option that was already designed for this use case, making the intent explicit rather than hiding it behind a silent catch {}.
  • Promotes the variable to const, which is correct since it is no longer reassigned.
  • The result is cleaner and easier to follow: the happy path and the "config not found" path are both handled in one place (runnerConfigQueryOptions).

Observations:

  • The safe option in runnerConfigQueryOptions returns null when the config is not found, and the call sites already guard with || {}, so correctness is preserved.
  • No logic changes were introduced beyond removing the swallowed exception, so risk of regression is low.

Potential Issues

  • Silent swallow vs. explicit null: The old catch {} silently discarded any error (network failures, auth errors, 500s), not just "not found" errors. The new approach using safe: true only suppresses the "not found" case; other errors (network, 403, etc.) will now propagate up to the caller. This is strictly better behavior — surface real errors, only swallow the expected "not found" case. Worth calling out as an intentional improvement.
  • retry: shouldRetryAllExpect403 (note: there appears to be a typo in the existing code — likely intended as Except) is set on the query options, so transient network errors will be retried before throwing. This is fine.

Minor Notes

  • The PR description template was left largely unfilled (type of change checkboxes unchecked, no test description). Not a blocker given the simplicity of the fix, but worth noting for future PRs.
  • No test coverage was added, but this is a UI interaction fix that would require integration/E2E testing to cover meaningfully.

Verdict

Clean, correct fix. The approach of using the purpose-built safe option instead of a catch-all try/catch is the right call. The accidental improvement of surfacing real errors rather than swallowing them is a welcome side effect. No concerns.

@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
@jog1t jog1t force-pushed the 05-11-refactor_frontend_datacenter_aware_provider_configuration branch from 4bb912f to e7bdad0 Compare May 15, 2026 19:30
@jog1t jog1t force-pushed the 05-11-fix_frontend_missing_provider_configuration_right_after_adding_it branch from c64f1b8 to e1f82ef Compare May 15, 2026 19:30
@jog1t jog1t mentioned this pull request May 15, 2026
11 tasks
Copy link
Copy Markdown
Contributor Author

jog1t commented May 15, 2026

Merge activity

  • May 15, 7:36 PM UTC: A user started a stack merge that includes this pull request via Graphite.
  • May 15, 7:56 PM UTC: Graphite rebased this pull request as part of a merge.
  • May 15, 7:56 PM UTC: @jog1t merged this pull request with Graphite.

@jog1t jog1t changed the base branch from 05-11-refactor_frontend_datacenter_aware_provider_configuration to graphite-base/5032 May 15, 2026 19:53
@jog1t jog1t changed the base branch from graphite-base/5032 to main May 15, 2026 19:54
@jog1t jog1t force-pushed the 05-11-fix_frontend_missing_provider_configuration_right_after_adding_it branch from e1f82ef to ecc5680 Compare May 15, 2026 19:55
@jog1t jog1t merged commit e02c6c7 into main May 15, 2026
4 of 8 checks passed
@jog1t jog1t deleted the 05-11-fix_frontend_missing_provider_configuration_right_after_adding_it branch May 15, 2026 19:57
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