Skip to content

feat(webapp): warn about Node.js 21 production deployments - #4933

Closed
carderne wants to merge 1 commit into
mainfrom
fix/node-runtime-update-banner
Closed

carderne wants to merge 1 commit into
mainfrom
fix/node-runtime-update-banner

Conversation

@carderne

Copy link
Copy Markdown
Collaborator

Summary

Shows an organization-wide warning when current Production deployments still use Node.js 21. The warning takes precedence over other organization banners and links directly to the Projects settings page with update instructions.

Design

Reuses the existing current-production runtime classification, including legacy deployments without complete runtime metadata. The result is permission-gated and shared through the organization loader so the global banner and Projects settings indicator use one lookup.

@changeset-bot

changeset-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2107b53

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Sep 14, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Walkthrough

The organization route now detects pending project runtime updates by organization ID and returns a gated boolean. A shared hook exposes this value to the banner and settings navigation. selectOrgBanner prioritizes runtime updates, and OrgBanner renders a warning with a projects link and Node.js version text. The settings route removes duplicate runtime update loading. Tests verify banner priority, and a change note documents the warning.

Priority: ⬇️ Low

Merge Risk: 🔵 Low · up to 2107b

After promoting or rolling back a deployment, the runtime-update warning may not update until the user reloads or navigates. Add revalidation for these actions before merging.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the change and design, but it does not use the required template sections. It omits the issue reference, checklist, testing steps, changelog, and screenshots sections. Add the required template sections. Include the issue reference, complete the checklist, describe the testing performed, add a short changelog entry, and provide screenshots or state that screenshots are not applicable.
Docstring Coverage ⚠️ Warning Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 8 files. (1 skipped: 1… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: warning about Node.js 21 production deployments. It follows the conventional feat(webapp) format.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 7.69% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 8 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/node-runtime-update-banner

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
apps/webapp/app/components/billing/selectOrgBanner.ts (1)

4-4: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Replace OrgBannerKind with a const object and string-union type.

This change extends a TypeScript enum. Use a const object with a derived type instead.

Proposed refactor
-export enum OrgBannerKind {
-  RuntimeUpdate = "runtime-update",
-  LimitRejected = "limit-rejected",
-  LimitGrace = "limit-grace",
-  NoLimitConfigured = "no-limit",
-  Upgrade = "upgrade",
-  EnvironmentWarning = "env-warning",
-  None = "none",
-}
+export const OrgBannerKind = {
+  RuntimeUpdate: "runtime-update",
+  LimitRejected: "limit-rejected",
+  LimitGrace: "limit-grace",
+  NoLimitConfigured: "no-limit",
+  Upgrade: "upgrade",
+  EnvironmentWarning: "env-warning",
+  None: "none",
+} as const;
+
+export type OrgBannerKind = (typeof OrgBannerKind)[keyof typeof OrgBannerKind];

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: c1e925b0-7f67-4d80-8a99-baeabbd16db4

📥 Commits

Reviewing files that changed from the base of the PR and between 6172bcd and 2107b53.

📒 Files selected for processing (9)
  • .server-changes/node-runtime-update-banner.md
  • apps/webapp/app/components/billing/OrgBanner.tsx
  • apps/webapp/app/components/billing/selectOrgBanner.ts
  • apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx
  • apps/webapp/app/hooks/useOrganizations.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings/route.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationSlug/route.tsx
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • apps/webapp/test/orgBanner.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

📜 Review details
⏰ Context from checks skipped due to timeout. (34)
  • GitHub Check: report
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (13, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (8, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (19, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (20, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (16, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (2, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (6, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (11, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (9, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (24, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (23, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (15, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (22, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (14, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (21, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (10, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (18, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (4, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (17, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (3, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (1, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (12, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (7, 24)
  • GitHub Check: webapp / 🧪 Unit Tests: Webapp (5, 24)
  • GitHub Check: runops-guard / runops-guard
  • GitHub Check: typecheck / typecheck
  • GitHub Check: obsmap / 🧪 Unit Tests: Observability Map
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (2, 2)
  • GitHub Check: e2e-webapp / 🧪 E2E Tests: Webapp (1, 2)
  • GitHub Check: fk-cascade-guard / fk-cascade-guard
  • GitHub Check: code-quality / code-quality
  • GitHub Check: audit
  • GitHub Check: Analyze (javascript-typescript)
🧰 Additional context used
📓 Path-based instructions (10)
Never use `request.signal` to detect client disconnects.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/app/hooks/useOrganizations.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • apps/webapp/app/components/billing/selectOrgBanner.ts
Test files must not import `app/env.server.ts`; pass configuration as options instead.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/test/orgBanner.test.ts
For dashboard changes, visually verify the running Remix app with Chrome DevTools MCP, using snapshots, screenshots, interaction, and console-message checks as appropriate.

📄 CodeRabbit inference engine (apps/webapp/CLAUDE.md)

Files:

  • apps/webapp/app/components/billing/OrgBanner.tsx
  • apps/webapp/app/hooks/useOrganizations.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug/route.tsx
  • apps/webapp/app/components/billing/selectOrgBanner.ts
  • apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings/route.tsx
Use zod for validation in packages/core and apps/webapp

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/components/billing/OrgBanner.tsx
  • apps/webapp/test/orgBanner.test.ts
  • apps/webapp/app/hooks/useOrganizations.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug/route.tsx
  • apps/webapp/app/components/billing/selectOrgBanner.ts
  • apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings/route.tsx
Do not import `env.server.ts` directly or indirectly into test files; instead pass environment-dependent values through options/parameters to make code testable

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

Files:

  • apps/webapp/test/orgBanner.test.ts
Access environment variables through the `env` export of `env.server.ts` instead of directly accessing `process.env` Use subpath exports from `@trigger.dev/core` package instead of importing from the root `@trigger.dev/core` path

📄 CodeRabbit inference engine (.cursor/rules/webapp.mdc)

Files:

  • apps/webapp/app/components/billing/OrgBanner.tsx
  • apps/webapp/test/orgBanner.test.ts
  • apps/webapp/app/hooks/useOrganizations.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug/route.tsx
  • apps/webapp/app/components/billing/selectOrgBanner.ts
  • apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings/route.tsx
Use vitest for all tests in the Trigger.dev repository

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/test/orgBanner.test.ts
Use function declarations instead of default exports

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/components/billing/OrgBanner.tsx
  • apps/webapp/test/orgBanner.test.ts
  • apps/webapp/app/hooks/useOrganizations.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug/route.tsx
  • apps/webapp/app/components/billing/selectOrgBanner.ts
  • apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings/route.tsx
Use types over interfaces for TypeScript Avoid using enums; prefer string unions or const objects instead

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Files:

  • apps/webapp/app/components/billing/OrgBanner.tsx
  • apps/webapp/test/orgBanner.test.ts
  • apps/webapp/app/hooks/useOrganizations.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • apps/webapp/app/routes/_app.orgs.$organizationSlug/route.tsx
  • apps/webapp/app/components/billing/selectOrgBanner.ts
  • apps/webapp/app/components/navigation/OrganizationSettingsSideMenu.tsx
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.settings/route.tsx
When creating or editing OTEL metrics (counters, histograms, gauges), ensure metric attributes have low cardinality by using only enums, booleans, bounded error codes, or bounded shard IDs Do not use high-cardinality attributes in OTEL metr...

📄 CodeRabbit inference engine (.cursor/rules/otel-metrics.mdc)

Files:

  • apps/webapp/test/orgBanner.test.ts
  • apps/webapp/app/hooks/useOrganizations.ts
  • apps/webapp/app/services/projectRuntimeUpdates.server.ts
  • apps/webapp/app/components/billing/selectOrgBanner.ts
🧠 Learnings (2)
📚 Learning: 2026-06-16T09:19:47.637Z
Learnt from: d-cs
Repo: triggerdotdev/trigger.dev PR: 3960
File: apps/webapp/test/prismaInfrastructureErrorCapture.test.ts:0-0
Timestamp: 2026-06-16T09:19:47.637Z
Learning: In this repo’s Vitest setup, `vitest.config.ts` uses `globals: true`, so identifiers like `vi`, `describe`, `it`, and `expect` are available as globals in Vitest test files. During code review, do not flag missing `vi`/`describe`/`it`/`expect` imports as a runtime error or correctness issue when they’re used in `*.test.ts/tsx` or `*.spec.ts/tsx` files. Explicit imports are still preferred for consistency, but they’re not required for runtime behavior.

Applied to files:

  • apps/webapp/test/orgBanner.test.ts
📚 Learning: 2026-07-26T13:14:02.968Z
Learnt from: ericallam
Repo: triggerdotdev/trigger.dev PR: 4378
File: .server-changes/realtime-run-reads-from-primary.md:0-0
Timestamp: 2026-07-26T13:14:02.968Z
Learning: For files in the .server-changes directory, the body text is published verbatim as dashboard-facing user release notes. Write entries in terms of user-visible behavior (what users can do/see), and avoid implementation-oriented details such as environment-variable names, internal mechanisms, or configuration knobs. If you need to include operational/configuration specifics, put those details in the PR description instead of the .server-changes entry.

Applied to files:

  • .server-changes/node-runtime-update-banner.md

// items. Both calls are cheap and cached.
rbac.isUsingPlugin().catch(() => false),
ssoController.isUsingPlugin().catch(() => false),
organizationHasProjectRuntimeUpdate({ organizationId: organization.id }),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Revalidate after promotion or rollback changes the current deployment.

The deployment forms submit location.pathname + location.search as redirectUrl. Both actions call ChangeCurrentDeploymentService and redirect to that same path. For this same-path submission, neither existing form helper matches, so shouldRevalidate returns false. The loader therefore does not rerun organizationHasProjectRuntimeUpdate, and hasProjectRuntimeUpdate can remain stale.

Add a shouldRevalidate condition for the promotion and rollback resource actions, based on params.formAction.

@carderne carderne closed this Sep 14, 2026
@carderne
carderne deleted the fix/node-runtime-update-banner branch September 14, 2026 16:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant