Repository navigation
Conversation
|
👋 Hi! This PR is currently in draft status. Workflow runs won't be auto-approved until it's marked as ready for review. When you're ready, click "Ready for review" and the workflows will be approved on the next cycle automatically. |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
Design Review (Fable 5, fork) — 🔴 BLOCK (blocking)Design-level review of Design-Verdict: BLOCK Cannot evaluate: missing screenshot of this revision's FolderPanel failure notices — every frame is hosted off capture commit BlockersRendered evidence is not admitted for this revision. WatchThe 10s listing bound is sized from local storage only (the constant's comment concedes "no network mount was available to sample"), and Retry is deferred to a later unit — so a slow-but-working network-mounted folder degrades from an eventual listing to a hard "timed out" notice whose only action is the agent hand-off. [DESIGN-REVIEWED] 8fe347d |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify the 10s listing bound on a network-mounted directory — the one case the sizing measurement itself admits it never sampled. Not justified as shipped
What this change shipsInventory (9 items) — 8 justifiedIntent: FIX — bound the four file-read fetches and name each failure's cause in translated copy, folder panel first.
[FIRST-PRINCIPLES-REVIEWED] 8fe347d |
UX Review (Fable 5, fork) — 🔴 BLOCKUX-level review of UX-Verdict: BLOCK Cannot evaluate: missing admitted screenshots — every frame is a raw fork-commit URL pinned outside this PR, which the evidence step does not admit. Evidence gaps
Watch
[UX-REVIEWED] 8fe347d |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed Review details
FINDING — website/src/api/client.ts:4126 — FINDING — website/capture/listing-failure-copy.tsx:93 — [OPUS-REVIEWED] 8fe347d |
130328f to
9207d18
Compare
9207d18 to
d2edb79
Compare
d2edb79 to
41bb7ca
Compare
0b5b1af to
66aab18
Compare
66aab18 to
b22501d
Compare
b22501d to
e04e324
Compare
e04e324 to
22b5c95
Compare
|
Consolidation: this PR and PR #7068 carry the same change This PR and PR #7068 (same author, still being driven) ship the same fix, mostly byte for byte. Merging the two heads with What is shared (line numbers at 22b5c95):
What #7068 has beyond this PR: its What only this PR has:
Suggestion: host in #7068. It was opened earlier, it is fresher (199 commits behind origin/main vs 289 here), and it is a superset. Port items 1 and 2 into it; bring item 3 over only if reviewers want it. Leave out From a full open-PR audit against origin/main c66f95b (2026-09-25); findings were checked by independent reviewers reading the code. Reply here if this is wrong. |
Adds a client-side deadline to the file-search and directory-listing reads, and a machine-readable code on their refusals, so a caller can tell a timeout from a denial instead of rendering one generic error.
|
🤖 Kiro Crew [operator: NicholasRBowers#a942f9ca]: This PR has been inactive for 7+ days. I reviewed the blockers but they require your input:
When you've addressed these, the pipeline will re-assess on its next cycle. |
|
PR triage: SUPERSEDED by #7068 (merged 2026-09-29, I checked this PR's diff (merge base
Both residual test deltas from the consolidation comment have already been ported. The only parts not on main are the local capture harness (
Reopen if I've missed something this PR still carries. |
Problem / Motivation
Four file endpoints — file search, the project tree, and the two directory listings — were fetched with no client-side deadline. A wedged or slow gateway left the request unsettled, so the UI could not tell "still walking" from "no results", and every failure rendered as one generic error regardless of cause.
Their refusals also carried no machine-readable field: a 403 for a sensitive path and a 404 for a missing project root were distinguishable only by parsing untranslated server prose.
Why it matters
A caller that cannot tell a timeout from a denial cannot offer the right remedy — Retry is correct for a timeout and useless for a refusal, and rendering the server's English string in place of translated copy is a worse bug than a spinner.
This unit ships the bound, the classifier, and the first consuming surface: the folder panel's two failure notices. It is one of six units split out of a larger file-search timeout change that was too big to review in one piece.
The shared retry affordance (
RetryControl) and the two keyboard hand-offs onuseListKeyboardNavare not in this PR. An earlier revision carried them with no caller; they were deleted, and each lands with the surface that calls it.What changed (motivation → approach → change)
withDeadlinestates the scope boundary deciding which fetches are bounded, and rejects with aTimeoutError-namedErrorso callers can key on the name.codefield (access_denied,project_not_found).searchErrorCauseclassifies a rejection astimed_out/failed/denied/root_missing, keyed on thatcodeand never on the human string. A 403 carryingauthRequiredis a session expiry, so it is not reported as a refusal of the path. Two key maps consume it —LISTING_FAILURE_KEYSandSEARCH_FAILURE_KEYS— diverging ontimed_outalone, because that is the only string naming which read expired; a refusal is the same fact whichever read hit it.CAUSE_BY_CODEcarries only the two codes these endpoints actually emit, so no row is mapped without a rejection that reaches it.FolderPanelrenders both failure arms through those maps — the search arm viaSEARCH_FAILURE_KEYS[searchErrorCause(searchError)], the listing arm viaLISTING_FAILURE_KEYS[searchErrorCause(error)]— so a timeout, a refusal and a missing root each name themselves in the user's language instead of printing the gateway's English.report={findReport(...)}. The "Ask the agent" hand-off resolves its structured context by exact-matching the displayed message against the error journal, whose key is the raw server sentence; translating the notice moves the text off that key, so without the explicit report the hand-off would degrade to a bare message and drop endpoint, status andcode.website/capture/listing-failure-copy.*,website/scripts/capture-listing-failure-copy.mjs) photographs and asserts all eight notices acrossen/jaand dark/light. Nothing in CI runs it; it is the repo's established review-evidence mechanism.Every piece in this diff has a consumer inside this diff. The interim cost of deferring Retry is worth naming: until the surface that owns it lands, a timed-out listing or search offers "Ask the agent" as its only action, and the user's other recourse is to retype the query or reopen the panel.
Screenshots
Captured by this PR's own harness (
node scripts/capture-listing-failure-copy.mjs) at therevision under review. The 14 frames are not committed --
temp-screenshots/is gitignored,as the harness itself states -- and are served below from the capture revision
6bb55376e55b; five representative ones inline. The harnessasserts the translated copy is present and the raw
deadline exceededtext is absent in everyscene, and exits non-zero otherwise.
The
jaframe is the load-bearing one: both the notice copy and the "Ask the agent" controlare localised where the previous code printed the gateway's English. The light-theme frame
covers the contrast question the harness header raises.
Remaining frames at that same capture revision: the other five
endark states (both armsx denied / root missing / failed), a second
jalisting pair, and two further light-themescenes.
Tests
withDeadline.test.tspins the rejection shape a replacement transport must satisfy —isDeadlineError, the cause mapping, and that a deadline rejection is not retried — so a future transport default cannot silently degrade every cause-keyed notice back to generic copy.ApiClient.coverage.test.tsxasserts the fetch receives the deadline's signal rather than the caller's, that a caller passing no signal is bounded all the same, and that the tree read does not share the listings' shorter bound.test_file_search.pyasserts the UI-facingcoderather than the human string.error-code-baseline.jsonwas regenerated withpython test/test_error_code_contract.py --update; the counts move by the four responses this adds.Manual verification
Verified locally at this revision:
tsc -p tsconfig.app.jsonclean (break-armed by renaming thesearchErrorCauseexport, which fails atFolderPanel.tsx), the four frontend suites below green, and the backend error-code contract green includingtest_baseline_is_not_stale. The CI lanes covering it areFrontend Lint & Type Check,Frontend Tests (1)–(4)andFrontend Coverage Merge. The frontend suites covering this change arewithDeadline.test.ts,ApiClient.coverage.test.tsx,FolderPanel.search.test.tsxandFolderPanel.test.tsx;test_file_search.pycovers the backendcodefield.Pattern harvest
Rule candidate: semgrep
Pattern:
err.message || t(key)— a truthy error message shadows the translated fallback, soany rejection carrying server prose renders untranslated while the fallback key looks like it
covers the case. Both call sites this PR rewrites had exactly that shape. Flag
||where theleft operand is an error
.messageand the right operand is a translation call.Second candidate: a translated string passed where a lookup key is expected.
ErrorNoticeresolves its agent hand-off by exact-matching
messageagainst the error journal, somessage={t(...)}without an explicitreport=silently drops endpoint/status/code. Flag amessageprop whose value is a translation call on a component that also acceptsreport.