René's URL Explorer Experiment


Title: refactor(local-runner): one run endpoint for dynamic apps, cloud by default by jamesbhobbs · Pull Request #465 · deepnote/deepnote · GitHub

Open Graph Title: refactor(local-runner): one run endpoint for dynamic apps, cloud by default by jamesbhobbs · Pull Request #465 · deepnote/deepnote

X Title: refactor(local-runner): one run endpoint for dynamic apps, cloud by default by jamesbhobbs · Pull Request #465 · deepnote/deepnote

Description: Summary serveStatic — the machinery behind dynamic apps — exposed two run routes: POST /api/run for a local kernel and POST /api/run-cloud for Deepnote. Every app built on it therefore needed two buttons, two response shapes to render, and a decision from the user about where a run should happen before anything could run at all. This collapses them into one POST /api/run whose destination is a server setting, defaulting to Deepnote Cloud. await serveStatic({ dir: "./public", notebookPath: "dashboard.deepnote", // runTarget: "local", // omit for Deepnote Cloud }); Before After Routes /api/run + /api/run-cloud /api/run Choosing where the user, per click runTarget, cloud unless set Response two shapes one, tagged with target Buttons in run-app Run + Run in cloud Run GET /api/info now reports runTarget alongside the input blocks, so a page can label its Run button without being told separately — run-app uses this to say "Running in Deepnote Cloud…" or "Running in a local kernel…" from one handler. Security: the guard follows what it protects The cross-origin guard stayed tied to what it protects rather than to a route name. A cloud run spends the token and can create project content as a side effect, so it keeps the guard; a local run does neither and keeps the looser rule it had on its own route: if (runTarget === 'cloud' && rejectCrossOriginRequest(req, res)) return Both directions are pinned by tests — a foreign origin still gets 403 against a cloud-targeted server, and still gets through to a local one — so folding the routes together can't silently tighten or loosen it. Behaviour change in the example run-app now runs in Deepnote Cloud by default and wants DEEPNOTE_TOKEN; RUN_TARGET=local restores the local-kernel path and its OPENAI_API_KEY requirement. serve.mjs turns that env var into runTarget, so the option is visible in the example rather than only in the docs. Local responses now state success: true rather than implying it, so a page reads one field for both targets instead of inferring "no news is good news" from the shorter local response. Breaking change POST /api/run-cloud is gone. Callers that ran in the cloud now POST to /api/run against a server using the default runTarget; callers that ran locally pass runTarget: 'local'. serveStatic has no consumers outside this repo's run-app example, which is updated here. cloudRunner is gone too — the two runner seams are now one RunnerFn: type RunnerFn = (input, inputs, options?: RunOptions) => Promise RunOptions carries what either end needs (pythonEnv, persistSnapshot, token). RunResult describes either outcome: outputs and success are the fields every run has, while runId, status, created, and viewUrl describe a cloud run and are simply absent from a local one — they drop out of the JSON rather than being sent as nulls. Both ends are adapted to that signature where the runner is resolved, so the route itself no longer branches at all — one call, one response builder: const runner: RunnerFn = options.runner ?? (runTarget === 'local' ? (input, inputs, o) => runWithInputs(input, inputs, { pythonEnv: o?.pythonEnv, persistSnapshot: o?.persistSnapshot }) : (input, inputs, o) => runInCloud(input, inputs, { token: o?.token })) The Deepnote API is the default, and the only thing that overrides it is having a local Deepnote kernel to point at. Test plan pnpm test — 2896 passed, 1 skipped (serve-static.test.ts: 34 passed) pnpm typecheck clean pnpm spell-check — 0 issues pnpm prettier:check clean New tests: cloud is the default target, runTarget: 'local' reaches the local runner, /api/info reports either, and the origin guard applies to cloud but not local pnpm example:local-runner with DEEPNOTE_TOKEN — one Run button, runs in Deepnote RUN_TARGET=local OPENAI_API_KEY=… pnpm example:local-runner — same button, local kernel 🤖 Generated with Claude Code Summary by CodeRabbit New Features Unified notebook execution through a single /api/run endpoint. Deepnote Cloud execution is now the default, with optional local execution. Added execution target information to status updates and results. Simplified the runner interface with one Run button for both execution modes. Improved reporting for execution failures and invalid run targets. Documentation Updated local runner guides with cloud-default behavior, credentials, configuration, and local execution instructions. Bug Fixes Improved request protection for cloud execution while allowing local runs from permitted contexts.

Open Graph Description: Summary serveStatic — the machinery behind dynamic apps — exposed two run routes: POST /api/run for a local kernel and POST /api/run-cloud for Deepnote. Every app built on it therefore needed two b...

X Description: Summary serveStatic — the machinery behind dynamic apps — exposed two run routes: POST /api/run for a local kernel and POST /api/run-cloud for Deepnote. Every app built on it therefore needed two b...

Opengraph URL: https://github.com/deepnote/deepnote/pull/465

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/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:6f877746-a981-308b-54c0-a04843c2a782
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC0B4:160D9D:A38253:DEC8E0:6AEDCDBB
html-safe-nonced01611946c2e323dca2fcbc39d034b1d7a6d3b91a24f44a193cf44619bf89ecd
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMEI0OjE2MEQ5RDpBMzgyNTM6REVDOEUwOjZBRURDREJCIiwidmlzaXRvcl9pZCI6IjY1ODM1NzMwNDg0NzA2NTQzOTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac61a617991132351b1ed2d2b04dbbac336538250068d707d090f47e2396fff6ca
hovercard-subject-tagpull_request:4299236853
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
twitter:imagehttps://avatars.githubusercontent.com/u/15235276?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/15235276?s=400&v=4
og:image:altSummary serveStatic — the machinery behind dynamic apps — exposed two run routes: POST /api/run for a local kernel and POST /api/run-cloud for Deepnote. Every app built on it therefore needed two b...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonef60373873bb1ef795e8511ea1f2a76997e9c649d72b02942aedf2def3423a0ce
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/deepnote/deepnote git https://github.com/deepnote/deepnote.git
octolytics-dimension-user_id45339858
octolytics-dimension-user_logindeepnote
octolytics-dimension-repository_id1066509034
octolytics-dimension-repository_nwodeepnote/deepnote
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1066509034
octolytics-dimension-repository_network_root_nwodeepnote/deepnote
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release0f55cfa61438c7dc93d1024a1e5e5182b36830e2
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fdeepnote%2Fdeepnote%2Fpull%2F465%2Fcommits%2Ffdabece07e7c15b824e3737877babac728952552
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%2Fdeepnote%2Fdeepnote%2Fpull%2F465%2Fcommits%2Ffdabece07e7c15b824e3737877babac728952552
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%2Fcommits&source=header-repo&source_repo=deepnote%2Fdeepnote
Reloadhttps://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
Reloadhttps://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
Reloadhttps://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
deepnotehttps://github.com/deepnote
deepnotehttps://github.com/deepnote/deepnote
Codehttps://github.com/deepnote/deepnote
Issues14 (14)https://github.com/deepnote/deepnote/issues
Pull requests24 (24)https://github.com/deepnote/deepnote/pulls
Discussionshttps://github.com/deepnote/deepnote/discussions
Actionshttps://github.com/deepnote/deepnote/actions
Security and qualityhttps://github.com/deepnote/deepnote/security
Insightshttps://github.com/deepnote/deepnote/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fdeepnote%2Fdeepnote%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fdeepnote%2Fdeepnote%2Fissues%2Fnew%2Fchoose
jamesbhobbshttps://github.com/jamesbhobbs
mainhttps://github.com/deepnote/deepnote/tree/main
feat/dynamic-app-one-run-endpointhttps://github.com/deepnote/deepnote/tree/feat/dynamic-app-one-run-endpoint
Conversation 13 https://github.com/deepnote/deepnote/pull/465
Commits 9 https://github.com/deepnote/deepnote/pull/465/commits
Checks 20 https://github.com/deepnote/deepnote/pull/465/checks
Files changed https://github.com/deepnote/deepnote/pull/465/files
Please reload this pagehttps://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
refactor(local-runner): one run endpoint for dynamic apps, cloud by default https://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552#top
Show all changes 9 commits https://github.com/deepnote/deepnote/pull/465/files
326296c refactor(local-runner): one run endpoint for dynamic apps, cloud by d… jamesbhobbs Aug 17, 2026 https://github.com/deepnote/deepnote/pull/465/commits/326296c94e014151d463c546302d277d735c0f5e
20680cf refactor(local-runner): merge the two runners into one, cloud by default jamesbhobbs Aug 17, 2026 https://github.com/deepnote/deepnote/pull/465/commits/20680cf21d02ea383666308ed011d40cc7d1dd3d
42e912b fix(local-runner): derive a local run's success from its failed blocks jamesbhobbs Aug 17, 2026 https://github.com/deepnote/deepnote/pull/465/commits/42e912bc2e0541f657f4b4d0c5f4f5ba2fce2428
13dcf6c test(local-runner): cover the default runner adapters jamesbhobbs Aug 17, 2026 https://github.com/deepnote/deepnote/pull/465/commits/13dcf6c48c32c0d397dd0a0bf33e753e0d347d3d
d368c8b Merge branch 'main' into feat/dynamic-app-one-run-endpoint jamesbhobbs Aug 19, 2026 https://github.com/deepnote/deepnote/pull/465/commits/d368c8b957680bcfb0a266c6e53e35f2aebc62a6
4cd6fb7 fix(local-runner): keep unified run UI target-aware jamesbhobbs Aug 19, 2026 https://github.com/deepnote/deepnote/pull/465/commits/4cd6fb7d1c30a397aa5ac0eee61b78f4323d28f8
16b6c75 fix(local-runner): validate unified run targets jamesbhobbs Aug 19, 2026 https://github.com/deepnote/deepnote/pull/465/commits/16b6c75f4df03a5277dc5612ed672fabe2bd2055
fdabece test(local-runner): satisfy spell check jamesbhobbs Aug 19, 2026 https://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
0c2e68d Merge branch 'main' into feat/dynamic-app-one-run-endpoint jamesbhobbs Aug 19, 2026 https://github.com/deepnote/deepnote/pull/465/commits/0c2e68d5c50e68ed9b88502a47b7e1670b4e4802
Clear filters https://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
Please reload this pagehttps://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
Please reload this pagehttps://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
Prev https://github.com/deepnote/deepnote/pull/465/commits/16b6c75f4df03a5277dc5612ed672fabe2bd2055
Next https://github.com/deepnote/deepnote/pull/465/commits/0c2e68d5c50e68ed9b88502a47b7e1670b4e4802
Please reload this pagehttps://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
https://github.com/jamesbhobbs
jamesbhobbshttps://github.com/deepnote/deepnote/commits?author=jamesbhobbs
https://github.com/deepnote/deepnote/blob/main/.github/CODEOWNERS#L2
packages/local-runner/src/serve-static.test.tshttps://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552#diff-9f0582287ec4219d6fe56fe3e5c771907dc47112f507c3a60be65c3de970bbfa
View file https://github.com/deepnote/deepnote/blob/fdabece07e7c15b824e3737877babac728952552/packages/local-runner/src/serve-static.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/deepnote/deepnote/pull/465/commits/{{ revealButtonHref }}
https://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552#diff-9f0582287ec4219d6fe56fe3e5c771907dc47112f507c3a60be65c3de970bbfa
https://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552#diff-9f0582287ec4219d6fe56fe3e5c771907dc47112f507c3a60be65c3de970bbfa
Please reload this pagehttps://github.com/deepnote/deepnote/pull/465/commits/fdabece07e7c15b824e3737877babac728952552
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.