Skip to content

Dev - #475

Merged
saqibmanan merged 8 commits into
mainfrom
dev
Sep 23, 2026
Merged

Dev#475
saqibmanan merged 8 commits into
mainfrom
dev

Conversation

@saqibmanan

Copy link
Copy Markdown
Contributor

No description provided.

UdayRajSahai2 and others added 8 commits September 17, 2026 16:28
…n isn't hidden

navigationTab was 'null' on first paint (useQueryState with no default),
so the empty-state branch's 'navigationTab === '\''drafts'\''' check failed
on the very first render whenever the current filter had zero items --
the Add New button (and the visual tab selection) just didn't render.
A useEffect already tried to self-correct by calling
setNavigationTab('drafts') when null, but that runs after first paint,
so it only closed the gap once the URL update + re-render round-tripped
-- a race that mostly won on a fast/idle connection and mostly lost
under real load or a slow list query.

Root-caused via CivicDataSpace-test#103: test_prv_011_org_create_collaborative
timed out waiting for a button that was never there for an account with
zero existing collaboratives, on every run, concurrent or not -- not
flakiness, a deterministic zero-item edge case. dataset/ and usecases/
pages share the identical pattern (confirmed by inspection) and would
hit the same bug for any account whose default-filtered list is empty.

Fix: useQueryState('tab', parseAsString.withDefault('drafts')), the same
pattern already used in charts/page.tsx and the access page -- navigationTab
is now synchronously 'drafts' on first render, no round-trip needed. Removed
the now-dead null-check in each page's useEffect (the state can no longer be
null) but kept the refetch-on-tab-change behavior.

Verified: tsc --noEmit and eslint clean on all three files, zero new errors
(10 pre-existing errors elsewhere, in charts/components/ChartsImage.tsx,
untouched by this change). Not verified against a live running instance --
that needs local Keycloak/NextAuth setup out of scope for this change;
next step is confirming test_prv_011/002/003 actually go green against a
dev deploy of this.
…-dev

fix: default drafts/published tab so the empty-state create button isn't hidden
… on dev deploy for now

proxy.ts's public-pages allowlist had '/privacy', but the real route is
/privacy-policy -- the regex is $-anchored so it never matched, and the
page (and the footer link pointing at the same wrong '/privacy' path)
redirected to /login. This is what's been failing consumer-smoke and
rolling back every dev deploy, unrelated to #471.

Also: skip_provider: true on both smoke-tests and functional-tests in
the dev deploy gate. Provider create-flow tests are under separate
investigation (CivicDataSpace-test#103 and follow-ons) -- not blocking
deploys on them until that's resolved. No-op on main, which already
runs the readonly suite only.
…-skip-provider-dev

fix: privacy-policy login-gating bug; skip provider suite on dev deploy
Checked live, read-only, on both dev.civicdataspace.in and
civicdataspace.in: /privacy returns 200 on both; /privacy-policy
307-redirects to login on both. /privacy was the real, already-working
route before #472 -- that PR's diagnosis was backwards. This undoes
the proxy.ts allowlist entry and the footer link change from #472,
keeping the skip_provider workflow change (unrelated, still correct).
@saqibmanan
saqibmanan merged commit daedf9b into main Sep 23, 2026
42 of 48 checks passed

This branch was successfully deployed

1 active deployment
development — 2970ce92 Deployed Sep 23, 2026 by saqibmanan via promote #246
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants