Skip to content

Consolidate refill store details output with first-win logic#418

Open
DanWebb wants to merge 3 commits intomainfrom
wrap-2234-refill-place-details-notes-has-what-3-words-replaced-twice
Open

Consolidate refill store details output with first-win logic#418
DanWebb wants to merge 3 commits intomainfrom
wrap-2234-refill-place-details-notes-has-what-3-words-replaced-twice

Conversation

@DanWebb
Copy link
Copy Markdown
Member

@DanWebb DanWebb commented Apr 2, 2026

The refill data comes from suppliers who stock the same store, so the store details like the website will always be the same. In the admin any of the locations within the property could contain the info we need or in the spreadsheet any one of the suppliers could have provided the info. So getRefillPlaceDetails takes the first available value for each detail type (phone, website, notes, opening hours) instead of aggregating all sub-locations.

This also extracts a PlaceNotes component to unify the what3words URL-to-display round-trip that was duplicated across two pages and simplifies getNotes regex handling with replaceAll to fix a global regex lastIndex bug. Add getRefillPlaceDetails which takes the first available value for each detail type (phone, website, notes, opening hours) instead of aggregating all sub-locations.

DanWebb and others added 2 commits April 2, 2026 15:23
… logic

Extract PlaceNotes component to unify the what3words URL-to-display
round-trip that was duplicated across two pages. Simplify getNotes
regex handling with replaceAll to fix a latent global regex lastIndex
bug. Add getRefillPlaceDetails which takes the first available value
for each detail type (phone, website, notes, opening hours) instead
of aggregating all sub-locations.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…tors

Refill places only ever show one note, so use `note: string | undefined`
instead of `notes: string[]` to express this in the type. Fix E2E mock
telephone numbers to use digit-only format matching getPhoneNumbers output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@DanWebb DanWebb self-assigned this Apr 2, 2026
@mergify mergify bot requested a review from a team April 2, 2026 15:43
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 2, 2026

⚠️MegaLinter analysis: Success with warnings

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ EDITORCONFIG editorconfig-checker 8 0 0 0.04s
✅ REPOSITORY checkov yes no no 28.69s
⚠️ REPOSITORY gitleaks yes 6 no 6.35s
✅ REPOSITORY git_diff yes no no 0.04s
✅ REPOSITORY secretlint yes no no 3.35s
✅ REPOSITORY syft yes no no 9.29s
✅ REPOSITORY trivy-sbom yes no no 5.59s
✅ REPOSITORY trufflehog yes no no 105.73s
✅ TSX eslint 3 0 0 7.42s
✅ TYPESCRIPT eslint 5 0 0 12.03s

Detailed Issues

⚠️ REPOSITORY / gitleaks - 6 errors
○
    │╲
    │ ○
    ○ ░
    ░    gitleaks

Finding:     VITE_MARKER_KEY: REDACTED
Secret:      REDACTED
RuleID:      generic-api-key
Entropy:     3.553509
File:        .github/workflows/deploy.yml
Line:        37
Commit:      HIDDEN_BY_MEGALINTERAuthor:      Dan Webb
Email:       dan@etch.co
Date:        2024-04-24T11:48:15Z
Fingerprint: 2c76e7174c25cd560f5bceb4c095e253417e0634:.github/workflows/deploy.yml:generic-api-key:37
Link:        https://github.com/etchteam/recycling-locator/blob/2c76e7174c25cd560f5bceb4c095e253417e0634/.github/workflows/deploy.yml#L37

Finding:     VITE_MARKER_KEY: REDACTED
Secret:      REDACTED
RuleID:      generic-api-key
Entropy:     3.553509
File:        .github/workflows/deploy.yml
Line:        39
Commit:      HIDDEN_BY_MEGALINTERAuthor:      Dan Webb
Email:       dan@etch.co
Date:        2024-03-16T16:55:19Z
Fingerprint: 1556c5d76bf2feb9f1745484fa07fae4ea6fac75:.github/workflows/deploy.yml:generic-api-key:39
Link:        https://github.com/etchteam/recycling-locator/blob/1556c5d76bf2feb9f1745484fa07fae4ea6fac75/.github/workflows/deploy.yml#L39

Finding:     MARKER_KEY: REDACTED
Secret:      REDACTED
RuleID:      generic-api-key
Entropy:     3.553509
File:        .github/workflows/deploy.yml
Line:        37
Commit:      HIDDEN_BY_MEGALINTERAuthor:      Dan Webb
Email:       dan@etch.co
Date:        2024-03-12T05:46:34Z
Fingerprint: edb2bd3b00e33ba9eef6326d3c8cd6a657649c68:.github/workflows/deploy.yml:generic-api-key:37
Link:        https://github.com/etchteam/recycling-locator/blob/edb2bd3b00e33ba9eef6326d3c8cd6a657649c68/.github/workflows/deploy.yml#L37

Finding:     ...E_PACKAGE_VERSION=1 VITE_HERE_MAPS_PLACES_KEY=REDACTED npm run build
Secret:      REDACTED
RuleID:      generic-api-key
Entropy:     4.693479
File:        .github/workflows/ci.yml
Line:        69
Commit:      HIDDEN_BY_MEGALINTERAuthor:      Dan Webb
Email:       dan@etch.co
Date:        2024-02-24T21:21:34Z
Fingerprint: 80649ba25c2a8f92eb7825b81355d08292efa0c8:.github/workflows/ci.yml:generic-api-key:69
Link:        https://github.com/etchteam/recycling-locator/blob/80649ba25c2a8f92eb7825b81355d08292efa0c8/.github/workflows/ci.yml#L69

Finding:     ...E_PACKAGE_VERSION=1 VITE_HERE_MAPS_PLACES_KEY=REDACTED npm test
Secret:      REDACTED
RuleID:      generic-api-key
Entropy:     4.693479
File:        .github/workflows/ci.yml
Line:        73
Commit:      HIDDEN_BY_MEGALINTERAuthor:      Dan Webb
Email:       dan@etch.co
Date:        2024-02-24T12:01:19Z
Fingerprint: 82ebd091a8e8fd8e381d88003189fff7c22f8555:.github/workflows/ci.yml:generic-api-key:73
Link:        https://github.com/etchteam/recycling-locator/blob/82ebd091a8e8fd8e381d88003189fff7c22f8555/.github/workflows/ci.yml#L73

Finding:     ...E_PACKAGE_VERSION=1 VITE_HERE_MAPS_PLACES_KEY=REDACTED npm test
Secret:      REDACTED
RuleID:      generic-api-key
Entropy:     4.693479
File:        .github/workflows/ci.yml
Line:        73
Commit:      HIDDEN_BY_MEGALINTERAuthor:      Dan Webb
Email:       dan@etch.co
Date:        2024-02-24T11:56:43Z
Fingerprint: 219c47440fa90bc250dcb661929edcaf69f8c33b:.github/workflows/ci.yml:generic-api-key:73
Link:        https://github.com/etchteam/recycling-locator/blob/219c47440fa90bc250dcb661929edcaf69f8c33b/.github/workflows/ci.yml#L73

4:14PM INF 1321 commits scanned.
4:14PM INF scanned ~8012667 bytes (8.01 MB) in 5.85s
4:14PM WRN leaks found: 6

See detailed reports in MegaLinter artifacts
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

Use startsWith for stricter what3words URL matching to satisfy CodeQL,
replace non-literal RegExp with stringContaining, and fix prettier formatting.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 2, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants