Skip to content

fix(apps): typed API error for four app clients instead of a bare Error - #7074

Merged
bolichen97 merged 1 commit into
mainfrom
fix/app-api-typed-errors
Aug 31, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/app-api-typed-errors

Conversation

@chenmingwei23

@chenmingwei23 chenmingwei23 commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

1. What is the problem?

Four app API clients threw a bare Error carrying the raw response body:

Client Line
website/src/apps/design-tweak/api.ts parse()
website/src/apps/file-explorer/api.ts get()
website/src/apps/design-critique/api.ts jsonFetch()
website/src/apps/mochi/api.ts request()

The first three were the identical throw new Error(body || \HTTP ${r.status}`)`;
mochi's variant put the status and a 200-char body slice into the message text.

Two things fall out of that:

  • The wire body becomes the error message. A backend refusal is
    {"error": "path is outside the sandbox"}, so wherever the app renders
    e.message the user sees that JSON envelope verbatim -- escaped quotes, \n
    instead of real newlines.
  • The status is discarded. Nothing downstream can tell 404 from 409, or spot
    a 403 auth expiry, without regex-matching prose. No caller of these four
    branches on status today, so this is latent -- but it bites the first one that
    needs to, which is exactly how the Dev Fleet version of this bug was found.

This is a sibling of the ErrorPanel work: same root cause, four clients that were
never converted.

2. Why this issue matters to the user

Any refusal from these four apps renders as unstructured wire JSON. That is the
whole visible failure mode -- a user asking File Explorer for a path outside the
sandbox gets {"error":"path is outside the sandbox"} rather than the sentence
inside it.

For contributors, the cost is the next person to need status branching in one of
these apps. With the status thrown away there is no correct way to add it locally,
so they either re-derive the typed error a fifth time or match on message text --
and message text is localized prose, so matching it is a bug waiting to happen.

3. How our fix solves it

The dashboard already solved both halves in api/client.ts: ApiError carries
status + the raw body, and friendlyErrText unwraps {error|detail|message}
for display. The fix reuses those rather than adding a fifth and sixth app-local
copy of the same idea.

To be precise about what that does and does not achieve: two app-local ApiError
classes already exist (crew-companion/api.ts, md-notebook/api.ts) and this
PR removes neither
. Each carries a field the shared class lacks
(code, staleBackend), so converging them needs those fields to have a home
first -- a separate change with its own review. The claim here is narrower: a
side-effect-free shared module now EXISTS, so the four clients in this diff did
not have to mint a third and fourth spelling, and a future consolidation has
somewhere to land.

They could not simply be imported. client.ts is ~3.5k lines and its module graph
pulls in queryClient, installApiTransport, artifact-write bookkeeping and the
error journal. file-explorer already imports it for other reasons, but
design-tweak, design-critique and mochi do not -- and making a standalone app
depend on the dashboard's transport just to name an error type is the kind of
regression the Bundle Size Gate exists to catch.

So the two symbols move to a new side-effect-free api/apiError.ts, and
client.ts re-exports both. Every existing import path is unchanged, including
pages/devFleetApi.ts and the seven test files that mock ../api/client -- the
move is invisible to them.

The new toApiError(Response) is the piece the four clients actually needed:

export async function toApiError(r: Response): Promise<ApiError> {
  const body = await r.text().catch(() => '')
  const authRequired = r.status === 403 && r.headers.get('X-Auth-Required') === 'true'
  const message = friendlyErrText(r.status, body) || `HTTP ${r.status}`
  return new ApiError(r.status, message, body, authRequired)
}

Each client's error branch becomes throw await toApiError(r).

All bare throws in these four files are converted, not just the shared helpers.
The first draft converted only the four central parse/get/jsonFetch/request
functions, which left four sibling throw new Error(...) calls behind in the same
files -- a point patch inside its own blast radius. Now also converted:
design-tweak/api.ts (the chat-API helper, which discarded the body entirely),
mochi/api.ts (probeEnabled, whose 403/503 -> disabled/starting mapping is
untouched, and enableMochi), and design-critique/api.ts (uploadFiles).
Grepping throw new Error across all four files now returns nothing.

Three deliberate choices:

  • The HTTP <status> fallback is preserved, because that is what
    body || \HTTP ${status}`` did. An empty-body refusal reads exactly as it did
    before.
  • The body is read once and tolerates a read failure (.catch(() => ''),
    matching the previous calls), so a refusal that fails mid-stream still yields
    the status instead of throwing something unrelated out of the error path. The
    auth-header read is guarded for the same reason -- see section 4.
  • It does NOT journal to utils/errorReport and does NOT raise the stale-owner
    prompt.
    client.ts::apiFailure layers both on top for dashboard calls. Those
    are dashboard-session concerns, and they are precisely the side effects this
    split exists to keep out of app bundles.

Two behaviour changes, both intended, neither silent:

  1. mochi's message loses its mochi api <path>: prefix. That prefix was
    diagnostic text living in a user-facing string; the status and body now travel
    on the error object, and the request path is in the browser's network panel.
    Uniformity across the four clients is the point, so keeping one bespoke message
    shape would have defeated it.
  2. A 429 is relabelled rather than shown. friendlyErrText's 429 branch
    replaces the body with the tunnel-edge rate-limit sentence, because a dashboard
    behind API Gateway receives the opaque
    {"message":"Rate exceeded","throttlingReasons":null} and rendering that
    verbatim is useless. So a 429 through these four clients now reads as that
    sentence where it previously showed the raw throttle envelope. This is the one
    case that is NOT purely additive; it is pinned by its own test, and the original
    envelope stays on .body. (Caught by review -- an earlier draft of this
    description claimed the change was "strictly additive for every existing
    caller", which this contradicts.)

4. What tests we did

Visual evidence

The user-visible delta is the message text itself. Both panels below are the real
FileViewer error surface (FileExplorerPage.tsx:446 passes the caught
e.message straight into it), rendered with the two strings the two code paths
produce for the SAME 403 body -- each computed by its own expression in the
harness rather than transcribed, so the image cannot drift from what the code
does:

FileViewer error surface: before shows the raw JSON envelope, after shows the unwrapped sentence

Committed at website/temp-screenshots/app-api-typed-errors.png. The capture
script asserts both messages are present and differ before it will save, so a
blank or stale bundle cannot be shipped as evidence.

The other three clients share the identical code path and are covered by the
per-client assertions below rather than by three more near-identical images.

Automated tests

src/test/appApiTypedErrors.test.ts asserts the contract per client rather
than once against the shared helper. That is deliberate: the bug was four
independent copies of the same mistake, so a single client drifting back must fail
on its own. Verified by reverting each of the four individually -- each reddens
exactly its own case and leaves the other three green:

Reverted client Failing test
design-tweak design-tweak (+ the shared empty-body case)
file-explorer file-explorer (+ the shared empty-body case)
design-critique design-critique (+ the shared empty-body case)
mochi mochi (+ the shared empty-body case)

src/test/apiError.test.ts covers the helper, each assertion mutation-verified:

Mutation Failing test
authRequired hardcoded false flags an auth-expiry refusal...
drop the || HTTP <status> fallback falls back to HTTP <status>..., survives a body that cannot be read, and the shared per-client case
unguard the header read (r.headers.get) survives a Response-like object with no headers AND the pre-existing FileExplorerApiCov80 case

One thing CI caught that local runs had not. Frontend Tests (1) failed on
the first push: FileExplorerApiCov80.test.ts's own fetch stub omits headers,
so an unguarded r.headers.get(...) threw a TypeError inside the error path --
surfacing "Cannot read properties of undefined" where the backend had said "zzz
outside the allowed roots". That is strictly worse than the raw-JSON message this
PR exists to fix, so the header read is now defensive (r.headers?.get?.). This
is a real robustness property, not test appeasement: a factory that builds errors
must never throw, or it destroys the failure it was called to describe. The
pre-existing test passes unchanged with the guard in place -- it was not edited.

Also covered: JSON unwrapping (with an explicit assertion that {"error" does
not survive into the message), a non-JSON body passing through, the envelope
staying reachable on .body, and ApiError still being an Error whose name
is ApiError so existing e instanceof Error ? e.message : String(e) fallbacks
keep working.

One test guards the move itself: client.ApiError must be the same class
identity
as the defining module's. If the re-export ever became a second class,
instanceof ApiError checks in the dashboard would silently stop matching errors
thrown by app clients -- a failure that would otherwise be invisible until
something misbehaved at runtime.

Run targeted (this host cannot take a full vitest run; CI covers the rest): the
three new/related error suites, mochiApiSeam, ApiClient.coverage (682 tests),
errorToAgent, SecurityPanel, FolderConfigModal, the six suites that mock
ApiError, and the DesignCritique page suites -- 863 + 156 + 52 passing. tsc --noEmit and eslint clean on all eight touched files.

5. Any other suggestions on the work

  • The remaining landscape, counted, so nobody has to guess. This PR converts
    the four clients named in the backlog finding; it is not the end of the pattern.
    grep "throw new Error" src/apps/**/api.ts still returns 56 sites in other
    app clients: issue-radar/api.ts (50, all the single shape
    throw new Error(await parseErrorBody(r))), md-notebook (4),
    personal-shopper/api.ts:19, ops-mission-control/api.ts:1087. Accepted and
    deferred deliberately: issue-radar's 50 share one helper and would convert as a
    single mechanical change of their own, and md-notebook's throw body.error --
    an already-extracted human message, not raw wire JSON -- so they are a milder
    grade of the same problem. Rolling any of them in here would make this diff
    unreviewable.
  • Two app-local ApiError classes survive this PR (crew-companion/api.ts:16
    carrying code, md-notebook/api.ts:16 carrying staleBackend). Now that a
    side-effect-free shared module exists they could collapse onto it, but each needs
    its extra field to have a home on the shared type first, so that is its own
    change. Flagged rather than buried, because leaving them indefinitely is how a
    third spelling gets minted.
  • No new user-facing strings, so nothing was added to the i18n catalogs;
    friendlyErrText moved with its existing 429 key intact.

@chenmingwei23
chenmingwei23 requested review from a team and buluoray August 30, 2026 18:01
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Aug 30, 2026
@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5) — ✅ PASS

Design-level review of e4be4dc0436b15b112de96165876c782e92d1a7c — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

Design-Verdict: PASS

Real four-way duplication fixed at the shared layer, with the extraction kept side-effect-light, back-compat pinned by a class-identity test, and both behavior changes declared and tested.

[DESIGN-REVIEWED] e4be4dc

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5) — ✅ PASS

UX-level review of e4be4dc0436b15b112de96165876c782e92d1a7c — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

All lenses check out. This is a strictly-improving change: raw JSON envelopes ({"error":"..."}) in app error cards become the unwrapped human sentence, the screenshot confirms the rendered before/after, empty-body fallbacks keep their prior HTTP <status> shape, and mochi's jargon-y mochi api /pet-state: 503 prefix disappears from user-visible messages. The 429 string's "retries automatically" promise actually becomes truer here, since the retry ladder keys off .status === 429, which these clients' errors now carry. No new surfaces, strings, or flows introduce risk.

UX-Verdict: PASS

Refusals in four apps now render the backend's human sentence instead of a raw JSON envelope — strictly better copy, no new UX surface introduced.

[UX-REVIEWED] e4be4dc

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review — ✅ no blocking findings

GPT 5.6 completed its review of e4be4dc0436b15b112de96165876c782e92d1a7c and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] e4be4dc

