Skip to content

fix(chat): bound the @-menu file-search fetch so a slow gateway fails visibly - #7068

Merged
NicholasRBowers merged 1 commit into
kirodotdev:mainfrom
rnoack1:fix/file-search-fetch-timeout
Sep 29, 2026
Merged

NicholasRBowers merged 1 commit into
kirodotdev:mainfrom
rnoack1:fix/file-search-fetch-timeout

Conversation

@rnoack1

@rnoack1 rnoack1 commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: Stop a wedged gateway turning every file-browsing surface into an eternal spinner, by bounding the reads and naming each failure with its remedy.

When the gateway stops answering, the chat page's file reads hang forever. The composer's @ file-mention menu sits on "Searching…" with Enter swallowed, the folder tab's listing and search never settle, the file rail's tree never loads, and both folder pickers' browse listings spin. Nothing tells the user what failed or what would fix it.

Why it matters

A wedged gateway is exactly the moment a person reaches for the file browser to check what state their project is in. Every one of these surfaces answering with an eternal spinner turns one stuck process into a dashboard that looks entirely broken.

Not a goal

What changed (motivation → approach → change)

Piece What it does
Client-side deadlines /api/file-search, /api/project/tree, browse listings, drive roots, and recent projects are bounded (15s search, 10s browse) in the API client's files endpoint module (api/client/files.ts), through one journaling deadline helper the facade hands the endpoint modules on their shared transport (api/client.ts, api/client/transport.ts, lib/withDeadline.ts), so every caller of the shared query keys inherits the bound; a read that hits its bound journals its own report (endpoint, code timeout) and every failed request pins its journaled report to its own rejection (utils/errorReport.ts), so each notice hands the agent its own read's report even when several reads fail together with the same message; the recent-projects read keeps its own sequence ticket, so a stale result from an earlier open is discarded, and a recents failure never replaces a folder or drive-list failure on screen
Cause-keyed copy, both pickers The folder tab (chat/FolderPanel.tsx) and both folder pickers (components/ProjectPicker.tsx, components/WorkspacePicker.tsx) name each failure apart — timed out, failed, no access, folder not found — through the shared classifier (lib/searchErrorCause.ts); a failed recent-projects read lands on the Browse tab with a notice naming its cause instead of a silently empty picker, and the Recent tab states the same failure instead of claiming there are no recent projects; the drive-list read keys its notice the same way, so a drive list that timed out says "Drive list timed out" with the typed-drive and All-drives remedies, and a refused one names the path still on screen; a refused or missing folder in the workspace picker names the folder that refused and the remedy ("No access to {{path}}. Type another path above."); the notice strings are translated in every catalog under i18n/locales (e.g. locales/zh-CN.json), and the German and Russian picker families each address the reader in one register throughout, the informal one their style guides require (locales/de.json, locales/ru.json)
Retry, only where it can help Both folder pickers' listing notices (components/WorkspacePicker.tsx, components/ProjectPicker.tsx) carry a Retry button for timed-out and failed listings only — a permanent refusal offers none — and it re-asks exactly the read that failed (a folder, the opening read, or the project picker's drive list), not wherever the user browsed since; while that re-ask is in flight the control turns inert as Retrying… — aria-disabled, so a keyboard press keeps focus on it — and the notice row carries aria-busy, so the wait is visible and a second press is impossible; typing in the path field clears a notice that names the folder being replaced, and its Retry, and in the workspace picker a listing still loading lands its folders without overwriting what was typed; a listing that settles after a newer request started is discarded, so a slow failure never overwrites the current view, and closing or re-opening a picker clears a stale notice
Refresh that reflects its work The folder tab's header Refresh stays busy — and inert to a second press — until every read one press starts has settled: the listing, the active search walk, the recoverable tree read (chat/FolderPanel.tsx); a background listing read the button did not start still spins the icon but never blocks a press; the header keeps room for the button's Refresh text label while the user has pressed it, holds a searchable query, or a notice names it, so the label never appears under a cursor already reaching for it, and ordinary folder navigation never resizes the button
Backend code contract The files endpoints (handlers/files.py) return machine-readable codes (access_denied, project_not_found, not_a_directory), so the client can tell a permanent refusal (no Retry) from a recoverable failure (Retry)
Rail tree notice, one per outage A failed file tree keeps the file tab's rail (chat/FileBrowserRail.tsx, chat/SidePanel.tsx) and its toggle mounted with a notice. A timed-out or failed read names the header Refresh, whose label shows and which stays in the tab order while it works (busy, not disabled) so a keyboard press on the named remedy keeps its place; a refused or missing folder states only its cause, and Refresh stays an icon for after the user fixes it outside the app (failureMessage in lib/searchErrorCause.ts, shared with the folder tab). A tree that has not loaded yet renders nothing under the notice, so no loading shimmer contradicts it, while a tree already on screen stays usable under the notice when a later read fails; the Files home lands in its error arm (chat/FilesHomePanel.tsx) instead of a false "No project directory"; the tree notice names its cause — no access, folder not found, else the generic line — on all three surfaces through one map (TREE_FAILURE_KEYS in lib/searchErrorCause.ts); when the tree and the folder listing fail together, the folder tab shows one notice, not two
No requests while known-broken The tree's background poll (pierre/PierreWorkspaceTreeImpl.tsx) stops while the read is errored and resumes on recovery, and the folder tab's Refresh refetches exactly the active search key (chat/FolderPanel.tsx), not every cached variant

The reads hang because nothing bounds them: the server never answers and the client waits forever. The fix puts the deadline in the API client — react-query dedupes on the query key, so a per-component bound would let the weakest caller decide it. A deadline the client set itself is a known cause, so those arms say "timed out", while any other rejection honestly says "failed". Permanent refusals come from the new backend code fields and deliberately offer no Retry, because re-asking a refusal returns the same answer.

Both pickers name the folder a failed read asked for whenever they know it, a drive clicked in the Windows drive list included, and mention the list still shown only when there is one. Only the opening read, which asks for no folder of its own, takes copy that names none, so neither a first open nor a reopen against a wedged gateway renders a blank folder name. The @-menu keeps main's own error surface — the deadline lives below it, in the client — and its "Searching…"/"No matches" lines carry role="status" so the settling is announced to screen readers. The workspace picker's Back and Escape clear a stale failure notice along with the form state they already reset, and its "No subdirectories" line waits for a listing to land, so typing during the opening read never calls an unread folder empty. The drives harness (scripts/capture-windows-drives-evidence.mjs) asserts the drive list's timed-out and denied copy verbatim, so a copy drift fails its run.

Backwards compatibility

Compatible: the bounded methods reject after the deadline where they previously hung forever; every consumer of those promises already handles rejection (the same paths a 5xx takes today). The API coverage test keeps all wrapped methods under the universal request probe; a caller's own AbortSignal is accepted only where a production caller passes one (browseFiles, via FolderPanel's query), and the deadline signal is composed inside the client everywhere.

