René's URL Explorer Experiment


Title: fix(webapp): remove unawaited task list metrics promises by claude[bot] · Pull Request #4380 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(webapp): remove unawaited task list metrics promises by claude[bot] · Pull Request #4380 · triggerdotdev/trigger.dev

X Title: fix(webapp): remove unawaited task list metrics promises by claude[bot] · Pull Request #4380 · triggerdotdev/trigger.dev

Description: Requested via Slack thread TaskListPresenter created promises that nothing ever consumed. Two of the three deferred metrics promises it returned had no reader, no await and no .catch(), so when the query behind one of them failed the rejection had nowhere to go. Before / After Before TaskListPresenter.call() returned four things: tasks, activity, runningStats and durations. Its only caller reads tasks and runningStats. Every load of the tasks page therefore fired two ClickHouse queries whose results were thrown away. If either of those two queries failed, the resulting promise rejection was unhandled — nothing was awaiting it and nothing had attached an error handler, so it surfaced as an unhandled rejection at the process level rather than as an error anyone could attribute to a request. After TaskListPresenter.call() returns tasks and runningStats only. Two fewer queries run per tasks-page load. There is no longer an unconsumed promise that can reject without a handler. runningStats is awaited by its caller, so its failures continue to be handled the way they always were. Nothing changes on screen: the tasks page renders hourlyActivity and runningStates, and neither of the removed values fed either of those. How The removed values were verified unreferenced before deleting anything: TaskListPresenter has exactly one caller, UnifiedTaskListPresenter, which reads taskResult.tasks and taskResult.runningStats and nothing else. No file anywhere in the repo — app code, tests, or type re-exports — reads an activity or durations field off the presenter's result. UnifiedTaskListPresenter builds its own unifiedTaskListHourlyActivity query for the 24h chart the page actually renders, which is what made the presenter's separate 7-day daily activity data redundant. getDailyTaskActivity and getAverageDurations on ClickHouseEnvironmentMetricsRepository had no callers other than the two lines being deleted, so they and their now-orphaned helpers and types were removed too. Changes: apps/webapp/app/presenters/v3/TaskListPresenter.server.ts — drop the activity and durations fields (both from the main return and from the no-current-worker early return) and the two repository calls behind them. Drop the unreferenced TaskActivity type alias. The "don't await this" comment on the remaining runningStats promise now spells out that the caller has to consume it. apps/webapp/app/services/environmentMetricsRepository.server.ts — remove getDailyTaskActivity and getAverageDurations from the EnvironmentMetricsRepository interface and its ClickHouse implementation, along with fillInDailyTaskActivity and the DailyTaskActivity / AverageDurations types. getCurrentRunningStats is the control that shows the diagnosis is right. It throws on query failure in exactly the same way as the two removed methods — if (queryError) throw queryError — but it never produced an unhandled rejection, because UnifiedTaskListPresenter passes its promise into a Promise.all(...).then(...) chain that the route then awaits. Same failure mode, opposite outcome, and the only difference is whether anything consumes the promise. Follow-ups, not in this PR: AgentListPresenter returns three sparkline promises in the same shape and they look similarly unconsumed. Left alone here to keep this change reviewable. With these two callers gone, the getTaskActivity and getAverageDurations query builders in @internal/clickhouse have no remaining callers in this repo. Whether to remove them is a separate call for someone who owns that package. ✅ Checklist I have followed every step in the contributing guide The PR title follows the convention. I ran and tested the code works Testing pnpm run typecheck --filter webapp — passes. This is the meaningful check here: it proves nothing still references the removed fields, methods or types. pnpm run format and pnpm run lint:fix — clean, no changes produced. No test file referenced the removed symbols, so no test needed updating. Changelog Server-only change, so this carries a .server-changes/ note rather than a changeset: .server-changes/task-list-remove-unused-metrics-queries.md. The tasks page no longer runs two queries whose results were never displayed, cutting wasted work on every page load and removing a source of hidden server errors Screenshots No visual change — the removed data was never rendered.

Open Graph Description: Requested via Slack thread TaskListPresenter created promises that nothing ever consumed. Two of the three deferred metrics promises it returned had no reader, no await and no .catch(), so when the...

