Skip to content

Comments

H-6263: Basic pagination for retrieving Flow Runs#8473

Merged
CiaranMn merged 2 commits intomainfrom
cm/paginate-get-flow-runs
Feb 23, 2026
Merged

H-6263: Basic pagination for retrieving Flow Runs#8473
CiaranMn merged 2 commits intomainfrom
cm/paginate-get-flow-runs

Conversation

@CiaranMn
Copy link
Member

🌟 What is the purpose of this PR?

Adds basic pagination to the getFlowRuns query and associated frontend components.

Pre-Merge Checklist 🚀

🚢 Has this modified a publishable library?

This PR:

  • does not modify any publishable blocks or libraries, or modifications do not need publishing

📜 Does this require a change to the docs?

The changes in this PR:

  • are internal and do not require a docs change

🕸️ Does this require a change to the Turbo Graph?

The changes in this PR:

  • do not affect the execution graph

⚠️ Known issues

  • The goals table doesn't have pagination components, so users will only see the first X of them always.

🐾 Next steps

  • H-6264: Think through Flow Runs pagination properly

📹 Demo

Screenshot 2026-02-23 at 17 27 25

@vercel
Copy link

vercel bot commented Feb 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hash Ready Ready Preview, Comment Feb 23, 2026 5:32pm
petrinaut Ready Ready Preview, Comment Feb 23, 2026 5:32pm
2 Skipped Deployments
Project Deployment Actions Updated (UTC)
hashdotdesign Ignored Ignored Feb 23, 2026 5:32pm
hashdotdesign-tokens Ignored Ignored Feb 23, 2026 5:32pm

@cursor
Copy link

cursor bot commented Feb 23, 2026

PR Summary

Medium Risk
Touches a core query/utility (getFlowRuns) and changes its return shape across multiple consumers, so any missed call site or pagination edge case could break flow run listings.

Overview
Adds basic offset-based pagination to the getFlowRuns GraphQL query by introducing a PaginatedFlowRuns wrapper (flowRuns + totalCount) and new offset/limit arguments.

Updates backend getFlowRuns to return { flowRuns, totalCount } and slice results after Temporal deduping, and adjusts resolver/detail-field detection accordingly. Frontend (Workers Activity Log) now passes pagination variables and renders simple Previous/Next controls + range text; other clients (AI websocket + browser plugin) are updated to read from the new flowRuns field.

Written by Cursor Bugbot for commit 30c85ce. This will update automatically on new commits. Configure here.

@github-actions github-actions bot added area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/libs Relates to first-party libraries/crates/packages (area) type/eng > frontend Owned by the @frontend team type/eng > backend Owned by the @backend team area/apps labels Feb 23, 2026
@augmentcode
Copy link

augmentcode bot commented Feb 23, 2026

🤖 Augment PR Summary

Summary: This PR introduces basic offset/limit pagination for retrieving Flow Runs across the GraphQL API and frontend.

Changes:

  • Update GraphQL schema so getFlowRuns returns PaginatedFlowRuns with flowRuns + totalCount, and accepts offset/limit.
  • Adjust API resolver and backend getFlowRuns utility to return paginated results plus an overall count.
  • Update detailed-field detection to work when FlowRun is nested under PaginatedFlowRuns.flowRuns.
  • Add a pagination state interface to the frontend Flow Runs context and pass pagination variables to the query.
  • Add basic “Previous/Next page” controls and count display to the workers Flow Runs table.
  • Update plugin-browser queries and other call sites to accommodate the new response shape.

Technical Notes: totalCount is derived from the (de-duplicated) Temporal workflow IDs before applying offset-based slicing.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 4 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 4 potential issues.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@CiaranMn CiaranMn enabled auto-merge February 23, 2026 17:52
@CiaranMn CiaranMn added this pull request to the merge queue Feb 23, 2026
@graphite-app graphite-app bot requested review from a team February 23, 2026 17:54
Merged via the queue into main with commit b966a5d Feb 23, 2026
71 of 72 checks passed
@CiaranMn CiaranMn deleted the cm/paginate-get-flow-runs branch February 23, 2026 18:11
@codecov
Copy link

codecov bot commented Feb 23, 2026

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 62.60%. Comparing base (bc6e591) to head (30c85ce).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...ers/flows/shared/were-detailed-fields-requested.ts 0.00% 4 Missing ⚠️
apps/hash-api/src/ai/infer-entities-websocket.ts 0.00% 1 Missing ⚠️
...ntities-websocket/handle-infer-entities-request.ts 0.00% 1 Missing ⚠️
...h-api/src/graphql/resolvers/flows/get-flow-runs.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #8473   +/-   ##
=======================================
  Coverage   62.59%   62.60%           
=======================================
  Files        1296     1296           
  Lines      131048   131038   -10     
  Branches     5488     5487    -1     
=======================================
  Hits        82032    82032           
+ Misses      48106    48096   -10     
  Partials      910      910           
Flag Coverage Δ
apps.hash-ai-worker-ts 1.40% <ø> (ø)
apps.hash-api 0.00% <0.00%> (ø)
local.hash-isomorphic-utils 0.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/apps > hash* Affects HASH (a `hash-*` app) area/apps > hash-api Affects the HASH API (app) area/apps area/libs Relates to first-party libraries/crates/packages (area) type/eng > backend Owned by the @backend team type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

2 participants