Skip to content

fix(client): ignore stale driver lists - #2839

Open
HandSonic wants to merge 2 commits into
OtterMind:mainfrom
HandSonic:fix/driver-list-latest-request
Open

HandSonic wants to merge 2 commits into
OtterMind:mainfrom
HandSonic:fix/driver-list-latest-request

Conversation

@HandSonic

@HandSonic HandSonic commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Related issue

N/A - no matching issue was found.

Summary

Driver-list requests were not owned by the active connection render. Older responses could overwrite a newer database type and invoke onChange with the wrong default driver. Delayed download/save/delete callbacks could also start a stale refresh after a context switch, including A-B-A and same-type datasource changes. This change scopes requests to a unique activation token and validates it before starting and committing work.

Affected surfaces

  • Frontend / Web
  • Backend / API / Storage
  • Database plugin / Driver
  • JCEF / Desktop packaging
  • CI / Build / Release
  • Documentation only

Verification

  • Commands and results:
    • Eight ownership/lifecycle tests passed for reverse completion, stale errors, invalidation, delayed mutation refresh, unmount, A-B-A, and same-type custom-driver changes.
    • Existing driver upload contracts: passed.
    • Targeted ESLint: passed.
    • Full Community prebuild, Umi/Webpack build, and production bundle verifier: passed.
    • Fork code and CodeQL checks: passed.
    • Three-pass adversarial review and repair-batch merge-tree: passed.
  • Manual verification: N/A - deferred request/mutation promises reproduce every ordering without a browser.
  • UI evidence: N/A

Risk and compatibility

  • Public API or stored data: No API or saved driver format changes.
  • Database or driver compatibility: Driver list data is unchanged; only stale callbacks are suppressed.
  • Network, privacy, or security: Prevents a driver from a previous datasource context being written into the current connection form.
  • Community / Local / Pro boundary: Shared Community connection editor.
  • Backward compatibility: Current-scope loads and save/download/delete refreshes keep existing behavior.

Reviewer map

  • Start here: DriverListRequestOwner, then the scope lifecycle in Driver/index.tsx.
  • Failure condition: an old render starts/commits a refresh, invokes stale onChange, or survives unmount/ABA.
  • Rollback or disable path: Revert commit 464dda9bc802d04337320f85c498ce36aaa65248; no migration is required.

Contributor declaration

  • I linked the Issue that defines this change.
  • I tested the affected behavior and reported the actual results above.
  • I did not include credentials, private data, or generated build output.
  • I disclosed substantial AI assistance below, or this PR contains no substantial AI-generated code.

AI assistance: OpenAI Codex assisted with diagnosis, implementation, automated tests, verification, and adversarial review.

Latest-main revalidation (2026-09-04)

  • Rebased onto upstream 144a04e; current head 464dda9.
  • Driver upload/list ownership tests and targeted ESLint passed.
  • Included in the green combined Community production build and bundle verification.

@HandSonic
HandSonic requested review from a team and openai0229 as code owners August 30, 2026 18:59
@openai0229 openai0229 moved this to In Review in Chat2DB Community Aug 30, 2026
@HandSonic
HandSonic force-pushed the fix/driver-list-latest-request branch from cd63afb to 00ac2f8 Compare September 3, 2026 08:35
@HandSonic
HandSonic force-pushed the fix/driver-list-latest-request branch from 00ac2f8 to 464dda9 Compare September 3, 2026 21:08
Align existing OtterMind/Chat2DB PR OtterMind#2839, retaining its focused behavior and current Community contracts.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants