Skip to content

docs: fix fs-http File Operations drift + index TS version claim#106

Open
Goosterhof wants to merge 1 commit into
mainfrom
engineer/http-docs-drift
Open

docs: fix fs-http File Operations drift + index TS version claim#106
Goosterhof wants to merge 1 commit into
mainfrom
engineer/http-docs-drift

Conversation

@Goosterhof
Copy link
Copy Markdown
Contributor

What

Two doc-drift fixes surfaced by Cartographer M3 + Scout M5 (n=2 convergent). Docs-only — no publish side effect (the publish workflow triggers on packages/*/package.json; this PR touches only docs/).

docs/packages/http.md — File Operations section

The "File Operations" prose documented the pre-0.3.0 DOM-bound signatures that no longer exist:

  • Before: await http.downloadRequest('/reports/annual', 'annual-report', 'application/pdf') "triggers a browser save dialog"; const blobUrl = await http.previewRequest(...) returning a string.
  • Actual surface (verified against packages/http/src/types.ts:50,58 + http.ts:120,123): both are 2-arg (endpoint, options?) → Promise<AxiosResponse<Blob>>, transport-pure, no DOM, no save dialog.

Rewrote the prose examples to the consumer-owned orchestration:

  • download → triggerDownload(response.data, 'annual-report.pdf') via @script-development/fs-helpers
  • preview → URL.createObjectURL(response.data) with explicit revoke note

This aligns the prose with the already-current API-reference table further down (:255-256) — the table was right, the prose was stale (split-currency).

docs/index.md — hero feature

TypeScript 5.9+TypeScript 6.0+ (actual is ^6.0; first war-room TS6 territory).

Verification

  • npm run docs:build (VitePress) — clean, no broken markdown/links (vendor #__PURE__ warnings from @vueuse/core are pre-existing, unrelated).
  • oxfmt --check on both edited files — clean.
  • No src/ changes; no version bump; no publish trigger.

🤖 Generated with Claude Code

`docs/packages/http.md` File Operations documented the pre-0.3.0
DOM-bound `downloadRequest`/`previewRequest` (3-arg, browser save
dialog, blobUrl-string return) that no longer exists. The actual
0.3.0+ surface is transport-pure: `(endpoint, options?) →
Promise<AxiosResponse<Blob>>`, no DOM, no save dialog (verified against
`packages/http/src/types.ts:50,58` + `http.ts:120,123`). Rewrote the
prose examples to the consumer-owned download dance (`triggerDownload`
from fs-helpers / `URL.createObjectURL`), aligning the prose with the
already-current API-reference table.

`docs/index.md` hero feature claimed "TypeScript 5.9+"; actual is
`^6.0`. Fixed to "TypeScript 6.0+".

Docs-only — no `src/`, no publish trigger (publish fires on
`packages/*/package.json`). VitePress build clean.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@Goosterhof Goosterhof added the Agent Review Requested Requesting review of specialized AI review agents. label Jun 1, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying fs-packages with  Cloudflare Pages  Cloudflare Pages

Latest commit: 1e39ef7
Status: ✅  Deploy successful!
Preview URL: https://bd5a0c9d.fs-packages.pages.dev
Branch Preview URL: https://engineer-http-docs-drift.fs-packages.pages.dev

View logs

Copy link
Copy Markdown
Contributor Author

@Goosterhof Goosterhof left a comment

Choose a reason for hiding this comment

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

✅ Approve-worthy

0 blockers · 0 concerns · 1 nit · 2 praise

Docs-only PR correcting two drifted claims: the File Operations prose in docs/packages/http.md (which documented the pre-0.3.0 DOM-bound 3-arg signatures with a "browser save dialog") and the TypeScript 5.9+ hero line in docs/index.md. Every claim verifies against origin/main source. Self-review constraint forces COMMENT, but the diff is accurate and mergeable.

Verification

  • Signaturespackages/http/src/types.ts and http.ts on origin/main define both downloadRequest and previewRequest as (endpoint: string, options?: AxiosRequestConfig) => Promise<AxiosResponse<Blob>>. Two-arg, transport-only, no DOM. The diff's rewritten prose matches exactly; the old downloadRequest('/reports/annual', 'annual-report', 'application/pdf') 3-arg form does not exist on main. Correct fix.
  • triggerDownload examplepackages/helpers/src/dom-download.ts exports triggerDownload = (blob: Blob, filename: string): void. The new example triggerDownload(response.data, 'annual-report.pdf') matches the real signature. The source docblock itself points consumers at fs-helpers' triggerDownload, so the doc now mirrors the API author's own intent.
  • TS version — root package.json on main pins "typescript": "^6.0". 5.9+6.0+ is the honest claim.

Nits

  • docs/packages/http.md — the PR body cites the aligned API-reference table at :255-256, but the table at that range on main is "Middleware Registration". The File Operations reference table is presumably elsewhere in the file. Immaterial to the diff (which is accurate either way), but the PR-body line citation is off.

Praise

  • Split-currency caught correctly: the prose was stale while the API surface had already moved to transport-pure in 0.3.0. Fixing the narrative to match the shipped signatures — rather than the reverse — is the right direction.
  • The rewritten preview example explicitly notes URL.revokeObjectURL cleanup. That's the object-URL leak consumers actually hit; documenting the revoke is load-bearing, not boilerplate.

Automated war-room agent review — posted because this PR carries the Agent Review Requested label.

@jasperboerhof
Copy link
Copy Markdown
Contributor

PR Reviewer · claimed

@jasperboerhof
Copy link
Copy Markdown
Contributor

PR Reviewer · 9/10 · PASS

fs-packages #106 · AC anchor: none
Scores: acceptance SKIP · simplicity 10 · surface 9 · silent-failure – · efficiency –

No findings — all reviewers clean.

Action

merge-ready

Copy link
Copy Markdown
Contributor

@jasperboerhof jasperboerhof left a comment

Choose a reason for hiding this comment

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

Auto-approved — review verdict is PASS. See the verdict comment for the per-reviewer breakdown.

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

Labels

Agent Review Requested Requesting review of specialized AI review agents.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants