Add cancel button to streaming progress bar

The X button aborts the in-flight fetch via AbortController,
which was already wired up but had no UI trigger. Works for
both desktop and mobile views.
This commit is contained in:
Viktor Barzin 2026-02-22 02:04:56 +00:00
parent 301579c255
commit 9dc011754b
No known key found for this signature in database
GPG key ID: 0EB088298288D958
2 changed files with 14 additions and 4 deletions

View file

@ -418,7 +418,7 @@ function App() {
<div className="flex-1 relative min-h-0">
{/* Streaming Progress Bar */}
<div className="absolute top-0 left-0 right-0 z-10">
<StreamingProgressBar progress={streamingProgress} isLoading={isLoading} />
<StreamingProgressBar progress={streamingProgress} isLoading={isLoading} onCancel={() => abortControllerRef.current?.abort()} />
</div>
{processedListingData && processedListingData.features.length > 0 ? (
@ -595,7 +595,7 @@ function App() {
<div className="flex-1 flex flex-col overflow-hidden min-h-0">
{/* Streaming Progress Bar */}
<div className="relative shrink-0">
<StreamingProgressBar progress={streamingProgress} isLoading={isLoading} />
<StreamingProgressBar progress={streamingProgress} isLoading={isLoading} onCancel={() => abortControllerRef.current?.abort()} />
</div>
{/* Map/List Container */}