False positive or not applicable? A repository writer can comment:
/ai-review override gpt e4be4dc0436b15b112de96165876c782e92d1a7c: <one-sentence reason>

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

Opus 4.8 Review — ✅ no blocking findings

Reviewed e4be4dc0436b15b112de96165876c782e92d1a7c — this comment is updated in place on each push.

Review details

No findings that block; one advisory.

FINDING — website/temp-screenshots/app-api-typed-errors.png:1 — a throwaway screenshot binary (Binary files /dev/null and b/website/temp-screenshots/app-api-typed-errors.png differ) is committed into a directory literally named temp-screenshots/, with no consumer, permanently entering version history and the shipped checkout → Fix: drop the file from the PR and add website/temp-screenshots/ to .gitignore.

[OPUS-REVIEWED] e4be4dc

Verdict parsed from the review's SHA-scoped output markers for commit e4be4dc0436b15b112de96165876c782e92d1a7c.

False positive or not applicable? A repository writer can comment:
/ai-review override fable e4be4dc0436b15b112de96165876c782e92d1a7c: <one-sentence reason>

@github-actions

github-actions Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5) — 🟡 CONCERNS

Premise-level review of e4be4dc0436b15b112de96165876c782e92d1a7c — 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.

All evidence is gathered. The change checks out against its description: the four files are fully converted (grep for throw new Error in them returns nothing), temp-screenshots/ is a tracked evidence convention, both behaviour changes are declared and pinned by tests, and the new module split is derived from a real bundle constraint. The one real finding is the counted sibling landscape the fix leaves standing.

