From 961b40ed0355bbe17b7ef04e0de88a98cf7d1e09 Mon Sep 17 00:00:00 2001 From: David Pine <7679720+IEvangelist@users.noreply.github.com> Date: Fri, 18 Sep 2026 16:08:35 -0500 Subject: [PATCH 1/6] Fix release hub navigation and unify search recovery UX Preserve Astro ClientRouter lifecycle and history ownership, restore deferred artwork after navigation, and align search controls and contextual recovery across the hub, API reference and galleries. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .../CatalogSearchActiveFilters.astro | 35 ++ .../src/components/Integrations.astro | 242 +++++---- src/frontend/src/components/SampleGrid.astro | 258 +++++----- src/frontend/src/components/SessionGrid.astro | 209 +++----- .../api-reference/ApiSearchBar.astro | 174 +------ .../api-reference/InpageSearch.astro | 196 +------- .../api-reference/VersionFilter.astro | 31 +- .../api-reference/inpage-search-sync.ts | 2 + .../dev-center/BrowseDropdown.astro | 3 +- .../dev-center/GlossaryBrowser.astro | 37 +- .../components/dev-center/GlossaryBrowser.ts | 50 +- .../{DevLayout.astro => HubLayout.astro} | 2 +- .../dev-center/ResourceBrowser.astro | 49 +- .../components/dev-center/ResourceBrowser.ts | 87 ++-- .../components/dev-center/empty-results.ts | 20 + .../components/dev-center/filter-history.ts | 93 ++++ .../components/search/SearchEmptyState.astro | 21 + .../src/components/search/SearchField.astro | 47 ++ .../components/search/search-empty-state.ts | 59 +++ .../src/components/starlight/Search.astro | 97 +++- .../src/components/starlight/Sidebar.astro | 274 +++------- .../docs/community/contributor-guide.mdx | 8 + src/frontend/src/content/i18n/en.json | 35 ++ src/frontend/src/pages/hub/browse/index.astro | 6 +- .../src/pages/hub/glossary/[term].astro | 6 +- .../src/pages/hub/glossary/index.astro | 6 +- src/frontend/src/pages/hub/index.astro | 8 +- .../reference/api/_search-presentation.ts | 97 ++++ .../api/csharp/[package]/[type]/index.astro | 47 +- .../api/csharp/[package]/index.astro | 45 +- .../pages/reference/api/csharp/index.astro | 72 ++- .../typescript/[module]/[item]/index.astro | 47 +- .../api/typescript/[module]/index.astro | 45 +- .../reference/api/typescript/index.astro | 73 ++- src/frontend/src/styles/dev-hub.css | 19 +- src/frontend/src/styles/search-controls.css | 149 ++++++ .../utils/dev-center/resource-card-html.ts | 9 +- .../tests/e2e/api-search-contract.spec.ts | 302 +++++++++++ src/frontend/tests/e2e/dev-browse.spec.ts | 40 +- .../tests/e2e/dev-empty-recovery.spec.ts | 148 ++++++ src/frontend/tests/e2e/dev-glossary.spec.ts | 39 +- src/frontend/tests/e2e/dev-grain.spec.ts | 59 +++ src/frontend/tests/e2e/dev-navigation.spec.ts | 138 +++++ .../tests/e2e/filter-navigation.spec.ts | 2 +- .../tests/e2e/gallery-search-contract.spec.ts | 472 ++++++++++++++++++ .../tests/e2e/search-visual-parity.spec.ts | 80 +++ src/frontend/tests/e2e/site-search.spec.ts | 149 ++++++ .../typecheck/component-props.contracts.ts | 15 + .../unit/api-search-lifecycle.vitest.test.ts | 24 +- .../unit/api-search-recovery.vitest.test.ts | 95 ++++ .../unit/custom-components.vitest.test.ts | 48 +- .../tests/unit/dev-glossary.vitest.test.ts | 9 +- .../tests/unit/filter-history.vitest.test.ts | 164 ++++++ .../unit/resource-browser.vitest.test.ts | 10 +- .../unit/search-presentation.vitest.test.ts | 191 +++++++ .../tests/unit/search-recovery.vitest.test.ts | 32 ++ 56 files changed, 3439 insertions(+), 1236 deletions(-) create mode 100644 src/frontend/src/components/CatalogSearchActiveFilters.astro rename src/frontend/src/components/dev-center/{DevLayout.astro => HubLayout.astro} (94%) create mode 100644 src/frontend/src/components/dev-center/empty-results.ts create mode 100644 src/frontend/src/components/dev-center/filter-history.ts create mode 100644 src/frontend/src/components/search/SearchEmptyState.astro create mode 100644 src/frontend/src/components/search/SearchField.astro create mode 100644 src/frontend/src/components/search/search-empty-state.ts create mode 100644 src/frontend/src/pages/reference/api/_search-presentation.ts create mode 100644 src/frontend/src/styles/search-controls.css create mode 100644 src/frontend/tests/e2e/api-search-contract.spec.ts create mode 100644 src/frontend/tests/e2e/dev-empty-recovery.spec.ts create mode 100644 src/frontend/tests/e2e/dev-navigation.spec.ts create mode 100644 src/frontend/tests/e2e/gallery-search-contract.spec.ts create mode 100644 src/frontend/tests/e2e/search-visual-parity.spec.ts create mode 100644 src/frontend/tests/unit/api-search-recovery.vitest.test.ts create mode 100644 src/frontend/tests/unit/filter-history.vitest.test.ts create mode 100644 src/frontend/tests/unit/search-presentation.vitest.test.ts create mode 100644 src/frontend/tests/unit/search-recovery.vitest.test.ts diff --git a/src/frontend/src/components/CatalogSearchActiveFilters.astro b/src/frontend/src/components/CatalogSearchActiveFilters.astro new file mode 100644 index 000000000..16d6dd96e --- /dev/null +++ b/src/frontend/src/components/CatalogSearchActiveFilters.astro @@ -0,0 +1,35 @@ +--- +interface Props { + label: string; +} +const { label } = Astro.props; +--- + +