inspector/clients/web/src/lib
Repository files (latest commit first)
Filename Latest commit message Latest commit date
cliffhall 8f4aa7f8af fix(web): reject drafts whose digits or types would not survive being sent
Copilot's seventh pass, three comments, all the same class: the editor showing
one value while the wire carries another.

- `JSON.parse` rounds a whole number past 2^53−1 to the nearest double, so a
  draft reading `{"id":9007199254740993}` submits `…992`. New
  `hasRoundedInteger`, applied by all four JSON-draft parsers — the raw
  arguments editor, `SchemaJsonField`, the Edit-and-replay modal, and
  `parseJsonObjectDraft`, which Copilot did not flag but shares the defect.

  It is narrower than "unsafe integer": it also requires the number's shortest
  form to be written out in full, because JS stringifies from 1e21 upward in
  exponent form and such a value was typed that way — `{"n":1e308}` is a
  legitimate `_meta` value that `parseJsonObjectDraft`'s tests already pin as
  accepted. It still refuses the rare full-form integer that happens to be
  exactly representable, erring toward refusing a sendable value rather than
  misreporting an unsendable one — the trade `toNumericValue` already makes.

- `getPrompt` runs `convertPromptArguments`, which JSON-stringifies every
  non-string argument, so `{"count":2}` leaves as `{"count":"2"}` while the
  editor still shows a number. `reshapedReplayParam` now rejects a non-string
  prompt argument. Not a workaround: the spec types
  `GetPromptRequest.params.arguments` as `Record<string, string>`, so a string
  is the only thing a prompt argument can be. `tools/call` is untouched —
  `callTool` sends its arguments as given.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UL9retfvAXRgvi6EWk4SY4
Signed-off-by: cliffhall <cliff@futurescale.com>
2026-08-27 04:34:45 -04:00
..
appElicitationController.test.ts fix(apps): bind app elicitations to the connection that made them 2026-08-22 22:55:43 -04:00
appElicitationController.ts fix(apps): bind app elicitations to the connection that made them 2026-08-22 22:55:43 -04:00
authToken.test.ts chore(web): address Copilot review on #2127 2026-08-26 18:24:09 -04:00
authToken.ts chore(web): move App.tsx's module-level block into files (#2127) 2026-08-26 18:07:40 -04:00
browserTabVisibility.test.ts refactor(web): sharpen the src/lib vs src/utils rule and move misfiled modules (#1784) 2026-07-25 22:24:30 -04:00
browserTabVisibility.ts refactor(web): sharpen the src/lib vs src/utils rule and move misfiled modules (#1784) 2026-07-25 22:24:30 -04:00
clearServerOAuthState.test.ts refactor(web): sharpen the src/lib vs src/utils rule and move misfiled modules (#1784) 2026-07-25 22:24:30 -04:00
clearServerOAuthState.ts refactor(web): sharpen the src/lib vs src/utils rule and move misfiled modules (#1784) 2026-07-25 22:24:30 -04:00
downloadFile.test.ts refactor(web): sharpen the src/lib vs src/utils rule and move misfiled modules (#1784) 2026-07-25 22:24:30 -04:00
downloadFile.ts refactor(web): rename "History" tab/feature to "Protocol" (#1623) 2026-07-09 19:04:54 -04:00
environmentFactory.test.ts refactor: migrate to RemoteOAuthStorage for web OAuth handling 2026-07-03 13:11:13 -07:00
environmentFactory.ts refactor: migrate to RemoteOAuthStorage for web OAuth handling 2026-07-03 13:11:13 -07:00
oauthResume.test.ts fix(web): drop a pre-#2001 selectedToolName on OAuth resume 2026-08-17 00:19:22 -04:00
oauthResume.ts fix(web): drop a pre-#2001 selectedToolName on OAuth resume 2026-08-17 00:19:22 -04:00
protocolReplay.test.ts fix(web): reject drafts whose digits or types would not survive being sent 2026-08-27 04:34:45 -04:00
protocolReplay.ts fix(web): reject drafts whose digits or types would not survive being sent 2026-08-27 04:34:45 -04:00
publishAppDocument.test.ts fix(web): move the app origin off 6276, bound the publish route 2026-08-24 08:45:40 -04:00
publishAppDocument.ts feat(web): honor _meta.ui.domain with a dedicated app origin 2026-08-24 08:45:40 -04:00
refreshingPersist.test.ts fix(auth): stop a config-only PUT deleting stored secrets (#2084) 2026-08-22 23:30:17 -04:00
refreshingPersist.ts fix(auth): stop a config-only PUT deleting stored secrets (#2084) 2026-08-22 23:30:17 -04:00
remoteOAuthStorage.test.ts refactor: migrate to RemoteOAuthStorage for web OAuth handling 2026-07-03 13:11:13 -07:00
remoteOAuthStorage.ts fix(auth): guard OAuth-storage async paths against unhandled rejections 2026-07-08 10:59:40 -04:00