◐ Shell
clean mode source ↗

Comparing docs-live...main · triggerdotdev/trigger.dev

Commits on Jun 17, 2026

  1. feat(clickhouse): replicate run plan type to task_runs_v2 (#3978)

    Replicates `TaskRun.planType` into the `task_runs_v2` ClickHouse table
    so run analytics can group by plan type.
    
    Adds a `plan_type` column (goose migration `033`,
    `LowCardinality(String)`), the replication insert mapping, and the
    matching schema/column/type entries - same shape as the recent `region`
    addition. Write-once at trigger, so it just rides along on existing
    replicated rows. Internal analytics only; not exposed in the Query API.
    Configuration menu

    Browse the repository at this point in the history

  2. fix(webapp): capture Prisma infra errors and obfuscate leaked messages (

    #3960)
    
    ## Summary
    
    Prisma infrastructure failures (P1xxx-class: database unreachable, timed
    out, connection dropped, engine init/panic) carry the database hostname
    in their `.message`. This captures them centrally for observability and
    ensures they never reach API clients verbatim.
    
    ## Design
    
    A `$allOperations` client extension on the writer and replica clients
    logs infrastructure errors with the originating model and operation,
    then rethrows the **original** error unchanged — call sites that branch
    on `error.code` (unique-violation idempotency, not-found handling) and
    transaction retries keep working. Only infrastructure errors are logged;
    routine query/validation errors (P2xxx) are left alone.
    
    `$allOperations` can't see the transaction boundary (`$transaction` is a
    client method, not an operation), so infrastructure errors surfacing
    from `$transaction()` without a Prisma code — e.g.
    `PrismaClientInitializationError` — are logged separately at the
    transaction wrapper, where the existing coded-error path would otherwise
    miss them.
    
    `clientSafeErrorMessage()` swaps an infrastructure error's message for
    `"Internal Server Error"` at the API routes that previously returned
    `error.message` raw. Status codes, headers, and every non-infrastructure
    message are unchanged.
    
    ## Test plan
    
    - [x] P2002 / P2025 rethrow with code intact and are not logged
    - [x] Statement errors inside `$transaction` keep their code (retry
    logic intact)
    - [x] Raw queries wrapped without crashing on the undefined model
    - [x] A genuine connectivity failure is logged with model/operation/code
    - [x] `clientSafeErrorMessage` obfuscates infra messages, preserves all
    others
    - [x] `pnpm run typecheck --filter webapp` (12/12)
    
    ## Note
    
    Overlaps with #3391 (Prisma 7 migration) on
    `apps/webapp/app/db.server.ts` — coordinate rebasing.

    d-cs authored

    Jun 17, 2026
    Configuration menu

    Browse the repository at this point in the history

  3. fix(webapp): admin feature flag number inputs and scrolling (#3979)

    The global feature flags admin page had a few rough edges.
    
    The percentage flags are numeric (`z.coerce.number()`) but rendered as
    free-text inputs, so you could type non-numeric values that only failed
    validation after submitting - and the error surfaced behind the confirm
    dialog. The control-type detection now recognises numbers and renders a
    proper number input, with the min/max range as the placeholder so the
    type is clear even when the field is unset. The save error also shows
    inside the confirm dialog now, not just behind it.
    
    The action buttons were unreachable without zooming out. The admin
    layout wrapped each page in a plain block, so `h-full` page content
    overran the viewport by the height of the tab bar and got clipped by the
    `overflow-hidden` body. Making the layout a flex column bounds each page
    to the space below the tabs, so the existing per-page scroll works and
    the feature flags page scrolls like the Users/Orgs tabs. Also capped the
    confirm dialog's diff list so its footer stays on screen when there are
    many changes.
    Configuration menu

    Browse the repository at this point in the history