Title: fix(chat): invalidate deployment queries after a chat mutation by waleedlatif1 · Pull Request #6223 · simstudioai/sim · GitHub
Open Graph Title: fix(chat): invalidate deployment queries after a chat mutation by waleedlatif1 · Pull Request #6223 · simstudioai/sim
X Title: fix(chat): invalidate deployment queries after a chat mutation by waleedlatif1 · Pull Request #6223 · simstudioai/sim
Description: Summary PATCH /api/chat/manage/[id] calls performFullDeploy when the workflow has drifted from its active deployment (route.ts:183-190), so editing a chat can mint a new deployment version. useUpdateChat invalidated only chatStatus and chatDetail, so deploymentKeys.info / versions / deployedState went stale. The deployment panel kept showing the previous version and a stale "needs redeployment" indicator until the 30s/5min staleTime expired or the window refocused. Both chat mutations now route through invalidateDeploymentQueries, the shared helper the rest of the deployment surface uses (useUndeployWorkflow follows the same pattern). That also picks up deployedState, which useCreateChat's hand-rolled list omitted even though performChatDeploy replaces the deployed workflow state — so the deployed-state diff viewer could show stale content after deploying a chat. Failure scenario Edit a chat's welcome message while the workflow draft has drifted → the PATCH redeploys to v4 → the deployment panel still shows v3 as latest, with the redeploy prompt still visible. Type of Change Bug fix Testing New hooks/queries/chats.test.tsx covers both mutations, following the mcp.test.tsx render-hook pattern. Verified to fail against the previous invalidation (reverting useUpdateChat turns the test red). 115 tests pass across hooks/queries; typecheck and lint clean. Not exercised in a live browser — the assertion is on which query keys get invalidated. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)
Open Graph Description: Summary PATCH /api/chat/manage/[id] calls performFullDeploy when the workflow has drifted from its active deployment (route.ts:183-190), so editing a chat can mint a new deployment version. useUpd...
X Description: Summary PATCH /api/chat/manage/[id] calls performFullDeploy when the workflow has drifted from its active deployment (route.ts:183-190), so editing a chat can mint a new deployment version. useUpd...
Opengraph URL: https://github.com/simstudioai/sim/pull/6223
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:add10750-11ec-e52f-440f-2ec4c2b602b0 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | C5B2:5A71D:AC0693:EBAD13:6AFB4F2F |
| html-safe-nonce | e09a55063b541877173b697d74a0b9aabcb7adc07738e68c70581e411ed83885 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNUIyOjVBNzFEOkFDMDY5MzpFQkFEMTM6NkFGQjRGMkYiLCJ2aXNpdG9yX2lkIjoiNjM3NjQzOTM3NzIxOTUwNTk2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 32b91d611e3484747d657f6fe32ecb4ee3eba23885002d301de7c288111527dc |
| hovercard-subject-tag | pull_request:4197567870 |
| 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/simstudioai/sim/pull/6223/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary PATCH /api/chat/manage/[id] calls performFullDeploy when the workflow has drifted from its active deployment (route.ts:183-190), so editing a chat can mint a new deployment version. useUpd... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | acf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| 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 | 26504db649b58525278f77a52b80ba5f10d5f4de |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width