Tests

  • withDeadline.test.ts — the deadline rejects with a TimeoutError-named error (the name the cause classifier keys on; an executable pin for any future transport swap) and forwards caller aborts.
  • FolderPanel.deadline.test.tsx — each cause renders its own copy; Refresh appears only where re-asking can help; a running retry shows "Searching…" with the header spinning, never the stale timeout copy; Refresh re-reads the listing after non-timeout failures too; a press still re-runs a timed-out search while a listing read it did not start is in flight, and is not announced as disabled.
  • FolderPanel.search.test.tsx / FolderPanel.test.tsx / FolderPanel.tree.test.tsx — notice suppression (no "Empty folder" claim under a tree notice), Refresh refetches the failed reads with exactly the active (query, limit) key, stays busy and inert until the press-started search walk and recoverable tree read settle (a second press dispatches nothing); the tree notice's agent hand-off carries the read's journaled report (endpoint, status, code), not the composed notice line; a wedged gateway failing the tree and the listing together raises exactly one alert, and each notice's hand-off names its own endpoint when two deadlines fire in sequence; a refused search or listing hands the agent endpoint, status and code; a listing 400 names a missing folder, an unnamed 400 stays generic, and a failure with no status stays retryable; a session-expiry 403 carrying access_denied still reads as a plain failure; a listing read with an empty search box keeps the button compact with no label, while a pressed Refresh keeps its reserved width when a timeout then names it.
  • FileBrowserRail.test.tsx / FilesHomePanel.test.tsx / sidePanelFileRailDefault.test.tsx — a timed-out tree keeps the rail mounted with its notice and an empty tree body (no skeleton); per cause, a timed-out or failed tree names Refresh and shows its label while a refused or missing tree shows the bare cause with an icon-only Refresh, and in the file tab a refused tree keeps the toggle and the notice; a tree that already loaded stays on screen under the notice when a later refetch fails, recovers after Refresh, whose button stays focusable and refuses a second press while its refresh runs, and lands in the panel's error arm (not "No project directory"); a refused or missing tree names its cause, and a failure naming no cause keeps the generic line; the Files home tree notice hands the agent the read's report (endpoint, status, code).
  • PierreWorkspaceTreeImpl.test.tsx — an errored tree read fires zero further polls; recovery resumes the poll.
  • ApiClient.coverage.test.tsx — the six deadline-wrapped methods stay in the universal probe; a new assertion fails the suite if they are exempted again; the caller's abort signal is relayed through browseFiles; two same-message refusals from different endpoints each keep their own journaled report.
  • ApiClient.refactor.surface.test.ts — browseFiles and fileSearch take an AbortSignal now, so the no-session-key probe passes them real arguments instead of placeholder strings.
  • WorkspacePickerCoverage.test.tsx — a rejecting folder listing renders the error notice with Retry, never "No subdirectories"; Retry re-asks the failed path and clears the notice on success; while the re-ask is in flight the control is inert as Retrying…, keeps focus after a keyboard press, and a second press dispatches nothing; a keystroke in the path field clears a folder-naming notice and its Retry but keeps the opening read's, and the listing in flight still lands its folders without its late success overwriting what was typed or its late failure naming a replaced path; leaving the create form before anything listed re-runs the opening read, and Select with nothing to select does nothing; a stale settlement neither re-enables the control nor replaces the notice — only the request that still holds the ticket does; a denied listing shows no Retry; a listing superseded by navigation or close settles without touching the view; a successful empty listing still shows the empty state; a failed Back to the parent keeps an empty folder's empty state beside the notice, while a reopen whose opening read fails hides it; a failed drill names the folder it asked for, whatever the cause, while the opening read's failure names none.
  • ProjectPicker.listingError.test.tsx — each failure cause renders its own copy (with and without a failed path); a drive-list timeout says "Drive list timed out" with the All-drives remedy (never the folder-listing line), and a refused drive list renders its own arm; a failure of the listing on screen never shows the empty-state, while a failed drive list or a failed different typed path keeps an empty folder's empty-state; success-empty still does; an opening-folder timeout says "Open it again, or pick a folder from the list." beside a Retry that re-lists that folder, and Retry equally re-runs a failed opening read or re-lists a timed-out drive list, while a refused or missing listing offers none; during the re-ask the same button reads Retrying…, stays focused and aria-disabled, and a second press sends nothing; a keystroke during the re-ask drops the notice and its Retry, and the retired re-ask lands neither its folders nor its path over what was typed; a rejecting recent-projects read lands on Browse with the recents notice (pp-recent-error), a resolving one shows none; when both opening reads fail, in either order, the folder-listing notice stays and no empty-state appears; a directory notice's hand-off keeps its own report after a later deadline is journaled; the Recent tab states a recents failure with its own copy, including when a directory failure outranks it on Browse; a reopen keeps the previous open's rows on screen, with no "No recent projects" claim and no remount of the search box, while its recents read is still pending; a reopen whose recents read rejects shows none of the previous open's rows under the notice; a reopen whose opening listing fails takes the copy that names no folder; a typed drill that fails before any listing landed, and a timed-out click on a drive in the Windows drive list, name the folder that failed without claiming a list still shown.
  • Backend: test_dashboard_files_onloop_fs.py / test_file_search.py / test_browse_files.py pin the code fields (access_denied, not_a_directory on browse-files too); error-code-baseline.json ratchets down (six newly-coded responses).

Manual verification

Ran the bundled drives harness (website/scripts/capture-windows-drives-evidence.mjs) against the production build — it drives the real SPA with the drive-list read answering, refusing, and hanging, waits on the timed-out arm's copy verbatim ("Drive list timed out"), and photographs each arm. The workspace picker's timed-out Retry and its in-flight Retrying… state were captured from the capture/error-notice-surfaces.html page with the browse read hung, so the client's own 10s deadline is what fires in the frames. The project picker, workspace picker, Files home and folder tab frames come from a local page that mounts the real components with the network stubbed to refuse, report missing, or hang; each frame asserts its copy verbatim before it is photographed (the path-edit frame asserts the notice and Retry are gone and the typed path kept), and the one-notice frame asserts both reads journaled a timeout. The project picker's Retry frames — timed out, Retrying…, recovered, a failed opening read, a timed-out drill and a timed-out drive list — were captured on the production build with every API call stubbed and the listing read hung or failing, so the client's own 10s deadline fires; each frame asserts its notice text and the button's label before it is photographed.

Screenshots / video

The wedged @-menu settling into its notice instead of hanging:

Menu timed out settles into failure notice

The folder tab naming a timeout apart from other causes, with the remedy in the notice:

Folder panel listing timed out

The workspace picker's bounded browse failure with its Retry, the in-flight state one press produces, the recovery, typing a new path, and the denied arm with Retry withheld:

Workspace picker listing timed out with Retry
Workspace picker retrying — control inert while the re-ask runs
Workspace picker recovered after Retry
Workspace picker: typing a new path clears the timed-out notice and its Retry, the list filters to the typed path
Workspace picker denied, Retry withheld

The project picker when recent projects time out, and when a folder refuses — the list stays usable:

Project picker: recent projects timed out, Browse tab with the recents notice
Project picker: Recent tab states the recents timeout, no false empty list
Project picker: recent projects failed, generic copy on Browse
Project picker: a refused folder named, the list below still shown

The project picker's Retry beside a timed-out or failed listing, the in-flight state one press produces, and the recovery:

Project picker: the first folder listing timed out, Retry offered
Project picker retrying: the same button reads Retrying and is inert while the re-ask runs
Project picker recovered after Retry, the folders listed
Project picker: the first folder listing failed, no-path copy with Retry
Project picker: opening a folder timed out, the list below still usable, Retry offered

The workspace picker naming the folder that refused, and the Files home and folder tab naming the tree's cause — one notice when the tree and listing both fail:

Workspace picker: no access to the folder that refused
Files home: tree refused, cause named
Folder tab: tree and listing both timed out, one notice

The drive list naming its own timeout and refusal:

Drive list timed out, cause-keyed copy with the All-drives remedy and a Retry, rows still usable
Drive list refused, no-access copy naming the path still on screen

All evidence frames

Menu no matches control
Panel search timed out, header Refresh labeled
Panel search denied, no Retry
Panel search not found
Rail tree timed out, empty body under the notice
Rail tree refused: file tab keeps the rail, cause named, icon-only Refresh
Rail tree folder not found: cause named, icon-only Refresh
Panel listing failed
Project picker: folder not found
Project picker: a typed path refused before any folder is listed, the path named
Project picker: a typed path not found before any folder is listed, the path named
Workspace picker: folder not found, named
Files home: tree folder not found, cause named
Panel tree error, no stacked empty claim

Related Issues

no linked issue: the hang was reported in review triage, not a tracked issue; follow-ups live in #11405, #11419, #11420.

Pattern harvest

Not generalizable: the deadline-at-the-client-level pattern is already the repo's convention for bounded reads (slash commands, skills); this PR extends it to the file surfaces rather than introducing a new pattern.

Checklist

  • Tests added/updated for the change
  • npm run build and the frontend suites pass locally
  • Backend related tests and linters pass locally
  • Screenshots attached for user-visible changes

@rnoack1
rnoack1 requested review from a team and patrigao August 30, 2026 17:48
@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Aug 30, 2026
@rnoack1
rnoack1 force-pushed the fix/file-search-fetch-timeout branch from 078f243 to ca51006 Compare August 30, 2026 18:24
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Aug 30, 2026
@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

Reviewed 7a6c6c5647f8bc88624cdbf6fd652c91a4e0016c via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 7a6c6c5

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — ✅ PASS

Design-level review of 7a6c6c5647f8bc88624cdbf6fd652c91a4e0016c via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Verify the 15s/10s budgets against a network-mounted project dir — every sample is local-disk, and Retry re-enters the same bound (#11419).

[DESIGN-REVIEWED] 7a6c6c5

Description read

[DESCRIPTION-READ] d753ff43cee5d35dfdfa5a26f71539ec195192605dc650150c398947491654b8

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5, fork) — 🟡 CONCERNS

