René's URL Explorer Experiment


Title: chore(utils): consolidate record guards and remove dead code by waleedlatif1 · Pull Request #6715 · simstudioai/sim · GitHub

Open Graph Title: chore(utils): consolidate record guards and remove dead code by waleedlatif1 · Pull Request #6715 · simstudioai/sim

X Title: chore(utils): consolidate record guards and remove dead code by waleedlatif1 · Pull Request #6715 · simstudioai/sim

Description: Summary Consolidate ~54 duplicate record-guard implementations onto the shared @sim/utils/object helpers. Adds toRecord/toRecordOrNull for the two coercion shapes 14 local helpers were each re-deriving; both preserve identity on a hit. Fix a GitLab webhook crash: const ref = (b.ref as string) || '' only catches falsy, so a truthy non-string ({"ref": 12345}) reached .replace and threw. That runs in the background worker after the delivery is already 200-ACKed, and GitLab does not auto-retry, so the delivery was lost silently. Delete 465 unreachable symbols (~6,750 lines): 31 module-local functions and 434 stranded exports, including whole abandoned paths (findWebhookAndWorkflow, calculateBillingProjection, unused React Query hooks and admin contracts). The local copies were not interchangeable — several omitted the array exclusion, and three webhook helpers (pagerduty/zendesk/gitlab) did (value as Record) || {}, which type-checks nothing. Each call site was reviewed individually rather than swept; two sites were reverted where isRecordLike narrowing broke a downstream object as Interface cast. edit-workflow/validation.ts is deliberately left array-permissive: its Object.entries walk mirrors the equally unguarded walk in operations.ts, so tightening only the validation side would stop platform-managed API keys from being stripped while the apply side still creates those child blocks. That pair needs to change together. Type of Change Bug fix (GitLab webhook ref) Chore / refactor Testing bunx turbo run type-check (23 workspaces), full apps/sim suite (25,290 tests), all 26 audits, and a production next build. Dead-code candidates were verified against unfiltered repo-wide searches plus registry, dynamic-import, barrel, and .mdx reachability; 29 candidates were confirmed live and kept. 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 Consolidate ~54 duplicate record-guard implementations onto the shared @sim/utils/object helpers. Adds toRecord/toRecordOrNull for the two coercion shapes 14 local helpers were each re-der...

