René's URL Explorer Experiment


Title: fix(copilot): load workflow chat history through the windowed chat routes by waleedlatif1 · Pull Request #9113 · simstudioai/sim · GitHub

Open Graph Title: fix(copilot): load workflow chat history through the windowed chat routes by waleedlatif1 · Pull Request #9113 · simstudioai/sim

X Title: fix(copilot): load workflow chat history through the windowed chat routes by waleedlatif1 · Pull Request #9113 · simstudioai/sim

Description: Summary Workflow Copilot panel chats are stored as copilot chats, but the chat detail route only served mothership chats. Every panel history load got a 404 and fell back to the legacy /api/mothership/chat?chatId= read, whose response has no mode — which the history parser requires — so the panel showed "Failed to load chat history" on every load and refetch, after reading the whole transcript The chat detail route now serves both chat types; its authorization (authorizeCopilotChatRow) already checks workflow read for workflow chats Older pages and stream status serve copilot chats too, behind the same rule as the detail read: the workflow must still be readable, and a workspace Plan chat needs Plan mode on (requireOwnedChatReadable, sharing authorizeChatWorkflowRead / isChatModeAvailable with the detail read). Other chat use cases are unchanged for every chat that carries a workspace A workflow chat row from before chats carried a workspace (nullable workspace_id, never backfilled) is scoped through its workflow while its owner may read that workflow, so these chats load their older pages and stream status instead of being refused Removed the client 404 fallback and the now-unused legacy GET (app/api/copilot/chat/queries.ts, getAccessibleCopilotChat, its column set and query schemas); the list branch of that GET had no callers either. Shrunk the explicit-any, source-conventions and unused-exports baselines accordingly Rollout: a new client against an old server gets a plain 404 until the deploy finishes; the fallback it loses was already failing to parse Type of Change Bug fix Testing Integration: the mothership detail route on a workflow copilot chat returns 200 with its mode and the same snapshot handling (replay-budget.integration.ts; 404 on the current code); older pages and stream status serve a workflow copilot chat including a legacy row without a workspace, and refuse one whose workflow is archived (transcript-pages.integration.ts, read-stream-status.integration.ts; the served cases fail on the current code) Ran locally: focused unit tests for the chat lifecycle, detail route, chat history hook and chat application use cases (10 files, 129 tests), apps/sim type-check, biome, check:explicit-any, check:unused-exports, check:test-patterns, check:comment-hygiene, check:boundaries; type-check, full audits and integration suites run in CI Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) 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 Workflow Copilot panel chats are stored as copilot chats, but the chat detail route only served mothership chats. Every panel history load got a 404 and fell back to the legacy /api/mother...

X Description: Summary Workflow Copilot panel chats are stored as copilot chats, but the chat detail route only served mothership chats. Every panel history load got a 404 and fell back to the legacy /api/mother...

Opengraph URL: https://github.com/simstudioai/sim/pull/9113

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:b72f5790-c161-0b17-4efb-b4554babf4cf
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idA6A2:AF687:B7CC3B:FCAB7C:6AFB5290
html-safe-nonceb506f1ae14a1e0770914b116c8cba3dc86a634356bb3d51e5396de979b7a716a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNkEyOkFGNjg3OkI3Q0MzQjpGQ0FCN0M6NkFGQjUyOTAiLCJ2aXNpdG9yX2lkIjoiNjU4ODQ0NDk5MzA4NDE1MDQxNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac97cbd19b0910ddd7ff0f060a8a3f867e331ffb16f549485a080b4a455a26ddd9
hovercard-subject-tagpull_request:4883728604
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/9113/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Workflow Copilot panel chats are stored as copilot chats, but the chat detail route only served mothership chats. Every panel history load got a 404 and fell back to the legacy /api/mother...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/9113/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F9113%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F9113%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/9113/files
Reloadhttps://github.com/simstudioai/sim/pull/9113/files
Reloadhttps://github.com/simstudioai/sim/pull/9113/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
fix/copilot-chat-history-windowedhttps://github.com/simstudioai/sim/tree/fix/copilot-chat-history-windowed
Conversation 8 https://github.com/simstudioai/sim/pull/9113
Commits 3 https://github.com/simstudioai/sim/pull/9113/commits
Checks 51 https://github.com/simstudioai/sim/pull/9113/checks
Files changed https://github.com/simstudioai/sim/pull/9113/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9113/files
fix(copilot): load workflow chat history through the windowed chat routes https://github.com/simstudioai/sim/pull/9113/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/9113/files
d563a99 fix(copilot): load workflow chat history through the windowed chat ro… waleedlatif1 Oct 16, 2026 https://github.com/simstudioai/sim/pull/9113/commits/d563a9916aaf8cdf50e5abb9f0958539316af3f6
dc79a92 fix(copilot): scope workflow chats without a workspace through their … waleedlatif1 Oct 16, 2026 https://github.com/simstudioai/sim/pull/9113/commits/dc79a922b521bde0c707c913f49c2c49248f7ba5
62449f1 test(copilot): name each workflow chat fixture's workflow uniquely waleedlatif1 Oct 16, 2026 https://github.com/simstudioai/sim/pull/9113/commits/62449f1a073054587d78ca1c9aa2dcfaea6332ec
Clear filters https://github.com/simstudioai/sim/pull/9113/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9113/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9113/files
queries.ts https://github.com/simstudioai/sim/pull/9113/files#diff-71cb4c7fe6b0db7f968693fcce01b4964dfbb19748514b01c1b03ca4b0524c2c
route.ts https://github.com/simstudioai/sim/pull/9113/files#diff-d395799e1832a78abe482908ee9d11258195ed5a102a98aba269c3f022186115
route.ts https://github.com/simstudioai/sim/pull/9113/files#diff-4c5e8c40518ea807e723d9aa9ba2b447c98e3ac89dbcb79481be95192b4aef2b
mothership-chats.ts https://github.com/simstudioai/sim/pull/9113/files#diff-d93326dc7ad3c0d6856933a9ba910634ba50d1e7c3292f43f7aaa85ca2979311
copilot.ts https://github.com/simstudioai/sim/pull/9113/files#diff-8b5dc9d30733bae6d14041b210bc4a1aacaa52829dcb1341289cf86395178fd0
mothership-chats.ts https://github.com/simstudioai/sim/pull/9113/files#diff-960eb86dfce0edf82ee9d3ba690f1644349c37467f238ae8be028ece995bc21b
context.ts https://github.com/simstudioai/sim/pull/9113/files#diff-53ba708ba4ce73b692c29881bcce54f3849d93c97886844a7c8a1d6bce501a2b
read-older-messages.ts https://github.com/simstudioai/sim/pull/9113/files#diff-86ceb0d609f384849f832b574a288e02f04e954a95974dc533be9a8debea6b4e
read-stream-status.integration.ts https://github.com/simstudioai/sim/pull/9113/files#diff-b80b277827f81dc8804137a46fa99f267779f9ac0fa24d7208155aa3be5d9e40
read-stream-status.ts https://github.com/simstudioai/sim/pull/9113/files#diff-0b6e70eed6bbff7028c3aa3cb9f4ca40c9cfcdf3444ed39abbc1056648a109f6
lifecycle.test.ts https://github.com/simstudioai/sim/pull/9113/files#diff-eefe8b1f45c8163e3a07597b5fe9048bceec419e009b89546ec97aa748a4483c
lifecycle.ts https://github.com/simstudioai/sim/pull/9113/files#diff-5c6b5b0ac8f130fb574fdf2ed39d7ee01d1e79836b4be518f043416a8457f107
transcript-pages.integration.ts https://github.com/simstudioai/sim/pull/9113/files#diff-40b72ddd658b771a64ac1ab76c9382c824265e378d6aa2cd2609031b643bc58c
replay-budget.integration.ts https://github.com/simstudioai/sim/pull/9113/files#diff-04bace9e9f0119a69011fc277d61f57754d0a1af8b9ad2fad75f07c6671617c1
mothership-chat-lifecycle.mock.ts https://github.com/simstudioai/sim/pull/9113/files#diff-0e83bbd3456658f34de1520332a8cfa81369fd80d21ded700e7a4375ecf725d7
check-explicit-any.baseline.json https://github.com/simstudioai/sim/pull/9113/files#diff-780d04116ec981737479435cdb0364b49047711f2dfb93b671a9be50a1b0bb27
check-source-conventions.baseline.json https://github.com/simstudioai/sim/pull/9113/files#diff-f2c7074fc5e74c3cb4f2c59eae74fce826fead48160a9ca8858cfabd077cbb93
check-unused-exports.baseline.json https://github.com/simstudioai/sim/pull/9113/files#diff-4b59a8526a4f226dffb0fbf6b8ec25d3082ab45da697f584eaaca4bd483c928f
apps/sim/app/api/copilot/chat/queries.tshttps://github.com/simstudioai/sim/pull/9113/files#diff-71cb4c7fe6b0db7f968693fcce01b4964dfbb19748514b01c1b03ca4b0524c2c
View file https://github.com/simstudioai/sim/blob/e25a6cf085f75c62f4af01a710be11097c5ca6ed/apps/sim/app/api/copilot/chat/queries.ts
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/simstudioai/sim/pull/9113/files
apps/sim/app/api/mothership/chat/route.tshttps://github.com/simstudioai/sim/pull/9113/files#diff-d395799e1832a78abe482908ee9d11258195ed5a102a98aba269c3f022186115
View file https://github.com/simstudioai/sim/blob/62449f1a073054587d78ca1c9aa2dcfaea6332ec/apps/sim/app/api/mothership/chat/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9113/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9113/files#diff-d395799e1832a78abe482908ee9d11258195ed5a102a98aba269c3f022186115
https://github.com/simstudioai/sim/pull/9113/files#diff-d395799e1832a78abe482908ee9d11258195ed5a102a98aba269c3f022186115
apps/sim/app/api/mothership/chats/[chatId]/route.tshttps://github.com/simstudioai/sim/pull/9113/files#diff-4c5e8c40518ea807e723d9aa9ba2b447c98e3ac89dbcb79481be95192b4aef2b
View file https://github.com/simstudioai/sim/blob/62449f1a073054587d78ca1c9aa2dcfaea6332ec/apps/sim/app/api/mothership/chats/%5BchatId%5D/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9113/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9113/files#diff-4c5e8c40518ea807e723d9aa9ba2b447c98e3ac89dbcb79481be95192b4aef2b
https://github.com/simstudioai/sim/pull/9113/files#diff-4c5e8c40518ea807e723d9aa9ba2b447c98e3ac89dbcb79481be95192b4aef2b
apps/sim/hooks/queries/mothership-chats.tshttps://github.com/simstudioai/sim/pull/9113/files#diff-d93326dc7ad3c0d6856933a9ba910634ba50d1e7c3292f43f7aaa85ca2979311
View file https://github.com/simstudioai/sim/blob/62449f1a073054587d78ca1c9aa2dcfaea6332ec/apps/sim/hooks/queries/mothership-chats.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9113/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9113/files#diff-d93326dc7ad3c0d6856933a9ba910634ba50d1e7c3292f43f7aaa85ca2979311
https://github.com/simstudioai/sim/pull/9113/files#diff-d93326dc7ad3c0d6856933a9ba910634ba50d1e7c3292f43f7aaa85ca2979311
apps/sim/lib/api/contracts/copilot.tshttps://github.com/simstudioai/sim/pull/9113/files#diff-8b5dc9d30733bae6d14041b210bc4a1aacaa52829dcb1341289cf86395178fd0
View file https://github.com/simstudioai/sim/blob/62449f1a073054587d78ca1c9aa2dcfaea6332ec/apps/sim/lib/api/contracts/copilot.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9113/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9113/files#diff-8b5dc9d30733bae6d14041b210bc4a1aacaa52829dcb1341289cf86395178fd0
https://github.com/simstudioai/sim/pull/9113/files#diff-8b5dc9d30733bae6d14041b210bc4a1aacaa52829dcb1341289cf86395178fd0
apps/sim/lib/api/contracts/mothership-chats.tshttps://github.com/simstudioai/sim/pull/9113/files#diff-960eb86dfce0edf82ee9d3ba690f1644349c37467f238ae8be028ece995bc21b
View file https://github.com/simstudioai/sim/blob/62449f1a073054587d78ca1c9aa2dcfaea6332ec/apps/sim/lib/api/contracts/mothership-chats.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9113/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9113/files#diff-960eb86dfce0edf82ee9d3ba690f1644349c37467f238ae8be028ece995bc21b
https://github.com/simstudioai/sim/pull/9113/files#diff-960eb86dfce0edf82ee9d3ba690f1644349c37467f238ae8be028ece995bc21b
apps/sim/lib/mothership/chat/application/context.tshttps://github.com/simstudioai/sim/pull/9113/files#diff-53ba708ba4ce73b692c29881bcce54f3849d93c97886844a7c8a1d6bce501a2b
View file https://github.com/simstudioai/sim/blob/62449f1a073054587d78ca1c9aa2dcfaea6332ec/apps/sim/lib/mothership/chat/application/context.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9113/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9113/files#diff-53ba708ba4ce73b692c29881bcce54f3849d93c97886844a7c8a1d6bce501a2b
https://github.com/simstudioai/sim/pull/9113/files#diff-53ba708ba4ce73b692c29881bcce54f3849d93c97886844a7c8a1d6bce501a2b
https://github.com/simstudioai/sim/pull/9113/files#diff-53ba708ba4ce73b692c29881bcce54f3849d93c97886844a7c8a1d6bce501a2b
https://github.com/simstudioai/sim/pull/9113/files#diff-53ba708ba4ce73b692c29881bcce54f3849d93c97886844a7c8a1d6bce501a2b
apps/sim/lib/mothership/chat/application/read-older-messages.tshttps://github.com/simstudioai/sim/pull/9113/files#diff-86ceb0d609f384849f832b574a288e02f04e954a95974dc533be9a8debea6b4e
View file https://github.com/simstudioai/sim/blob/62449f1a073054587d78ca1c9aa2dcfaea6332ec/apps/sim/lib/mothership/chat/application/read-older-messages.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9113/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9113/files#diff-86ceb0d609f384849f832b574a288e02f04e954a95974dc533be9a8debea6b4e
https://github.com/simstudioai/sim/pull/9113/files#diff-86ceb0d609f384849f832b574a288e02f04e954a95974dc533be9a8debea6b4e
https://github.com/simstudioai/sim/pull/9113/files#diff-86ceb0d609f384849f832b574a288e02f04e954a95974dc533be9a8debea6b4e
https://github.com/simstudioai/sim/pull/9113/files#diff-86ceb0d609f384849f832b574a288e02f04e954a95974dc533be9a8debea6b4e
Please reload this pagehttps://github.com/simstudioai/sim/pull/9113/files
https://github.com/simstudioai/sim/pull/9113/files#diff-86ceb0d609f384849f832b574a288e02f04e954a95974dc533be9a8debea6b4e
Please reload this pagehttps://github.com/simstudioai/sim/pull/9113/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9113/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.