Skip to content

Add field compilation notes batch PDF#224

Merged
jirhiker merged 2 commits intostagingfrom
codex/update-pdf-generation
Mar 22, 2026
Merged

Add field compilation notes batch PDF#224
jirhiker merged 2 commits intostagingfrom
codex/update-pdf-generation

Conversation

@jirhiker
Copy link
Member

Summary

  • add a dedicated Field Compilation Notes PDF document for batch well exports while leaving the existing well details PDF path intact
  • update batch export to build the new document, including equipment rows, recent measurement methods, site notes, general field notes, and hydrograph/manual measurement pages
  • keep name resolution on the existing provider-based lookup path and limit sample-method loading to the two most recent observations used on the first sheet

Testing

  • npm run typecheck

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 03c248f9c4

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +773 to +777
const current = hydrographImagesRef.current
const ready = neededHydrographs.every(
(bundle) =>
typeof current[bundle.well.id] === 'string' &&
current[bundle.well.id].length > 0

Choose a reason for hiding this comment

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

P1 Badge Refresh hydrograph cache before treating images as ready

If the user exports the same wells twice, this ready check can succeed on the previous run's PNGs before the new hidden HydrographPngExporter instances have rendered. setHydrographImagesByWellId only schedules a state update, while hydrographImagesRef.current still holds the old entries until a later effect runs, so a second export can silently reuse stale hydrographs after observations changed.

Useful? React with 👍 / 👎.

Comment on lines +780 to +786
if (ready || Date.now() - startedAt > 8000) {
resolve(
Object.fromEntries(
neededHydrographs.map((bundle) => [
bundle.well.id,
current[bundle.well.id] ?? '',
])

Choose a reason for hiding this comment

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

P2 Badge Remove the fixed 8s hydrograph render cutoff

On slower browsers or larger batches, some off-screen hydrographs can take longer than eight seconds to render. This branch resolves anyway and substitutes '' for any chart that is still pending, so wells with valid groundwater data export a Hydrograph unavailable page with no warning instead of the actual graph.

Useful? React with 👍 / 👎.

@jirhiker jirhiker force-pushed the codex/update-pdf-generation branch from ed0e8b3 to 4ae2e80 Compare March 22, 2026 03:58
@jirhiker
Copy link
Member Author

@jirhiker jirhiker merged commit fb692fd into staging Mar 22, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant