Title: fix(axios-client): stop Activity Monitor sticking on "Pending" after a 200 by netanelgilad · Pull Request #201 · base44/javascript-sdk · GitHub
Open Graph Title: fix(axios-client): stop Activity Monitor sticking on "Pending" after a 200 by netanelgilad · Pull Request #201 · base44/javascript-sdk
X Title: fix(axios-client): stop Activity Monitor sticking on "Pending" after a 200 by netanelgilad · Pull Request #201 · base44/javascript-sdk
Description: What Mirror of the platform-side fix in apper (PR base44-dev/apper#12518). The host builder's Activity Monitor creates a "Pending" entry on api-request-start and resolves it on api-request-end. Both are sent to the parent window via postMessage, which serializes with the structured-clone algorithm. When a request/response body isn't structured-cloneable (a function, stream, or other host object), postMessage throws DataCloneError synchronously: success path — the throw was swallowed by an empty try/catch, so api-request-end was never delivered → the request stayed "Pending" forever despite returning 200. error path — posted no api-request-end at all, so failed requests also stuck on "Pending". Fix Route all activity messages through postActivityMessage, which retries with a JSON-sanitized payload (toSerializable) when the raw post throws — the status code is always delivered, the real body is preserved when cloneable. Also emit api-request-end on the error path. Tests New tests/unit/axios-client.test.ts simulates the browser (postMessage runs structuredClone) and asserts the end event is still delivered for a non-cloneable 200, plus toSerializable coverage. The guard fails on the old swallow-only code and passes with the fix. Full unit suite (159) + typecheck green. 🤖 Generated with Claude Code https://claude.ai/code/session_01TMZivSDxbkghHKnS1iyxvs
Open Graph Description: What Mirror of the platform-side fix in apper (PR base44-dev/apper#12518). The host builder's Activity Monitor creates a "Pending" entry on api-request-start and resolves it on api-re...
X Description: What Mirror of the platform-side fix in apper (PR base44-dev/apper#12518). The host builder's Activity Monitor creates a "Pending" entry on api-request-start and resolves ...
Opengraph URL: https://github.com/base44/javascript-sdk/pull/201
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9ab9ef61-1049-07e3-7694-359235a5a1f3 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E876:2C345B:1B83BF:2461C6:6A4C245F |
| html-safe-nonce | 81d1fd76461fada7b031f0b326820b0e895a692e1d6b08543ce815bea3bbdf63 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODc2OjJDMzQ1QjoxQjgzQkY6MjQ2MUM2OjZBNEMyNDVGIiwidmlzaXRvcl9pZCI6IjM1NjIzNTMzNDE0NjI0ODgxNTkiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 71b09aa97ad9058e4eb5f6ad14386969ae5d8a9784ce1c090c3cb58c32034951 |
| hovercard-subject-tag | pull_request:3906456305 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/base44/javascript-sdk/pull/201/files |
| twitter:image | https://avatars.githubusercontent.com/u/3474905?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/3474905?s=400&v=4 |
| og:image:alt | What Mirror of the platform-side fix in apper (PR base44-dev/apper#12518). The host builder's Activity Monitor creates a "Pending" entry on api-request-start and resolves it on api-re... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1b6b16d04026f131a36d57e3b01d0f4d26a51800edf48bf5ed0256e0ac905511 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/base44/javascript-sdk git https://github.com/base44/javascript-sdk.git |
| octolytics-dimension-user_id | 234699998 |
| octolytics-dimension-user_login | base44 |
| octolytics-dimension-repository_id | 939374418 |
| octolytics-dimension-repository_nwo | base44/javascript-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 939374418 |
| octolytics-dimension-repository_network_root_nwo | base44/javascript-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9ee13484b32cf23e15fde191da4c9aa47d41201c |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width