X Description: Summary Consolidate ~54 duplicate record-guard implementations onto the shared @sim/utils/object helpers. Adds toRecord/toRecordOrNull for the two coercion shapes 14 local helpers were each re-der...

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

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:e2925a66-7b55-960a-4c22-79df445a622f
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD7FE:3C556:AF0E97:F0EA78:6AFB5179
html-safe-nonced0f3fb3d9652a66f3b36981c54a6409991e992c3617786abc58a2602a405d891
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEN0ZFOjNDNTU2OkFGMEU5NzpGMEVBNzg6NkFGQjUxNzkiLCJ2aXNpdG9yX2lkIjoiNDAxNjcwNTIzMDQ3MzM0MjY1IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac05c3070fd1cc4c295e25fcad78522fba7f1c33d64b8e9464c6b50256189c717f
hovercard-subject-tagpull_request:4283893064
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/6715/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 Consolidate ~54 duplicate record-guard implementations onto the shared @sim/utils/object helpers. Adds toRecord/toRecordOrNull for the two coercion shapes 14 local helpers were each re-der...
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/6715/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6715%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%2F6715%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/6715/files
Reloadhttps://github.com/simstudioai/sim/pull/6715/files
Reloadhttps://github.com/simstudioai/sim/pull/6715/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
chore/nuke-record-guardshttps://github.com/simstudioai/sim/tree/chore/nuke-record-guards
Conversation 4 https://github.com/simstudioai/sim/pull/6715
Commits 6 https://github.com/simstudioai/sim/pull/6715/commits
Checks 30 https://github.com/simstudioai/sim/pull/6715/checks
Files changed https://github.com/simstudioai/sim/pull/6715/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6715/files
chore(utils): consolidate record guards and remove dead code https://github.com/simstudioai/sim/pull/6715/files#top
Show all changes 6 commits https://github.com/simstudioai/sim/pull/6715/files
a041474 refactor: consolidate local isRecord guards onto shared isRecordLike waleedlatif1 Aug 14, 2026 https://github.com/simstudioai/sim/pull/6715/commits/a041474a7b237c93beba5f4948be0d231592f46f
0fa258f refactor: replace inline record guards with isRecordLike waleedlatif1 Aug 14, 2026 https://github.com/simstudioai/sim/pull/6715/commits/0fa258fee5771c273629cb136cc26bb7eefe15b3
7a79925 refactor: consolidate duplicate record coercion helpers onto @sim/utils waleedlatif1 Aug 14, 2026 https://github.com/simstudioai/sim/pull/6715/commits/7a799258a1361971a0f44ab7d32f9aff5a99a234
5c3295f fix(webhooks): guard non-string GitLab ref, and consolidate the last … waleedlatif1 Aug 14, 2026 https://github.com/simstudioai/sim/pull/6715/commits/5c3295f8a423350472b9a09bfbc6ebe7c62e8ae1
c800614 refactor: delete 31 unreachable module-local functions waleedlatif1 Aug 14, 2026 https://github.com/simstudioai/sim/pull/6715/commits/c8006149b0461f67df0224d33d862b598dfe8ffe
27ff773 refactor: delete 434 stranded exported symbols waleedlatif1 Aug 14, 2026 https://github.com/simstudioai/sim/pull/6715/commits/27ff7733d89cec2f0404acdac532d2f9b68ac6c6
Clear filters https://github.com/simstudioai/sim/pull/6715/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6715/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6715/files
apps/desktop/src/main/browser-agent/driver.tshttps://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
View file https://github.com/simstudioai/sim/blob/27ff7733d89cec2f0404acdac532d2f9b68ac6c6/apps/desktop/src/main/browser-agent/driver.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6715/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
https://github.com/simstudioai/sim/pull/6715/files#diff-515694ac7beaa3b13cb8b2224e3c5ec946ddc589bf9d8c294986e76a8c270ed6
apps/desktop/src/main/browser-import/browser-sources.tshttps://github.com/simstudioai/sim/pull/6715/files#diff-9c8783519d14bf9a4bdeb71f26aeb4f772714c6fba0dc3a76c488eb6b44d2769
View file https://github.com/simstudioai/sim/blob/27ff7733d89cec2f0404acdac532d2f9b68ac6c6/apps/desktop/src/main/browser-import/browser-sources.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6715/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6715/files#diff-9c8783519d14bf9a4bdeb71f26aeb4f772714c6fba0dc3a76c488eb6b44d2769
apps/desktop/src/main/browser-import/chromium-profiles.tshttps://github.com/simstudioai/sim/pull/6715/files#diff-8553e8a0a664c27c0c4bb3663e3bca13461a9d0f2f4f0ac5dfc9e2484fed2c97
View file https://github.com/simstudioai/sim/blob/27ff7733d89cec2f0404acdac532d2f9b68ac6c6/apps/desktop/src/main/browser-import/chromium-profiles.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6715/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6715/files#diff-8553e8a0a664c27c0c4bb3663e3bca13461a9d0f2f4f0ac5dfc9e2484fed2c97
https://github.com/simstudioai/sim/pull/6715/files#diff-8553e8a0a664c27c0c4bb3663e3bca13461a9d0f2f4f0ac5dfc9e2484fed2c97
https://github.com/simstudioai/sim/pull/6715/files#diff-8553e8a0a664c27c0c4bb3663e3bca13461a9d0f2f4f0ac5dfc9e2484fed2c97
https://github.com/simstudioai/sim/pull/6715/files#diff-8553e8a0a664c27c0c4bb3663e3bca13461a9d0f2f4f0ac5dfc9e2484fed2c97
apps/desktop/src/main/terminal/index.tshttps://github.com/simstudioai/sim/pull/6715/files#diff-74076d8d25116ad5bb8b4f51915e92169cac28f67682613e6b181a2c845e1412
View file https://github.com/simstudioai/sim/blob/27ff7733d89cec2f0404acdac532d2f9b68ac6c6/apps/desktop/src/main/terminal/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6715/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6715/files#diff-74076d8d25116ad5bb8b4f51915e92169cac28f67682613e6b181a2c845e1412
https://github.com/simstudioai/sim/pull/6715/files#diff-74076d8d25116ad5bb8b4f51915e92169cac28f67682613e6b181a2c845e1412
https://github.com/simstudioai/sim/pull/6715/files#diff-74076d8d25116ad5bb8b4f51915e92169cac28f67682613e6b181a2c845e1412
apps/realtime/src/database/operations.tshttps://github.com/simstudioai/sim/pull/6715/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
View file https://github.com/simstudioai/sim/blob/27ff7733d89cec2f0404acdac532d2f9b68ac6c6/apps/realtime/src/database/operations.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6715/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6715/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
https://github.com/simstudioai/sim/pull/6715/files#diff-e8428fa80ec5afb5442d2c399ae8dccd54ba450b45cbaae13a15c833911be725
apps/sim/app/(landing)/components/hero/components/hero-visual/stage-workflow.tsxhttps://github.com/simstudioai/sim/pull/6715/files#diff-5ae23ed65784061fe2d410a4c490925ab7005db88cd84ddcea339636dcd1eb01
View file https://github.com/simstudioai/sim/blob/3848f97b4cacdbdf8d4809bb40042f34f2680381/apps/sim/app/(landing)/components/hero/components/hero-visual/stage-workflow.tsx
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/simstudioai/sim/pull/6715/files
apps/sim/app/(landing)/components/landing-preview/landing-preview-mount.tsxhttps://github.com/simstudioai/sim/pull/6715/files#diff-d31ab43bf6f66adfd54db4deae16e715b613f76c33c9294ba21cd9e8925a4048
View file https://github.com/simstudioai/sim/blob/3848f97b4cacdbdf8d4809bb40042f34f2680381/apps/sim/app/(landing)/components/landing-preview/landing-preview-mount.tsx
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/simstudioai/sim/pull/6715/files
apps/sim/app/(landing)/components/mothership/components/iso-marks/iso-illustration-style.tshttps://github.com/simstudioai/sim/pull/6715/files#diff-0ae185d23ff7740d7628aac77e9c546bec0d8dc41339f6f2007979f5c83c4400
View file https://github.com/simstudioai/sim/blob/27ff7733d89cec2f0404acdac532d2f9b68ac6c6/apps/sim/app/(landing)/components/mothership/components/iso-marks/iso-illustration-style.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6715/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6715/files#diff-0ae185d23ff7740d7628aac77e9c546bec0d8dc41339f6f2007979f5c83c4400
apps/sim/app/api/credentials/route.tshttps://github.com/simstudioai/sim/pull/6715/files#diff-b71bb8ac13a5387f3571efaf0b51a0dcc84502b5cc62d0620cb7cfb4ff6a06c7
View file https://github.com/simstudioai/sim/blob/27ff7733d89cec2f0404acdac532d2f9b68ac6c6/apps/sim/app/api/credentials/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6715/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6715/files#diff-b71bb8ac13a5387f3571efaf0b51a0dcc84502b5cc62d0620cb7cfb4ff6a06c7
https://github.com/simstudioai/sim/pull/6715/files#diff-b71bb8ac13a5387f3571efaf0b51a0dcc84502b5cc62d0620cb7cfb4ff6a06c7
apps/sim/app/api/desktop/tool/authorize/route.tshttps://github.com/simstudioai/sim/pull/6715/files#diff-c0a963b3b1c2ea48a43bd00264d2615204d133fc0936ac88cef8f89e2e3abdfa
View file https://github.com/simstudioai/sim/blob/27ff7733d89cec2f0404acdac532d2f9b68ac6c6/apps/sim/app/api/desktop/tool/authorize/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6715/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6715/files#diff-c0a963b3b1c2ea48a43bd00264d2615204d133fc0936ac88cef8f89e2e3abdfa
https://github.com/simstudioai/sim/pull/6715/files#diff-c0a963b3b1c2ea48a43bd00264d2615204d133fc0936ac88cef8f89e2e3abdfa
https://github.com/simstudioai/sim/pull/6715/files#diff-c0a963b3b1c2ea48a43bd00264d2615204d133fc0936ac88cef8f89e2e3abdfa
Please reload this pagehttps://github.com/simstudioai/sim/pull/6715/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6715/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.