Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
1. High-Level Overview
Goal: Fix the Inngest API failure on
/jobsusing the modern Inngest REST v2 pipeline (/v2/runs) exclusively (no legacy fallbacks), pin the Inngest container image indocker-compose.ymlto a fixed version (v1.45.1) instead oflatest, normalize base URL resolution, flagoffline: trueon HTTP errors, and eliminate repeated background polling toast spam.flowchart TD subgraph UI ["Client Dashboard (JobsView)"] Mount["Mount / Poll Cycle"] -->|"listJobs()"| Action["Server Action: listJobs()"] Action -->|"Result<ListJobsResult>"| HandleResult["Process Result"] HandleResult -->|"offline === true"| ShowBanner["Render JobsOfflineBanner (No Toast)"] HandleResult -->|"isManualRefresh && error && !offline"| ShowToast["toast.error()"] end subgraph Service ["Inngest Run Service (Pure REST v2)"] Action --> CleanBase["resolveInngestApiBaseUrl()\n(Strip trailing slash & /api/inngest)"] CleanBase --> RestV2["buildRunsUrl()\n(GET /v2/runs?query=event.data.userId==...)"] RestV2 -->|"HTTP 200 OK"| ParseRuns["Normalize Inngest Runs (JobItem[])"] RestV2 -->|"HTTP Error (4xx/5xx) or Connection Drop"| MarkOffline["Return { jobs: [], offline: true, error }"] end subgraph Infra ["Local Container (docker-compose.yml)"] ImagePin["Pin image: inngest/inngest:v1.45.1"] --> RunningContainer["Predictable Inngest Dev Server"] endGlobal Constraints
/v0/gql) or legacy endpoints. Single unified pipeline across dev server and cloud.latestwith explicit taginngest/inngest:v1.45.1indocker-compose.ymlmatching other services (postgres:17,qdrant/qdrant:v1.20.0).event.data.userId == "${userId}"and in-memory payload verification.2. Alternatives Evaluated
v1.45.1(Recommended)latest; removes breakinginclude=outputquery param; handles URL misconfiguration cleanly; no legacy GraphQL baggage.latestwith REST v2 Fixlatestcan change unexpectedly and break API contract at any time without developer control.3. Root Cause Analysis
include=output):In
lib/inngest/run-service.ts,buildRunsUrlsetsurl.searchParams.set("include", "output"). Inngest Dev Server/v2/runsREST API rejects this parameter with HTTP 400:{"errors":[{"code":"invalid_field_format","message":"unsupported include value \"output\""}]}. When omitted,/v2/runsreturns HTTP 200 OK.If
INNGEST_BASE_URLcontains/api/inngest(e.g. from developer confusing the serve endpoint with the engine endpoint) or a trailing slash, appending/v2/runsproduces an invalid route (e.g..../api/inngest/v2/runs) which returns HTTP 404 from Next.js.offline: trueon HTTP Errors:When
res.okis false infetchUserInngestRuns, it returns{ jobs: [], error: ... }withoffline: undefined. Becauseofflineis nottrue, the dashboard cannot show theJobsOfflineBanner, and instead triggers raw error toasts.React 19 mount and
useJobsPollingvisibility listeners triggerloadJobsimmediately and every 5 seconds. Without gating byisManualRefresh, each failed poll emitstoast.error.docker-compose.ymlcurrently usesinngest/inngest:latest, which prevents deterministic control over the engine version.