Skip to content

fix: improve Lighthouse LCP scores for guides and landing apps#2304

Merged
andrew-bierman merged 10 commits into
developmentfrom
copilot/improve-lighthouse-scores
May 17, 2026
Merged

fix: improve Lighthouse LCP scores for guides and landing apps#2304
andrew-bierman merged 10 commits into
developmentfrom
copilot/improve-lighthouse-scores

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 26, 2026

  • apps/expo/features/packs/store/packWeightHistory.ts — replace as any + biome-ignore by constructing explicit body { id, weight, localCreatedAt } matching the API's Zod schema
  • apps/admin/lib/cfAccess.ts — Zod schema + safeParse (taken from main); useCFAccessIdentity hook added
  • packages/api/src/middleware/cfAccess.ts — updated to positional args (request, teamDomain, aud) matching callers
  • apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx — TS error fixed: optional chaining on forecastday[0]?.day
  • Merge conflicts resolved with previous main merge
  • Merge latest origin/main (iOS inset adjustments) — clean, no conflicts

Agent-Logs-Url: https://github.com/PackRat-AI/PackRat/sessions/396e79f1-4bef-4512-802b-b8f182cd9250

Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

cloudflare-workers-and-pages Bot commented Apr 26, 2026

Deploying packrat-landing with  Cloudflare Pages  Cloudflare Pages

Latest commit: 40095d4
Status: ✅  Deploy successful!
Preview URL: https://b10a00d3.packrat-landing.pages.dev
Branch Preview URL: https://copilot-improve-lighthouse-s.packrat-landing.pages.dev

View logs

@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

cloudflare-workers-and-pages Bot commented Apr 26, 2026

Deploying packrat-guides with  Cloudflare Pages  Cloudflare Pages

Latest commit: 40095d4
Status:🚫  Build failed.

View logs

…unnecessary 'use client' directives

Agent-Logs-Url: https://github.com/PackRat-AI/PackRat/sessions/4c56e6bb-bbc6-4033-9d86-d72ec9deb619

Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
@github-actions github-actions Bot added the dependencies Pull requests that update a dependency file label Apr 26, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 26, 2026

Coverage Report for Expo Unit Tests Coverage (./apps/expo)

Status Category Percentage Covered / Total
🔵 Lines 82.61% 480 / 581
🔵 Statements 82.61% (🎯 75%) 480 / 581
🔵 Functions 92.59% 50 / 54
🔵 Branches 90.9% 170 / 187
File CoverageNo changed files found.
Generated in workflow #1286 for commit 40095d4 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 26, 2026

Coverage Report for API Unit Tests Coverage (./packages/api)

Status Category Percentage Covered / Total
🔵 Lines 69.62% 502 / 721
🔵 Statements 69.62% (🎯 65%) 502 / 721
🔵 Functions 92.68% 38 / 41
🔵 Branches 88.32% 227 / 257
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/api/src/services/passwordResetService.ts 0% 0% 0% 0% 1-82
Generated in workflow #1286 for commit 40095d4 by the Vitest Coverage Report Action

Agent-Logs-Url: https://github.com/PackRat-AI/PackRat/sessions/18022a11-7288-4e72-adc3-9e2add9ac4f6

Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
@cloudflare-workers-and-pages
Copy link
Copy Markdown
Contributor

cloudflare-workers-and-pages Bot commented Apr 26, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

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

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
packrat-admin 40095d4 Commit Preview URL

Branch Preview URL
May 16 2026, 10:33 PM

@andrew-bierman andrew-bierman marked this pull request as ready for review April 26, 2026 19:03
Copilot AI review requested due to automatic review settings April 26, 2026 19:03
…truction

Agent-Logs-Url: https://github.com/PackRat-AI/PackRat/sessions/e15d3f21-af97-454a-8147-e275ad61898f

Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
@andrew-bierman
Copy link
Copy Markdown
Collaborator

@copilot fix failing ci and resolve merge conflicts

Copilot AI added 2 commits April 27, 2026 04:42
…house-scores

# Conflicts:
#	apps/admin/components/auth-guard.tsx
#	apps/admin/lib/cfAccess.ts
#	apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx
#	bun.lock
#	packages/api/src/routes/admin/index.ts
Copy link
Copy Markdown
Contributor Author

Copilot AI commented Apr 27, 2026

@copilot fix failing ci and resolve merge conflicts

Done. Merged origin/main (commit e5f82e1) and resolved all conflicts:

  • apps/admin/lib/cfAccess.ts — took main's refactored version: Zod schema with safeParse directly, no jwt field (CF edge injects the assertion header, it's not in the response body), added useCFAccessIdentity TanStack Query hook
  • packages/api/src/middleware/cfAccess.ts — updated to positional args (request, teamDomain, aud) to match callers on main; this also fixes the stale biome-ignore warning (now valid since 3 params genuinely exceeds the default max-2 rule)
  • apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx — took main's version which already includes the optional chaining fix (forecastday[0]?.day.maxtemp_c) that resolves the TS error
  • apps/admin/components/auth-guard.tsx, packages/api/src/routes/admin/index.ts, bun.lock — took main's versions

…house-scores

Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
Resolve conflicts:
- apps/guides/app/page.tsx — dev independently server-rendered the hero +
  features + featured-guides sections and split filter UI into a small client
  component (FilterableGuides). That's stricter LCP optimization than this
  PR's monolithic GuidesContent client component, so keep dev's version
  (also drops the redundant components/guides-content.tsx).
- apps/guides/components/header.tsx — keep dev's useMemo() wrapping of
  getAllCategories() (prevents re-walking posts on scroll re-renders).
- apps/landing/package.json — keep dev's catalog: references (project
  convention) plus dev's @emotion/is-prop-valid + framer-motion additions.

Verification:
- bun check-types: passes
- bun check: Biome clean
- apps/{guides,landing}/app/page.tsx are server components (no 'use client')
- useSearchParams remains in components/filterable-guides.tsx
@andrew-bierman
Copy link
Copy Markdown
Collaborator

Rebased onto current origin/development.

Conflicts resolved:

  • apps/guides/app/page.tsx — development independently took the LCP optimization further than this PR: it server-renders the hero, the features grid, and the featured-guides section, and isolates the filter UI into a small client component (FilterableGuides) that still uses useSearchParams. Adopted dev's version (strictly less client JS than this PR's monolithic GuidesContent).
  • Removed the now-redundant apps/guides/components/guides-content.tsx introduced by this PR (its responsibilities are split across server-side data fetching in page.tsx + the smaller filterable-guides.tsx client component).
  • apps/guides/components/header.tsx — kept dev's useMemo(() => getAllCategories(), []) (avoids re-walking all posts on each scroll-triggered re-render).
  • apps/landing/package.json — kept dev's catalog: references (monorepo convention) and dev's additions (@emotion/is-prop-valid, framer-motion).

Verification (locally, in worktree):

  • bun check-types: passes (0 errors)
  • bun check / biome check on apps/{guides,landing}: clean
  • grep -l "'use client'" apps/guides/app/page.tsx apps/landing/app/page.tsx: no match — both are server components
  • useSearchParams lives in apps/guides/components/filterable-guides.tsx and category-filter.tsx, properly wrapped in <Suspense>

Push: 40095d465

@github-actions github-actions Bot added documentation Improvements or additions to documentation ci/cd database labels May 16, 2026
@andrew-bierman andrew-bierman changed the base branch from main to development May 17, 2026 01:12
Matches packageManager (bun@1.3.10) but locks the actual version used in CI / CF Pages to 1.3.14 to mirror what's already running in worktrees and mcp-cli-eden.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot removed documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file api ci/cd mobile database labels May 17, 2026
@andrew-bierman andrew-bierman merged commit 7f67396 into development May 17, 2026
8 checks passed
@andrew-bierman andrew-bierman deleted the copilot/improve-lighthouse-scores branch May 17, 2026 06:45
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.

3 participants