Skip to content

Release/2.0.21#2226

Merged
mikib0 merged 133 commits into
mainfrom
release/2.0.21
Apr 18, 2026
Merged

Release/2.0.21#2226
mikib0 merged 133 commits into
mainfrom
release/2.0.21

Conversation

@mikib0
Copy link
Copy Markdown
Collaborator

@mikib0 mikib0 commented Apr 18, 2026

This pull request refactors the GitHub Actions CI workflows to consolidate and improve checks, optimize dependency management, and enhance E2E test reliability. The changes include merging and replacing several workflows with a new unified checks.yml, optimizing caching and install steps, and adding robust secret validation and environment setup for E2E tests.

Workflow consolidation and improvements:

  • Added .github/workflows/checks.yml to unify linting, type checking, Biome checks, and other code quality steps, replacing the previous separate workflows for Biome and type checks. This workflow also supports an autofix mode for Biome via workflow dispatch.
  • Removed .github/workflows/biome.yml and .github/workflows/check-types.yml as their functionality is now handled by the new checks.yml workflow. [1] [2]
  • Improved dependency installation by consistently using bun install --frozen-lockfile across all workflows to ensure lockfile consistency. [1] [2] [3] [4] [5] [6]

E2E testing enhancements:

  • Enhanced E2E workflows with better environment preparation, including disk space cleanup and swap file configuration for Android builds, and robust secret validation steps to prevent misconfigured runs. [1] [2]
  • Added caching for node_modules and CocoaPods to speed up repeated runs, and updated the Android emulator runner to a newer version. [1] [2] [3]
  • Ensured E2E test users are seeded into the dev database before tests run, improving test reliability. [1] [2]
  • Switched test runner scripts to use a centralized shell script for Android E2E tests, and updated bundle IDs to match preview builds. [1] [2]

Copilot setup and validation:

  • Replaced the old .github/copilot-setup-steps.yml with a new, robust .github/workflows/copilot-setup-steps.yml workflow that validates required secrets, pins Node and Bun versions, and verifies toolchain readiness for Copilot. [1] [2]

Miscellaneous improvements:

  • Added environment variable to suppress Maestro CLI analytics during CI runs.
  • Improved shutdown steps for iOS simulators to handle unset variables gracefully.

These changes streamline CI, improve reliability, and make local and cloud development environments more predictable and robust.

andrew-bierman and others added 30 commits April 11, 2026 09:16
Adds a new @packrat/env workspace package with a Node-runtime shim that
parses process.env through a Zod schema once at startup, caches the
result, and throws an aggregated error listing every missing or invalid
variable. Node/Bun scripts import env.FOO (or requireNodeEnv(['FOO']))
instead of reaching into process.env.FOO directly, so missing required
vars fail loudly instead of silently returning undefined later in the
pipeline.

Migrates three high-value callers as proof of the pattern:
- packages/api/migrate.ts (NEON_DATABASE_URL)
- packages/api/src/db/seed.ts (NEON_DATABASE_URL)
- packages/analytics/scripts/smoke-test.ts (R2_* credentials)

Out of scope for this PR: Expo client (EXPO_PUBLIC_*), Next.js
landing/guides, and the Cloudflare Worker API which already has its
own context-aware getEnv(c) shim at
packages/api/src/utils/env-validation.ts. The preinstall hook
.github/scripts/configure-deps.ts is intentionally not migrated
because it runs before node_modules symlinks exist.
Agent-Logs-Url: https://github.com/PackRat-AI/PackRat/sessions/64974b12-aef2-4934-b7ad-7bc55240b1b5

Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
- Rebase onto development (resolve analytics/package.json conflict:
  keep @packrat/env dep + use catalog: for chalk)
- Fix @ts-ignore@ts-expect-error in useCreatePackFromPack.ts
- Add comment-stripping to no-circular-deps.ts (prevents JSDoc false positives)
- Break circular imports: catalog/types, profile/types, itemCalculations
  now point to specific type files instead of barrel indexes