UX-level review of 7a6c6c5647f8bc88624cdbf6fd652c91a4e0016c via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

UX-Verdict: CONCERNS

No blind reader has seen these notices — every cause-keyed string and Retry control is evidenced only by screenshots this lane read after the diff.

Watch

  • Files home offers "Refresh" under permanent refusals the PR's own policy says re-asking can't fix: attachments 18/34 show "No access to this folder" / "Folder not found" with a prominent Refresh button directly beneath, while the pickers deliberately withhold Retry for denied/root_missing and the rail demotes Refresh to an unnamed icon. A user with a refused folder presses the adjacent button and gets the same answer — every time that outage occurs, on the product's most spacious error surface. Smallest fix: match the rail's treatment (keep the escape hatch but stop presenting it as the notice's remedy, e.g. icon-only or moved out of the notice's attention locus).
  • Two names for one re-ask across sibling surfaces: pickers say Retry, panels say "Refresh to retry" (attachments 03 vs 02). Each surface is internally consistent and Refresh is a pre-existing control, so this is habituation risk only — worth a human glance, not a change request.

Suggestions

  • components.workspacePicker.listing_failed "Could not open {{path}}. Retry, or pick another folder." — "Retry" here is a noun naming a button inside a sentence; the shown variants (timed out, no access) read better because the verb clause stands alone. Consider "Could not open {{path}} — use Retry, or pick another folder." for both listing_failed and listing_timed_out.

[UX-REVIEWED] 7a6c6c5

Description read

[DESCRIPTION-READ] 5945cb8b206c3dccd66e1c461a2991cb09e0c31a9448fb907606d242f139d1d4

That sha256 names everything this verdict read: the PR description, plus the 38 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — ✅ PASS

Premise-level review of 7a6c6c5647f8bc88624cdbf6fd652c91a4e0016c via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

First-Principles-Verdict: PASS

