Repository navigation
FE-2006: Identify flow definitions by their EntityId not just EntityUuid - #10075
Conversation
…d a run's workflow from its entity
…so its workflow id
…e code only the flow ids
…ted, so a retry or reset executes the edition the run is drawn with
…her than each place handling the separator itself
…by uuid and taking the h web's id from the HASH Instance entity to start them
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryMedium Risk Overview API & execution: UI & plugin: GraphQL and client code rename Reviewed by Cursor Bugbot for commit 441fd8b. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #10075 +/- ##
==========================================
- Coverage 68.02% 68.01% -0.01%
==========================================
Files 2002 2003 +1
Lines 205905 205921 +16
Branches 8785 8786 +1
==========================================
+ Hits 140057 140059 +2
- Misses 64183 64197 +14
Partials 1665 1665
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit e0a223a. Configure here.
There was a problem hiding this comment.
🟡 Changes recommended
Flow submission is not gated on instance-settings readiness and can fail before starting a workflow.
1 open issue
What changed in this PR
Extends #10072’s full-entity-ID approach to flow definitions, preserving their web identity across execution and display.
Changes:
- Updates GraphQL, workflow, and schedule contracts to use
EntityId. - Resolves the instance-specific HASH web for built-in definitions.
- Updates frontend navigation, filtering, and browser-plugin callers.
| File | Description |
|---|---|
| libs/@local/hash-isomorphic-utils/src/graphql/type-defs/knowledge/flow.typedef.ts | Updates GraphQL identifier contracts. |
| libs/@local/hash-isomorphic-utils/src/graphql/queries/flow.queries.ts | Requests full definition IDs. |
| libs/@local/hash-isomorphic-utils/src/flows/types.ts | Updates local run types. |
| libs/@local/hash-isomorphic-utils/src/flows/temporal-types.ts | Updates workflow parameters. |
| libs/@local/hash-isomorphic-utils/src/flows/schedule-types.ts | Updates schedule input IDs. |
| libs/@local/hash-isomorphic-utils/src/flows/frontend-paths.ts | Updates definition links and filters. |
| libs/@local/hash-isomorphic-utils/src/flows/flow-definition-ids.ts | Adds built-in definition helpers. |
| libs/@local/hash-backend-utils/src/flows/shared/get-hash-web-id.ts | Resolves the HASH web ID. |
| libs/@local/hash-backend-utils/src/flows/shared/get-flow-run-links.ts | Preserves full definition link targets. |
| libs/@local/hash-backend-utils/src/flows/shared/get-flow-definition-entity-by-id.ts | Scopes lookups by web and UUID. |
| libs/@local/hash-backend-utils/src/flows/process-flow-workflow/initialize-flow.ts | Initializes runs with full IDs. |
| libs/@local/hash-backend-utils/src/flows/process-flow-workflow/common-activities/get-flow-definition-activity.ts | Loads definitions using full IDs. |
| libs/@local/hash-backend-utils/src/flows/process-flow-workflow.ts | Threads IDs through workflow processing. |
| libs/@local/hash-backend-utils/src/flows/get-flow-run-details.ts | Returns full definition IDs. |
| libs/@local/hash-backend-utils/src/flows.ts | Updates run filtering and metadata. |
| apps/plugin-browser/src/shared/storage.ts | Updates stored user and run types. |
| apps/plugin-browser/src/shared/get-user.ts | Extracts the HASH web ID. |
| apps/plugin-browser/src/scripts/background/infer-entities.ts | Updates optimistic run IDs. |
| apps/plugin-browser/src/pages/popup/popup-contents/action-center/shared/use-flow-runs.ts | Updates inference-run recognition. |
| apps/plugin-browser/src/pages/popup/popup-contents/action-center/history/shared/table-label.tsx | Builds full-ID history links. |
| apps/plugin-browser/src/pages/popup/popup-contents/action-center/history/manually-triggered.tsx | Updates manual-run filtering. |
| apps/plugin-browser/src/pages/popup/popup-contents/action-center/history/automatically-triggered.tsx | Updates automatic-run filtering. |
| apps/plugin-browser/src/graphql/queries/user.queries.ts | Requests instance settings. |
| apps/plugin-browser/src/graphql/queries/flow.queries.ts | Requests full definition IDs. |
| apps/hash-frontend/src/pages/workers.page/flow-run-table.tsx | Updates run filtering and classification. |
| apps/hash-frontend/src/pages/workers.page.tsx | Passes renamed filter props. |
| apps/hash-frontend/src/pages/shared/use-hash-flows.ts | Adds built-in ID generation hook. |
| apps/hash-frontend/src/pages/shared/use-flow-definitions.ts | Loads web-scoped definitions. |
| apps/hash-frontend/src/pages/shared/flow-definitions-context.ts | Updates context identifier types. |
| apps/hash-frontend/src/pages/shared/flow-definitions-context-provider.tsx | Provides full selected IDs. |
| apps/hash-frontend/src/pages/goals/new.page.tsx | Starts goals with full IDs. |
| apps/hash-frontend/src/pages/goals.page/goals-list.tsx | Updates goal recognition. |
| apps/hash-frontend/src/pages/flows.page.tsx | Updates definition rows and links. |
| apps/hash-frontend/src/pages/dashboard/hooks/use-dashboard-item-config.ts | Updates dashboard workflow IDs. |
| apps/hash-frontend/src/pages/@/[shortname]/workers/[run-id].page.tsx | Selects definitions by full ID. |
| apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer/topbar.tsx | Builds web-aware definition navigation. |
| apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer/run-flow-modal.tsx | Schedules using full definition IDs. |
| apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer/outputs.tsx | Updates goal-output recognition. |
| apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer/flow-run-sidebar.tsx | Updates definition props and classification. |
| apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer/dag-slide.tsx | Updates diagram definition IDs. |
| apps/hash-frontend/src/pages/@/[shortname]/shared/flow-visualizer.tsx | Threads full IDs through visualization. |
| apps/hash-frontend/src/pages/@/[shortname]/flows/[flow-def-id].page.tsx | Reconstructs IDs from route namespaces. |
| apps/hash-frontend/src/graphql/queries/knowledge/flow.queries.ts | Updates start-flow mutation arguments. |
| apps/hash-api/src/graphql/resolvers/knowledge/file/shared.ts | Resolves PDF-analysis definition IDs. |
| apps/hash-api/src/graphql/resolvers/knowledge/file/request-file-upload.ts | Supplies the graph client. |
| apps/hash-api/src/graphql/resolvers/knowledge/file/create-file-from-url.ts | Supplies the graph client. |
| apps/hash-api/src/graphql/resolvers/flows/start-flow.ts | Starts workflows with full IDs. |
| apps/hash-api/src/graphql/resolvers/flows/shared/get-runnable-flow-definition.ts | Validates full-ID definition lookups. |
| apps/hash-api/src/graphql/resolvers/flows/get-flow-runs.ts | Forwards full-ID filters. |
| apps/hash-api/src/graphql/resolvers/flows/flow-schedule.ts | Updates schedule workflow arguments. |
| apps/hash-api/src/graph/knowledge/system-types/flow-schedule.ts | Simplifies schedule input typing. |
| apps/hash-api/src/ai/infer-entities-websocket/handle-infer-entities-request.ts | Resolves built-in inference IDs. |
| apps/hash-ai-worker-ts/src/workflows/run-flow-workflow.ts | Updates naming callback parameters. |
| apps/hash-ai-worker-ts/src/shared/testing-utilities/mock-get-flow-context.ts | Constructs full IDs in mocks. |
| apps/hash-ai-worker-ts/src/activities/flow-activities/generate-flow-run-name-activity.ts | Updates built-in flow recognition. |
Review effort: Balanced
… so for scheduled runs
…graph # Conflicts: # libs/@local/hash-isomorphic-utils/src/flows/flow-definition-schema.ts
…-2006-flow-definition-entity-ids


🌟 Purpose
Does the same thing for Flow Definitions as #10072 did for Flow Runs, i.e. pass their whole
EntityIdaround instead of just theEntityUuid(so that theWebIdis available).🔍 Changes
Basically mechanical. The one worth thing noting is that for hardcoded Flow Definitions we have to look up the system web id (i.e. the
hweb) in order to construct the entity id for those definitions, because only the UUID is known in the code, and thehweb has a new id in each instance.Existing flow runs, schedules etc would fail – there are no such existing things in production.