Chore/20250811#235
Conversation
🦋 Changeset detectedLatest commit: c6e166a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Caution Review failedThe pull request is closed. WalkthroughRepository-wide dependency and toolchain updates: pnpm bumped from 10.13.1 → 10.14.0 across CI workflows and packageManager fields; multiple package/version bumps in packages; Sentry integration migrated from @sentry/react / @sentry/node to @sentry/react-router with build/runtime changes; Vite config refactored and sourcemaps always enabled. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Router
participant SentryClient as Sentry (client)
Client->>SentryClient: Sentry.init(..., reactRouterTracingIntegration())
Client->>Router: navigate()
Router->>SentryClient: route events traced
sequenceDiagram
participant Web as Web Request
participant Wrapper as wrapSentryHandleRequest
participant App as handleRequest
participant SentryServer as Sentry (server)
Web->>Wrapper: incoming request
Wrapper->>SentryServer: start trace / annotate
Wrapper->>App: call handleRequest(req)
App-->>Wrapper: Response (streaming body)
Wrapper->>SentryServer: pipe(getMetaTagTransformer(body))
Wrapper-->>Web: traced Response
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (6)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## development #235 +/- ##
============================================
Coverage 92.86% 92.86%
============================================
Files 85 85
Lines 12889 12889
Branches 1294 1294
============================================
Hits 11970 11970
Misses 917 917
Partials 2 2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.github/workflows/tests.yml (1)
56-56: Tests workflow: pnpm pinned to 10.14.0 across jobs — OK; consider lockfile enforcementThe bumps are consistent. Optional: switch install steps to use
pnpm install --frozen-lockfilefor reproducible CI installs.Also applies to: 149-149, 229-229
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (11)
.github/workflows/deploy-docs-test.yml(1 hunks).github/workflows/deploy-docs.yml(1 hunks).github/workflows/release.yml(1 hunks).github/workflows/tests.yml(3 hunks)fdm-app/package.json(5 hunks)fdm-calculator/package.json(1 hunks)fdm-core/package.json(3 hunks)fdm-data/package.json(1 hunks)fdm-docs/package.json(2 hunks)package.json(1 hunks)pnpm-workspace.yaml(1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-05-28T07:57:19.217Z
Learnt from: SvenVw
PR: SvenVw/fdm#147
File: fdm-docs/package.json:39-39
Timestamp: 2025-05-28T07:57:19.217Z
Learning: In pnpm workspaces, the syntax `"typescript": "catalog:"` is valid and correct. It references the version defined in the workspace's catalog section in pnpm-workspace.yaml, allowing consistent dependency versions across packages in a monorepo.
Applied to files:
fdm-data/package.jsonfdm-calculator/package.jsonpnpm-workspace.yamlfdm-core/package.json
📚 Learning: 2025-05-28T07:57:19.217Z
Learnt from: SvenVw
PR: SvenVw/fdm#147
File: fdm-docs/package.json:39-39
Timestamp: 2025-05-28T07:57:19.217Z
Learning: In pnpm workspaces, the syntax `"typescript": "catalog:"` is valid and correct. It references the version defined in the workspace's catalog section in pnpm-workspace.yaml, allowing consistent dependency versions across packages in a monorepo. The catalog: syntax without a package name is the shorthand for referencing the default catalog.
Applied to files:
fdm-data/package.jsonfdm-calculator/package.jsonpnpm-workspace.yamlfdm-core/package.json
📚 Learning: 2024-11-25T12:42:32.783Z
Learnt from: SvenVw
PR: SvenVw/fdm#6
File: fdm-app/vite.config.ts:5-9
Timestamp: 2024-11-25T12:42:32.783Z
Learning: In the `fdm-app` project, SvenVw is preparing for migration to Remix v3 and may include type declarations or configurations for v3 features in advance, such as in `vite.config.ts`.
Applied to files:
pnpm-workspace.yaml
🔇 Additional comments (20)
fdm-calculator/package.json (1)
64-64: Align packageManager to pnpm 10.14.0 — looks goodConsistent with the repo-wide bump. No functional impact expected.
fdm-data/package.json (1)
60-60: pnpm version bump confirmedpackageManager updated to 10.14.0 to match the workspace and CI. Good.
.github/workflows/deploy-docs.yml (1)
41-41: CI uses pnpm 10.14.0 — consistent with workspacePinned version updated correctly in the action setup.
.github/workflows/deploy-docs-test.yml (1)
38-38: Docs test workflow aligned to pnpm 10.14.0Version pin matches other workflows.
fdm-docs/package.json (1)
29-30: Patch bumps and pnpm version update — LGTM
- react/react-dom: ^19.1.1 (patch) — low risk, consistent with app.
- docusaurus-plugin-typedoc/typedoc-plugin-markdown: minor upgrades — OK.
- packageManager: pnpm@10.14.0 — consistent.
Note: Continued use of "catalog:" (typedoc/typescript) is correct per workspace catalog.Also applies to: 36-36, 38-38, 56-56
package.json (1)
28-28: PNPM version consistency verified
- Root manifest update (
@biomejs/biome→ ^2.1.4) looks good.- All
package.jsonfiles declarepackageManager: "pnpm@10.14.0".- Every GitHub workflow uses
pnpm/action-setup@v4withversion: 10.14.0.- No remaining references to pnpm@10.13.x found.
No further changes needed.
.github/workflows/release.yml (1)
40-40: Release workflow pinned to pnpm 10.14.0 — goodIn line with other workflows and manifests.
fdm-core/package.json (4)
54-54: @types/node patch bump looks safePatch update within the same major; low risk. No action needed.
57-57: fs-extra patch bump is finePatch release, no API changes expected. All good.
67-67: Verify fdm-core build/test with proper dependency install
It looks like the smoke test failed due to a missingdotenvx(and no node_modules in fdm-core). Please ensure that fdm-core’s dependencies are bootstrapped before rerunning the build/test to validate the pglite bump:Suggested steps from repo root:
- Install all workspace deps
pnpm install- Ensure fdm-core’s own deps are present
pnpm install --filter @svenvw/fdm-core- Rebuild and retest fdm-core
pnpm -w -F @svenvw/fdm-core build pnpm -w -F @svenvw/fdm-core test- Confirm there are no unexpected changes in pglite usage
rg -n --glob 'fdm-core/**' '@electric-sql/pglite' -A3 -B3
76-76: pnpm version consistency verifiedAll
package.jsonfiles are set to"packageManager": "pnpm@10.14.0", and every GitHub Actions workflow under.github/workflows/usespnpm/action-setup@v4withversion: 10.14.0. No mismatches found—no further changes needed.pnpm-workspace.yaml (2)
9-9: dotenvx catalog bumpLooks good. Consumers use dotenvx via “dotenvx run” scripts; patch bump should be transparent.
16-24: All bumped dependencies usecatalog:references
Confirmed that in every workspace package (fdm-docs, fdm-data, fdm-core, fdm-app, fdm-calculator), the following libraries are pinned viacatalog:with no stray semver versions:
- better-auth
- drizzle-orm
- rollup
- rollup-plugin-polyfill-node
- typedoc
- typedoc-plugin-missing-exports
- typescript
- vite
No action required.
fdm-app/package.json (7)
17-17: @hookform/resolvers → 5.2.1 aligns with react-hook-form 7.62Compatible pair; no issues expected.
48-56: UI/SDK patch/minor bumps (framer-motion, isbot, lucide-react, mapbox-gl, posthog-js)All look routine. No API changes expected; keep an eye on mapbox-gl minor for style/bundle changes.
60-67: React 19.1.1 and React Router 7.8.0Patch for React/DOM and minor for Router; versions are aligned across deps/devDeps. Good.
72-80: Misc libs (remix-utils, sonner, zustand) minor/patchLow risk; approve.
84-86: Dev tooling bumps (React Router dev/fs-routes, @types/react)*Aligned to runtime versions; type-only changes. Looks good.
Also applies to: 95-96
26-33: No Sentry init or React Email usage changes needed in fdm-appA quick grep confirms:
- Sentry is initialized in fdm-app/instrument.server.mjs (using @sentry/node and @sentry/profiling-node) and imported in your Remix entry and root files. The v10 upgrade retains the same init API.
- There’s no
@react-email/*import in fdm-app, so the tailwind/email package bump doesn’t affect this app.No code changes are required here; the build and runtime I/O remain compatible.
108-108: pnpm 10.14.0: verify your CI pins the same versionAll
packageManagerentries in yourpackage.jsonfiles are now set topnpm@10.14.0, but I didn’t find any GitHub Actions workflows under.github/workflows. Please double-check that your CI system (e.g. GitHub Actions, CircleCI, GitLab CI) installs or pins pnpm 10.14.0, for example by reviewing:
.github/workflows/*.yml.circleci/config.yml.gitlab-ci.yml
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
fdm-app/package.json (1)
26-27: Quick scan: @react-email/components & @react-email/tailwind usages intactI ran the suggested grep across the codebase and confirmed that your email templates import the same primitives (Section, Text, Tailwind) in these files without any missing references:
- fdm-app/app/components/blocks/email/magic-link.tsx
- fdm-app/app/components/blocks/email/welcome.tsx
- fdm-app/app/components/blocks/email/invitation.tsx
The pnpm-lock shows both packages at the intended versions and no unexpected API removals. Please proceed to build or preview your email templates (and run any CI/email‐rendering tests) to ensure there are no compile- or runtime-time regressions with v0.5.0.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
fdm-app/package.json(5 hunks)fdm-app/vite.config.ts(1 hunks)pnpm-workspace.yaml(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- pnpm-workspace.yaml
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-11-25T12:42:32.783Z
Learnt from: SvenVw
PR: SvenVw/fdm#6
File: fdm-app/vite.config.ts:5-9
Timestamp: 2024-11-25T12:42:32.783Z
Learning: In the `fdm-app` project, SvenVw is preparing for migration to Remix v3 and may include type declarations or configurations for v3 features in advance, such as in `vite.config.ts`.
Applied to files:
fdm-app/vite.config.ts
🔇 Additional comments (3)
fdm-app/vite.config.ts (1)
16-16: Gate production source maps and upload hidden maps to SentryThe current Vite config at
fdm-app/vite.config.tsalways emits full source maps (sourcemap: true), which increases bundle size and risks exposing your source in prod. In production builds, you should:
- Use conditional or “hidden” source maps instead of always-on
- Upload hidden maps to Sentry via the
@sentry/vite-pluginrather than serving them publiclyMinimal diff to gate by
NODE_ENV:--- a/fdm-app/vite.config.ts +++ b/fdm-app/vite.config.ts @@ build: { - sourcemap: true, + sourcemap: process.env.NODE_ENV === "development" ? true : "hidden", target: "ES2022", rollupOptions: { … }, },Optionally add Sentry upload:
import { sentryVitePlugin } from "@sentry/vite-plugin"; export default defineConfig({ plugins: [ /* other plugins */, sentryVitePlugin({ org: process.env.SENTRY_ORG, project: process.env.SENTRY_PROJECT, authToken: process.env.SENTRY_AUTH_TOKEN, telemetry: false, }), ], build: { sourcemap: "hidden", }, });Please verify in your production build artifacts (e.g. after
npm run buildinfdm-app) that no.mapfiles are publicly served:find fdm-app/dist -type f -name '*.map'fdm-app/package.json (2)
17-17: LGTM: react-hook-form and resolvers bumped in lockstepKeeping these in sync prevents peer/version mismatches and runtime warnings.
Also applies to: 63-63
108-108: All workflows already pinned to pnpm@10.14.0
The RG search confirms every GitHub Actions workflow specifies version: 10.14.0, matching your package.json.• .github/workflows/tests.yml (lines 56, 149, 229)
• .github/workflows/release.yml (line 40)
• .github/workflows/deploy-docs.yml (line 41)
• .github/workflows/deploy-docs-test.yml (line 38)No changes required.
| "lucide-react": "^0.525.0", | ||
| "mapbox-gl": "^3.13.0", | ||
| "lucide-react": "^0.539.0", | ||
| "mapbox-gl": "^3.14.0", |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
Mapbox GL 3.14 and proj4 2.19.x — verify worker/css import and ESM import style
- Ensure client bundles import Mapbox CSS once to avoid styling regressions.
- In ESM projects, avoid require("proj4"); prefer ESM imports.
Run:
If require("proj4") is found, replace with:
import proj4 from "proj4"Also applies to: 58-58
🏁 Script executed:
#!/bin/bash
# Verify Mapbox CSS import present
rg -n 'mapbox-gl/dist/mapbox-gl.css' -g '!**/node_modules/**' || echo "Missing Mapbox GL CSS import"
# Flag any CommonJS imports of proj4
rg -n 'require\\(["\\\']proj4["\\\']\\)' -g '!**/node_modules/**' || trueLength of output: 476
🏁 Script executed:
#!/bin/bash
# Re-check CommonJS imports of proj4 with corrected quoting
rg -n "require\\(['\"]proj4['\"]\\)" -g '!**/node_modules/**' || echo "No CommonJS require of proj4 found"Length of output: 144
Consolidate Mapbox GL CSS import and confirm ESM proj4 usage
-
Confirmed that Mapbox CSS is imported in:
• fdm-app/app/root.tsx (line 2)
• fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx (line 2)
• fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx (line 8)
To avoid duplicate styling, remove the CSS imports from the two route files and keep the single import inapp/root.tsx. -
No CommonJS
require("proj4")calls were found in the codebase—ESM imports are already in use, so no changes needed for proj4.
Files to update:
- Remove
import "mapbox-gl/dist/mapbox-gl.css"from
• fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
• fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
🤖 Prompt for AI Agents
In fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx (around
line 2) and fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
(around line 8), remove the duplicate import statement import
"mapbox-gl/dist/mapbox-gl.css" so only the single CSS import in
fdm-app/app/root.tsx remains; simply delete those import lines from the two
route files and ensure no other mapbox CSS imports exist, no changes required
for proj4 as ESM imports are already used.
There was a problem hiding this comment.
Actionable comments posted: 2
🔭 Outside diff range comments (3)
.changeset/light-bushes-sniff.md (1)
6-6: Remove stray character from changeset.There’s an extraneous “6” at EOF that will show up in release notes. Please remove it.
Apply this diff to fix:
-6 +fdm-app/app/components/blocks/sidebar/support.tsx (1)
36-38: Fix Sentry.getFeedback type usageI searched all
@sentry/*declaration files innode_modulesand found nogetFeedbackexport—soReturnType<typeof Sentry.getFeedback>will cause TS errors. To resolve:• File:
fdm-app/app/components/blocks/sidebar/support.tsx(lines 36–38)
Replace:const [feedback, setFeedback] = useState<ReturnType< typeof Sentry.getFeedback > | null>(null)With a structural interface:
interface SentryFeedback { appendToDom(): void open(): void } const [feedback, setFeedback] = useState<SentryFeedback | null>(null)• Or, if a
Feedbacktype exists in@sentry/react, import it directly:import type { Feedback as SentryFeedback } from '@sentry/react' const [feedback, setFeedback] = useState<SentryFeedback | null>(null)This ensures type safety without relying on an un-exported symbol.
fdm-app/app/entry.server.tsx (1)
25-35: Function return type mismatch: make handleRequest async
handleRequestis typed to returnPromise<Response>but returns a bareResponsein the redirect branch. Mark itasyncto satisfy the signature.-const handleRequest = function handleRequest( +const handleRequest = async function handleRequest(
🧹 Nitpick comments (6)
.changeset/light-bushes-sniff.md (1)
5-5: Tighten the changeset message (scope and rationale).Consider clarifying the scope and motivation, e.g. “Migrate Sentry to @sentry/react-router (React Router v7 integration, tracing/profiling alignment).” This helps future readers scanning release notes.
Apply this diff to refine the message:
-Switch to `@sentry/react-router` from `@sentry/react` for better error monitoring +Migrate Sentry to `@sentry/react-router` (RRv7 integration with improved routing-aware tracing and profiling)fdm-app/instrument.server.mjs (1)
16-21: Add environment and release metadata to Sentry.init.Attaching
environmentandreleasegreatly improves issue triage and source map association.Apply this diff to enhance initialization:
Sentry.init({ dsn: String(process.env.VITE_SENTRY_DSN), integrations: [nodeProfilingIntegration()], tracesSampleRate: Number(process.env.VITE_SENTRY_TRACE_SAMPLE_RATE), profilesSampleRate: Number(process.env.VITE_SENTRY_PROFILE_SAMPLE_RATE), + environment: process.env.NODE_ENV ?? "development", + release: process.env.npm_package_version })fdm-app/app/components/blocks/sidebar/support.tsx (2)
103-112: Avoid anchor navigation to “#” when opening the feedback form.Clicking the “Feedback” item navigates to “#” in addition to opening the form. Prefer a pure button to prevent hash navigation.
Apply this diff:
- <SidebarMenuItem key="feedback"> - <SidebarMenuButton - asChild - size="sm" - onClick={openFeedbackForm} - > - <NavLink to="#"> - <Send /> - <span>Feedback</span> - </NavLink> - </SidebarMenuButton> - </SidebarMenuItem> + <SidebarMenuItem key="feedback"> + <SidebarMenuButton size="sm" onClick={openFeedbackForm}> + <Send /> + <span>Feedback</span> + </SidebarMenuButton> + </SidebarMenuItem>
82-85: Don’t derive support email from window.hostname.
support@${window.location.hostname}can generate invalid/unroutable addresses (e.g., staging hosts, subdomains). Prefer a configured email.Options:
- Use a config value:
clientConfig.supportEmail ?? "support@example.com".- Or derive from a known base URL domain exposed via runtime config, not the current hostname.
fdm-app/app/entry.client.tsx (1)
21-21: Good: Router-aware tracing integration enabledUsing
Sentry.reactRouterTracingIntegration()pairs well with the server’sgetMetaTagTransformerandwrapSentryHandleRequestfor distributed tracing.If you want the environment to reflect Vite’s mode reliably, consider using
import.meta.env.MODEinstead ofimport.meta.env.NODE_ENV:environment: import.meta.env.MODEfdm-app/react-router.config.ts (1)
5-13: Consider failing-soft or logging when build-end upload failsRight now, any error inside
sentryOnBuildEndwill bubble and may fail builds. If that’s undesirable, wrap it in try/catch and log a warning while proceeding.- buildEnd: async ({ viteConfig, reactRouterConfig, buildManifest }) => { - if (process.env.SENTRY_AUTH_TOKEN !== undefined) { - await sentryOnBuildEnd({ - viteConfig, - reactRouterConfig, - buildManifest, - }) - } - }, + buildEnd: async ({ viteConfig, reactRouterConfig, buildManifest }) => { + if (process.env.SENTRY_AUTH_TOKEN !== undefined) { + try { + await sentryOnBuildEnd({ + viteConfig, + reactRouterConfig, + buildManifest, + }) + } catch (err) { + console.warn("Sentry buildEnd hook failed; continuing without blocking the build.", err) + } + } + },
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (11)
.changeset/light-bushes-sniff.md(1 hunks)fdm-app/app/components/blocks/sidebar/support.tsx(1 hunks)fdm-app/app/entry.client.tsx(2 hunks)fdm-app/app/entry.server.tsx(7 hunks)fdm-app/app/root.tsx(1 hunks)fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx(1 hunks)fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx(0 hunks)fdm-app/instrument.server.mjs(1 hunks)fdm-app/package.json(5 hunks)fdm-app/react-router.config.ts(1 hunks)fdm-app/vite.config.ts(1 hunks)
💤 Files with no reviewable changes (1)
- fdm-app/app/routes/farm.$b_id_farm.$calendar.field.$b_id.atlas.tsx
🧰 Additional context used
🧠 Learnings (13)
📚 Learning: 2025-01-14T16:06:24.294Z
Learnt from: SvenVw
PR: SvenVw/fdm#45
File: fdm-app/app/routes/farm.$b_id_farm._index.tsx:1-1
Timestamp: 2025-01-14T16:06:24.294Z
Learning: In the fdm-app codebase, the `redirect` function should be imported from `react-router`, not `react-router-dom`.
Applied to files:
.changeset/light-bushes-sniff.mdfdm-app/instrument.server.mjsfdm-app/app/entry.client.tsxfdm-app/app/root.tsx
📚 Learning: 2025-01-14T16:06:21.832Z
Learnt from: SvenVw
PR: SvenVw/fdm#45
File: fdm-app/app/routes/farm.$b_id_farm.settings._index.tsx:1-1
Timestamp: 2025-01-14T16:06:21.832Z
Learning: In the fdm project, `redirect` and other routing utilities should be imported from `react-router` instead of `react-router-dom`.
Applied to files:
.changeset/light-bushes-sniff.mdfdm-app/instrument.server.mjsfdm-app/app/entry.client.tsxfdm-app/app/root.tsx
📚 Learning: 2025-04-18T13:49:17.029Z
Learnt from: SvenVw
PR: SvenVw/fdm#124
File: fdm-app/app/components/custom/farm/farm-title.tsx:3-3
Timestamp: 2025-04-18T13:49:17.029Z
Learning: In the fdm project, NavLink and other routing components can be imported from either "react-router" or "react-router-dom" as react-router-dom is included in react-router.
Applied to files:
.changeset/light-bushes-sniff.mdfdm-app/app/components/blocks/sidebar/support.tsx
📚 Learning: 2025-02-19T10:50:50.200Z
Learnt from: SvenVw
PR: SvenVw/fdm#82
File: fdm-app/app/entry.client.tsx:13-13
Timestamp: 2025-02-19T10:50:50.200Z
Learning: Sentry DSN being public in client-side code is not a security concern as per Sentry documentation, but it can be made configurable using Vite's environment variables system with the `VITE_` prefix.
Applied to files:
fdm-app/instrument.server.mjsfdm-app/vite.config.tsfdm-app/package.json
📚 Learning: 2024-12-11T12:09:35.540Z
Learnt from: SvenVw
PR: SvenVw/fdm#20
File: fdm-app/tsconfig.json:8-9
Timestamp: 2024-12-11T12:09:35.540Z
Learning: In the `fdm-app/tsconfig.json` file, the include path `.react-router/types/**/*` refers to a build-time generated directory which is intentionally not included in the repository.
Applied to files:
fdm-app/app/components/blocks/sidebar/support.tsxfdm-app/app/entry.client.tsxfdm-app/app/root.tsxfdm-app/react-router.config.ts
📚 Learning: 2024-12-16T10:56:07.561Z
Learnt from: SvenVw
PR: SvenVw/fdm#16
File: fdm-app/app/routes/app.addfarm.$b_id_farm.cultivations.$b_lu_catalogue.fertilizers.tsx:1-1
Timestamp: 2024-12-16T10:56:07.561Z
Learning: The project uses `react-router` v7, and the `data` function is exported and used for error handling in loaders and actions.
Applied to files:
fdm-app/app/components/blocks/sidebar/support.tsx
📚 Learning: 2024-11-25T14:42:26.660Z
Learnt from: SvenVw
PR: SvenVw/fdm#6
File: fdm-app/app/components/blocks/field-map.tsx:0-0
Timestamp: 2024-11-25T14:42:26.660Z
Learning: In `fdm-app/app/components/blocks/field-map.tsx`, explicit cleanup of Mapbox GL resources is not necessary, as `react-map-gl` handles it automatically upon component unmount, and `MapRef` does not have a `remove` method.
Applied to files:
fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
📚 Learning: 2025-01-09T16:03:37.764Z
Learnt from: SvenVw
PR: SvenVw/fdm#42
File: fdm-app/app/routes/farm/_b_id_farm/layout.tsx:46-95
Timestamp: 2025-01-09T16:03:37.764Z
Learning: A shared layout component `FarmLayoutBase` has been created in `components/custom/farm-layout-base.tsx` to maintain consistency across farm-related pages. The component handles farm selection dropdown, breadcrumb navigation, and provides a common layout structure.
Applied to files:
fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
📚 Learning: 2025-01-31T15:41:43.741Z
Learnt from: SvenVw
PR: SvenVw/fdm#67
File: fdm-app/app/components/custom/atlas/atlas-panels.tsx:28-28
Timestamp: 2025-01-31T15:41:43.741Z
Learning: When handling different map event types in react-map-gl v7.1.8, use MapLayerMouseEvent for mouse events (which have the point property) and ViewStateChangeEvent for view state changes. Use a type guard like 'point' in evt to safely access event-specific properties.
Applied to files:
fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
📚 Learning: 2025-01-31T15:06:35.764Z
Learnt from: SvenVw
PR: SvenVw/fdm#67
File: fdm-app/app/components/custom/atlas/atlas-sources.tsx:21-66
Timestamp: 2025-01-31T15:06:35.764Z
Learning: In react-map-gl components, when querying rendered features via map.queryRenderedFeatures(), the effect's dependency array must include any props that affect the map's rendered state (like source data) to ensure features are queried against the current map state.
Applied to files:
fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
📚 Learning: 2025-06-10T13:10:03.154Z
Learnt from: SvenVw
PR: SvenVw/fdm#161
File: fdm-app/app/components/blocks/field-map.tsx:0-0
Timestamp: 2025-06-10T13:10:03.154Z
Learning: When facing prop name inconsistencies with react-map-gl (like mapboxAccessToken vs mapboxApiAccessToken), using different import statements can resolve the issue more elegantly than changing prop names across multiple files.
Applied to files:
fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
📚 Learning: 2025-01-31T16:06:33.810Z
Learnt from: SvenVw
PR: SvenVw/fdm#67
File: fdm-app/app/routes/farm.create.$b_id_farm.atlas.tsx:164-212
Timestamp: 2025-01-31T16:06:33.810Z
Learning: Map configuration in the application should be modularized using the `useMapConfig` hook and `MapControls` component to maintain consistency across all MapGL instances.
Applied to files:
fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx
📚 Learning: 2024-11-25T12:42:32.783Z
Learnt from: SvenVw
PR: SvenVw/fdm#6
File: fdm-app/vite.config.ts:5-9
Timestamp: 2024-11-25T12:42:32.783Z
Learning: In the `fdm-app` project, SvenVw is preparing for migration to Remix v3 and may include type declarations or configurations for v3 features in advance, such as in `vite.config.ts`.
Applied to files:
fdm-app/vite.config.tsfdm-app/package.json
🔇 Additional comments (12)
fdm-app/instrument.server.mjs (1)
1-1: All checks passed: SSR integration verified for @sentry/react-router
- Confirmed
wrapSentryHandleRequestis imported and applied infdm-app/app/entry.server.tsx.- No remaining imports from
@sentry/reactor@sentry/nodewere found.- Client-side feedback integration via
Sentry.getFeedback()is in use.fdm-app/app/components/blocks/sidebar/support.tsx (1)
1-1: LGTM: Sentry import path aligns with the router-aware migration.Switching to
@sentry/react-routerhere is consistent with the project-wide RRv7 Sentry migration.fdm-app/app/root.tsx (1)
1-1: LGTM: Sentry import updated to router-aware package.This aligns with RRv7 and keeps
Sentry.captureExceptionusage intact inErrorBoundary. Also matches prior guidance to usereact-routerfor routing utilities (e.g.,redirect).fdm-app/app/routes/farm.$b_id_farm.$calendar.atlas.fields._index.tsx (1)
11-11: LGTM: Trimmed router imports to what’s used.Importing only
LoaderFunctionArgsanduseLoaderDatafromreact-routeris correct and removes the unuseddatahelper here.fdm-app/app/entry.client.tsx (1)
7-7: Migration to @sentry/react-router looks correctImporting from @sentry/react-router aligns with the rest of the PR and the server-side changes.
fdm-app/react-router.config.ts (1)
2-2: Build-time Sentry hook import is correct
sentryOnBuildEndimport from@sentry/react-routermatches the new integration approach.fdm-app/package.json (3)
30-31: Sentry dependency migration aligns with code changesSwitching to
@sentry/react-router(+ keeping@sentry/profiling-node) matches the new integration across the app.
107-107: pnpm manager bump acknowledgedRepository-wide upgrade to pnpm 10.14.0 is consistent.
30-31: Dependency Usage Verified
The@sentry/profiling-nodepackage is still imported infdm-app/instrument.server.mjs(line 2), so the dependency remains required and should not be removed.fdm-app/vite.config.ts (1)
49-49: Always-on sourcemaps: OK given conditional uploadWith sourcemaps always generated and upload gated by token+production, this matches the intended behavior.
fdm-app/app/entry.server.tsx (2)
155-157: Good: enable distributed tracing in streamed HTMLUsing
pipe(getMetaTagTransformer(body))correctly injects distributed tracing metadata.
177-179: Good: wrap default export with Sentry handler
wrapSentryHandleRequest(handleRequest)is the correct pattern for the router integration.
Summary by CodeRabbit
Chores
New Features
Dev experience
Tests/CI
Bug Fixes