Skip to content

feat(webapp): dashboard parity for mollifier-buffered runs#3757

Draft
d-cs wants to merge 2 commits into
mollifier-phase-3-mutationsfrom
mollifier-phase-3-dashboard
Draft

feat(webapp): dashboard parity for mollifier-buffered runs#3757
d-cs wants to merge 2 commits into
mollifier-phase-3-mutationsfrom
mollifier-phase-3-dashboard

Conversation

@d-cs
Copy link
Copy Markdown
Collaborator

@d-cs d-cs commented May 26, 2026

Summary

Dashboard surfaces handle buffered runs by falling back to the mollifier snapshot:

  • Run detail, span detail, streams view (_app.../runs.\$runParam, resources.../spans.\$spanParam, resources.../streams.\$streamKey).
  • Redirect routes (@.runs.\$runParam, runs.\$runParam, projects.v3.\$projectRef.runs.\$runParam).
  • Action routes — cancel / replay / idempotency-reset / debug — under resources.taskruns/... and resources.../idempotencyKey.reset.
  • Logs download.
  • Realtime subscription route + per-run resource (realtime.v1.runs.\$runId, resources.../realtime.v1.*).
  • CancelRunDialog gains an onCancelSubmitted callback so submit isn't raced by the Radix DialogClose wrapper.

Stacked on the mutations PR.

Test plan

  • `pnpm run typecheck --filter webapp` passes
  • `pnpm run test --filter webapp test/mollifierRealtimeRunResource.test.ts` passes
  • `pnpm run test --filter webapp test/mollifierRealtimeRunResourceBuffer.test.ts` passes
  • `pnpm run test --filter webapp test/mollifierRealtimeSubscription.test.ts` passes
  • Manual smoke: trigger a buffered run, open it in the dashboard, replay/cancel from the UI

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 26, 2026

⚠️ No Changeset found

Latest commit: d6ea563

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

coderabbitai Bot commented May 26, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 668f665a-c68f-409f-8936-e36f1affe9d7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch mollifier-phase-3-dashboard

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.

Comment thread apps/webapp/app/routes/realtime.v1.runs.$runId.ts
Comment thread apps/webapp/app/routes/resources.runs.$runParam.logs.download.ts
Comment thread apps/webapp/app/routes/resources.taskruns.$runParam.debug.ts
@d-cs d-cs self-assigned this May 26, 2026
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from b8ead31 to 109fbd7 Compare May 26, 2026 11:12
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from dd31d60 to ba09531 Compare May 26, 2026 11:12
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 109fbd7 to c7a66bd Compare May 26, 2026 13:24
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from ba09531 to 1de95f4 Compare May 26, 2026 13:24
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 3157546 to 432f81a Compare May 26, 2026 14:28
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from c7a66bd to 094d006 Compare May 26, 2026 14:44
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 432f81a to 8c19830 Compare May 26, 2026 14:44
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 094d006 to 9914976 Compare May 26, 2026 15:00
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 8c19830 to fd7e01d Compare May 26, 2026 15:00
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 9914976 to 2ee45a8 Compare May 26, 2026 15:12
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from fd7e01d to 83880f8 Compare May 26, 2026 15:12
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 83880f8 to 1a8fbc6 Compare May 26, 2026 15:24
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from f4b6064 to 0547ba9 Compare May 26, 2026 16:00
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 1a8fbc6 to 558703b Compare May 26, 2026 16:00
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 0547ba9 to 0708ce5 Compare May 26, 2026 16:20
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 558703b to 372ca71 Compare May 26, 2026 16:20
@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 0708ce5 to 396552e Compare May 26, 2026 16:32
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 372ca71 to 1fd59a3 Compare May 26, 2026 16:32
Copy link
Copy Markdown
Contributor

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

Choose a reason for hiding this comment

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

Devin Review found 1 potential issue.

View 7 additional findings in Devin Review.

Open in Devin Review

Comment on lines +64 to +66
if (!member) {
throw new Response("Not Found", { status: 404 });
}
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.

🟡 Bare catch {} silently swallows intentional auth-check throw new Response(...) in debug route

The org-membership auth check at line 65 uses throw new Response("Not Found", { status: 404 }) to signal an unauthorized access. However, this throw is inside a try block whose catch {} at line 93 catches all exceptions — including this intentional Remix Response throw. The Response is silently swallowed and the code falls through to the same 404 at line 97, so the end behavior is the same today. But the pattern is fragile: if the fallthrough is ever changed (e.g., to return a different status, or to add logic between the catch and the final throw), the auth check's Response would be silently lost. The return pattern used in the analogous resources.runs.$runParam.logs.download.ts:49 is the correct approach.

Suggested change
if (!member) {
throw new Response("Not Found", { status: 404 });
}
if (!member) {
return new Response("Not Found", { status: 404 });
}
Open in Devin Review

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

@d-cs d-cs force-pushed the mollifier-phase-3-mutations branch from 396552e to eb2a777 Compare May 26, 2026 16:57
d-cs added a commit that referenced this pull request May 26, 2026
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 1fd59a3 to 99ba3a7 Compare May 26, 2026 16:57
d-cs and others added 2 commits May 26, 2026 18:09
Dashboard run detail, span detail, streams view, realtime
subscription, redirect routes, replay/cancel/idempotency-reset
action routes, the logs download route, and the cancel dialog all
handle buffered runs by falling back to the mollifier snapshot.

Stacked on the mutations PR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ity envId from realtime counter

Three CodeRabbit findings from #3709, re-raised on #3757:

- resources.taskruns.$runParam.debug.ts: buffered fallback returned the
  run's queue / concurrencyKey / queueTimestamp from the snapshot
  without verifying org membership. Any authenticated user who knew a
  friendlyId could read those fields across orgs. Now joins through
  orgMember the same way the PG path does and 404s on miss.
- resources.runs.$runParam.logs.download.ts: same shape — the buffered
  placeholder leaked runId existence to non-members on direct URL
  access. Same orgMember check now gates the buffered branch.
- mollifierTelemetry.server.ts: recordRealtimeBufferedSubscription was
  attaching envId (a UUID) as an OTEL counter dimension, violating the
  project's "no high-cardinality IDs in metric attributes" guideline.
  Dropped the parameter; the call site's logger.info still emits envId.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@d-cs d-cs force-pushed the mollifier-phase-3-dashboard branch from 99ba3a7 to d6ea563 Compare May 26, 2026 17:09
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