Skip to content

fix(shell): lazy-load GlobalSearchDialog to meet client budget - #713

Merged
tiankaima merged 7 commits into
mainfrom
fix/lazy-load-global-search-dialog
Jul 31, 2026
Merged

fix(shell): lazy-load GlobalSearchDialog to meet client budget#713
tiankaima merged 7 commits into
mainfrom
fix/lazy-load-global-search-dialog

Conversation

@tiankaima

Copy link
Copy Markdown
Member

Summary

  • Lazy-load GlobalSearchDialog in AppShell instead of a static import so global search chunks are not part of the initial shell bundle.
  • Dialog is fetched on first open (search button or Cmd/Ctrl+K), then cached for the session.

Fixes E2E CI public-route-client-budget.test.sh request-count failures introduced by global search (#708):

  • /: 60 → 56 requests (limit 56)
  • /catalog/courses/[jwId]: 95 → 93 (limit 93)
  • /catalog/sections/[jwId]: 104 → 103 (limit 103)

Test plan

  • bash tests/ci/public-route-client-budget.test.sh
  • bunx biome check src/lib/components/shell/AppShell.svelte
  • bunx svelte-check
  • CI Build E2E artifacts green

Global search dialog chunks were eagerly bundled into the shell, pushing
public route initial request counts over CI limits. Load the dialog on
first open (Cmd+K) so catalog and home pages stay within budget.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 31, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
life-ustc 1e7226a Jul 31 2026, 03:27 PM

worker.js imported CATALOG_EDGE_CACHE_TAG from catalog-runtime-cache,
which evaluated Prisma and broke the E2E worker with fileURLToPath.
Move the constant to a leaf module.
@github-actions

github-actions Bot commented Jul 31, 2026

Copy link
Copy Markdown

Scope catalog/admin search buttons away from the global search trigger,
expect 24h CDN cache on catalog APIs, and tighten mobile topbar padding
to avoid 280px horizontal overflow.
The shell now owns Ctrl/Cmd+K for global search, so the dashboard links
page test should click its local searchbox instead of expecting the
shortcut to focus it.
Extend global search with campus link results, a dedicated /search page,
keyboard navigation, and teacher-before-section ranking. Match links across
all locales and route /search through the dynamic SSR bypass.
Lazy-loaded global search adds one initial asset request to the shared
layout graph while gzip size stays within existing limits.
@tiankaima
tiankaima merged commit d4cde98 into main Jul 31, 2026
15 checks passed
@tiankaima
tiankaima deleted the fix/lazy-load-global-search-dialog branch July 31, 2026 15:40
github-actions Bot pushed a commit that referenced this pull request Jul 31, 2026
# [1.82.0](v1.81.1...v1.82.0) (2026-07-31)

### Bug Fixes

* **search:** harden global search dialog and local dev setup ([d9c3a8d](d9c3a8d))
* **search:** resolve CI type errors and update OpenAPI spec ([8cdffc1](8cdffc1))
* **search:** unblock Chinese IME queries in global search dialog ([cc315f9](cc315f9))
* **search:** wire dialog input updates for Svelte 5 Input component ([573404b](573404b))
* **shell:** lazy-load GlobalSearchDialog to meet client budget ([#713](#713)) ([d4cde98](d4cde98))

### Features

* **search:** add global search and fix calendar export freshness ([#708](#708)) ([241e917](241e917))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.82.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant