Skip to content

release: development → main (OG fix + MCP/CLI Eden + foundation refactors)#2438

Merged
andrew-bierman merged 262 commits into
mainfrom
development
May 17, 2026
Merged

release: development → main (OG fix + MCP/CLI Eden + foundation refactors)#2438
andrew-bierman merged 262 commits into
mainfrom
development

Conversation

@andrew-bierman

Copy link
Copy Markdown
Collaborator

Release roll-up

Promoting development → main (254 commits ahead). Production deploys from `main`, so this is what gets the recent foundation + OG work in front of users.

Headline items

Foundation refactors

Open Graph (fixes the prod-OG issue specifically)

Web

Smaller wins

Why now

The OG previews on `guides.packratai.com` are currently empty in production because all the OG/metadata work lives on `development`. Promoting closes the deploy gap — once Cloudflare Pages rebuilds production, OG previews appear within minutes. Re-scrape via the Facebook OG Debugger to bust caches after deploy.

Risk

This is a large release; the foundation refactors are intentionally additive (re-export shims preserve every existing import path), but the MCP/CLI migration is genuinely new behavior. Mobile + landing prod traffic is unaffected (they don't consume the MCP/CLI directly).

Recommend a CI watch + a quick smoke check of:

  1. `guides.packratai.com` root + a guide URL — confirm OG meta tags present
  2. `packrat.world` continues to render OG correctly
  3. A few API endpoints touched by the schema unification (catalog, trips, packs, weather)
  4. MCP server tool count via `tools/list` (should be ~60+)

Co-Authored-By: Claude Opus 4.7 (1M context) noreply@anthropic.com

mikib0 and others added 30 commits May 13, 2026 15:18
…type inference

Add response: { 200: Schema } to all remaining routes so Eden Treaty
stops returning unknown for API responses. Convert return status() error
paths to throw so handler return types stay clean.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…types/index.ts

Move enum constants, Zod schemas, and inferred types to a dedicated
constants.ts file. Convert types/index.ts to a pure re-export barrel.
Update all api-internal importers to use @packrat/api/types/constants
directly. Expo app imports continue working via the re-export barrel.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…api/schemas

Replace duplicated schema definitions in packages/app entities with
direct re-exports from the canonical API schemas. Fix CatalogItemSchema
to use datetimeString preprocess (consistent with PackItemSchema) so
dates serialize to string instead of Date at the API boundary.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…templates

- catalog POST/PUT: parse through CatalogItemSchema before returning, stripping
  the embedding vector from API responses and adding response: { 200: Schema }
  for Eden Treaty type inference
- catalog POST/PUT: convert return status() error paths to throws so handler
  return type matches the declared response schema
- packTemplates generate-from-online-content: switch from manual role check to
  adminAuthPlugin macro (isAdmin: true) for consistent access control
…API constants

Delete apps/expo/types/index.ts which duplicated type definitions already in
@packrat/api/types/constants. Redirect all 15 importing files to the canonical
source so there is one definition for PackItem, Pack, User, WeightUnit, and
PackCategory across the codebase.

Also fix constants.ts utility schemas: userId fields were z.number() but better-auth
uses string UUIDs; update to z.string() and fix corresponding test mock data.
- upload.ts: return 400/403 instead of throw Error() for validation/auth
- trips/index.ts: soft-delete (deleted=true) scoped by userId; return 404
  when no row matched (replaces hard DELETE + separate ownership check)
- guides/index.ts: return 400 for missing q param instead of throw Error()
- user/index.ts: return 409 for duplicate email instead of throw Error()
- weather.ts: return 400 for missing location ID instead of throw Error()
- packs/index.ts: return 403 for access denied; use computePackWeights()
  directly instead of computePacksWeights([])[0] (noUncheckedIndexedAccess);
  remove redundant try/catch that only re-threw
- schemas/upload.ts: restore z.string().url() validation on presigned URLs
- routeParams.ts: update stale comment to match .pipe() implementation

Routes that needed to return error status codes inline had their
response: { 200: Schema } maps removed to satisfy Elysia type constraints
(Eden Treaty typing preserved on all other routes).
Create two new workspace packages:
- @packrat/db: Drizzle table definitions, raw constants (no Zod), ValidationError
  interface, drizzle-zod generated schemas
- @packrat/schemas: All route-level Zod schemas, depends on @packrat/db

packages/api keeps 100% backward-compatible re-export shims so all existing
import paths continue to work unchanged. drizzle.config.ts and migration infra
are untouched. @packrat/app entities now import from @packrat/schemas directly.

Resolves duplicate ErrorResponseSchema/SuccessResponseSchema across schema files
(consolidated into @packrat/schemas/shared). Fixes pre-existing type mismatches
surfaced by stricter Drizzle-inferred types: User.avatar→image/avatarUrl,
Pack→PackWithItems for compute-pack utility, test factories updated to provide
all required Drizzle model fields.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…ckrat/db and @packrat/schemas

Replace all import paths that went through the @packrat/api re-export shims:
- @packrat/api/types/constants → @packrat/db (Pack, PackItem, User, CatalogItem, etc.)
- @packrat/api/schemas/* → @packrat/schemas/*
- @packrat/api/types → @packrat/schemas/constants

Adds @packrat/db and @packrat/schemas as direct workspace deps in apps/expo.
Migrates apps/expo features, utils, and packages/api/src/utils to source from
canonical packages rather than the backward-compat shims.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Introduce a clean 4-layer architecture:
  @packrat/constants  (zero dep) raw arrays, TS unions, plain interfaces
  @packrat/db         Drizzle tables + inferred model types
  @packrat/schemas    Zod schemas built on constants + db
  @packrat/types      re-exports model types from db for frontend consumption

- @packrat/constants: PACK_CATEGORIES, WEIGHT_UNITS, ITEM_CATEGORIES,
  WeightUnit, PackCategory, ItemLink, ItemReview, etc.
- @packrat/types: Pack, PackItem, User, CatalogItem, PackWithItems, Trip, etc.
- @packrat/db/constants.ts becomes a re-export shim (backward compat)
- @packrat/units now sources WeightUnit/WEIGHT_UNITS from @packrat/constants
  instead of defining its own duplicate
- Consumer imports in apps/expo and packages/api updated accordingly

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Remove 21 shim files that existed solely to forward imports to their
new canonical homes after the @packrat/db and @packrat/schemas extraction:

- packages/db/src/constants.ts (→ @packrat/constants)
- packages/api/src/db/schema.ts (→ @packrat/db/schema)
- packages/api/src/db/zod-schemas.ts (→ @packrat/db/zod-schemas)
- packages/api/src/schemas/{ai,auth,catalog,chat,feed,guides,
  imageDetection,packTemplates,packs,seasonSuggestions,
  trailConditions,trips,upload,users,weather}.ts (→ @packrat/schemas/*)
- packages/api/src/types/{validation,constants,index}.ts

All consumers updated to import directly from canonical sources:
@packrat/constants, @packrat/db, @packrat/schemas, @packrat/types.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
…subpath resolution

Metro does not use the package.json exports field by default; without
unstable_enablePackageExports the bundler cannot resolve subpath imports
like @packrat/schemas/constants, causing the E2E APK build to fail.
…lution

Metro's unstable_enablePackageExports resolves the exports map to an exact
path. Without the .ts extension, ./src/constants resolves to a non-existent
file and Metro warns + falls back, ultimately failing to find the module.
Explicit ./src/*.ts makes Metro find the source file directly.
Bun and Metro resolve exports map paths exactly — ./src/* (extensionless)
produces a path that doesn't exist, causing module resolution failures.
Apply ./src/*.ts to @packrat/db, @packrat/api, @packrat/osm-db, and
@packrat/overpass to match the same fix already applied to @packrat/schemas.
…/schemas

- packages/schemas/src/admin.ts: full Zod conversion of all TypeBox schemas
  (AdminStats, AdminUser, AdminPack, AdminCatalog, ETL, analytics, trails)
- packages/api/src/schemas/admin.ts: deleted (no longer a shim, no longer needed)
- Admin routes now import from @packrat/schemas/admin
- apps/admin/lib/api.ts: Static<typeof XSchema> → z.infer<typeof XSchema>,
  import path updated to @packrat/schemas/admin
- TrailConditionReportSchema in admin renamed AdminTrailConditionReportSchema
  to avoid barrel collision with trailConditions.ts variant

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Extract shared datetimeString helper to packages/schemas/src/utils.ts
- Add inferred types to @packrat/schemas/admin so consumers import types directly
- Clean up apps/admin/lib/api.ts to re-export from schema types instead of re-inferring
- Normalize UserAvatar.tsx to single avatarUrl field; update mockData accordingly
- Use typed cast in compute-pack.test.ts instead of `as any`
- Remove unused with:{ pack/catalogItem } eager loads in trips and packs routes
- Return structured 404 with code field in user and weather routes
…rectly

- Add `export type Env = ValidatedEnv` to env-validation.ts
- Delete packages/api/src/types/env.ts (was a pure re-export shim)
- Update all 13 consumers to import Env from @packrat/api/utils/env-validation
- Remove ValidationError re-export from etl.ts; consumers import from @packrat/schemas/validation
…ve dead middleware aliases

- UserAvatar prop type uses Pick<MockUser, 'name' | 'avatarUrl'> instead of local duplicate
- variables.ts: userId was number, should be string (users.id is string via Better Auth)
- Delete adminMiddleware.ts and apiKeyAuth.ts (re-export alias files with no importers)
… code regressions

- @packrat/types now re-exports z.infer<> types from @packrat/schemas instead
  of raw Drizzle InferSelectModel types (wire-safe ISO strings vs Date objects)
- Added type exports (Pack, PackItem, PackWithItems, Trip, User, CatalogItem)
  directly to their schema files
- Added PackWithItemsSchema with required items array to packs.ts
- Removed re-export block from schemas/constants.ts; packs.ts and catalog.ts
  now import WEIGHT_UNITS/PACK_CATEGORIES directly from @packrat/constants
- Fixed duplicate Trip type export in trips.ts
- Fixed status code regressions in packs and catalog routes: throw new Error()
  → return status(400/500, ...) for client/server errors
- Added ApiErrorSchema to affected route response maps so Elysia types resolve
- Fixed test fixture: createdAt/updatedAt now use ISO strings not Date objects
…chemas

Every named Zod schema now lives in packages/schemas/src/ — route and
service files only import, never define.

New schema files:
- packages/schemas/src/trails.ts — OsmMemberSchema, RouteBaseRowSchema,
  RouteSearchRowSchema, RouteDetailRowSchema
- packages/schemas/src/wildlife.ts — WildlifeIdentifyRequestSchema

Schema additions to existing files:
- trailConditions: CreateTrailConditionReportRequestSchema, UpdateTrailConditionReportRequestSchema
- admin: AnalyticsPeriodSchema
- catalog: CatalogETLSchema
- packs: AddPackItemBodySchema
- packTemplates: AIPackAnalysisSchema, AIPackAnalysisItemSchema; replace
  local datetimeString with import from ./utils

Route/service cleanup:
- All top-level const XxxSchema = z. removed from routes/ and services/
- 10 route files and services/trails.ts updated to import from @packrat/schemas

Enforcement:
- packages/checks/src/check-route-schemas.ts — new script that fails if any
  named schema is defined at module level in routes/ or services/
  (4 internal AI-parsing files allowlisted)
- Wired as check:route-schemas:strict in pre-push clean-checks
andrew-bierman and others added 5 commits May 17, 2026 00:29
Runtime-portable: same helper works in Node, Workers, browser. Useful if
this ever moves out of @packrat/cli (e.g., shared with @packrat/mcp on
Cloudflare Workers, which doesn't have Bun's globals).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
fix(guides): build OG images for all 504 posts (was 39)
MCP + CLI: Eden Treaty migration, admin tools, ACL
chore(guides): harden OG image generation + add web-build CI
…cores

fix: improve Lighthouse LCP scores for guides and landing apps
Copilot AI review requested due to automatic review settings May 17, 2026 06:52
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

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)
🔵 In progress
View logs
packrat-admin dd81e3f May 17 2026, 07:26 AM

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

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)
🔵 In progress
View logs
packrat-api-dev dd81e3f May 17 2026, 07:26 AM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot wasn't able to review this pull request because it exceeds the maximum number of files (300). Try reducing the number of changed files and requesting a review from Copilot again.

@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Too many files!

This PR contains 299 files, which is 149 over the limit of 150.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: cd863ac0-49ad-4c55-bf22-524310a7c65b

📥 Commits

Reviewing files that changed from the base of the PR and between 7ab32c1 and b0a75b0.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock, !bun.lock
📒 Files selected for processing (299)
  • .bun-version
  • .github/workflows/builds.yml
  • .github/workflows/web-e2e-tests.yml
  • .gitignore
  • apps/admin/lib/api.ts
  • apps/admin/package.json
  • apps/expo/.gitignore
  • apps/expo/app/(app)/(tabs)/_layout.web.tsx
  • apps/expo/app/(app)/(tabs)/profile/index.tsx
  • apps/expo/app/(app)/ai-chat.tsx
  • apps/expo/app/(app)/current-pack/[id].tsx
  • apps/expo/app/(app)/settings/index.tsx
  • apps/expo/app/_layout.tsx
  • apps/expo/app/_layout.web.tsx
  • apps/expo/atoms/atomWithSecureStorage.web.ts
  • apps/expo/components/initial/UserAvatar.tsx
  • apps/expo/components/initial/WeightBadge.tsx
  • apps/expo/data/mockData.ts
  • apps/expo/features/ai/components/GuidesRAGGenerativeUI.tsx
  • apps/expo/features/ai/components/ToolInvocationRenderer.tsx
  • apps/expo/features/ai/components/WeatherGenerativeUI.tsx
  • apps/expo/features/ai/lib/CustomChatTransport.ts
  • apps/expo/features/ai/lib/appleModelWrapper.ts
  • apps/expo/features/ai/lib/constants.ts
  • apps/expo/features/ai/lib/llamaToolsWrapper.ts
  • apps/expo/features/ai/lib/localModelManager.ts
  • apps/expo/features/ai/lib/localModelManager.web.ts
  • apps/expo/features/ai/lib/tools.ts
  • apps/expo/features/auth/hooks/useAuthActions.ts
  • apps/expo/features/catalog/hooks/useCatalogItemDetails.ts
  • apps/expo/features/catalog/hooks/useCatalogItems.ts
  • apps/expo/features/catalog/hooks/useVectorSearch.ts
  • apps/expo/features/catalog/screens/AddCatalogItemDetailsScreen.tsx
  • apps/expo/features/catalog/types.ts
  • apps/expo/features/guides/types.ts
  • apps/expo/features/pack-templates/components/PackTemplateForm.tsx
  • apps/expo/features/pack-templates/hooks/useBulkAddCatalogItems.ts
  • apps/expo/features/pack-templates/packTemplateListAtoms.ts
  • apps/expo/features/pack-templates/screens/CreatePackTemplateItemForm.tsx
  • apps/expo/features/pack-templates/store/packTemplateItems.ts
  • apps/expo/features/pack-templates/store/packTemplates.ts
  • apps/expo/features/packs/components/HorizontalCatalogItemCard.tsx
  • apps/expo/features/packs/components/PackForm.tsx
  • apps/expo/features/packs/components/TemplateItemsSection.tsx
  • apps/expo/features/packs/hooks/useAddCatalogItem.ts
  • apps/expo/features/packs/hooks/useBulkAddCatalogItems.ts
  • apps/expo/features/packs/hooks/usePackDetailsFromApi.ts
  • apps/expo/features/packs/hooks/usePackGapAnalysis.ts
  • apps/expo/features/packs/hooks/usePackItemDetailsFromApi.ts
  • apps/expo/features/packs/hooks/usePackOwnershipCheck.ts
  • apps/expo/features/packs/input.ts
  • apps/expo/features/packs/packListAtoms.ts
  • apps/expo/features/packs/screens/CreatePackItemForm.tsx
  • apps/expo/features/packs/store/packItems.ts
  • apps/expo/features/packs/store/packWeightHistory.ts
  • apps/expo/features/packs/store/packs.ts
  • apps/expo/features/packs/types.ts
  • apps/expo/features/packs/utils/uploadImage.web.ts
  • apps/expo/features/profile/types.ts
  • apps/expo/features/trail-conditions/store/trailConditionReports.ts
  • apps/expo/features/trips/components/TripForm.tsx
  • apps/expo/features/trips/screens/TripDetailScreen.tsx
  • apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx
  • apps/expo/features/trips/store/trips.ts
  • apps/expo/features/weather/lib/weatherService.ts
  • apps/expo/lib/Picker.tsx
  • apps/expo/lib/Picker.web.tsx
  • apps/expo/lib/appleAuthentication.ts
  • apps/expo/lib/appleAuthentication.web.ts
  • apps/expo/lib/constants.web.ts
  • apps/expo/lib/devClient.ts
  • apps/expo/lib/devClient.web.ts
  • apps/expo/lib/hooks/useColorScheme.web.tsx
  • apps/expo/lib/i18n/locales/en.json
  • apps/expo/lib/updates.ts
  • apps/expo/lib/updates.web.ts
  • apps/expo/lib/utils/ImageCacheManager.web.ts
  • apps/expo/lib/utils/__tests__/compute-pack.test.ts
  • apps/expo/lib/utils/compute-pack.ts
  • apps/expo/metro.config.js
  • apps/expo/mocks/expo-sqlite-kv-store.ts
  • apps/expo/mocks/react-native-community-datetimepicker.tsx
  • apps/expo/mocks/react-native-google-signin.ts
  • apps/expo/package.json
  • apps/expo/playwright/playwright.config.ts
  • apps/expo/playwright/tests/core.spec.ts
  • apps/expo/playwright/tests/fixtures.ts
  • apps/expo/playwright/tests/globalSetup.ts
  • apps/expo/playwright/tests/packs.spec.ts
  • apps/expo/playwright/tests/profile.spec.ts
  • apps/expo/playwright/tests/trips.spec.ts
  • apps/expo/providers/index.web.tsx
  • apps/expo/types/index.ts
  • apps/expo/utils/__tests__/weight.test.ts
  • apps/expo/utils/weight.ts
  • apps/expo/vitest.config.ts
  • apps/guides/.lighthouserc.js
  • apps/guides/.lighthouserc.mobile.js
  • apps/guides/README.md
  • apps/guides/__tests__/layout.metadata.test.ts
  • apps/guides/__tests__/og-image.test.ts
  • apps/guides/__tests__/og-images.test.ts
  • apps/guides/__tests__/og-meta.test.ts
  • apps/guides/app/page.tsx
  • apps/guides/components/footer.tsx
  • apps/guides/components/providers/query-provider.tsx
  • apps/guides/lib/metadata.ts
  • apps/guides/package.json
  • apps/guides/scripts/generate-og-images.ts
  • apps/guides/styles/globals.css
  • apps/landing/.lighthouserc.js
  • apps/landing/.lighthouserc.mobile.js
  • apps/landing/README.md
  • apps/landing/__tests__/layout.metadata.test.ts
  • apps/landing/__tests__/og-meta.test.ts
  • apps/landing/components/app-preview.tsx
  • apps/landing/components/sections/landing-hero.tsx
  • apps/landing/components/site-footer.tsx
  • apps/landing/components/ui/device-mockup.tsx
  • apps/landing/lib/metadata.ts
  • apps/landing/lib/og-image.tsx
  • apps/landing/package.json
  • apps/landing/scripts/generate-og-images.ts
  • apps/landing/styles/globals.css
  • apps/landing/tailwind.config.ts
  • apps/trails/components/AuthGate.tsx
  • apps/trails/lib/apiClient.ts
  • apps/trails/lib/useAuth.tsx
  • apps/web/app/auth/page.tsx
  • apps/web/package.json
  • docs/design/client-uuid-split.md
  • docs/plans/2026-05-14-refactor-extract-schemas-and-db-packages-plan.md
  • lefthook.yml
  • package.json
  • packages/api/package.json
  • packages/api/src/auth/auth.config.ts
  • packages/api/src/auth/index.ts
  • packages/api/src/containers/AppContainer.ts
  • packages/api/src/db/index.ts
  • packages/api/src/db/seed-e2e-user.ts
  • packages/api/src/db/seed.ts
  • packages/api/src/index.ts
  • packages/api/src/middleware/adminMiddleware.ts
  • packages/api/src/middleware/apiKeyAuth.ts
  • packages/api/src/routes/admin/analytics/catalog.ts
  • packages/api/src/routes/admin/analytics/platform.ts
  • packages/api/src/routes/admin/index.ts
  • packages/api/src/routes/admin/trails.ts
  • packages/api/src/routes/ai/index.ts
  • packages/api/src/routes/catalog/index.ts
  • packages/api/src/routes/chat.ts
  • packages/api/src/routes/feed/index.ts
  • packages/api/src/routes/guides/index.ts
  • packages/api/src/routes/packTemplates/index.ts
  • packages/api/src/routes/packs/index.ts
  • packages/api/src/routes/passwordReset.ts
  • packages/api/src/routes/seasonSuggestions.ts
  • packages/api/src/routes/trailConditions/reports.ts
  • packages/api/src/routes/trails/index.ts
  • packages/api/src/routes/trips/index.ts
  • packages/api/src/routes/upload.ts
  • packages/api/src/routes/user/index.ts
  • packages/api/src/routes/weather.ts
  • packages/api/src/routes/wildlife/index.ts
  • packages/api/src/schemas/admin.ts
  • packages/api/src/services/aiService.ts
  • packages/api/src/services/catalogService.ts
  • packages/api/src/services/embeddingService.ts
  • packages/api/src/services/etl/CatalogItemValidator.ts
  • packages/api/src/services/etl/mergeItemsBySku.ts
  • packages/api/src/services/etl/processCatalogEtl.ts
  • packages/api/src/services/etl/processLogsBatch.ts
  • packages/api/src/services/etl/processValidItemsBatch.ts
  • packages/api/src/services/etl/queue.ts
  • packages/api/src/services/etl/updateEtlJobProgress.ts
  • packages/api/src/services/imageDetectionService.ts
  • packages/api/src/services/packItemService.ts
  • packages/api/src/services/packService.ts
  • packages/api/src/services/passwordResetService.ts
  • packages/api/src/services/r2-bucket.ts
  • packages/api/src/services/trails.ts
  • packages/api/src/services/userService.ts
  • packages/api/src/types/env.ts
  • packages/api/src/types/etl.ts
  • packages/api/src/types/index.ts
  • packages/api/src/types/variables.ts
  • packages/api/src/utils/DbUtils.ts
  • packages/api/src/utils/__tests__/compute-pack.test.ts
  • packages/api/src/utils/__tests__/env-validation.test.ts
  • packages/api/src/utils/__tests__/itemCalculations.test.ts
  • packages/api/src/utils/__tests__/weight.test.ts
  • packages/api/src/utils/ai/logging.ts
  • packages/api/src/utils/ai/provider.ts
  • packages/api/src/utils/compute-pack.ts
  • packages/api/src/utils/csv-utils.ts
  • packages/api/src/utils/embeddingHelper.ts
  • packages/api/src/utils/env-validation.ts
  • packages/api/src/utils/itemCalculations.ts
  • packages/api/src/utils/routeParams.ts
  • packages/api/src/utils/weight.ts
  • packages/api/test/auth.test.ts
  • packages/api/test/chat.test.ts
  • packages/api/test/db-test-helper.ts
  • packages/api/test/etl.test.ts
  • packages/api/test/fixtures/catalog-fixtures.ts
  • packages/api/test/fixtures/pack-fixtures.ts
  • packages/api/test/fixtures/pack-template-fixtures.ts
  • packages/api/test/packs.test.ts
  • packages/api/test/setup.ts
  • packages/api/test/utils/db-helpers.ts
  • packages/api/test/utils/user-helpers.ts
  • packages/app/package.json
  • packages/app/src/entities/catalog/schema.ts
  • packages/app/src/entities/feed/schema.ts
  • packages/app/src/entities/pack/schema.ts
  • packages/app/src/entities/trip/schema.ts
  • packages/app/src/entities/user/schema.ts
  • packages/checks/package.json
  • packages/checks/src/check-route-schemas.ts
  • packages/checks/src/check-type-casts.ts
  • packages/cli/package.json
  • packages/cli/src/api/client.ts
  • packages/cli/src/api/config.ts
  • packages/cli/src/api/ids.ts
  • packages/cli/src/api/prompt.ts
  • packages/cli/src/api/run.ts
  • packages/cli/src/commands/admin/analytics.ts
  • packages/cli/src/commands/admin/catalog.ts
  • packages/cli/src/commands/admin/etl.ts
  • packages/cli/src/commands/admin/index.ts
  • packages/cli/src/commands/admin/login.ts
  • packages/cli/src/commands/admin/logout.ts
  • packages/cli/src/commands/admin/packs.ts
  • packages/cli/src/commands/admin/stats.ts
  • packages/cli/src/commands/admin/trails.ts
  • packages/cli/src/commands/admin/users.ts
  • packages/cli/src/commands/ai/index.ts
  • packages/cli/src/commands/auth/index.ts
  • packages/cli/src/commands/auth/login.ts
  • packages/cli/src/commands/auth/logout.ts
  • packages/cli/src/commands/auth/refresh.ts
  • packages/cli/src/commands/auth/register.ts
  • packages/cli/src/commands/auth/whoami.ts
  • packages/cli/src/commands/catalog/index.ts
  • packages/cli/src/commands/feed/index.ts
  • packages/cli/src/commands/packs/create.ts
  • packages/cli/src/commands/packs/delete.ts
  • packages/cli/src/commands/packs/gap-analysis.ts
  • packages/cli/src/commands/packs/get.ts
  • packages/cli/src/commands/packs/index.ts
  • packages/cli/src/commands/packs/items.ts
  • packages/cli/src/commands/packs/list.ts
  • packages/cli/src/commands/seasons/index.ts
  • packages/cli/src/commands/templates/index.ts
  • packages/cli/src/commands/trails/index.ts
  • packages/cli/src/commands/trips/index.ts
  • packages/cli/src/commands/user/index.ts
  • packages/cli/src/commands/weather/index.ts
  • packages/cli/src/index.ts
  • packages/cli/tsconfig.json
  • packages/config/src/config.ts
  • packages/constants/package.json
  • packages/constants/src/index.ts
  • packages/constants/tsconfig.json
  • packages/db/package.json
  • packages/db/src/index.ts
  • packages/db/src/schema.ts
  • packages/db/src/validation.ts
  • packages/db/src/zod-schemas.ts
  • packages/db/tsconfig.json
  • packages/env/scripts/no-raw-process-env.ts
  • packages/env/src/node.ts
  • packages/guards/src/narrow.ts
  • packages/guards/src/parse.ts
  • packages/mcp/src/__tests__/auth.test.ts
  • packages/mcp/src/__tests__/client.test.ts
  • packages/mcp/src/__tests__/helpers.ts
  • packages/mcp/src/__tests__/tools/catalog.test.ts
  • packages/mcp/src/__tests__/tools/knowledge.test.ts
  • packages/mcp/src/__tests__/tools/packs.test.ts
  • packages/mcp/src/__tests__/tools/trail-conditions.test.ts
  • packages/mcp/src/__tests__/tools/trips.test.ts
  • packages/mcp/src/__tests__/tools/weather.test.ts
  • packages/mcp/src/client.ts
  • packages/mcp/src/index.ts
  • packages/mcp/src/resources.ts
  • packages/mcp/src/tools/admin.ts
  • packages/mcp/src/tools/ai.ts
  • packages/mcp/src/tools/alltrails.ts
  • packages/mcp/src/tools/auth.ts
  • packages/mcp/src/tools/catalog.ts
  • packages/mcp/src/tools/feed.ts
  • packages/mcp/src/tools/guides.ts
  • packages/mcp/src/tools/knowledge.ts
  • packages/mcp/src/tools/packTemplates.ts
  • packages/mcp/src/tools/packs.ts
  • packages/mcp/src/tools/seasons.ts
  • packages/mcp/src/tools/trail-conditions.ts
  • packages/mcp/src/tools/trails.ts

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch development

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Deploying packrat-guides with  Cloudflare Pages  Cloudflare Pages

Latest commit: dd81e3f
Status:⚡️  Build in progress...

View logs

Main's 07d50ad (fix(trails): correct authClient import to use trailsAuthClient)
overlapped with dev's broader auth refactor. Took dev's versions across:
- apps/expo/features/auth/hooks/useAuthActions.ts (uses asString/asBoolean guards)
- apps/trails/components/AuthGate.tsx (VerifyEmail + pendingEmail integration)
- apps/trails/lib/apiClient.ts (trailsAuthClient as authClient alias)
- apps/trails/lib/useAuth.tsx (pendingEmail in state shape)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Pull requests that update a dependency file api ci/cd mobile web database labels May 17, 2026
@github-actions

github-actions Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

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

Status Category Percentage Covered / Total
🔵 Lines 66.4% 504 / 759
🔵 Statements 66.4% (🎯 65%) 504 / 759
🔵 Functions 90.47% 38 / 42
🔵 Branches 88.32% 227 / 257
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/api/src/auth/auth.config.ts 0% 100% 100% 0% 13-75
packages/api/src/services/embeddingService.ts 100% 100% 100% 100%
packages/api/src/services/passwordResetService.ts 0% 0% 0% 0% 1-82
packages/api/src/services/trails.ts 0% 100% 100% 0% 3-56
packages/api/src/services/userService.ts 0% 0% 0% 0% 1-52
packages/api/src/utils/compute-pack.ts 42.25% 100% 66.66% 42.25% 64-111
packages/api/src/utils/csv-utils.ts 95.43% 87.5% 100% 95.43% 66-67, 69-70, 88-89, 132-133, 149-150, 171-172
packages/api/src/utils/embeddingHelper.ts 83.63% 82.75% 100% 83.63% 24, 31-33, 43, 48-50, 54
packages/api/src/utils/itemCalculations.ts 100% 100% 100% 100%
packages/api/src/utils/routeParams.ts 0% 0% 0% 0% 1-24
packages/api/src/utils/weight.ts 100% 100% 100% 100%
Generated in workflow #1335 for commit b0a75b0 by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

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

Status Category Percentage Covered / Total
🔵 Lines 82.76% 485 / 586
🔵 Statements 82.76% (🎯 75%) 485 / 586
🔵 Functions 92.59% 50 / 54
🔵 Branches 90.9% 170 / 187
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/expo/lib/utils/compute-pack.ts 100% 100% 100% 100%
apps/expo/utils/weight.ts 100% 100% 100% 100%
Generated in workflow #1335 for commit b0a75b0 by the Vitest Coverage Report Action

Adds a follow-up to #2437 that asserts the OG / Twitter meta tags
expected by social previewers actually land in the built HTML, and
optionally re-checks them over the wire against a deployed URL.

- New `apps/guides/__tests__/og-meta.test.ts` runs `bun run build`
  (if `out/` is missing) and walks every `out/guide/<slug>.html` plus
  `out/index.html`, parsing with cheerio. It asserts the full meta set
  (og:title, og:description, og:image, og:image:width, og:image:height,
  og:type, og:url, og:site_name, twitter:card, twitter:title,
  twitter:description, twitter:image) on a 3-post random sample, that
  every post has an absolute `https://` og:image pointing at
  `/og/<slug>.png`, and that the root page uses the site-wide image
  (not a per-post one). Sampling keeps the suite fast across 500+ posts.
- Optional live pass via `open-graph-scraper` is gated on
  `OG_LIVE_CHECK_URL`. Same shape, fetched over the wire — useful after
  a deploy to catch CF transforms / cache layers that a built-HTML check
  can miss.
- New `test:og-meta` script and wired into the `Builds` workflow after
  the guides build, before the artifact upload — a meta-tag regression
  fails the workflow check on the PR.
- `cheerio` and `open-graph-scraper` added as devDependencies of
  `apps/guides` (test-only, not runtime deps).
- README documents both passes and lists the manual debugger URLs
  (opengraph.xyz, microlink, FB Sharing Debugger, LinkedIn Post
  Inspector) for post-deploy verification.

Antecedents: #2436 (build-order fix) and #2437 (OG hardening + Builds
workflow).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor

Deploying packrat-landing with  Cloudflare Pages  Cloudflare Pages

Latest commit: 64637fc
Status:🚫  Build failed.

View logs

andrew-bierman and others added 6 commits May 17, 2026 01:10
…flow

Extends the guides OG meta validation pattern to the landing marketing
site, and wires Lighthouse CI into the Builds workflow for both apps.

Per the team mandate: every web app gets programmatic OG and Lighthouse
evaluation, surfaced in PR checks before deploy.

Landing-side OG meta:
- apps/landing/__tests__/og-meta.test.ts walks built HTML in out/
  (top-level *.html + nested <slug>/index.html, skipping 404/500),
  asserts the same 12-tag OG/Twitter set as guides, requires absolute
  https og:image pointing at the site-wide image, and includes the
  same OG_LIVE_CHECK_URL-gated open-graph-scraper block.
- Adds cheerio + open-graph-scraper as devDependencies (matching guides).
- Adds test:og-meta script.

Lighthouse CI in Builds workflow:
- Adds lighthouse:ci script (lhci autorun, no rebuild) to both apps.
- Builds workflow gains a Lighthouse CI step after OG validation in
  each job, with continue-on-error so perf regressions yellow-check
  rather than block, and a Step Summary block so reviewers see the
  output without clicking into job logs.
- Uses existing .lighthouserc.{js,mobile.js} budgets unchanged.

Docs:
- New apps/landing/README.md documents the build pipeline + OG +
  Lighthouse validation layers + manual debugger links.
- Updates apps/guides/README.md to cross-reference the shared pattern
  and document the new Lighthouse CI integration.

.gitignore: adds .lighthouseci/ output dir.

packages/env/scripts/no-raw-process-env.ts auto-updated by postinstall
env script to allow OG_LIVE_CHECK_URL reads in the two new test files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Was >=24.0.0 which allowed non-LTS jumps (e.g. 26). ^24.0.0 restricts to the 24.x series — current Node LTS, supported through 2027.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ove continue-on-error

Three real issues from the latest #2439 CI run:
- 404.html and 500.html were dragging Lighthouse runs down — they inherently lack <title>/<html lang>/meta description by design. Used assertMatrix with a regex pattern to exclude them; full assertion set still runs against every other HTML.
- continue-on-error: true on the Lighthouse step meant failures didn't fail CI. Removed both (guides + landing). Lighthouse is now a real gate.
- LHCI reports were going to temporary-public-storage URLs only. Added actions/upload-artifact steps for apps/<name>/.lighthouseci with 14-day retention so reviewers can click through after the PR run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
chore(web): programmatic OG meta validation + Lighthouse CI for guides + landing
chore(engines): pin node to ^24.0.0 (current LTS)
@andrew-bierman andrew-bierman merged commit 43c8fb0 into main May 17, 2026
20 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api ci/cd database dependencies Pull requests that update a dependency file documentation Improvements or additions to documentation mobile web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants