Skip to content

Comments

Fix: show the deprecation panel if it's an old project and v3#3113

Merged
matt-aitken merged 1 commit intomainfrom
fix-v3-deprecation-panel
Feb 23, 2026
Merged

Fix: show the deprecation panel if it's an old project and v3#3113
matt-aitken merged 1 commit intomainfrom
fix-v3-deprecation-panel

Conversation

@matt-aitken
Copy link
Member

Without doing an expensive query we can’t tell if it’s definitely a v3 projects – like getting run counts.
So let’s just assume if the project hasn’t been upgraded to v4 (by running dev/deploy CLI with v4) AND the project is older than the v4 release then it’s v3.

Without doing an expensive query we can’t tell if it’s definitely a v3 projects – like getting run counts.
So let’s just assume if the project hasn’t been upgraded to v4 (by running dev/deploy CLI with v4) AND the project is older than the v4 release then it’s v3.
@changeset-bot
Copy link

changeset-bot bot commented Feb 23, 2026

⚠️ No Changeset found

Latest commit: be01ae9

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
Copy link
Contributor

coderabbitai bot commented Feb 23, 2026

Walkthrough

Two files are modified to introduce date-based filtering for the V3 deprecation panel. The SideMenuProject type is extended to include a createdAt field, and a new projectCreatedAt: Date prop is added to V3DeprecationPanel. The panel's visibility logic is changed from a fixed condition to a temporal gate that compares the project creation date against a hardcoded v4 release date (2025-09-01). The OrganizationsPresenter is updated to expose the project's createdAt property in the response.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description lacks the required template structure including checklist, testing steps, changelog, and screenshots sections specified in the repository template. Add the missing template sections: checklist items, testing steps, changelog entry, and screenshots placeholder to match the repository's required PR description format.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: showing the deprecation panel for old v3 projects based on creation date.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix-v3-deprecation-panel

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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 and usage tips.

devin-ai-integration[bot]

This comment was marked as resolved.

@matt-aitken matt-aitken marked this pull request as ready for review February 23, 2026 11:09
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
apps/webapp/app/presenters/OrganizationsPresenter.server.ts (1)

113-123: createdAt is redundant here — already present via the spread.

...fullProject at line 114 already includes createdAt. The explicit re-assignment on line 115 is a no-op; only the environments override (line 116) is needed to shadow the spread.

♻️ Proposed cleanup
  project: {
    ...fullProject,
-   createdAt: fullProject.createdAt,
    environments: sortEnvironments(
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/webapp/app/presenters/OrganizationsPresenter.server.ts` around lines 113
- 123, The spread of fullProject already contains createdAt, so remove the
redundant explicit assignment createdAt: fullProject.createdAt from the object
literal and keep only the environments override; update the project construction
where fullProject is spread (symbols: fullProject, createdAt, environments,
sortEnvironments) so the result relies on the spread for createdAt and uses the
existing environments override to shadow that field.
apps/webapp/app/components/navigation/SideMenu.tsx (1)

655-657: Move V4_RELEASE_DATE to module level; drop redundant new Date() cast.

Two nits on this block:

  1. V4_RELEASE_DATE is re-instantiated on every render. As a fixed constant it belongs at module scope.
  2. projectCreatedAt is already typed as Date, so new Date(projectCreatedAt) is a no-op wrapper. remix-typedjson handles a subset of native types (including Date) and properly round-trips them through the Remix serialization boundary, so the defensive cast isn't needed.
♻️ Proposed cleanup
+// Outside the component, at module scope:
+const V4_RELEASE_DATE = new Date("2025-09-01");
+
 function V3DeprecationPanel({ ... }) {
-  // Only show for projects created before v4 was released
-  const V4_RELEASE_DATE = new Date("2025-09-01");
-  const isLikelyV3 = isV3 && new Date(projectCreatedAt) < V4_RELEASE_DATE;
+  const isLikelyV3 = isV3 && projectCreatedAt < V4_RELEASE_DATE;
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/webapp/app/components/navigation/SideMenu.tsx` around lines 655 - 657,
Move the V4_RELEASE_DATE constant out of the SideMenu component to module scope
and initialize it once (e.g., const V4_RELEASE_DATE = new Date("2025-09-01") at
top-level), and remove the redundant new Date(...) wrapper when computing
isLikelyV3 so it reads const isLikelyV3 = isV3 && projectCreatedAt <
V4_RELEASE_DATE; — update references to V4_RELEASE_DATE and ensure
projectCreatedAt is used as a Date directly in the isLikelyV3 computation (leave
isV3 and isLikelyV3 names intact).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@apps/webapp/app/components/navigation/SideMenu.tsx`:
- Around line 655-657: Move the V4_RELEASE_DATE constant out of the SideMenu
component to module scope and initialize it once (e.g., const V4_RELEASE_DATE =
new Date("2025-09-01") at top-level), and remove the redundant new Date(...)
wrapper when computing isLikelyV3 so it reads const isLikelyV3 = isV3 &&
projectCreatedAt < V4_RELEASE_DATE; — update references to V4_RELEASE_DATE and
ensure projectCreatedAt is used as a Date directly in the isLikelyV3 computation
(leave isV3 and isLikelyV3 names intact).

In `@apps/webapp/app/presenters/OrganizationsPresenter.server.ts`:
- Around line 113-123: The spread of fullProject already contains createdAt, so
remove the redundant explicit assignment createdAt: fullProject.createdAt from
the object literal and keep only the environments override; update the project
construction where fullProject is spread (symbols: fullProject, createdAt,
environments, sortEnvironments) so the result relies on the spread for createdAt
and uses the existing environments override to shadow that field.

ℹ️ Review info

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6765252 and be01ae9.

📒 Files selected for processing (2)
  • apps/webapp/app/components/navigation/SideMenu.tsx
  • apps/webapp/app/presenters/OrganizationsPresenter.server.ts
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (25)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (7, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (2, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (8, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (1, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (3, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (4, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (7, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (6, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (2, 8)
  • GitHub Check: units / internal / 🧪 Unit Tests: Internal (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (4, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (5, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (3, 8)
  • GitHub Check: units / webapp / 🧪 Unit Tests: Webapp (1, 8)
  • GitHub Check: units / packages / 🧪 Unit Tests: Packages (1, 1)
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - pnpm)
  • GitHub Check: sdk-compat / Node.js 20.20 (ubuntu-latest)
  • GitHub Check: sdk-compat / Cloudflare Workers
  • GitHub Check: typecheck / typecheck
  • GitHub Check: sdk-compat / Bun Runtime
  • GitHub Check: sdk-compat / Deno Runtime
  • GitHub Check: e2e / 🧪 CLI v3 tests (windows-latest - npm)
  • GitHub Check: sdk-compat / Node.js 22.12 (ubuntu-latest)
🧰 Additional context used
📓 Path-based instructions (7)
**/*.{ts,tsx}

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

**/*.{ts,tsx}: Use types over interfaces for TypeScript
Avoid using enums; prefer string unions or const objects instead

**/*.{ts,tsx}: Always import tasks from @trigger.dev/sdk, never use @trigger.dev/sdk/v3 or deprecated client.defineJob pattern
Every Trigger.dev task must be exported and have a unique id property with no timeouts in the run function

Files:

  • apps/webapp/app/presenters/OrganizationsPresenter.server.ts
  • apps/webapp/app/components/navigation/SideMenu.tsx
{packages/core,apps/webapp}/**/*.{ts,tsx}

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

Use zod for validation in packages/core and apps/webapp

Files:

  • apps/webapp/app/presenters/OrganizationsPresenter.server.ts
  • apps/webapp/app/components/navigation/SideMenu.tsx
**/*.{ts,tsx,js,jsx}

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

Use function declarations instead of default exports

Import from @trigger.dev/core using subpaths only, never import from root

Files:

  • apps/webapp/app/presenters/OrganizationsPresenter.server.ts
  • apps/webapp/app/components/navigation/SideMenu.tsx
apps/webapp/app/**/*.{ts,tsx}

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

Access all environment variables through the env export of env.server.ts instead of directly accessing process.env in the Trigger.dev webapp

Files:

  • apps/webapp/app/presenters/OrganizationsPresenter.server.ts
  • apps/webapp/app/components/navigation/SideMenu.tsx
apps/webapp/**/*.{ts,tsx}

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

apps/webapp/**/*.{ts,tsx}: When importing from @trigger.dev/core in the webapp, use subpath exports from the package.json instead of importing from the root path
Follow the Remix 2.1.0 and Express server conventions when updating the main trigger.dev webapp

Access environment variables via env export from apps/webapp/app/env.server.ts, never use process.env directly

Files:

  • apps/webapp/app/presenters/OrganizationsPresenter.server.ts
  • apps/webapp/app/components/navigation/SideMenu.tsx
**/*.ts

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

**/*.ts: 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 metrics such as UUIDs/IDs (envId, userId, runId, projectId, organizationId), unbounded integers (itemCount, batchSize, retryCount), timestamps (createdAt, startTime), or free-form strings (errorMessage, taskName, queueName)
When exporting OTEL metrics via OTLP to Prometheus, be aware that the exporter automatically adds unit suffixes to metric names (e.g., 'my_duration_ms' becomes 'my_duration_ms_milliseconds', 'my_counter' becomes 'my_counter_total'). Account for these transformations when writing Grafana dashboards or Prometheus queries

Files:

  • apps/webapp/app/presenters/OrganizationsPresenter.server.ts
**/*.{js,ts,jsx,tsx,json,md,yaml,yml}

📄 CodeRabbit inference engine (AGENTS.md)

Format code using Prettier before committing

Files:

  • apps/webapp/app/presenters/OrganizationsPresenter.server.ts
  • apps/webapp/app/components/navigation/SideMenu.tsx
🧠 Learnings (1)
📚 Learning: 2026-02-11T16:37:32.429Z
Learnt from: matt-aitken
Repo: triggerdotdev/trigger.dev PR: 3019
File: apps/webapp/app/components/primitives/charts/Card.tsx:26-30
Timestamp: 2026-02-11T16:37:32.429Z
Learning: In projects using react-grid-layout, avoid relying on drag-handle class to imply draggability. Ensure drag-handle elements only affect dragging when the parent grid item is configured draggable in the layout; conditionally apply cursor styles based on the draggable prop. This improves correctness and accessibility.

Applied to files:

  • apps/webapp/app/components/navigation/SideMenu.tsx
🔇 Additional comments (1)
apps/webapp/app/components/navigation/SideMenu.tsx (1)

128-131: No action needed. MatchedProject includes the createdAt field. The OrganizationsPresenter explicitly returns createdAt on the project object (line 115 of OrganizationsPresenter.server.ts), so the Pick operation in SideMenuProject will succeed without any type errors.

@matt-aitken matt-aitken merged commit 3a70546 into main Feb 23, 2026
38 checks passed
@matt-aitken matt-aitken deleted the fix-v3-deprecation-panel branch February 23, 2026 11:10
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.

2 participants