Skip to content

fix(search): prevent stale dialog request state - #90

Merged
llbbl merged 2 commits into
mainfrom
fix/74-search-dialog-request-state
Aug 24, 2026
Merged

fix(search): prevent stale dialog request state#90
llbbl merged 2 commits into
mainfrom
fix/74-search-dialog-request-state

Conversation

@llbbl

@llbbl llbbl commented Aug 24, 2026

Copy link
Copy Markdown
Owner

Closes #74

Summary

  • Add active AbortController ownership guards so only the current request can update loading, errors, and results.
  • Cancel pending debounce and in-flight search work immediately when the query changes or the dialog closes, then reset dialog state before reopen.
  • Add overlap and close/reopen regression coverage for stale-response handling and successful active-request results.

Validation

  • pnpm format
  • pnpm lint
  • pnpm exec tsc --noEmit
  • pnpm test --run (162 tests)
  • pnpm test:coverage --run (overall line coverage 94.48%; Search.tsx line coverage 95.12%)
  • pnpm db:init:local
  • pnpm index:local (3/3 documents)
  • env TURSO_DB_URL=file:local.db TURSO_AUTH_TOKEN=local pnpm build

@codecov

codecov Bot commented Aug 24, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.89189% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.33%. Comparing base (9797866) to head (c6c18f4).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/components/Search.tsx 91.89% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #90      +/-   ##
==========================================
+ Coverage   83.62%   89.33%   +5.70%     
==========================================
  Files          12       12              
  Lines         287      300      +13     
  Branches       72       71       -1     
==========================================
+ Hits          240      268      +28     
+ Misses         28       16      -12     
+ Partials       19       16       -3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@llbbl
llbbl merged commit 73e8f84 into main Aug 24, 2026
6 checks passed
@llbbl
llbbl deleted the fix/74-search-dialog-request-state branch August 24, 2026 02: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.

fix(search): prevent stale command-dialog request state

1 participant