Repository navigation
Add CI, fix lint purity error, add hook and App tests, real README (#12) - #14
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
… render (#12) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
… render (#12) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…ts (#12) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
…ities test (#12) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf
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.
Adds CI, makes lint pass on
mainby fixing the real render impurity inuseStressPoints, adds the missing hook and App tests, replaces the Vite template README, and adds a repo-rootCLAUDE.md.Summary
.github/workflows/ci.yml: single jobcion push tomainand onpull_request, Nodelts/*with npm cache, runningnpm ci,npm run lint,npm test,npm run build,npm audit --omit=dev --audit-level=high. Actions pinned toactions/checkout@v7andactions/setup-node@v7;permissions: contents: read.src/hooks/useStressPoints.js: points are no longer generated during render. A pure-by-argumentgenerateStressPoints(count, random)runs inside a debounced (150 ms) effect timer and the result is held in state. Rapid slider changes generate once, for the last value; 0 clears. Return shape is unchanged, sobuildLayersandMapVieware untouched. Noeslint-disableor rule change was added.usePorts(success, non-OK response, network rejection),useGPUCapabilities(nonavigator.gpu, null adapter, rejecting adapter, success),Apprender smoke withMapViewanduseGPUHeatmapmocked andfetchstubbed, and the rewrittenuseStressPointstests (debounce, single generation, clear on 0, ranges).README.md: purpose, browser and WebGPU requirements, setup from a clean clone, scripts, data sources and licenses, known limitations.CLAUDE.md: gate commands, style rules (JavaScript only, no emojis, no em dashes), and a## Git exceptionscoped toissue-<N>-*branches. This PR changesCLAUDE.md; the repo has no eval suite, so that change is ungated beyond human review.main(src/hooks/useGPUCompute.jslines 3 to 5 dispatch exactly 65,535 workgroups); no change there.Behavior note: the PTS readout and the drawn stress points now update about 150 ms after the slider settles (plus generation time), instead of on every slider step.
Plan
docs/plans/2026-11-07-issue-12-ci-lint-tests-readme.md, committed in 55d4cf3. Revised in 85a5f33:public/data/ports.geojsonis Natural Earthne_10m_ports(1,081 features,nameproperty), not the NGA World Port Index assrc/config/sources.jssays; the README documents the actual source.Test evidence
Gate on 45be195, in order, all exit 0:
npm ci: added 329 packages, 0 vulnerabilitiesnpm run lint:eslint .with no problems (was 2react-hooks/purityerrors onmain)npm test: 14 files, 87 tests passed (was 11 files, 77 tests)npm run build: built;maplibre-gl-workeremittednpm audit --omit=dev --audit-level=high: 0 vulnerabilitiesTDD: red test committed alone in 9153a6a (2 of 6 failed:
Math.randomcalled 200 and 120 times during render), fixed in 54d413e. The new characterization tests were mutation-checked locally (8 of 9 failed with assertions broken).Live drive (
npm run build && npx vite preview, Chrome): basemap, airports and ports render; GPU panel PTS 73,769 at baseline. Slider to 1M: PTS unchanged at 30 ms, 1,073,769 at about 178 ms, stress points drawn. Rapid changes 2M, 3M, 500K, 4M, 200K about 40 ms apart: PTS polled every 5 ms showed only the start value and the final 273,769. Back to 0: cleared to 73,769 at about 159 ms. Airport and port toggles and the feature popup still work. No app console errors. The browser had no WebGPU adapter, so the heatmap path was not driven.Review findings
CLAUDE.mdsaid not to addeslint-disablecomments while two pre-existing ones exist; now says no new ones and names the existing ones.useGPUCapabilities"starts unknown" test now awaits the settled tier so no update lands outsideact.generateStressPointsdoes not guard a negative count (unreachable from the slider, min 0); actions pinned to major tags rather than SHAs, per the requested policy.Docs reconciled
README.md: rewritten (template replaced).CLAUDE.md: new.docs/plans/...issue-12...md: new, with the deviation note.Closes #12
🤖 Generated with Claude Code
https://claude.ai/code/session_01AELE7jB1i3uqqrHu3SjJjf