Title: fix(files): stop the embedded chat view being collaborative (streaming regressions) by waleedlatif1 · Pull Request #6107 · simstudioai/sim · GitHub
Open Graph Title: fix(files): stop the embedded chat view being collaborative (streaming regressions) by waleedlatif1 · Pull Request #6107 · simstudioai/sim
X Title: fix(files): stop the embedded chat view being collaborative (streaming regressions) by waleedlatif1 · Pull Request #6107 · simstudioai/sim
Description: Summary Making the embedded /chat resource FileViewer collaborative (#6095) violated the editor's core invariant that collaboration and agent-streaming are disjoint surfaces (rich-markdown-editor.tsx:791 — 'collaboration is enabled only on the Files page, which never streams'). The embedded view is a streaming surface, which caused three regressions: Copilot streaming showed only a chunk, didn't stream in. collaborationEnabled latches true at mount for a settled file → the streaming reconcile loop early-returns (:797) → streamingContent never applies. (Refresh mid-stream works because streamingAtMountRef is then true → collab off.) Editor stuck read-only after a stream. isEditable gates on collabReady (synced+seeded); the seed races the copilot write, so readiness can time out → read-only fallback. Files loaded much slower. Collab files render empty and block on a socket→seed round-trip (:296) + a redundant second blob read, discarding the already-fetched markdown. Fix Revert the embedded view to non-collaborative (remove the one collaborative prop). This restores the disjoint-surfaces invariant — the well-tested pre-#6095 behavior. The /chat panel is a copilot streaming/preview surface, not a multi-user collaborative one; the two-window live-caret case #6095 targeted never worked in a single tab anyway (Files and chat are separate routes). The Files-page collaborative editor is unchanged. Fixes Issues 1 & 3 fully, and Issue 2 for the embedded view (renders fetched markdown instantly, no seed round-trip). Issue 2 on the Files page is tracked separately (inherent to the collab seed design; needs a measured fix). Type of Change Bug fix (regression) Testing tsc clean, lint clean, 499 editor/collab tests pass. Traced the non-collab path: streaming reconcile runs, collabReady starts true so editing works post-stream, initialContent parses fetched markdown immediately. Pending live re-test on dev. 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 Making the embedded /chat resource FileViewer collaborative (#6095) violated the editor's core invariant that collaboration and agent-streaming are disjoint surfaces (rich-markdown-edit...
X Description: Summary Making the embedded /chat resource FileViewer collaborative (#6095) violated the editor's core invariant that collaboration and agent-streaming are disjoint surfaces (rich-markdown-...
Opengraph URL: https://github.com/simstudioai/sim/pull/6107
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:41a5648e-cc9e-e06d-8878-fcee36e28c03 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | B7C4:3E7424:B34968:FD82CD:6AFB59EB |
| html-safe-nonce | 2fb90e741f376cdfcb4b8c82a8e8eb65e86dfb30542ebf016b2d77a6fbfba6ef |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCN0M0OjNFNzQyNDpCMzQ5Njg6RkQ4MkNEOjZBRkI1OUVCIiwidmlzaXRvcl9pZCI6IjI1NjY4MjY3NzE3NjQ0MzU0MzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | df55208a7bad02a9dea7f372287539d30f8166b3f749a052a907e8d675d466ab |
| hovercard-subject-tag | pull_request:4173171745 |
| 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/6107/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 Making the embedded /chat resource FileViewer collaborative (#6095) violated the editor's core invariant that collaboration and agent-streaming are disjoint surfaces (rich-markdown-edit... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94 |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ef97164c52cf59bd10558ddec9c4f482763988 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width