- Create packs/input.ts and api/types/validation.ts to break dep cycles
- Fix schema.ts to import ValidationError from types/validation
- Convert apps/expo and packages/env deps to catalog: (bun catalog entries
  added by #2070 — ai, axios, radash, react, react-dom, tailwindcss, ts, zod)
- Sort package.json files
…shim

# Conflicts:
#	apps/expo/lib/utils/itemCalculations.ts

Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
Agent-Logs-Url: https://github.com/PackRat-AI/PackRat/sessions/82555f7b-9ebc-448f-b6cf-f66d136d627c

Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
…, and API container

Agent-Logs-Url: https://github.com/PackRat-AI/PackRat/sessions/0363de50-f658-4a76-9379-9de74ff9800f

Co-authored-by: andrew-bierman <94939237+andrew-bierman@users.noreply.github.com>
Adds four new endpoints under /api/admin/analytics (Basic Auth protected):
- GET /analytics        — Chart.js HTML dashboard with period selector
- GET /analytics/growth — Time-series: user registrations, pack creation, catalog additions
- GET /analytics/activity — Time-series: trips, trail condition reports, social posts
- GET /analytics/breakdown — Categorical: packs by category, pack items by category

All endpoints support period (day/week/month) and range query params.
Adds Analytics nav link to the existing admin panel layout.

https://claude.ai/code/session_017iNQZKZ9tbC8AfJ6qL1aqu
Packages:
- Rename packages/analytics → packages/data-lake (@packrat/data-lake)
  Pure data-lake library: DuckDB/Iceberg cache managers, query builder,
  enrichment, entity resolver — no CLI deps
- Create packages/cli (@packrat/cli)
  Extracts CLI entry + all 23 commands from data-lake; imports
  @packrat/data-lake as a workspace dep. Room to add non-catalog CLI
  commands without coupling them to the data-lake library.
- Update all @packrat/analytics imports → @packrat/data-lake in tests,
  tsconfigs, and cross-package references

Admin analytics API (packages/api/src/routes/admin/analytics/):
- platform.ts  — renamed from analytics.ts; routes unchanged under /platform/*
- catalog.ts   — new: 5 PostgreSQL-backed endpoints for the gear catalog
    GET /catalog/overview    total items, brands, pricing, availability,
                             embedding coverage, items added last 30 days
    GET /catalog/brands      top brands by count with avg/min/max price
    GET /catalog/prices      price distribution across 6 buckets
    GET /catalog/etl         ETL pipeline history + summary stats
    GET /catalog/embeddings  pgvector embedding coverage %
- index.ts     — mounts /platform + /catalog sub-routers; serves updated
                 HTML dashboard with separate "Platform" and "Gear Catalog"
                 sections, Chart.js charts for all 13 data sources

All admin analytics routes remain Basic Auth protected.

https://claude.ai/code/session_017iNQZKZ9tbC8AfJ6qL1aqu
Full-featured admin dashboard in apps/admin following the same
Next.js 15 / shadcn / Tailwind patterns as apps/landing and
apps/guides.

Key features:
- Collapsible shadcn sidebar with Dashboard, Platform Analytics,
  Gear Catalog Analytics, Users, Packs, Catalog, and Settings nav
- Dashboard overview: stat cards + area chart (growth), availability
  breakdown, and embedding coverage progress bar
- Platform analytics page: line + bar charts for growth/activity
  (period selector: day/week/month) and pack category donut chart
- Gear catalog page: price distribution (horizontal bar), availability
  donut, top brands bar chart, embedding coverage, and ETL job table
  with success-rate badges
- React Query v5 data fetching via AdminAPI client (lib/api.ts)
- All charts use the shadcn ChartContainer / recharts wrappers
- `bun admin` script added to root package.json
- admin-app/* path alias added to root tsconfig.json
- .env.local.example documents NEXT_PUBLIC_API_URL and Basic Auth vars

https://claude.ai/code/session_017iNQZKZ9tbC8AfJ6qL1aqu
Two chronic failure modes on `development` were:

1. iOS run wasted ~32 min building the sim app only to fail at the
   Maestro step when `E2E_TEST_EMAIL` / `E2E_TEST_PASSWORD` secrets were
   empty.  Fail fast with an actionable message before any expensive
   work runs.
2. Android Gradle OOM during `:app:packageRelease` on `ubuntu-latest`.
   Free disk, add a 10G swap file, cap parallelism, and bump the heap
   so R8/packaging fits.

Also set `_JAVA_OPTIONS` + the namespaced `ORG_GRADLE_PROJECT_*` env
so the heap bump reaches Gradle even when launched indirectly by eas.
Lets us validate the Android Gradle heap/swap fix without waiting for
the E2E_TEST_EMAIL/E2E_TEST_PASSWORD secrets to be populated. When
secrets are missing the build runs to completion and the Maestro/
simulator/emulator steps are skipped via a step-level if guard.
Removes the dependency on a manually-created preview DB user.  Adds
`packages/api/src/db/seed-e2e-user.ts` which upserts the E2E account
(creating if missing, refreshing password hash + emailVerified flag
if present) using NEON_DEV_DATABASE_URL.

The workflow now:
- Hardcodes TEST_EMAIL to admin+e2e-test-automation@packratai.com
- Requires only E2E_TEST_PASSWORD + NEON_DEV_DATABASE_URL secrets
  (the latter already exists)
- Runs the seed step on both iOS and Android jobs immediately before
  Maestro, so the test account always matches the password CI expects
Both TEST_EMAIL and TEST_PASSWORD now come from repo secrets, and the
seed script already reads its inputs purely from env vars — no hard-
coded identities anywhere. Pre-flight widened to enumerate exactly
which of E2E_TEST_EMAIL / E2E_TEST_PASSWORD / NEON_DEV_DATABASE_URL
is missing.
Drops the duplicate bcrypt import — if the app ever swaps the hashing
algorithm or salt rounds, the seed stays in sync automatically.
- seed: drop returning({id}) arg (drizzle infers); use non-! destructure
- swap: ubuntu-latest already has /swapfile mounted, use /mnt/swapfile-ci
  and dd instead of fallocate (which reports 'Text file busy')
Removed NDK, Python, go, temurin-jdk, azul jdks from the prune list —
the RN Gradle build links against the Android SDK/NDK installed on
the runner ("NDK was not found under …/sdk/ndk/27.3.13750724"), and
Python is load-bearing for some RN build scripts.
Previously we downgraded the secret preflight to a warning so the
Android Gradle heap/swap fix could be validated without the secrets
being populated.  That validation is now done (PR #2176's prior run
built the APK cleanly in 35m42s) and the lenient mode produced a
misleading green check: every Maestro/emulator step was skipped via
if-guards but the job conclusion was still 'success'.

Revert to the original behavior: hard-fail with a clear error listing
which of E2E_TEST_EMAIL / E2E_TEST_PASSWORD / NEON_DEV_DATABASE_URL is
missing, and drop every `has_secrets == 'true'` guard now that the
job fails on the very first step when those secrets aren't set.
iOS Maestro run failed with "iOS driver not ready in time" because
the xcuitest install/boot on a fresh macos-15 runner takes longer than
the 180s default. Set MAESTRO_DRIVER_STARTUP_TIMEOUT=600000ms.
- Refactor getPayloadConfigFromPayload to accept 2 params (opts object)
  instead of 3 separate params, matching the guides app pattern and
  satisfying biome's complexity/useMaxParams rule (max: 2)
- Sort packages/data-lake/package.json per monorepo conventions

https://claude.ai/code/session_017iNQZKZ9tbC8AfJ6qL1aqu
The no-duplicate-deps lint script checks peerDependencies too.
>=2.15.0 in web-ui conflicted with the pinned 3.8.1 in admin/landing/guides,
causing the biome CI step to exit 1.

https://claude.ai/code/session_017iNQZKZ9tbC8AfJ6qL1aqu
Apply biome 2.4.6 --write fixes to all files affected by the merge from
main: organizeImports, useTemplate, noUnusedVariables, and other
auto-fixable rules. Also addresses stale suppressions in chart.tsx.

https://claude.ai/code/session_017iNQZKZ9tbC8AfJ6qL1aqu
The EAS e2e profile builds the preview variant (app.config.ts appends
'.preview' to the bundle id when IS_PREVIEW). Maestro was launching
com.andrewbierman.packrat but the installed app is
com.andrewbierman.packrat.preview, causing clear-state to fail with:
  Failed to get app binary directory for bundle ... No such file or
  directory

Matches what .maestro/README.md already documents.
Prevents Next.js build cache from being tracked as untracked files.

https://claude.ai/code/session_017iNQZKZ9tbC8AfJ6qL1aqu
Caches that were missing:
- root `node_modules` on both jobs (keyed by bun.lock)
- iOS CocoaPods download cache (keyed by package.json + app.config.ts)

Expected savings on warm hits:
- bun install: ~40s → <5s (both jobs)
- pod install: ~3-5 min → <1 min (iOS)

Still dominated by xcodebuild/gradle compilation which is CPU-bound
on free-tier runners — can't cache those without a paid build cache
service or a bigger runner.
reactivecircus/android-emulator-runner@v2.37 runs each line of the
`script:` argument as a separate `sh -c`, which breaks our backslash
line continuations — `maestro test \` was executed by itself,
parsing `\` as the flow path ("Flow path does not exist").

Keep it single-line.
Inline `maestro test` didn't pass `-e APP_ID=...` so flows saw
`${APP_ID}` → undefined → 'Unable to launch app undefined'.
e2e.sh already forwards TEST_EMAIL/TEST_PASSWORD/APP_ID/TRIP_NAME/
PACK_NAME plus date-window vars the same way iOS does.
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 18, 2026

Important

Review skipped

Too many files!

This PR contains 156 files, which is 6 over the limit of 150.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e6e24044-2488-4b5d-8668-4f997596ecef

📥 Commits

Reviewing files that changed from the base of the PR and between f736999 and d6d1165.

⛔ Files ignored due to path filters (1)
  • bun.lock is excluded by !**/*.lock
📒 Files selected for processing (156)
  • .github/copilot-setup-steps.yml
  • .github/workflows/api-tests.yml
  • .github/workflows/biome.yml
  • .github/workflows/check-types.yml
  • .github/workflows/checks.yml
  • .github/workflows/copilot-setup-steps.yml
  • .github/workflows/e2e-tests.yml
  • .github/workflows/migrations.yml
  • .github/workflows/sync-guides-r2.yml
  • .github/workflows/unit-tests.yml
  • .gitignore
  • README.md
  • apps/admin/app/catalog/page.tsx
  • apps/admin/app/dashboard/analytics/catalog/page.tsx
  • apps/admin/app/dashboard/analytics/platform/page.tsx
  • apps/admin/app/packs/page.tsx
  • apps/admin/app/settings/page.tsx
  • apps/admin/app/users/page.tsx
  • apps/admin/components/analytics/catalog-analytics.tsx
  • apps/admin/components/analytics/platform-analytics.tsx
  • apps/admin/components/dashboard/dashboard-content.tsx
  • apps/admin/components/page-header.tsx
  • apps/admin/config/nav.ts
  • apps/admin/hooks/use-catalog-analytics.ts
  • apps/admin/hooks/use-platform-analytics.ts
  • apps/admin/lib/api.ts
  • apps/admin/package.json
  • apps/expo/app.config.ts
  • apps/expo/app/(app)/(tabs)/(home)/index.tsx
  • apps/expo/app/(app)/(tabs)/profile/index.tsx
  • apps/expo/app/(app)/ai-chat.tsx
  • apps/expo/app/(app)/trip/location-search.tsx
  • apps/expo/app/_layout.tsx
  • apps/expo/config.ts
  • apps/expo/eas.json
  • apps/expo/env/clientEnvs.ts
  • apps/expo/env/serverEnvs.ts
  • apps/expo/features/ai/components/AIModeSelector.tsx
  • apps/expo/features/auth/hooks/useAuthActions.ts
  • apps/expo/features/auth/hooks/useAuthInit.ts
  • apps/expo/features/catalog/components/CatalogItemsAuthWall.tsx
  • apps/expo/features/feed/utils/__tests__/feedUtils.test.ts
  • apps/expo/features/feed/utils/index.ts
  • apps/expo/features/trips/screens/TripDetailScreen.tsx
  • apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx
  • apps/expo/lib/api/client.ts
  • apps/expo/lib/utils/__tests__/buildImageUrl.test.ts
  • apps/expo/lib/utils/__tests__/buildPackTemplateItemImageUrl.test.ts
  • apps/expo/lib/utils/buildImageUrl.ts
  • apps/expo/lib/utils/buildPackTemplateItemImageUrl.ts
  • apps/expo/package.json
  • apps/guides/app/api/dev/generate-batch/route.ts
  • apps/guides/app/api/dev/generate-post/route.ts
  • apps/guides/app/dev/generate/page.tsx
  • apps/guides/lib/enhanceGuideContent.ts
  • apps/guides/package.json
  • apps/guides/scripts/update-authors.ts
  • apps/landing/package.json
  • biome.json
  • copilot-instructions.md
  • docs/plans/2026-04-15-001-refactor-hono-rpc-foundation-plan.md
  • package.json
  • packages/analytics/package.json
  • packages/analytics/src/core/catalog-cache.ts
  • packages/analytics/src/core/data-export.ts
  • packages/analytics/src/core/enrichment.ts
  • packages/analytics/src/core/entity-resolver.ts
  • packages/analytics/src/core/query-builder.ts
  • packages/analytics/src/core/spec-parser.ts
  • packages/analytics/test/integration/catalog-mode.test.ts
  • packages/analytics/test/integration/connection.test.ts
  • packages/analytics/test/integration/local-mode.test.ts
  • packages/api-client/package.json
  • packages/api-client/src/index.ts
  • packages/api-client/tsconfig.json
  • packages/api/TESTING.md
  • packages/api/container_src/package.json
  • packages/api/container_src/server.ts
  • packages/api/migrate.ts
  • packages/api/package.json
  • packages/api/src/db/seed-e2e-user.ts
  • packages/api/src/db/seed.ts
  • packages/api/src/routes/admin/analytics/catalog.ts
  • packages/api/src/routes/admin/analytics/index.ts
  • packages/api/src/routes/admin/analytics/platform.ts
  • packages/api/src/routes/admin/index.ts
  • packages/api/src/routes/ai/index.ts
  • packages/api/src/routes/guides/getGuidesRoute.ts
  • packages/api/src/routes/index.ts
  • packages/api/test/image-detection.test.ts
  • packages/api/test/pack-templates.test.ts
  • packages/api/test/setup.ts
  • packages/api/test/upload.test.ts
  • packages/checks/package.json
  • packages/checks/src/check-magic-strings.ts
  • packages/cli/package.json
  • packages/cli/scripts/smoke-test.ts
  • packages/cli/src/args.ts
  • packages/cli/src/commands/brand.ts
  • packages/cli/src/commands/brands.ts
  • packages/cli/src/commands/build-specs.ts
  • packages/cli/src/commands/category.ts
  • packages/cli/src/commands/compare.ts
  • packages/cli/src/commands/deals.ts
  • packages/cli/src/commands/export.ts
  • packages/cli/src/commands/filter.ts
  • packages/cli/src/commands/images.ts
  • packages/cli/src/commands/lightweight.ts
  • packages/cli/src/commands/market-share.ts
  • packages/cli/src/commands/ratings.ts
  • packages/cli/src/commands/resolve.ts
  • packages/cli/src/commands/reviews.ts
  • packages/cli/src/commands/sales.ts
  • packages/cli/src/commands/search.ts
  • packages/cli/src/commands/specs.ts
  • packages/cli/src/commands/trends.ts
  • packages/cli/src/index.ts
  • packages/config/package.json
  • packages/config/src/config.ts
  • packages/config/src/index.ts
  • packages/env/package.json
  • packages/env/scripts/no-raw-process-env.ts
  • packages/env/src/expo-client.ts
  • packages/env/src/expo-server.ts
  • packages/env/src/index.ts
  • packages/env/src/next.ts
  • packages/env/src/node.ts
  • packages/guards/package.json
  • packages/mcp/package.json
  • packages/mcp/src/__tests__/auth.test.ts
  • packages/mcp/src/__tests__/client.test.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/constants.ts
  • packages/mcp/src/enums.ts
  • packages/mcp/src/index.ts
  • packages/mcp/src/prompts.ts
  • packages/mcp/src/resources.ts
  • packages/mcp/src/tools/catalog.ts
  • packages/mcp/src/tools/packs.ts
  • packages/mcp/src/tools/trail-conditions.ts
  • packages/mcp/src/tools/trips.ts
  • packages/mcp/src/tools/weather.ts
  • packages/mcp/tsconfig.json
  • packages/mcp/vitest.config.ts
  • packages/ui/package.json
  • packages/web-ui/package.json
  • packages/web-ui/src/components/chart.tsx
  • scripts/check-all.ts
  • scripts/lint/check-react-doctor.ts
  • tsconfig.json

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 release/2.0.21

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.

@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 Apr 18, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 18, 2026

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

Status Category Percentage Covered / Total
🔵 Lines 85.86% 905 / 1054
🔵 Statements 85.86% (🎯 80%) 905 / 1054
🔵 Functions 94.11% 48 / 51
🔵 Branches 89.2% 281 / 315
File CoverageNo changed files found.
Generated in workflow #577 for commit d6d1165 by the Vitest Coverage Report Action

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 18, 2026

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

Status Category Percentage Covered / Total
🔵 Lines 80.15% 517 / 645
🔵 Statements 80.15% (🎯 75%) 517 / 645
🔵 Functions 92.85% 52 / 56
🔵 Branches 92.55% 199 / 215
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
apps/expo/features/feed/utils/index.ts 100% 100% 100% 100%
apps/expo/lib/utils/buildImageUrl.ts 100% 100% 100% 100%
apps/expo/lib/utils/buildPackTemplateItemImageUrl.ts 100% 100% 100% 100%
Generated in workflow #577 for commit d6d1165 by the Vitest Coverage Report Action

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the monorepo’s CI/workflows and adds several reliability/maintainability improvements across tooling and packages (typed env shims, shared config/constants, a shared API client, new admin analytics endpoints/UI), alongside version bumps for the 2.0.21 release.

Changes:

  • Consolidates CI checks into a unified checks.yml workflow and strengthens E2E workflow preparation/secret validation.
  • Introduces shared packages/utilities (@packrat/env, @packrat/config, @packrat/api-client, @packrat/checks) and new repo lint/check scripts.
  • Adds Admin analytics API routes and UI components; updates MCP tools to use the shared API client and enum-based schemas.

Reviewed changes

Copilot reviewed 154 out of 157 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tsconfig.json Updates root TS compiler options, adds workspace path aliases, and adjusts includes/excludes.
scripts/lint/check-react-doctor.ts Adds a monorepo-wide “doctor:react” runner across apps.
scripts/check-all.ts Adds new checks (magic strings + react doctor) to the consolidated check runner.
packages/web-ui/src/components/chart.tsx Refines chart config handling and displayName values; adds Biome ignore for controlled dangerouslySetInnerHTML.
packages/web-ui/package.json Moves recharts to dev+peer deps and marks it optional.
packages/ui/package.json Bumps package version.
packages/mcp/vitest.config.ts Adds Vitest alias for @packrat/api-client to use workspace source.
packages/mcp/tsconfig.json Adds baseUrl/paths for local package imports.
packages/mcp/src/tools/weather.ts Adjusts API call typing and switches season suggestions endpoint method.
packages/mcp/src/tools/trips.ts Changes list trips tool schema/params to include_public.
packages/mcp/src/tools/trail-conditions.ts Replaces literal enums with shared nativeEnum definitions.
packages/mcp/src/tools/packs.ts Switches schemas to shared enums; changes update/remove endpoints/methods.
packages/mcp/src/tools/catalog.ts Switches to page-based paging + enum sort params; tightens item fetch typing.
packages/mcp/src/resources.ts Refactors resource error helper to a single options object.
packages/mcp/src/prompts.ts Switches prompt schemas to shared enums.
packages/mcp/src/index.ts Uses shared API client factory; centralizes routes/service metadata constants.
packages/mcp/src/enums.ts Adds shared enums for MCP tool schemas.
packages/mcp/src/constants.ts Adds constants for MCP worker routes and service metadata.
packages/mcp/src/client.ts Re-exports API client primitives from @packrat/api-client.
packages/mcp/src/tests/tools/weather.test.ts Updates tests for new ApiError signature and POST season suggestions.
packages/mcp/src/tests/tools/trips.test.ts Updates tests for new trips list schema/params and ApiError signature.
packages/mcp/src/tests/tools/trail-conditions.test.ts Updates tests for new ApiError signature.
packages/mcp/src/tests/tools/packs.test.ts Updates tests for endpoint/method changes and ApiError signature.
packages/mcp/src/tests/tools/knowledge.test.ts Updates tests for new ApiError signature.
packages/mcp/src/tests/tools/catalog.test.ts Updates tests for page-based paging and ApiError signature.
packages/mcp/src/tests/client.test.ts Updates tests for new ApiError constructor options.
packages/mcp/src/tests/auth.test.ts Improves McpAgent mock shape to include instance fetch.
packages/mcp/package.json Bumps version and adds dependency on @packrat/api-client.
packages/guards/package.json Bumps version.
packages/env/src/node.ts Adds Node/Bun typed env shim (nodeEnv).
packages/env/src/next.ts Adds Next.js typed env shim (guideEnv).
packages/env/src/index.ts Exposes Node env shim at package root and type exports.
packages/env/src/expo-server.ts Adds Expo server-only env shim.
packages/env/src/expo-client.ts Adds Expo client env shim with explicit process.env reads for Metro.
packages/env/scripts/no-raw-process-env.ts Adds lint script to flag raw process.env usage outside allowlist.
packages/env/package.json Introduces new @packrat/env package.
packages/config/src/index.ts Adds entrypoint export for config constants.
packages/config/src/config.ts Adds shared, deeply-frozen app config (flags + dashboard layout/strings).
packages/config/package.json Introduces new @packrat/config package.
packages/cli/src/index.ts Derives CLI version from package.json and adds robust top-level error handling.
packages/cli/src/commands/trends.ts Uses shared arg parsing helpers.
packages/cli/src/commands/specs.ts Uses shared arg parsing helpers and cache initializer.
packages/cli/src/commands/search.ts Uses shared arg parsing helpers.
packages/cli/src/commands/sales.ts Uses shared arg parsing helpers.
packages/cli/src/commands/reviews.ts Uses shared arg parsing helpers.
packages/cli/src/commands/resolve.ts Uses shared arg parsing helpers.
packages/cli/src/commands/ratings.ts Uses shared arg parsing helpers.
packages/cli/src/commands/market-share.ts Uses shared arg parsing helpers.
packages/cli/src/commands/lightweight.ts Uses shared arg parsing helpers.
packages/cli/src/commands/images.ts Uses shared arg parsing helpers.
packages/cli/src/commands/filter.ts Uses shared arg parsing helpers and cache initializer.
packages/cli/src/commands/export.ts Uses shared arg parsing helpers.
packages/cli/src/commands/deals.ts Uses shared arg parsing helpers.
packages/cli/src/commands/compare.ts Uses shared arg parsing helpers.
packages/cli/src/commands/category.ts Uses shared arg parsing helpers.
packages/cli/src/commands/build-specs.ts Uses cache initializer consistently.
packages/cli/src/commands/brands.ts Uses shared arg parsing helpers.
packages/cli/src/commands/brand.ts Uses shared arg parsing helpers.
packages/cli/src/args.ts Adds centralized Zod-based CLI arg parsers.
packages/cli/scripts/smoke-test.ts Migrates S3/R2 env reads to nodeEnv.
packages/cli/package.json Adds bin entry and depends on @packrat/env + zod; bumps version.
packages/checks/src/check-magic-strings.ts Adds a repo scan for repeated “magic strings”.
packages/checks/package.json Introduces new @packrat/checks package.
packages/api/test/upload.test.ts Switches to using seeded+logged-in test user helper.
packages/api/test/setup.ts Tightens mock typing for batchVectorSearch.
packages/api/test/pack-templates.test.ts Switches to using seeded+logged-in test user helper.
packages/api/test/image-detection.test.ts Switches to using seeded+logged-in test user helper.
packages/api/src/routes/index.ts Exports AppRoutes type for typed API client usage.
packages/api/src/routes/guides/getGuidesRoute.ts Extracts regex patterns into constants for guide id/title derivation.
packages/api/src/routes/ai/index.ts Validates RAG search response via schema before returning.
packages/api/src/routes/admin/index.ts Wires new analytics routes into admin router and adds nav link.
packages/api/src/routes/admin/analytics/platform.ts Adds platform analytics endpoints (growth/activity/breakdown).
packages/api/src/routes/admin/analytics/index.ts Adds analytics sub-router aggregation and index response.
packages/api/src/routes/admin/analytics/catalog.ts Adds catalog analytics endpoints (overview/brands/prices/etl/embeddings).
packages/api/src/db/seed.ts Uses nodeEnv for NEON DB URL.
packages/api/src/db/seed-e2e-user.ts Adds E2E user upsert seed script for CI.
packages/api/package.json Adds E2E seed script and depends on @packrat/env; bumps version.
packages/api/migrate.ts Uses nodeEnv for NEON DB URL.
packages/api/container_src/server.ts Improves env validation and defers Google AI client init until env is validated.
packages/api/container_src/package.json Bumps version.
packages/api/TESTING.md Updates CI workflow references to consolidated checks workflow.
packages/api-client/tsconfig.json Adds TypeScript config for the new API client package.
packages/api-client/src/index.ts Adds shared HTTP client + error + MCP result helpers.
packages/api-client/package.json Introduces new @packrat/api-client package.
packages/analytics/test/integration/local-mode.test.ts Migrates S3 creds check to nodeEnv.
packages/analytics/test/integration/connection.test.ts Migrates S3/catalog creds checks to nodeEnv.
packages/analytics/test/integration/catalog-mode.test.ts Migrates catalog creds checks to nodeEnv.
packages/analytics/src/core/spec-parser.ts Extracts common regex patterns/constants for maintainability.
packages/analytics/src/core/query-builder.ts Adds Biome ignore for static-only class namespace usage.
packages/analytics/src/core/entity-resolver.ts Extracts common regex constants and avoids repeated inline patterns.
packages/analytics/src/core/enrichment.ts Extracts repeated regex patterns and normalizes URL cleanup steps.
packages/analytics/src/core/data-export.ts Extracts file extension regex constant for summary file writing.
packages/analytics/src/core/catalog-cache.ts Removes unused DuckDBInstance reference, simplifies catalog connection state.
packages/analytics/package.json Depends on @packrat/env; bumps version.
package.json Adds new check scripts and extends lint:custom with no-raw-process-env; bumps version.
copilot-instructions.md Updates workflow references and documents new Copilot setup workflow.
biome.json Adds MCP index file to ignore list.
apps/landing/package.json Adds doctor:react script; bumps version.
apps/guides/scripts/update-authors.ts Refactors loops away from forEach; adjusts exports ordering.
apps/guides/package.json Adds doctor:react script and @packrat/env; bumps version.
apps/guides/lib/enhanceGuideContent.ts Uses guideEnv instead of raw process.env.
apps/guides/app/dev/generate/page.tsx Uses guideEnv.NODE_ENV instead of raw process.env.
apps/guides/app/api/dev/generate-post/route.ts Uses guideEnv.NODE_ENV instead of raw process.env.
apps/guides/app/api/dev/generate-batch/route.ts Uses guideEnv.NODE_ENV instead of raw process.env.
apps/expo/package.json Adds doctor:react, depends on config/env, bumps Expo + adds deps; bumps version.
apps/expo/lib/utils/buildPackTemplateItemImageUrl.ts Migrates env import to @packrat/env/expo-client.
apps/expo/lib/utils/buildImageUrl.ts Migrates env import to @packrat/env/expo-client.
apps/expo/lib/utils/tests/buildPackTemplateItemImageUrl.test.ts Updates mock path for new env module.
apps/expo/lib/utils/tests/buildImageUrl.test.ts Updates mock path for new env module.
apps/expo/lib/api/client.ts Migrates env import to @packrat/env/expo-client.
apps/expo/features/trips/screens/TripWeatherDetailsScreen.tsx Replaces any with typed weather response and improves rendering safety.
apps/expo/features/trips/screens/TripDetailScreen.tsx Removes unused weather locations hook/state.
apps/expo/features/feed/utils/index.ts Migrates env import to @packrat/env/expo-client.
apps/expo/features/feed/utils/tests/feedUtils.test.ts Updates mock path for new env module.
apps/expo/features/catalog/components/CatalogItemsAuthWall.tsx Replaces header component usage with Expo Router screen config.
apps/expo/features/auth/hooks/useAuthInit.ts Migrates env import to @packrat/env/expo-client.
apps/expo/features/auth/hooks/useAuthActions.ts Migrates env import to @packrat/env/expo-client.
apps/expo/features/ai/components/AIModeSelector.tsx Gates UI behind feature flag.
apps/expo/env/serverEnvs.ts Removes old Expo server env shim (replaced by @packrat/env/expo-server).
apps/expo/env/clientEnvs.ts Removes old Expo client env shim (replaced by @packrat/env/expo-client).
apps/expo/eas.json Adjusts Gradle/Java memory tuning for Android builds.
apps/expo/config.ts Replaces inline flags with shared @packrat/config.
apps/expo/app/_layout.tsx Uses typed Expo client env for Sentry DSN.
apps/expo/app/(app)/trip/location-search.tsx Uses typed Expo client env for Google Maps key fallback.
apps/expo/app/(app)/ai-chat.tsx Gates local model init/transport checks behind feature flag.
apps/expo/app/(app)/(tabs)/profile/index.tsx Migrates env import to @packrat/env/expo-client.
apps/expo/app/(app)/(tabs)/(home)/index.tsx Centralizes dashboard layout + strings via shared config and reduces “gap” magic strings.
apps/expo/app.config.ts Bumps app version.
apps/admin/package.json Adds doctor:react script and bumps version.
apps/admin/lib/api.ts Adds typed API wrappers for new analytics endpoints.
apps/admin/hooks/use-platform-analytics.ts Adds React Query hooks for platform analytics endpoints.
apps/admin/hooks/use-catalog-analytics.ts Adds React Query hooks for catalog analytics endpoints.
apps/admin/config/nav.ts Adds analytics navigation entries.
apps/admin/components/page-header.tsx Adds shared page header component for admin pages.
apps/admin/components/dashboard/dashboard-content.tsx Adds dashboard analytics widgets + charts.
apps/admin/components/analytics/platform-analytics.tsx Adds platform analytics page content (charts + period selection).
apps/admin/components/analytics/catalog-analytics.tsx Adds catalog analytics page content (charts + ETL table).
apps/admin/app/users/page.tsx Adds placeholder users page with header.
apps/admin/app/settings/page.tsx Adds placeholder settings page with header.
apps/admin/app/packs/page.tsx Adds placeholder packs page with header.
apps/admin/app/dashboard/analytics/platform/page.tsx Adds platform analytics route page.
apps/admin/app/dashboard/analytics/catalog/page.tsx Adds catalog analytics route page.
apps/admin/app/catalog/page.tsx Adds placeholder catalog page with header.
README.md Replaces old workflow badges with consolidated checks badge.
.gitignore Adds .next and additional local/worktree ignores.
.github/workflows/unit-tests.yml Uses frozen Bun install.
.github/workflows/sync-guides-r2.yml Uses frozen Bun install.
.github/workflows/migrations.yml Uses frozen Bun install.
.github/workflows/e2e-tests.yml Adds secret validation, caching, seed step, and reliability improvements for E2E.
.github/workflows/copilot-setup-steps.yml Adds robust Copilot agent environment bootstrap workflow.
.github/workflows/checks.yml Adds unified checks workflow (Biome + custom checks + typecheck).
.github/workflows/check-types.yml Removes old check-types workflow (replaced by checks.yml).
.github/workflows/biome.yml Removes old biome workflow (replaced by checks.yml).
.github/copilot-setup-steps.yml Removes old Copilot setup steps file (replaced by workflow).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/api/src/routes/admin/analytics/index.ts
Comment thread packages/api/src/db/seed-e2e-user.ts Outdated
Comment thread packages/web-ui/package.json Outdated
Comment thread apps/admin/components/dashboard/dashboard-content.tsx
Comment thread .github/workflows/api-tests.yml
Comment thread .github/workflows/copilot-setup-steps.yml Outdated
Comment thread .github/workflows/checks.yml
Comment thread .github/workflows/checks.yml
Comment thread packages/cli/src/index.ts
@mikib0
Copy link
Copy Markdown
Collaborator Author

mikib0 commented Apr 18, 2026

@copilot apply changes based on the comments in this thread

Agent-Logs-Url: https://github.com/PackRat-AI/PackRat/sessions/c3f60a75-a528-428d-9667-a06baabb20d3

Co-authored-by: mikib0 <54102880+mikib0@users.noreply.github.com>
@cloudflare-workers-and-pages
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)
❌ Deployment failed
View logs
packrat-admin d6d1165 Apr 18 2026, 05:02 PM

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 18, 2026

@copilot apply changes based on the comments in this thread

All changes applied in d6d1165:

  • analytics/index.ts: Updated catalog links to reflect the real endpoints (/overview, /brands, /prices, /etl, /embeddings).
  • seed-e2e-user.ts: Migrated from raw process.env to nodeEnv from @packrat/env/node; added E2E_TEST_EMAIL and E2E_TEST_PASSWORD to nodeEnvSchema.
  • web-ui/package.json: Removed peerDependenciesMeta.recharts.optionalrecharts is now a required peer dependency.
  • apps/admin/package.json: Added recharts: 3.8.1 to dependencies.
  • api-tests.yml: Fixed invalid YAML with duplicate run keys — split into separate "Install dependencies" and "Run API tests" steps.
  • copilot-setup-steps.yml: Changed bun install to bun install --frozen-lockfile.
  • packages/cli/src/index.ts: Migrated process.env.DEBUG to nodeEnv.DEBUG; added DEBUG to nodeEnvSchema.

@mikib0 mikib0 merged commit 19f18bd into main Apr 18, 2026
12 of 15 checks passed
@mikib0 mikib0 deleted the release/2.0.21 branch April 18, 2026 18:14
andrew-bierman pushed a commit that referenced this pull request May 14, 2026
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