Skip to content

fix(api): drop in-flight connection tests when settings change - #7

Merged
kleinbem merged 1 commit into
mainfrom
crfull-stale-test
Nov 11, 2026
Merged

kleinbem merged 1 commit into
mainfrom
crfull-stale-test

Conversation

@kleinbem

@kleinbem kleinbem commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Follow-up to #5 (CodeRabbit's reply on the settings-change thread there, posted after the merge): a test started for the old settings could finish within the 600 ms retest window and still set the status. The settings-change effect now bumps the run counter, so testConnection discards that result.

Tests: npm run check 0 errors, 0 warnings.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Connection test results are now discarded if the endpoint, cache name or token changes while a test is in progress. This prevents results from an earlier configuration from being shown after settings have been updated, keeping the displayed test outcome aligned with the current connection details.

A test started for the old settings could finish inside the 600 ms
retest window and still set the status. Bumping the run counter on the
settings change discards it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@kleinbem
kleinbem enabled auto-merge (squash) November 11, 2026 02:57
@coderabbitai

coderabbitai Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

When the endpoint, cache name, or token changes after mount, the settings-change effect increments testRun. This invalidates results from connection tests started with the previous settings.

Changes: Connection test invalidation

Layer / File(s) Summary
Invalidate stale connection tests
src/routes/+page.svelte
The settings-change effect increments testRun when the endpoint, cache name, or token changes.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Possibly related PRs

Merge Risk: Minimal · up to abad8

Changing settings invalidates older connection-test results. No merge-blocking issue was identified.

Architecture risk: Low · up to abad8

The change affects 1 system.

Changed systems: src

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — src (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in src/routes/+page.svelte: The settings-change effect now increments testRun, invalidating results from tests started with the old settings.
Pre-merge checks: Passed 5

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the main change: discarding in-flight connection tests when settings change.
Docstring Coverage Passed No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML; Path: .coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd423fb3-d2c9-42e5-94a2-feb860a2dfd3
Commits

Reviewing files that changed from the base of the PR and between bdbbe09 and abad8aa.

Files selected for processing: 1

  • src/routes/+page.svelte

Limit details: You’ve used all 10 included reviews currently available.

@kleinbem
kleinbem merged commit c2b53c1 into main Nov 11, 2026
3 checks passed
@kleinbem
kleinbem deleted the crfull-stale-test branch November 11, 2026 03:01
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