René's URL Explorer Experiment


Title: fix(tables): make the atomic per-cell merge the only row-write path (fix row-level LWW) by waleedlatif1 · Pull Request #5970 · simstudioai/sim · GitHub

Open Graph Title: fix(tables): make the atomic per-cell merge the only row-write path (fix row-level LWW) by waleedlatif1 · Pull Request #5970 · simstudioai/sim

X Title: fix(tables): make the atomic per-cell merge the only row-write path (fix row-level LWW) by waleedlatif1 · Pull Request #5970 · simstudioai/sim

Description: Summary A table row stores every cell in one jsonb data column. Row updates ran a full-object read-modify-write (write the whole data), which is row-level last-write-wins: two users — or a user and an agent/copilot — editing different cells of the same row concurrently clobbered each other. updateRow now always writes the changed cells via a shared jsonbMergePatch helper (data = data || {changed}::jsonb), which Postgres evaluates against the current committed row under its write lock — so concurrent edits to different cells both survive. The dataWriteMode: 'replace' | 'patch' option is removed: replace never actually replaced (the merge only ever adds/overwrites keys, never deletes), so it was content-identical to patch and differed only by being racy — no caller benefited from it. batchUpdateRows (the multi-cell grid / copilot batch path) applies the same per-row merge, so batch edits can't clobber a concurrent single-cell edit either. Because the fix lives entirely in the service layer, the user-facing route + copilot callers are unchanged vs staging, and the two data:{} exec-clear writes in background/workflow-column-execution.ts are covered automatically. upsertRow (whole-row by design) and updateRowsByFilter (already ||-concat) are untouched. computedWrite (the workflow-engine lock exemption) is unaffected. Type of Change Bug fix Testing update-row.test.ts: asserts updateRow and batchUpdateRows each write data || {changed}::jsonb carrying only the changed cells (never the whole row). Reviewed via a 4-lens parallel audit (correctness/concurrency, downstream side-effects, completeness/scope, conventions): confirmed non-concurrent parity, no side effects (returned row unchanged; peers reconcile via authoritative refetch), and the mechanism is already prod-proven by cell-write.ts. check:api-validation:strict, check:utils, tsc --noEmit, biome, and the table + copilot suites (481 + 111 + 46) pass. 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 A table row stores every cell in one jsonb data column. Row updates ran a full-object read-modify-write (write the whole data), which is row-level last-write-wins: two users — or a user an...

X Description: Summary A table row stores every cell in one jsonb data column. Row updates ran a full-object read-modify-write (write the whole data), which is row-level last-write-wins: two users — or a user an...

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

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:b9de61ce-fb02-516a-53f4-ee16028b6fee
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD7B2:23CE74:B464A2:F8160B:6AFB5288
html-safe-nonce1ed4880929d43e495071ddad5d2c0109df0f3bb615e09f9b69251ff261593099
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0IyOjIzQ0U3NDpCNDY0QTI6RjgxNjBCOjZBRkI1Mjg4IiwidmlzaXRvcl9pZCI6Ijg2MjA2Mzc0MTIzMjM0NDc0MzIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac0c30a1d35b9b52d67e6624ec34497e40f8ee5becfa835a0140e1f79445771590
hovercard-subject-tagpull_request:4137395713
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/5970/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 A table row stores every cell in one jsonb data column. Row updates ran a full-object read-modify-write (write the whole data), which is row-level last-write-wins: two users — or a user an...
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/5970/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5970%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%2F5970%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/5970/files
Reloadhttps://github.com/simstudioai/sim/pull/5970/files
Reloadhttps://github.com/simstudioai/sim/pull/5970/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
table-cell-atomic-patchhttps://github.com/simstudioai/sim/tree/table-cell-atomic-patch
Conversation 7 https://github.com/simstudioai/sim/pull/5970
Commits 3 https://github.com/simstudioai/sim/pull/5970/commits
Checks 20 https://github.com/simstudioai/sim/pull/5970/checks
Files changed https://github.com/simstudioai/sim/pull/5970/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5970/files
fix(tables): make the atomic per-cell merge the only row-write path (fix row-level LWW) https://github.com/simstudioai/sim/pull/5970/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/5970/files
c6b101a fix(tables): write single-cell edits as an atomic JSONB patch (fix ro… waleedlatif1 Jul 26, 2026 https://github.com/simstudioai/sim/pull/5970/commits/c6b101a40066fb8cb37342382679b4d56f39ddca
7aff1ee test(tables): drop banned inline error-message pattern in route test … waleedlatif1 Jul 26, 2026 https://github.com/simstudioai/sim/pull/5970/commits/7aff1ee1d1e05b779aa35ffafffa727ff89e78f9
e7c903b refactor(tables): make the atomic cell-merge the only row-write path waleedlatif1 Jul 27, 2026 https://github.com/simstudioai/sim/pull/5970/commits/e7c903bb277f92fcf60c6582966ac5b00d0aa435
Clear filters https://github.com/simstudioai/sim/pull/5970/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5970/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5970/files
update-row.test.ts https://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
cell-write.test.ts https://github.com/simstudioai/sim/pull/5970/files#diff-0292944126e4718fda7829c6cfce842cd5186c3a4954e9d2ce0d04a534d9c91c
cell-write.ts https://github.com/simstudioai/sim/pull/5970/files#diff-8befc7502ca731cc5485a71bc410494ef85b85d4ef3449e1b9a579ce8badad52
service.ts https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
workflow-columns.ts https://github.com/simstudioai/sim/pull/5970/files#diff-2d2727f03b87c89b81e1bc74ad4faea8bf94a1d679ddf9b1ec098a8b22c83019
apps/sim/lib/table/__tests__/update-row.test.tshttps://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
View file https://github.com/simstudioai/sim/blob/e7c903bb277f92fcf60c6582966ac5b00d0aa435/apps/sim/lib/table/__tests__/update-row.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5970/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
https://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
https://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
https://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
https://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
https://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
https://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
https://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
https://github.com/simstudioai/sim/pull/5970/files#diff-e8d9471b9eadbae982819875ea48865b31f9e068727463f31d484deb0a748939
apps/sim/lib/table/cell-write.test.tshttps://github.com/simstudioai/sim/pull/5970/files#diff-0292944126e4718fda7829c6cfce842cd5186c3a4954e9d2ce0d04a534d9c91c
View file https://github.com/simstudioai/sim/blob/e7c903bb277f92fcf60c6582966ac5b00d0aa435/apps/sim/lib/table/cell-write.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5970/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5970/files#diff-0292944126e4718fda7829c6cfce842cd5186c3a4954e9d2ce0d04a534d9c91c
https://github.com/simstudioai/sim/pull/5970/files#diff-0292944126e4718fda7829c6cfce842cd5186c3a4954e9d2ce0d04a534d9c91c
apps/sim/lib/table/cell-write.tshttps://github.com/simstudioai/sim/pull/5970/files#diff-8befc7502ca731cc5485a71bc410494ef85b85d4ef3449e1b9a579ce8badad52
View file https://github.com/simstudioai/sim/blob/e7c903bb277f92fcf60c6582966ac5b00d0aa435/apps/sim/lib/table/cell-write.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5970/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5970/files#diff-8befc7502ca731cc5485a71bc410494ef85b85d4ef3449e1b9a579ce8badad52
https://github.com/simstudioai/sim/pull/5970/files#diff-8befc7502ca731cc5485a71bc410494ef85b85d4ef3449e1b9a579ce8badad52
apps/sim/lib/table/rows/service.tshttps://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
View file https://github.com/simstudioai/sim/blob/e7c903bb277f92fcf60c6582966ac5b00d0aa435/apps/sim/lib/table/rows/service.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5970/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
https://github.com/simstudioai/sim/pull/5970/files#diff-bb7e45c4b7c8d660db1d230975eb35231ae2616360572a342fd56d37296bb23f
apps/sim/lib/table/workflow-columns.tshttps://github.com/simstudioai/sim/pull/5970/files#diff-2d2727f03b87c89b81e1bc74ad4faea8bf94a1d679ddf9b1ec098a8b22c83019
View file https://github.com/simstudioai/sim/blob/e7c903bb277f92fcf60c6582966ac5b00d0aa435/apps/sim/lib/table/workflow-columns.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5970/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5970/files#diff-2d2727f03b87c89b81e1bc74ad4faea8bf94a1d679ddf9b1ec098a8b22c83019
https://github.com/simstudioai/sim/pull/5970/files#diff-2d2727f03b87c89b81e1bc74ad4faea8bf94a1d679ddf9b1ec098a8b22c83019
Please reload this pagehttps://github.com/simstudioai/sim/pull/5970/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.