Update Entities Visualizer#8783
Conversation
…e toolbar
Reorganize the entities visualizer around a single typed filter state
(EntitiesFilterState) with a pure buildEntitiesFilter mapping it to the
Graph API filter. Replace the shared TableHeader with a VisualizerHeader
shell that hosts a FilterRibbon (web pill, type pill, include-archived pill,
add-filters menu) on the left and QueryCount + view toggle on the right.
Bulk actions take over the left slot when rows are selected.
Move table-only actions (export, search, centralized sort) into a new
TableToolbar sub-header. Drop all client-side column filters (webId,
entityTypes, lastEditedById, createdById) so every filter is now server-side.
Switch traversal paths per view, fix cursor-reset on sort and conversions
changes, and shrink EntitiesVisualizer's public props to
{ entityTypeBaseUrl?, entityTypeId?, hideColumns? }.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fb400b6 to
9830e1b
Compare
🤖 Augment PR SummarySummary: Refactors the Entities Visualizer UI/data flow around a single typed filter state and moves filtering fully server-side. Changes:
Technical Notes: 🤖 Was this summary useful? React with 👍 or 👎 |
| const graphViewTraversalPaths: TraversalPath[] = [ | ||
| { | ||
| edges: [ | ||
| { kind: "has-left-entity", direction: "incoming" }, |
There was a problem hiding this comment.
apps/hash-frontend/src/pages/shared/entities-visualizer/data/traversal-paths.ts:11 — The Graph traversal only follows incoming has-left-entity -> outgoing has-right-entity, which seems to resolve links where the displayed entity is the left endpoint but not where it’s the right endpoint. That looks inconsistent with the comment about resolving links “into and out of” displayed entities, and may cause some incoming links/endpoints to be missing in Graph view.
Severity: medium
🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.
There was a problem hiding this comment.
@CiaranMn this should be according to the requirements, right? Please resolve if so.
PR SummaryMedium Risk Overview The shared
Reviewed by Cursor Bugbot for commit f1e18d8. Bugbot is set up for automated code reviews on this repo. Configure here. |
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 f1e18d8. Configure here.
| /** | ||
| * Hide the internal/external and archived filter controls | ||
| */ | ||
| hideFilters?: boolean; |
There was a problem hiding this comment.
Stale web filter on membership
Medium Severity
filterState.web.selectedInternalWebIds is initialized once from internalWebIds and never updated when internalWebIds grows (for example after org membership loads). Server-side web filtering then omits new webs, so entities in newly joined org webs stay hidden until the user adjusts or clears filters.
Reviewed by Cursor Bugbot for commit f1e18d8. Configure here.


🌟 What is the purpose of this PR?
Reworks the entities visualizer around a single, typed filter state and a redesigned header, and moves all filtering server-side.
🔗 Related links
🚫 Blocked by
🔍 What does this change?
EntitiesFilterStateand a purebuildEntitiesFilterthat maps it to a Graph APIFilter(web / type / archived clauses), replacing the oldFilterStateand all client-side column filters (webId,entityTypes,lastEditedById,createdById).TableHeaderwith aVisualizerHeadershell +FilterRibbon:WebFilterPill— select internal webs / include other websTypeFilterPill— driven byuseAvailableTypes, which fetches available types under the current web + archived filters but ignores the type filter itself (so unchecked types remain re-selectable)IncludeArchivedPill+AddFiltersMenuBulkActionsDropdowntakes over the left slot when table rows are selectedQueryCountto the header and drops the separate external-webscountEntitiesquery / internal-vs-external count reconciliation; the result count now comes straight from the entity request.TableToolbar(CSV export viagenerateEntitiesCsvFile, search toggle, and a centralizedSortControl).traversalPathsForView(graph view resolves links in/out of displayed entities; table/grid only resolve a link's own endpoints).EntitiesVisualizer's public props to{ entityTypeBaseUrl?, entityTypeId?, hideColumns? }, removingdefaultFilter,defaultGraphConfig,defaultGraphFilters,defaultView,fullScreenMode,hideFilters,loadingComponent,maxHeight, andreadonly.Pre-Merge Checklist 🚀
🚢 Has this modified a publishable library?
This PR:
📜 Does this require a change to the docs?
The changes in this PR:
🕸️ Does this require a change to the Turbo Graph?
The changes in this PR:
🐾 Next steps
🛡 What tests cover this?
None
❓ How to test this?
📹 Demo