X Description: Requested via Slack thread TaskListPresenter created promises that nothing ever consumed. Two of the three deferred metrics promises it returned had no reader, no await and no .catch(), so when the...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4380

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,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-controllerpull_requests
route-actionfiles
fetch-noncev2:16a78a07-13ac-3e44-bdfb-07c948fc8af2
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9EE8:31FFEA:5D884:8496E:6AFAF632
html-safe-nonce3e125b1a00932cac8b16e60eb6e5cf3cc7332a2f3df4818f7549069f0639688c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5RUU4OjMxRkZFQTo1RDg4NDo4NDk2RTo2QUZBRjYzMiIsInZpc2l0b3JfaWQiOiIxNDI4Njg0NDYwMDc2NDk2NDM0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmaca4cad787144c915274c6fba6ff7af7ceb84f7cff3c9de2bcce1c0a7a6ce73d36
hovercard-subject-tagpull_request:4137311899
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/4380/files
twitter:imagehttps://avatars.githubusercontent.com/in/1236702?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/in/1236702?s=400&v=4
og:image:altRequested via Slack thread TaskListPresenter created promises that nothing ever consumed. Two of the three deferred metrics promises it returned had no reader, no await and no .catch(), so when the...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea85e96a83bed7871993e6b1ffda24105928eee17
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4380/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4380%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4380%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4380/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4380/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4380/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
matt-aitkenhttps://github.com/matt-aitken
mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
fix/task-list-presenter-unconsumed-promiseshttps://github.com/triggerdotdev/trigger.dev/tree/fix/task-list-presenter-unconsumed-promises
Conversation 2 https://github.com/triggerdotdev/trigger.dev/pull/4380
Commits 1 https://github.com/triggerdotdev/trigger.dev/pull/4380/commits
Checks 44 https://github.com/triggerdotdev/trigger.dev/pull/4380/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4380/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4380/files
fix(webapp): remove unawaited task list metrics promises https://github.com/triggerdotdev/trigger.dev/pull/4380/files#top
Show all changes 1 commit https://github.com/triggerdotdev/trigger.dev/pull/4380/files
b2d5bf8 fix(webapp): remove unawaited task list metrics promises claude Jul 26, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4380/commits/b2d5bf8c44a93198de156a8828c9be64d2df5473
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4380/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4380/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4380/files
task-list-remove-unused-metrics-queries.md https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-3ebf936f54d4646c3ad2776a8ef3451e5becff8aeb1b2785cf8f2a5e5c9d592d
TaskListPresenter.server.ts https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-26d608f81840cc916631e1df14cb4951e7081dba2690e97f712b8dd0e3abf0e4
environmentMetricsRepository.server.ts https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-16ed5a86edad7d458a8b25026495f615968450cb05774a08e28d8498f89929a2
.server-changes/task-list-remove-unused-metrics-queries.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-3ebf936f54d4646c3ad2776a8ef3451e5becff8aeb1b2785cf8f2a5e5c9d592d
View file https://github.com/triggerdotdev/trigger.dev/blob/b2d5bf8c44a93198de156a8828c9be64d2df5473/.server-changes/task-list-remove-unused-metrics-queries.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4380/{{ revealButtonHref }}
apps/webapp/app/presenters/v3/TaskListPresenter.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-26d608f81840cc916631e1df14cb4951e7081dba2690e97f712b8dd0e3abf0e4
View file https://github.com/triggerdotdev/trigger.dev/blob/b2d5bf8c44a93198de156a8828c9be64d2df5473/apps/webapp/app/presenters/v3/TaskListPresenter.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4380/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-26d608f81840cc916631e1df14cb4951e7081dba2690e97f712b8dd0e3abf0e4
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-26d608f81840cc916631e1df14cb4951e7081dba2690e97f712b8dd0e3abf0e4
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-26d608f81840cc916631e1df14cb4951e7081dba2690e97f712b8dd0e3abf0e4
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-26d608f81840cc916631e1df14cb4951e7081dba2690e97f712b8dd0e3abf0e4
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-26d608f81840cc916631e1df14cb4951e7081dba2690e97f712b8dd0e3abf0e4
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-26d608f81840cc916631e1df14cb4951e7081dba2690e97f712b8dd0e3abf0e4
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-26d608f81840cc916631e1df14cb4951e7081dba2690e97f712b8dd0e3abf0e4
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-26d608f81840cc916631e1df14cb4951e7081dba2690e97f712b8dd0e3abf0e4
apps/webapp/app/services/environmentMetricsRepository.server.tshttps://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-16ed5a86edad7d458a8b25026495f615968450cb05774a08e28d8498f89929a2
View file https://github.com/triggerdotdev/trigger.dev/blob/b2d5bf8c44a93198de156a8828c9be64d2df5473/apps/webapp/app/services/environmentMetricsRepository.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4380/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-16ed5a86edad7d458a8b25026495f615968450cb05774a08e28d8498f89929a2
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-16ed5a86edad7d458a8b25026495f615968450cb05774a08e28d8498f89929a2
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-16ed5a86edad7d458a8b25026495f615968450cb05774a08e28d8498f89929a2
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-16ed5a86edad7d458a8b25026495f615968450cb05774a08e28d8498f89929a2
https://github.com/triggerdotdev/trigger.dev/pull/4380/files#diff-16ed5a86edad7d458a8b25026495f615968450cb05774a08e28d8498f89929a2
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4380/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.