First-Principles-Verdict: CONCERNS

The shared error module earns its place, but the duplication it cites as motivation — crew-companion's and md-notebook's own ApiError classes — both survive it untouched.

What this change ships

Intent: make refusals from four app clients render the backend's sentence, not the wire JSON, and carry the HTTP status. This is a FIX.

  1. Refusals in design-tweak, file-explorer, design-critique, mochi show the human message, not the JSON envelope — justified
  2. Those errors now carry status/body/authRequired for callers to branch on — justified (derived from the Dev Fleet precedent)
  3. ApiError/friendlyErrText move to side-effect-free api/apiError.ts, re-exported from client.ts — justified move (bundle isolation)
  4. New public toApiError(Response) — 8 call sites across 4 files, justified
  5. mochi errors lose the mochi api <path>: prefix — declared
  6. 429s in these apps now show the tunnel-edge sentence instead of the raw throttle envelope — declared, pinned by test
  7. design-tweak chat errors now include the body it previously discarded — declared
  8. Per-client and per-helper tests, plus a tracked evidence screenshot — justified (17+ PNGs already tracked in temp-screenshots/)

Watch

  • The description says crew-companion and md-notebook's own copies are "the duplication that made this worth fixing at the shared level" — yet the shared module removes neither. Grep class ApiError under src/apps: 2 app-local copies remain (crew-companion/api.ts:16 carrying code, md-notebook/api.ts:16 carrying staleBackend), each with fields the shared class lacks, so they are now on a path to becoming third spellings unless converged.
  • "four clients that were never converted" undercounts. Grep throw new Error across src/apps/**/api.ts: 56 bare-throw sites remain in other app clients — issue-radar/api.ts (50, all throw new Error(await parseErrorBody(r))), md-notebook (4), personal-shopper/api.ts:19, ops-mission-control/api.ts:1087. The general fix now exists and is genuinely larger to adopt everywhere — accepted-and-deferred, but a human should see the count.

[FIRST-PRINCIPLES-REVIEWED] e4be4dc

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Aug 30, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/app-api-typed-errors branch from 0b55ef9 to bff943d Compare August 30, 2026 18:21
@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 added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Aug 30, 2026
@chenmingwei23
chenmingwei23 force-pushed the fix/app-api-typed-errors branch from bff943d to ba14471 Compare August 30, 2026 19:04
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision labels Aug 30, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Disposition -- First Principles CONCERNS on bff943d2d

Both concerns accepted and fixed. New head ba1447103.

Concern 1: point patch inside its own blast radius (3 unconverted bare throws)

Accepted, fixed -- and the grep found one more than the review did.

The criticism is exactly right: converting the four central helpers while leaving
sibling throw new Error(...) calls in the very same files means the next reader
cannot tell which convention those files follow, which is how four copies of this
bug accumulated in the first place.

I verified each named site was Response-based before applying the suggested
remedy rather than taking it on faith. All three were, and all three are converted:

  • design-tweak/api.ts -- the chat-API helper. Worth noting this one was the worst
    of the set: throw new Error(\chat API ${r.status}`)` discarded the body
    entirely, so the backend's reason never reached the UI at all.
  • mochi/api.ts probeEnabled() -- converted the terminal throw only. Its
    deliberate 403 -> 'disabled' / 503 -> 'starting' mapping is untouched; those
    are states with their own UI, not failures.
  • mochi/api.ts enableMochi() -- converted.

The review's grep covered "the two edited api files", so it missed a fourth
identical site: design-critique/api.ts uploadFiles()
(throw new Error('upload failed (' + up.status + ')')). Fixing only the three
named while leaving its twin behind would have re-earned this exact concern, so
that one is converted too.

grep "throw new Error" across all four files now returns nothing.

On the wider point -- 8 app-local error classes across other apps -- accepted as
out of scope and left deferred. Two of them (crew-companion, md-notebook)
carry extra fields (code, staleBackend) that need a home on the shared type
before they could collapse onto it, so that is its own change with its own review.

Concern 2: the 429 relabel rides along undeclared

Accepted -- the contradiction was in my description, and it is now corrected.

The finding is precise. My body claimed the change was "strictly additive for
every existing caller", and friendlyErrText's 429 branch flatly contradicts
that: it replaces the body with the tunnel-edge rate-limit sentence rather than
passing it through. So for a 429 the message genuinely differs from before.

The behaviour is right and I want to keep it -- a dashboard behind API Gateway
receives the opaque {"message":"Rate exceeded","throttlingReasons":null}, and
rendering that verbatim is precisely the class of thing this PR exists to stop.
What was wrong was the claim, not the code. Two changes:

  • PR section 3 no longer says "strictly additive". It now lists two intended
    behaviour changes -- mochi's dropped path prefix and this 429 relabel -- and
    names the 429 as the one case that is not purely additive, noting the original
    envelope stays on .body.
  • New test relabels a 429 with the tunnel-edge message instead of the body
    pins it at the app-client level (asserting the message contains the rate-limit
    sentence, does NOT contain throttlingReasons, and that .body still does), so
    the behaviour is declared in the suite and not only in prose.

Verification on the new head

tsc --noEmit and eslint clean. Targeted suites: appApiTypedErrors (6),
apiError (9), FileExplorerApiCov80 (11), mochiApiSeam (20), the two
DesignCritique page suites -- 98 passing. Full-suite runs are not possible on this
host; CI covers the rest.

…Error

design-tweak, file-explorer, design-critique and mochi each threw
`new Error(body || \`HTTP <status>\`)` on a non-2xx response. Two consequences:

* the raw response body became the error MESSAGE, so a backend refusal such as
  {"error": "path is outside the sandbox"} reached the UI as that JSON envelope
  verbatim -- escaped quotes, no real newlines -- wherever the app renders
  e.message; and
* the status was thrown away, so no caller could branch on it (404 vs 409 vs a
  403 auth expiry) without regex-matching prose. Latent today because none of
  the four callers branches yet; it bites the first one that needs to, which is
  how the Dev Fleet version of this bug was originally found.

The dashboard already solved both halves in api/client.ts: ApiError carries
status + raw body, and friendlyErrText unwraps {error|detail|message} for
display. The fix reuses those rather than adding a fourth and fifth app-local
copy of the same class (crew-companion and md-notebook already have their own).

They could not simply be imported: client.ts is ~3.5k lines whose module graph
pulls in queryClient, installApiTransport, artifact-write bookkeeping and the
error journal. file-explorer already imports it for other reasons, but
design-tweak, design-critique and mochi do not, and making an app depend on the
dashboard's transport just to name an error type is what the Bundle Size Gate
exists to catch. So ApiError and friendlyErrText move to a new side-effect-free
api/apiError.ts, and client.ts re-exports both -- every existing import path,
and every test that mocks '../api/client', is unchanged by the move.

The new toApiError(Response) is the piece the four clients actually needed: read
the body once, unwrap the human message, keep the envelope in .body, set
authRequired from 403 + X-Auth-Required, and fall back to `HTTP <status>` on an
empty body so an empty-body refusal reads exactly as it did before. It
deliberately does NOT journal to utils/errorReport and does NOT raise the
stale-owner prompt, both of which client.ts::apiFailure layers on top: those are
dashboard-session concerns and they are the side effects this split exists to
keep out of app bundles.

Behaviour change worth naming: mochi's message loses its `mochi api <path>:`
prefix. That prefix was diagnostic text in a user-facing string; the status and
body now travel on the error, and the request path is in the network panel.

Tests: per-client assertions (not one shared-helper test) because the bug was
four independent copies of the same mistake, so a single client drifting back
must fail on its own. Each of the four reverted to the bare Error individually
reddens exactly its own case. Also covered: JSON unwrapping, the empty-body
fallback, the auth-expiry flag, an unreadable body, and that client.ts re-exports
the SAME class identity so dashboard instanceof checks still match app errors.

toApiError reads the auth header defensively (`r.headers?.get?.`) because it runs
ON the failure path: anything it throws REPLACES the real error with a misleading
one. FileExplorerApiCov80's own fetch stub omits `headers`, and an unguarded read
surfaced "Cannot read properties of undefined" where the backend had said "zzz
outside the allowed roots" -- strictly worse than the raw-JSON message this
change set out to fix. That pre-existing test passes unchanged with the guard,
and a new case pins it.

Evidence: website/temp-screenshots/app-api-typed-errors.png shows the real
FileViewer error surface with both messages, each computed by its own code path
from the same refusal body rather than transcribed.
@chenmingwei23
chenmingwei23 force-pushed the fix/app-api-typed-errors branch from ba14471 to e4be4dc Compare August 30, 2026 19:12
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision readiness: checking Automated validation is still running and removed readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision labels Aug 30, 2026
@chenmingwei23

Copy link
Copy Markdown
Contributor Author

Disposition -- First Principles CONCERNS on e4be4dc04

Both remaining items are description-accuracy findings, not code defects, and both
are now corrected in the PR body. No code change; the head stays e4be4dc04.

Watch 1: the motivation cites duplication this PR does not remove

Accepted. The criticism is of my wording and it was fair.

I wrote that crew-companion's and md-notebook's own ApiError classes were "the
duplication that made this worth fixing at the shared level" -- while the PR
removes neither. That sentence claims a consolidation the diff does not deliver.

Section 3 now states the narrower, true claim: two app-local classes already exist
and this PR removes neither, because each carries a field the shared class
lacks (code, staleBackend) that would need a home first. What the change
actually achieves is that the four clients in this diff did not have to mint a
third and fourth spelling, and a future consolidation now has somewhere to land.

This is the second time on this PR that a claim in my description outran the diff
(the first was "strictly additive for every existing caller", contradicted by the
429 branch). Both were caught here rather than by me, which is worth recording
plainly.

Watch 2: "four clients that were never converted" undercounts

Accepted, and the counts are now in the description. I re-ran the grep rather
than quoting the review's numbers.

Verified independently on e4be4dc04:

src/apps/issue-radar/api.ts:50
src/apps/md-notebook/api.ts:4
src/apps/ops-mission-control/api.ts:1
src/apps/personal-shopper/api.ts:1
total: 56

Matches the review exactly. Section 5 now carries the count and the breakdown, so
a human sees the real landscape instead of inferring "four clients" was the whole
of it.

Kept deferred, with reasons rather than hand-waving:

  • issue-radar (50) all share one shape,
    throw new Error(await parseErrorBody(r)), so they convert as a single
    mechanical change of their own -- and 50 call sites in one PR alongside this one
    would make the diff unreviewable.
  • md-notebook (4) throw body.error, an already-extracted human message, not
    raw wire JSON. Same family, milder grade: they lose the status, not the
    readability.
  • personal-shopper and ops-mission-control (1 each) are single sites in apps
    this diff does not otherwise touch.

I am not folding any of them in. If the Command Center or a maintainer would
rather see issue-radar's 50 swept in a follow-up, that is a clean standalone PR
and I will take it as its own item.

State

63 checks green, 0 red, 5 skipped. PR Readiness SUCCESS. GPT 5.6, Opus 4.8, Design
and UX all PASS on this head; First Principles is CONCERNS-advisory, dispositioned
above. tsc --noEmit and eslint clean; 117 targeted tests passing across the
converted sites and their existing coverage suites.

@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
@bolichen97
bolichen97 enabled auto-merge August 30, 2026 20:27

@bolichen97 bolichen97 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.

Readiness passed on the current head, all checks green, mergeable against main, and no outstanding change requests from any reviewer. Approving as part of a maintainer sweep of fix-type PRs.

@bolichen97
bolichen97 merged commit c4c1bf1 into main Aug 31, 2026
77 checks passed
@bolichen97
bolichen97 deleted the fix/app-api-typed-errors branch August 31, 2026 00:27
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Aug 31, 2026
@bolichen97

Copy link
Copy Markdown
Contributor

Open PR relationship audit

This is a consolidated, point-in-time code-level audit note. It compares complete merge-base diffs and current/merged code; it does not treat a shared topic as duplication or partial coverage as completion.

Relationship findings

  • PR #4650 is PARTIALLY_COVERED relative to this PR. Coverage is explicitly incomplete; this finding is not a completion or closure claim. Recommended action for PR #4650: CONTINUE_DEVELOPMENT. Drop FileExplorerApiError and consume main's ApiError/toApiError; the rest of the PR is untouched by PR #7074. Files: website/src/apps/file-explorer/api.ts.

No PR, Issue, label, branch, or review state was changed by the relationship-note portion of this audit.

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.

2 participants