Verify the 10s/15s bounds on a network-mounted project directory: every measurement behind them is local-disk, author-admitted (#11419), and there is deliberately no knob.

Not justified as shipped

  • Item 10 — rides along: dev evidence harness (capture-windows-drives-evidence.mjs) gains denied/hang capture arms; declared, tooling-only, no user surface.

What this change ships

Inventory (10 items) — 9 justified

Intent: stop a wedged gateway turning the chat's file-browsing surfaces into eternal spinners, by bounding the reads and naming each failure with its remedy — a FIX. The change has more than 10 observable differences; the 10 most noticeable are kept (omitted: WorkspacePicker typing-ownership race fixes, Select-on-blank no-op, disabled→aria-disabled focus retention, Refresh label width reservation).

  1. File search, project tree, folder/drive listings, and recent projects now fail visibly at 15s/10s instead of hanging forever — justified
  2. Folder tab, both pickers, rail, and Files home name each failure apart (timed out / failed / no access / not found) via one shared classifier — justified
  3. Files endpoints return machine-readable codes (access_denied, project_not_found, not_a_directory) — justified
  4. Both pickers gain a Retry button for recoverable failures only, inert "Retrying…" while in flight — justified
  5. A failed recent-projects read shows a cause-named notice on both tabs instead of a silently empty picker — justified
  6. Folder tab's Refresh stays busy until every read its press started settles, and refetches exactly the active search key — justified
  7. The file rail stays mounted through a failed tree read with a notice; its Refresh shows its word when named as the remedy — justified
  8. The tree's 10s background poll stops while the read is errored and resumes on recovery — justified
  9. A failed request carries its own journaled report pinned to the rejection, so the agent hand-off names the right endpoint — justified
  10. The Windows drives evidence harness captures denied and hang arms — rides along: dev tooling, declared

[FIRST-PRINCIPLES-REVIEWED] 7a6c6c5

Description read

[DESCRIPTION-READ] 97e986f99f00ee2256f8f2a13bc07994899095ec53c91b868f4bbbe4d6bd8853

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review (fork) — ✅ no blocking findings

Reviewed 7a6c6c5647f8bc88624cdbf6fd652c91a4e0016c via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 7a6c6c5

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Aug 30, 2026
@rnoack1
rnoack1 force-pushed the fix/file-search-fetch-timeout branch from ca51006 to e5dca34 Compare August 30, 2026 19:36
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision readiness: action required A blocking check or review needs attention labels Aug 30, 2026
@rnoack1
rnoack1 force-pushed the fix/file-search-fetch-timeout branch from e5dca34 to c3f5eff Compare August 30, 2026 19:51
@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention labels Aug 30, 2026
@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no

  • rebutted span=e3eb03e8b4dd

Same class as span a6cdf60c45f3, rebutted at #7068 (comment); nothing in that surface changed since. WorkspacePicker's named-path timed-out and failed arms render through the same component and cause map the attached WorkspacePicker and ProjectPicker frames already show, and their exact strings are pinned verbatim in WorkspacePickerCoverage.test.tsx.
One more still of the same notice with a different path filled in adds no evidence a reviewer lacks.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no

  • accepted-and-deferred span=f33d908bcda1

Same network-mount headroom question as design span 973442404dbe, deferred at #7068 (comment) to #11419 (labelled deferred-finding, assigned, with a Due line). This item's own "Clears when" names #11419, and the frozen goal lists per-storage-type deadline tuning under "Not a goal". Nothing new since that disposition.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no

  • needs-a-decision span=a1d127d40c40

The blind first-time read needs the branch pushed into this repository, which only a maintainer can do; that question is recorded at #7068 (comment).

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no

  • rebutted span=1c6f1b5c6d9f

A failed recents read already lands the user on a working remedy: ProjectPicker.tsx (open effect, ~278-303) clears the recent rows and switches to Browse, where the notice reads "Loading recent projects timed out. Type a project path above, or pick a folder from the list." above a live path field and folder listing; every reopen re-reads recents. Recents is a shortcut list, not a listing: the task (pick a project) is fully served beside the notice, and WorkspacePicker has no recents read to diverge from.
A Retry there would be a new control with its own in-flight state (the listing Retry re-asks only browse/browseDrives), for friction the lane grades low; the frozen goal is bounding the reads and naming each failure's remedy, which this notice does.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no

  • rebutted span=8f0a15c20c07

Same class as #7068 (comment). There is one policy: no surface's notice promises Refresh for a permanent cause (Files home renders the bare "No access to this folder" / "Folder not found", FilesHomePanel.tsx ~152), and every surface keeps a Refresh control reachable; the rail cause-keys only the word on its button, which stays as an icon.
On a tree failure this labelled button is Files home's only refresh (the rail is not mounted there and the header has none), and it is the way back after the user fixes permissions or restores the folder outside the app. Main renders the same button under every tree error, a denial included (main FilesHomePanel.tsx ~135-142); demoting it would change a main-owned control's look, which the frozen goal does not settle.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

Rebased: main moved with #14986 (48b040c -> 199532b), which fixes the Windows test_apps_registry_coverage tests this PR's CI inherited. The commit applied unchanged (range-diff =); related frontend tests, typecheck and i18n checks pass locally. CI re-running.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no

  • accepted-and-deferred span=c5bd59a50115

Same network-mount headroom question as design spans 973442404dbe and f33d908bcda1, deferred at #7068 (comment) to #11419 (labelled deferred-finding, assigned, with a Due line). The frozen goal lists per-storage-type deadline tuning under "Not a goal", and a network-mounted sample is not something this PR's CI can take. Nothing new since that disposition.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no

  • needs-a-decision span=2cff6950dbab

The blind first-time read needs the branch pushed into this repository, which only a maintainer can do; that question is recorded at #7068 (comment).

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no

  • rebutted span=97437a5846c5

Same class as spans a6cdf60c45f3 and e3eb03e8b4dd, rebutted at #7068 (comment) and #7068 (comment); this head is a clean rebase and nothing in that surface changed.
Both named-path timed-out strings render through the same notice row and cause map the attached frames show, and are pinned verbatim: ProjectPicker's in ProjectPicker.listingError.test.tsx, WorkspacePicker's in WorkspacePickerCoverage.test.tsx. Another still of the same notice with a different path adds no evidence.

… gateway

A wedged gateway used to hang the dashboard's file search and the folder
pickers forever. Every file-search and directory/drive listing read now runs
under a client deadline, fails into a cause-keyed notice naming the path
still on screen, and keeps the stale list usable. Both folder pickers offer a Retry beside a
timed-out or failed listing, inert as Retrying while its re-ask is in flight.

Co-authored-by: Kiro Crew <noreply@kirodotdev.github.io>
@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes

  • rebutted span=7d6d1a48d85b

The comment was wrong and is corrected in 7a6c6c5 (comments only): the drive list's rows are on screen, but shownPath is '' there, so the arm is chosen because no listing PATH exists for {{path}} to name, not because nothing is shown (ProjectPicker.tsx, LISTING_FAILED_NO_LISTING_KEYS and its call site).
The copy stays. "No access to Y:. Type another path above." names the refused drive and gives a remedy that works in that state: the path field is active and typing another drive recovers. The drive rows stay clickable beside the notice; nothing hides them.
The drive-list drill arm is pinned on purpose: ProjectPicker.listingError.test.tsx "a timed-out click on a drive in the Windows drive list names that drive" asserts Opening D:\ timed out. Type a path above. for exactly this view.
Drive-flavored named-path copy would add 4 new keys to every locale catalog for a Windows-only, denied-drive case the reviewer rates low frequency and low impact; the frozen goal is bounding wedged reads, not re-wording the picker's recovery hints.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

Rebased: main moved in the locale catalogs (website/src/i18n/locales/*.json) and src/kiro_crew/dashboard/handlers/files.py since the last push (199532b -> df0ea79); the PR commit applied unchanged, and the only content change in this push is a corrected code comment in ProjectPicker.tsx. CI re-running.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no

  • rebutted span=5fdbbae72459

Same class as 5891960820 and 5889523212. The Files home Refresh button, label, placement and handler are unchanged from main (the FilesHomePanel.tsx diff touches only comments near it), and main already shows it under every tree error, a 403 included.
What this PR changes is the sentence above it: denied/root_missing now name the cause ("No access to this folder" / "Folder not found") and, unlike the recoverable arms, carry no "Refresh to retry" clause, so no notice promises a re-ask can fix a permanent refusal (lib/searchErrorCause.ts, TREE_FAILURE_KEYS vs failureMessage).
In this arm it is the only refresh on the surface (the rail is not mounted and the header has none), so demoting it strands the user who just fixed the permission or restored the folder outside the app. Changing a main-owned control's placement is outside the frozen goal ("Not a goal": Files home redesign, #10839).

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: no

  • rebutted span=3b75ae73dbb6

Two different controls, not two names for one re-ask. The pickers' Retry is this PR's in-notice button that re-asks exactly the read that failed; the panels' Refresh is main's existing header control, and the notice names it by its existing label ("Refresh to retry").
Unifying the words would rename a main-owned control or make a notice name a button that is not on that surface. The lane grades it habituation risk, not a change request; no change.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes

  • rebutted span=7759751d5789

"Could not open {{path}}. Retry, or pick another folder." renders beside a button labelled exactly Retry in the same notice row, so the referent resolves; there is no behaviour or accessibility defect.
The reword is advisory and larger, not smaller: it re-translates the key in every locale catalog and re-pins the verbatim copy assertions in WorkspacePickerCoverage.test.tsx, for a sentence that already reads correctly next to its control. Kept.

@NicholasRBowers

Copy link
Copy Markdown
Contributor

self-added: yes

  • rebutted span=c1ee6535ad13

Removing the arms is a smaller diff but not a complete answer: the denied and hang arms of website/scripts/capture-windows-drives-evidence.mjs produce the body's two drive-list frames, and Manual verification names this harness as their source.
The hang arm is the only capture where the client's own 10s deadline, not a stubbed error, produces the timed-out copy, and it waits on "Drive list timed out" verbatim, so drift in the new drive-list strings fails the run. Dev tooling only, no user surface; the drivesFail -> drivesMode rename follows from having three arms. Kept.

@iamwhatever iamwhatever left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed. All five files.py hunks add a code field to existing error bodies and change nothing else: is_sensitive_path gate, audit logging, status codes and check order are unchanged. Client bounds (15s/10s) are backed by the measurements in files.ts:18-68, queryClient never retries a deadline, Retry appears only for timed-out/failed reads, late results are discarded. Backend tests assert each new code; withDeadline and FolderPanel.deadline tests are meaningful.

Non-blocking: pathComplete (files.ts:142) is still unbounded, so the @-menu's ./ path mode can still spin; browseDirs/browseDrives/projectTree/recentProjects pass undefined as the outer signal so unmount does not abort them.

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

Labels

fork Pull request from a fork (external contributor)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants