René's URL Explorer Experiment


Title: fix(webapp): show the toast when saving project general settings by claude[bot] · Pull Request #4601 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(webapp): show the toast when saving project general settings by claude[bot] · Pull Request #4601 · triggerdotdev/trigger.dev

X Title: fix(webapp): show the toast when saving project general settings by claude[bot] · Pull Request #4601 · triggerdotdev/trigger.dev

Description: Requested by Chris Arderne · Slack thread Related to #4324 Before / After Before: an org member without project-manage permission renames a project on the general settings page, hits Save, and lands on the tasks page with no message at all. The code intends to show "You don't have permission to rename this project", but nothing appears — the rename silently does nothing. The same silence applied to a successful rename: the "Project renamed to ..." toast never showed either. After: you stay on the general settings page you submitted from, and the toast explains what happened — either the permission error or the rename confirmation. This makes the reason visible; it does not change who is allowed to rename a project. Why the message disappeared The toast is a flash value in the __message cookie. The root loader (app/root.tsx) reads it with session.get("toastMessage") — which deletes the flash — and commits the emptied session on the same response. So the message survives exactly one hop that runs the root loader. These redirects pointed at the project root, /orgs/:org/projects/:project. That route's _index loader doesn't render anything; it immediately redirects again to the environment's tasks page. On a client navigation Remix fetches every matched route's loader in parallel, so the root loader ran for that intermediate hop, spent the flash, and returned a Set-Cookie clearing it — and then the router threw that hop's data away because a sibling loader redirected. By the time the tasks page rendered, the cookie was already empty. Ruled out along the way: the Set-Cookie is not dropped on the action's redirect, shouldRevalidate is not blocking the reader, and nothing swallows the thrown Response. Worth knowing generally: any redirectWithSuccessMessage / redirectWithErrorMessage whose target is itself a redirecting route loses its message for this reason, since the flash is read and cleared on a hop that renders nothing. Other call sites are likely affected. Fixing the class properly — forwarding the Set-Cookie through internal redirects, or reading the flash somewhere other than root — is a bigger architectural change than this PR should carry, so it deliberately stays out of scope: this PR only fixes the call sites in this one route. How redirectWithErrorMessage / redirectWithSuccessMessage in the general settings action now target v3ProjectSettingsGeneralPath(...) instead of v3ProjectPath(...). That removes the intermediate redirect hop entirely, so the very next request renders the toast. Redirecting back to the form is also the better behaviour on its own terms — a save that fails shouldn't move you off the page you were working on. The alternative fixes were worse: reading the flash somewhere other than root would need the toast plumbing rewritten for one call site, and having the project _index loader forward the cookie would leave the same trap set for every other caller that redirects through it. redirectDocument() was considered (per #4146's sibling fix for stale route chunks) and isn't relevant here — the settings route is already loaded, and this was never a chunk-loading failure. Applied to all four project-root redirects in the file: rename denial, rename success, delete denial, and delete failure. Delete success has the same defect and is deliberately left alone. It redirects to the org root /orgs/:org, whose _index loader has no branch that renders — every path throws a redirect — so "Project deleted" is swallowed the same way. The project you'd return to no longer exists, and there is no org-level page that both renders and makes sense to land on after a delete (the org has no projects list; the only rendering org pages are the settings subtree, "new project" and invites). Relocating where people land after deleting something is a worse trade than a missing confirmation, so the destination stays as it is and the release note doesn't promise a message for deletion. The default-region action in …env.$envParam.regions/route.tsx was checked — it already redirects to regionsPath(...), its own rendering page, so it never lost its message and is unchanged. The other silent path With the redirects fixed, the two json({ errors: { body: … } }) returns were the only remaining way to fail this form with nothing on screen. That shape isn't a conform SubmissionResult, so when it reached useForm({ lastResult }) conform called reset() and threw the message away: blank form, no error, submit re-enabled. Both now return json(submission.reply({ formErrors: [...] })), and the rename form renders renameForm.errors the way the delete form on the same page already did. The as any on useActionData() stays. dashboardAction is generic over TReturn extends Response, so useActionData() resolves to unknown and the cast is the only thing keeping it compiling. Removing it properly means teaching the shared route builder to carry its handler's payload type, which would touch every route using it. ✅ Checklist I have followed every step in the contributing guide The PR title follows the convention. I ran and tested the code works Testing New test at apps/webapp/test/projectSettingsToastRedirect.test.ts, four cases: Drives the real redirectWithErrorMessage and the real cookie session storage through the two-hop chain and asserts the message is present on the first hop and gone on the second — the reproduction of the bug. and 3. Drive the route's real action for a denied rename and a denied delete, asserting both the redirect Location and that a root-loader-style read of the resulting cookie yields the expected message. Pins the successful-delete destination at the org root, so the deliberate trade above doesn't drift unnoticed. Drives a failing rename and asserts the response is a conform SubmissionResult carrying the form-level error, so the message actually reaches the form. Cases 2 and 3 fail against main (expected '/orgs/o/projects/p' to be '/orgs/o/projects/p/env/prod/settings/general') and pass with this change. To be clear about what that does and doesn't cover: these tests drive the real redirectWithErrorMessage, the real cookie session storage and the route's real action (the auth gate and ProjectSettingsService are mocked, as in the existing route tests). I have not clicked through a running dashboard — the redirect target and the cookie lifecycle are what's verified here. Test Files 1 passed (1) Tests 5 passed (5) Also run: pnpm run typecheck --filter webapp (19/19 tasks pass), pnpm run lint --filter webapp (clean — 7 pre-existing warnings, unchanged from main) and pnpm exec oxfmt --check . (clean). Changelog Renaming a project now keeps you on the project settings page and tells you what happened, instead of silently moving you to the tasks page or clearing the form with no explanation. Screenshots None — the change is a redirect target; the toast component itself is unchanged. 💯

Open Graph Description: Requested by Chris Arderne · Slack thread Related to #4324 Before / After Before: an org member without project-manage permission renames a project on the general settings page, hits Save, and land...

X Description: Requested by Chris Arderne · Slack thread Related to #4324 Before / After Before: an org member without project-manage permission renames a project on the general settings page, hits Save, and land...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4601

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:31f97ddf-5622-2877-614a-8e9b2d672934
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD9F4:1E77:65D58B:97C976:6AFAF3F8
html-safe-nonce6edb975ac86a648d55f8d9e69fd2ca62e1c888c7ff1ac071d0920874d4892a0e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEOUY0OjFFNzc6NjVENThCOjk3Qzk3Njo2QUZBRjNGOCIsInZpc2l0b3JfaWQiOiI2ODE4OTUyNTYzNTU1NzU5MDk2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac253c6a34544bcf8b88db06d17ec215de6525810d6af0fd0cc7703414b00b7d90
hovercard-subject-tagpull_request:4270048203
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/triggerdotdev/trigger.dev/pull/4601/files
twitter:imagehttps://avatars.githubusercontent.com/in/1236702?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/1236702?s=400&v=4
og:image:altRequested by Chris Arderne · Slack thread Related to #4324 Before / After Before: an org member without project-manage permission renames a project on the general settings page, hits Save, and land...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
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
releasea85e96a83bed7871993e6b1ffda24105928eee17
ui-targetcanary-2
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4601/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4601%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%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4601%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=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4601/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4601/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4601/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
cardernehttps://github.com/carderne
mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
fix/project-settings-toast-lost-on-redirecthttps://github.com/triggerdotdev/trigger.dev/tree/fix/project-settings-toast-lost-on-redirect
Conversation 21 https://github.com/triggerdotdev/trigger.dev/pull/4601
Commits 5 https://github.com/triggerdotdev/trigger.dev/pull/4601/commits
Checks 46 https://github.com/triggerdotdev/trigger.dev/pull/4601/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4601/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4601/files
fix(webapp): show the toast when saving project general settings https://github.com/triggerdotdev/trigger.dev/pull/4601/files#top
Show all changes 5 commits https://github.com/triggerdotdev/trigger.dev/pull/4601/files
f2216b0 fix(webapp): show the toast when saving project general settings claude Aug 13, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4601/commits/f2216b09f1bb3e70387771f2ca44e63a6c59cbae
b81bf39 fix(webapp): show the toast after a successful project delete claude Aug 13, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4601/commits/b81bf39e4c85b0c38986d16061fcadebba70afd0
9453add fix(webapp): keep the delete destination and drop the deletion claim claude Aug 13, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4601/commits/9453add8aab292be8cb19763a5bdfe1ba54c9fe5
748e963 fix(webapp): surface project rename failures on the form claude Aug 13, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4601/commits/748e9634e18739727231fdc8e7a584d4b5eb3773
617296a fix(webapp): scope the settings form error to the submitted form claude Aug 13, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4601/commits/617296ada1d1478c795d8a603b017e35de44aff6
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4601/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4601/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4601/files
fix-project-settings-toast.md https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-98cd9a2ce0b55c39ed711aac8ad997a6d799787545d0b303779e4639e0323f5c
route.tsx https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
projectSettingsToastRedirect.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-507ddb8da39ac59108c8172b7bd3c9f04679c85b93b51f19795cce2763f2b65e
.server-changes/fix-project-settings-toast.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-98cd9a2ce0b55c39ed711aac8ad997a6d799787545d0b303779e4639e0323f5c
View file https://github.com/triggerdotdev/trigger.dev/blob/617296ada1d1478c795d8a603b017e35de44aff6/.server-changes/fix-project-settings-toast.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4601/{{ revealButtonHref }}
...pp.orgs.$organizationSlug.projects.$projectParam.env.$envParam.settings.general/route.tsxhttps://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
View file https://github.com/triggerdotdev/trigger.dev/blob/617296ada1d1478c795d8a603b017e35de44aff6/apps/webapp/app/routes/_app.orgs.%24organizationSlug.projects.%24projectParam.env.%24envParam.settings.general/route.tsx
Open in desktop https://desktop.github.com
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4601/files
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4601/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4601/files
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
https://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-5cf6aee982fca06ad642b18217053db0a224fb885cfc0506b0d481519988bc53
apps/webapp/test/projectSettingsToastRedirect.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4601/files#diff-507ddb8da39ac59108c8172b7bd3c9f04679c85b93b51f19795cce2763f2b65e
View file https://github.com/triggerdotdev/trigger.dev/blob/617296ada1d1478c795d8a603b017e35de44aff6/apps/webapp/test/projectSettingsToastRedirect.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4601/{{ revealButtonHref }}
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4601/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4601/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.