Title: fix(webapp): remove unused Electric sync trace routes by claude[bot] · Pull Request #4400 · triggerdotdev/trigger.dev · GitHub
Open Graph Title: fix(webapp): remove unused Electric sync trace routes by claude[bot] · Pull Request #4400 · triggerdotdev/trigger.dev
X Title: fix(webapp): remove unused Electric sync trace routes by claude[bot] · Pull Request #4400 · triggerdotdev/trigger.dev
Description: Requested by Eric Allam · Slack thread Removes two dead Remix routes and the helpers only they used. app/routes/sync.traces.runs.$traceId.ts (/sync/traces/runs/:traceId) and app/routes/sync.traces.$traceId.ts (/sync/traces/:traceId) were added with the original ElectricSQL run page and lost their only consumers when the dashboard hooks that called them were deleted. Nothing in the repo references either route today. Also removed, because the deleted routes were their only callers: OtelTraceIdSchema, RESERVED_ELECTRIC_SHAPE_PARAMS, TraceScope, buildElectricTraceWhereClause from app/v3/electricShape.server.ts (the file stays — UNSAFE_REALTIME_TAG_CHARS / sanitizeRealtimeTagForSql / sanitizeRealtimeTagsForSql are still used by realtime.v1.runs.ts and realtimeClient.server.ts) the loader-specific cases in apps/webapp/test/spanTraceRoutes.replicaLag.test.ts and internal-packages/run-store/src/runOpsStore.routesSpanTraceReadView.replicaLag.test.ts app/utils/longPollingFetch.ts is untouched — realtimeClient.server.ts still uses it. runOpsStore.ts / PostgresRunStore.ts are untouched too; the unrouted-lookup mechanism there is generic and stays. As a plain code fact: the run lookup these loaders performed keyed on TaskRun.traceId alone, which is not an index-backed query shape. That is noted only as context for why the code is not worth keeping around unused. Judgement call worth a maintainer's opinion The request was specifically about /sync/traces/runs/:traceId, the route that looks up a run by traceId. This PR also deletes its sibling /sync/traces/:traceId. The reasoning: both routes came in with the same ElectricSQL run-page work both lost their only consumers in the same later commit neither has any caller anywhere in the repo they share the same helper module, so keeping one means keeping the helpers half-used If you would rather keep the sibling, reverting just that one file deletion is easy and does not affect the rest of this PR — say the word and I will restore it along with the helpers it needs. ✅ Checklist I have followed every step in the contributing guide The PR title follows the convention. I ran and tested the code works Testing Verification run locally from the repo root: Command Result pnpm run format clean, no changes produced pnpm run lint:fix clean pnpm run lint pass (exit 0, no findings) pnpm run typecheck --filter webapp pass pnpm run typecheck --filter @internal/run-store pass A ripgrep sweep for sync.traces, sync/traces, syncTraceRunsLoader, buildElectricTraceWhereClause, OtelTraceIdSchema and RESERVED_ELECTRIC_SHAPE_PARAMS (excluding node_modules) returns zero hits. Not fully verified: both edited test files are testcontainers suites and need a Docker runtime, which was not available in my environment. I confirmed each file collects correctly with exactly the three intended remaining tests and no import errors — notably, dropping the session.server / controlPlaneResolver.server / longPollingFetch / env.server mocks does not break module loading for the surviving loaders. The assertions themselves then failed only on Could not find a working container runtime strategy. CI should be the real signal here. Per apps/webapp/CLAUDE.md, pnpm run build --filter webapp was deliberately not run. Changelog Removed two unused sync routes left over from the original ElectricSQL run page, along with the helpers and tests that existed only to serve them. No behaviour change — neither route had any caller. Screenshots n/a — no user-visible surface changes. 💯
Open Graph Description: Requested by Eric Allam · Slack thread Removes two dead Remix routes and the helpers only they used. app/routes/sync.traces.runs.$traceId.ts (/sync/traces/runs/:traceId) and app/routes/sync.traces....
X Description: Requested by Eric Allam · Slack thread Removes two dead Remix routes and the helpers only they used. app/routes/sync.traces.runs.$traceId.ts (/sync/traces/runs/:traceId) and app/routes/sync.traces....
Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4400
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:94338fbb-3af4-e499-a1b1-069bcd8d4306 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D764:1A4F7F:3470:4572:6AFB08AB |
| html-safe-nonce | fe93e9fe03b7a004ea18f515fe5055321d8feec59904da6d2e8bf83fc2dc64de |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENzY0OjFBNEY3RjozNDcwOjQ1NzI6NkFGQjA4QUIiLCJ2aXNpdG9yX2lkIjoiNzUwNTgxMzc2MjI4MDcyMDU1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | da96a7068cb0eb90e7ffa02b8bf2b5185ee2a9f8306e605d66850b95c089a668 |
| hovercard-subject-tag | pull_request:4149216117 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/4400/files |
| twitter:image | https://avatars.githubusercontent.com/in/1236702?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/in/1236702?s=400&v=4 |
| og:image:alt | Requested by Eric Allam · Slack thread Removes two dead Remix routes and the helpers only they used. app/routes/sync.traces.runs.$traceId.ts (/sync/traces/runs/:traceId) and app/routes/sync.traces.... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 76fb13cb43f1834708971f45a9cfcab5df3177a7582086613d7cdc6e98c4bfde |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git |
| octolytics-dimension-user_id | 95297378 |
| octolytics-dimension-user_login | triggerdotdev |
| octolytics-dimension-repository_id | 572570113 |
| octolytics-dimension-repository_nwo | triggerdotdev/trigger.dev |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 572570113 |
| octolytics-dimension-repository_network_root_nwo | triggerdotdev/trigger.dev |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | afc998826cdd963c8f91a96ae5372809ab5e296b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width