Land a succeeded draft only on a plan read from the server
CI / ci (push) Failing after 5s
CI / ci (pull_request) Successful in 3m18s

A redraft keeps the plan's id, so a plan the service worker answered from
its cache could pass for the finished rebuild. The API client's apiRead now
says whether a GET was the cached copy; the plan carries it, and the Draft
board shows the retryable draft-unread error instead of a cached plan with
the drafted id. A later read from the server still lands the draft.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-07 12:01:07 -04:00
co-authored by Claude Opus 5.5
parent 87381fa4b9
commit 58c415ca1a
6 changed files with 96 additions and 14 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
export { ApiProvider, useApi } from './ApiContext.tsx'
export { createApiClient, CSRF_HEADER, ME_PATH, type ApiClient, type ApiLocation, type ApiRequest, type Me } from './client.ts'
export { createApiClient, CSRF_HEADER, ME_PATH, type ApiClient, type ApiRead, type ApiLocation, type ApiRequest, type Me } from './client.ts'
export { ApiError } from './errors.ts'
export { createQueryClient, shouldRetry } from './queryClient.ts'
export { createVerifiedSession, VERIFIED_SESSION_KEY, type VerifiedSession } from './verifiedSession.ts'