Skip to content

Add PWA capabilities - #1

Merged
WentTheFox merged 9 commits into
mainfrom
claude/add-pwa-offline-caching-dcq56
May 18, 2026
Merged

Add PWA capabilities#1
WentTheFox merged 9 commits into
mainfrom
claude/add-pwa-offline-caching-dcq56

Conversation

@WentTheFox

Copy link
Copy Markdown
Owner

Summary

This PR introduces a complete web application for identifying undiscovered roads in Forza Horizon 6 by capturing the game screen and highlighting grey roads (#808080) in magenta in real time.

Key Changes

  • HTML UI (src/index.html): Full-featured control panel with screen capture, color picker, FPS/tolerance sliders, and an embedded help modal
  • Core Processing (src/main.js): Screen capture via MediaDevices API with real-time pixel manipulation using both fast 32-bit exact-match and tolerance-based color replacement paths, plus optional greyscale conversion
  • Service Worker (src/sw.js): Offline-first PWA support with cache-first strategy for all GET requests
  • Web Manifest (src/manifest.json): PWA metadata for standalone installation
  • Build Configuration (package.json): Parcel-based build setup with markdown and asset bundling
  • Documentation (README.md): Updated with build instructions, privacy notes, and PWA support details

Notable Implementation Details

  • Performance optimization: Uses Uint32Array view for fast exact-match color replacement when tolerance is 0 and greyscale is disabled, avoiding per-channel comparisons
  • Dual input sync: Range and number inputs for FPS and tolerance stay synchronized bidirectionally
  • Responsive UI: Dark theme with flexbox layout, disabled state management for buttons during capture
  • Markdown integration: README is bundled and rendered in-app via the marked library
  • Privacy-first: All processing happens client-side with no server communication
  • Accessibility: Keyboard shortcuts (Escape to close modal), semantic HTML, proper ARIA labels

https://claude.ai/code/session_01LSzcnsQrPwGMT1My23tr86

claude added 8 commits May 18, 2026 10:14
- Introduce Parcel 2 build (src/ → dist/) to eliminate the jsDelivr CDN dependency
- Bundle marked via npm and inline README.md at build time using bundle-text:, so the Help modal works with no network
- Add service worker (cache-as-you-go, cache-first) so the app works fully offline after the first visit
- Add manifest.json for PWA installability
- Update README: fix button label (ⓘ Help), update usage for build process, add in-app skip note, add Offline/PWA section

https://claude.ai/code/session_01LSzcnsQrPwGMT1My23tr86
Previously hardcoded "#808080 → magenta". Now both values update
live whenever either color picker changes.

https://claude.ai/code/session_01LSzcnsQrPwGMT1My23tr86
Building and Running is now a collapsed <details> block covering
dev and production separately. Usage starts directly from
"Click Share Screen". The in-app note now points to the right section.

https://claude.ai/code/session_01LSzcnsQrPwGMT1My23tr86
bundle-text inlines the README as-is; the relative path preview.png
resolves against the page URL where dist/ has no such file.
Use the absolute GitHub raw URL so it works on GitHub and in-app.

https://claude.ai/code/session_01LSzcnsQrPwGMT1My23tr86
Import preview.png via Parcel's url: specifier so it lands in dist/
with a content hash. Substitute its local URL into the README text
before rendering so the modal shows the local copy. The service worker
caches it on first modal open and serves it offline thereafter.

https://claude.ai/code/session_01LSzcnsQrPwGMT1My23tr86
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 18, 2026

Copy link
Copy Markdown

Deploying roadfinder-went with  Cloudflare Pages  Cloudflare Pages

Latest commit: 147a1d3
Status: ✅  Deploy successful!
Preview URL: https://7b688525.roadfinder-went.pages.dev
Branch Preview URL: https://claude-add-pwa-offline-cachi.roadfinder-went.pages.dev

View logs

@WentTheFox WentTheFox changed the title Add web app for real-time Forza road discovery highlighting Add PWA capabilities May 18, 2026
Limit push trigger to main so feature branches are only built via
the pull_request event, not both.

https://claude.ai/code/session_01LSzcnsQrPwGMT1My23tr86
@WentTheFox
WentTheFox merged commit 7aa8419 into main May 18, 2026
2 checks passed
@WentTheFox
WentTheFox deleted the claude/add-pwa-offline-caching-dcq56 branch May 18, 2026 10:53
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