Skip to content

fix(webapp): display imperative schedules without active worker deployments (#3209) - #4970

Closed
kaiizer777 wants to merge 1 commit into
triggerdotdev:mainfrom
kaiizer777:fix/imperative-schedules-ui-visibility
Closed

kaiizer777 wants to merge 1 commit into
triggerdotdev:mainfrom
kaiizer777:fix/imperative-schedules-ui-visibility

Conversation

@kaiizer777

Copy link
Copy Markdown

Closes #3209

Overview

Fixes an issue where imperative schedules created out-of-band (via SDK or API) prior to any active worker deployment were invisible in the UI schedule listing, despite counting towards plan limits.

Changes

  • In ScheduleListPresenter.server.ts:
    • Relaxed the early return so it only exits when !latestWorker && filterType === "DECLARATIVE".
    • When !latestWorker, sets effectiveFilterType = "IMPERATIVE" to ensure imperative schedules associated with the environment remain queryable and visible before initial worker deployment.
    • Added default page = 1 parameter to prevent skip: NaN validation errors.
    • Exposed schedulePhase: number | null on ScheduleListItem using deterministic calculateSchedulePhase fallback.
  • Added comprehensive unit and integration tests in apps/webapp/test/ScheduleListPresenter.test.ts.
  • Added .server-changes/imperative-schedules-ui-visibility.md user-facing release note.

✅ Checklist

  • I have followed every step in the contributing guide
  • The PR title follows the convention.
  • I ran and tested the code works

Testing

  • Verified with vitest against testcontainers: 5/5 tests passing in apps/webapp/test/ScheduleListPresenter.test.ts.
  • Verified existing schedule test suites (85 passing tests).
  • Verified pnpm run typecheck --filter webapp (0 errors).
  • Verified pnpm run lint (0 errors).

Changelog

Display imperative schedules created before initial deployment or worker task versioning in the schedules listing.

@github-actions

Copy link
Copy Markdown
Contributor

Hi @kaiizer777, thanks for your interest in contributing!

This project requires that pull request authors are vouched, and you are not in the list of vouched users.

This PR will be closed automatically. See https://github.com/triggerdotdev/trigger.dev/blob/main/CONTRIBUTING.md for more details.

@github-actions github-actions Bot closed this Sep 21, 2026
@coderabbitai

coderabbitai Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 2b9c8f7a-b856-40d8-8e9e-ffccff8578e1

📥 Commits

Reviewing files that changed from the base of the PR and between d8c3530 and de5b71e.

📒 Files selected for processing (3)
  • .server-changes/imperative-schedules-ui-visibility.md
  • apps/webapp/app/presenters/v3/ScheduleListPresenter.server.ts
  • apps/webapp/test/ScheduleListPresenter.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

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 found 2 potential issues.

Devin Review

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.

🔍 Presenter test is not colocated

Repository guidance requires new tests beside their source file. Move this suite alongside ScheduleListPresenter.server.ts before merging.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

vi.setConfig({ testTimeout: 60_000 });

async function seedProjectWithEnv(prisma: PrismaClient, slugBase: string) {
const slug = `${slugBase}_${Math.random().toString(36).slice(2, 10)}`;

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.

🔍 Fixtures use unseeded randomness

Math.random() makes fixture values irreproducible. Repository guidance requires seeded randomness in tests.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

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.

bug: Imperative schedules created without declarative tasks are invisible in the UI but block deployment

1 participant