Skip to content

FE-2290: Improve the empty state of the /types table - #10524

Open
claude[bot] wants to merge 3 commits into
mainfrom
claude/fe-2290-types-empty-state
Open

claude[bot] wants to merge 3 commits into
mainfrom
claude/fe-2290-types-empty-state

Conversation

@claude

@claude claude Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Deivids Vilkinsons, Ciaran Morinan, Alex Leon · Slack thread

🌟 Purpose

The /types table showed only "No results found" when no rows were visible. A new user lands there under the default "my webs" filter, and the page gave them nothing to do next. This supersedes #10522, which was closed because the default filter should stay "my webs only".

The table's empty state now depends on why it is empty:

  • The user's webs have no types at all: "No types yet", a short description, and a "Create an entity type" button that opens /new/types/entity-type. An "Show all public types" button also appears when that would show types.
  • Anything else: a smaller message ("No types match your filters", or "No data types in your webs" and so on when only the tab narrows it) with "Clear filters" and "Show all public types" buttons. Each button appears only when using it would show at least one type.

Screenshots (rendered from the real Grid and empty-state components with the app's MUI theme) are in the Slack thread, because uploading images to GitHub is not available from this session.

To see it: sign in as a new user and open /types. For the general case, open the "Web is" filter and untick your webs, or add a filter that matches nothing.

🔍 Changes

  • "No types at all" means that none of the types the page has already loaded, of any kind, belong to the user's own web or one of their orgs' webs. Archived types are not counted. It needs no new query: the page passes every loaded type to the table as allTypes, whichever tab is open. Until they have all loaded, an empty table shows its loading state, so the wrong message does not flash on screen.
  • "Clear filters" resets the type filters and the web filter to the default ("my webs only"). It appears only when that default would show some types on the current tab. "Show all public types" ticks "Public in any web", which the "Web is" filter menu offers already.
  • Grid takes an optional noResultsContent, which replaces its default message and can hold buttons. Every other table keeps the existing message.
  • The table is taller when empty (five rows for the "no types" state, three for the general one), so the message and buttons fit.
  • The profile page's types tab (onlyOneWeb) is unchanged.
  • The /types Playwright test now unticks every web, checks for "No types match your filters", and clicks "Show all public types" before it checks for a non-zero count. Before, it opened the menu and ticked "Public in any web" itself.

Generated by Claude Code

…table

The /types table showed a bare "No results found" when nothing was
visible, which is where a new user lands under the default "my webs"
filter. When the user's webs have no types at all it now offers to create
an entity type. Otherwise it offers to clear the filters or include public
types, each only when that would show some types.

Grid takes an optional noResultsContent to replace its default message.
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
hash Ready Ready Preview Nov 16, 2026 3:39pm UTC
3 Skipped Deployments
Project Deployment Actions Updated
hashdotdesign-tokens Ignored Ignored Preview Nov 16, 2026 3:39pm UTC
petrinaut Skipped Skipped Nov 16, 2026 3:39pm UTC
petrinaut-docs Skipped Skipped Nov 16, 2026 3:39pm UTC

Request Review

@github-actions github-actions Bot added area/apps > hash* Affects HASH (a `hash-*` app) type/eng > frontend Owned by the @frontend team area/tests New or updated tests area/tests > playwright New or updated Playwright tests area/apps labels Nov 16, 2026
@vercel
vercel Bot temporarily deployed to Preview – petrinaut-docs November 16, 2026 15:13 Inactive
@vercel
vercel Bot temporarily deployed to Preview – petrinaut November 16, 2026 15:13 Inactive
@vilkinsons
vilkinsons marked this pull request as ready for review November 16, 2026 15:22
Copilot AI balanced review requested due to automatic review settings November 16, 2026 15:22
@veria-ai

veria-ai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR overview

No security issues were found in this pull request.

Reviews

@cursor

cursor Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

PR Summary

Low Risk
UI-only changes to empty states, filters, and one shared Grid prop; no auth or data-path changes.

Overview
The /types table no longer shows a generic “No results found” when every row is hidden. Grid gains optional noResultsContent so callers can render interactive empty UI (with pointerEvents: "auto") instead of the static message.

TypesTable classifies emptiness using new allTypes (all kinds, from the types page) and optional helpers for web filtering. When the user has no types in their webs it shows “No types yet”, copy, and Create an entity type; otherwise it shows filter- or tab-specific titles with Clear filters and Show all public types only when those actions would surface rows. Empty grids use extra row height so the state fits, and loading waits until allTypes is known to avoid flashing the wrong message. onlyOneWeb usage is unchanged.

TypesEmptyState is the new shared component for those actions. The types page passes allTypes and treats entity-type fetch failures as null. The Playwright test clears web selections and uses Show all public types instead of toggling the web menu directly.

Reviewed by Cursor Bugbot for commit 36c9cb4. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

Catalogue-load failures can leave empty type tabs stuck loading indefinitely, and the Playwright test can time out by expecting the wrong empty-state heading for accounts without unarchived owned types.

2 open issues
What changed in this PR

Improves the /types empty state while preserving the default “my webs only” filter, replacing the approach in #10522.

Changes:

  • Adds contextual empty-state messages with creation and filter actions.
  • Uses all loaded type kinds to distinguish empty webs from filtered-out results, and adds custom empty content support to Grid.
  • Updates the Playwright test to exercise the public-types action.
File Description
tests/​hash-playwright/​tests/​features/​types-page.spec.ts Exercises empty-state messaging and the public-types action.
apps/​hash-frontend/​src/​pages/​types/​[[...type-kind]].page.tsx Passes all loaded types to the table.
apps/​hash-frontend/​src/​pages/​shared/​types-table/​types-empty-state.tsx Adds the empty-state message and action component.
apps/​hash-frontend/​src/​pages/​shared/​types-table.tsx Determines empty-state content, available actions, loading, and height.
apps/​hash-frontend/​src/​components/​grid/​grid.tsx Supports custom interactive empty-state content.

Review effort: Balanced

@cursor cursor Bot left a comment

Copy link
Copy Markdown

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 using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 49a2923. Configure here.

An empty /types tab waited for every kind of type before choosing its
empty state, so a failed entity or data type query left it loading
forever. The page now tells the table when a query failed, and the table
falls back to the general empty state.

The Playwright test no longer expects one heading, since the user may own
no types at all; it waits for the button both empty states offer.

This branch was successfully deployed

1 active and 2 inactive deployments
Preview – hash — 36c9cb4e Deployed Nov 16, 2026 by vercel[bot]
Preview – petrinaut-docs — 36c9cb4e Deployed Nov 16, 2026 by vercel[bot]
Preview – petrinaut — 36c9cb4e Deployed Nov 16, 2026 by vercel[bot]
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 area/tests > playwright New or updated Playwright tests area/tests New or updated tests type/eng > frontend Owned by the @frontend team

Development

Successfully merging this pull request may close these issues.

4 participants