Skip to content

Empty-state create button missing for any org/account with a zero-item filtered list #474

Description

@saqibmanan

What: navigationTab (drafts/published filter on Datasets, UseCases, Collaboratives) started null on first paint; the empty-state branch only renders "Add New X" when navigationTab === 'drafts', so any account whose default-filtered list is empty saw no button at all, plus no visually-selected tab. A useEffect self-corrected it, but only after first paint — a race that loses under real load.

Why it matters: any new/small org or account hits a dead-end with no way to create their first item. Found investigating CivicDataSpace-test#103's flaky concurrent-load tests.

Evidence: test_prv_011_org_create_collaborative timed out waiting for a button that was never there, deterministically, for an account with zero existing collaboratives — not flakiness.

Fix: useQueryState('tab', parseAsString.withDefault('drafts')), same pattern already used in charts/page.tsx. PR #471, merged.

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions