Add codebase evaluation report - #6
Merged
Merged
Conversation
Full review of the React app, data build scripts, workflows, and committed data bundles, with measurements from a production build and a headless render. Findings are ordered by impact and end with a prioritized roadmap. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GHwD8XvBcauzVZHuW8VYb5
- Mount the field report print appendix only while printing (beforeprint with flushSync) and cap it at 1,000 rows. The dashboard previously rendered every filtered row hidden in the DOM: 30,665 rows and 337,293 cells on a default load, now 16 rows. - Drop field survival only where a per-bag row exists for the same site, treatment, and assessment date. Site-level replacement had removed 22 measured records with no counterpart, including all Sequim Bay heat-primed survival and the Palix River 2024 to 2025 trajectory. - Upgrade react-router-dom to 7.18.3 to clear two moderate advisories. The routing API in use is unchanged in v7; all routes verified. - Add Live Data and Research to the header navigation and refresh the disclaimer copy to match the current datasets. - Label time series points by assessment date rather than month, which removed repeated x-axis ticks and ambiguous tooltips. - Dispatch the Pages deploy from the live refresh workflow only when a changed snapshot was committed, instead of redeploying on every hourly run via workflow_run. - Update README and the evaluation report to match. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GHwD8XvBcauzVZHuW8VYb5
Addresses the medium roadmap items from the codebase evaluation. Data layer - Data bundles now live in public/data/ and are fetched at runtime through a small cached store (src/data/resources.js) instead of being inlined into the JavaScript bundle. Routes are lazy-loaded. The entry chunk goes from 19.9 MB to 197 kB; Recharts and Leaflet load only on the routes that use them; the hourly live snapshot caches independently of code. - New compact positional bundle format (columns, lookups, constants, rows) encoded by scripts/shield_data.py and decoded by src/data/bundleFormat.js. Growth data drops from 19.9 MB to 1.45 MB raw (422 kB to 189 kB gzip). Committed data was re-encoded losslessly; the round trip was verified record by record. - mockShellfishData.js is replaced by observations.js (pure assembly and aggregation), resources.js (fetching), and siteMetadata.js (static site and vocabulary constants). Components take vocabularies as props. Analysis - Time series draws one line per site with per-site error bars and counts, so sites sampled on different dates are never pooled. - Growth now uses the same latest-assessment rule as survival in the summary card, treatment and site comparisons, and map summaries. Scripts - scripts/shield_data.py holds the shared treatment mapping, date parsing, HTTP fetch with retries, and bundle encoder; the growth, survival, and field observation scripts import it. - build_real_observations.py reads inputs from the public GitHub repository by default (PGC_SOURCE overrides with a local checkout) instead of a hard-coded home directory path. Verified end to end. - requirements.txt for the pandas/openpyxl dependency; npm run build:data runs the static builders in dependency order; npm run deploy removed. Tests and CI - Vitest with 36 tests covering the bundle decoder, the survival merge rule, every aggregation function, and schema/vocabulary validation of the committed bundles. - .github/workflows/ci.yml runs tests and a production build on pull requests and non-main branches. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GHwD8XvBcauzVZHuW8VYb5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Full review of the React app, data build scripts, workflows, and committed
data bundles, with measurements from a production build and a headless
render. Findings are ordered by impact and end with a prioritized roadmap.
Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com
Claude-Session: https://claude.ai/code/session_01GHwD8XvBcauzVZHuW8VYb5