Skip to content

Add codebase evaluation report - #6

Merged
sr320 merged 3 commits into
mainfrom
claude/codebase-evaluation-3idg0a
Sep 7, 2026
Merged

Add codebase evaluation report#6
sr320 merged 3 commits into
mainfrom
claude/codebase-evaluation-3idg0a

Conversation

@sr320

@sr320 sr320 commented Sep 7, 2026

Copy link
Copy Markdown
Member

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

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
@sr320
sr320 merged commit 65b0141 into main Sep 7, 2026
2 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.

2 participants