Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
88 commits
Select commit Hold shift + click to select a range
45ff763
Add strict browser data API, full-solver worker and tested scan geometry
senegrom Sep 6, 2026
438ff4a
Implement camera-first PWA, all-family editors, local OCR, photo over…
senegrom Sep 6, 2026
93a3380
Fix Pyodide 3.14 ES module packaging and retain independently testabl…
senegrom Sep 6, 2026
e2bae8d
Make browser acceptance tests await real solver and recognition compl…
senegrom Sep 6, 2026
d4ca1b1
Fix OCR atlas word merging and harden type changes, crop provenance a…
senegrom Sep 6, 2026
4dd9620
Keep large puzzle boards inside the mobile viewport and document Page…
senegrom Sep 6, 2026
1312fbf
Preserve scan uncertainty across reloads and verify current WebKit of…
senegrom Sep 6, 2026
d978744
Improve clue separation and confidence; test cached operation with th…
senegrom Sep 6, 2026
050852f
Retain validated sparse OCR layout while bounding mobile raster memory
senegrom Sep 6, 2026
b30b39f
Update browser-pages.yml
senegrom Sep 6, 2026
31fb82f
Exclude grid rules from clue OCR, add guided review and reject unsafe…
senegrom Sep 6, 2026
9ea64d8
Reject faint grid corner artifacts in perspective scans without weake…
senegrom Sep 6, 2026
76c519a
Harden scanner safety, offline recovery and cancellable OCR (#20)
senegrom Sep 6, 2026
5f1d473
Allow browser branch to deploy Pages through its own environment
senegrom Sep 6, 2026
4e1880f
TEMP
senegrom Sep 7, 2026
3f84cff
Restore and harden browser puzzle validation
senegrom Sep 7, 2026
015fb04
Add iPhone safe-area and contrast polish
senegrom Sep 7, 2026
fa97cd6
Fix grid keyboard navigation and guard no-op removals
senegrom Sep 7, 2026
43118fa
Add follow-up trust and structural validation regressions
senegrom Sep 7, 2026
4efb963
Load phone polish and accessibility guards
senegrom Sep 7, 2026
a95f1f3
Preserve offline installs across updates and avoid repeated large-ass…
senegrom Sep 7, 2026
03e89fe
Make phone interaction guards testable
senegrom Sep 7, 2026
5759bdc
Test keyboard boundaries, no-op guards and service-worker routing
senegrom Sep 7, 2026
a3e508d
Deduplicate browser CI while keeping the deployment gate
senegrom Sep 7, 2026
bed2b26
Refresh live deployment and scanner trust documentation
senegrom Sep 7, 2026
00ed2e2
Document automatic-type and offline-route regressions
senegrom Sep 7, 2026
dcfa091
Keep keyboard focus state in sync while blocking boundary wrap
senegrom Sep 7, 2026
2ffff21
Stage one-shot scanner follow-up applier
senegrom Sep 7, 2026
50addd3
Add follow-up payload 1/7
senegrom Sep 7, 2026
745c904
Add follow-up payload 2/7
senegrom Sep 7, 2026
e8eb2b9
Add follow-up payload 3/7
senegrom Sep 7, 2026
bef13ce
Add follow-up payload 4/7
senegrom Sep 7, 2026
a780abb
Add follow-up payload 5/7
senegrom Sep 7, 2026
47bcb74
Add follow-up payload 6/7
senegrom Sep 7, 2026
edd8a6d
Add follow-up payload 7/7
senegrom Sep 7, 2026
3de7576
Apply scanner hardening bundle
senegrom Sep 7, 2026
66e116d
Make follow-up payload reconstruction transport-safe
senegrom Sep 7, 2026
5c1bd41
Retry scanner hardening bundle
senegrom Sep 7, 2026
ef7a7e4
Recover the one truncated follow-up payload character by pinned digest
senegrom Sep 7, 2026
3b3a96a
Run digest-guided scanner bundle recovery
senegrom Sep 7, 2026
9192aab
Restore staged payload padding before pinned digest verification
senegrom Sep 7, 2026
441a7ae
Verify and apply reconstructed scanner bundle
senegrom Sep 7, 2026
5e6a991
Validate reconstructed scanner bundle before atomic apply
senegrom Sep 7, 2026
f6a487d
Run validated scanner hardening bundle
senegrom Sep 7, 2026
8de9018
Recover the missing final payload character against the original digest
senegrom Sep 7, 2026
a6de883
Recover final scanner payload byte and apply
senegrom Sep 7, 2026
f9eff93
Validate the complete deflate payload and ignore only its damaged gzi…
senegrom Sep 7, 2026
d67113a
Apply verified complete scanner payload
senegrom Sep 7, 2026
11bbcfd
Accept only a complete validated tar payload from the staged deflate …
senegrom Sep 7, 2026
d2b355d
Apply validated scanner hardening payload
senegrom Sep 7, 2026
f9d762d
Validate every staged file before extracting and applying the follow-up
senegrom Sep 7, 2026
b37dd2e
Apply fully validated scanner follow-up
senegrom Sep 7, 2026
6a57c69
Use content-addressed offline storage with cheap startup readiness ch…
senegrom Sep 7, 2026
99c3d11
Patch scan preference in core and inspect authoritative handler helpers
senegrom Sep 7, 2026
ba89026
Apply core scanner preference and cache fixes
senegrom Sep 7, 2026
b1c5fa3
Expose stable content-addressed cache key for verification and reuse
senegrom Sep 7, 2026
81b2301
Migrate scan preferences and expose remaining production handler context
senegrom Sep 7, 2026
cb07e0b
Apply scan preference migration and cache contract fixes
senegrom Sep 7, 2026
69b0b9c
Support injected cache verification without changing offline runtime …
senegrom Sep 7, 2026
f127c57
Wire authoritative app handlers and solve-ready validation before ato…
senegrom Sep 7, 2026
8f109ba
Apply authoritative scanner handlers and solve-ready gate
senegrom Sep 7, 2026
dea75db
Make solve-ready insertion formatting independent
senegrom Sep 7, 2026
63f27fb
Merge master into browser-scanner
senegrom Sep 7, 2026
b3135fc
Repair the browser-scanner deploy gate and finish the scanner follow-up
senegrom Sep 7, 2026
d934c85
Stage Str8ts newspaper patch 1/3
senegrom Sep 7, 2026
1d39115
Stage Str8ts newspaper patch 2/3
senegrom Sep 7, 2026
d8f4b2d
Stage Str8ts newspaper patch 3/3
senegrom Sep 7, 2026
4c6caee
Correct final Str8ts patch chunk
senegrom Sep 7, 2026
0e3f273
Stage real Sudoku photo 1/3
senegrom Sep 7, 2026
79af2c0
Stage real Sudoku photo 2/3
senegrom Sep 7, 2026
edc32b2
Stage real Sudoku photo 3/3
senegrom Sep 7, 2026
a9dcae4
Stage real Str8ts photo 1/4
senegrom Sep 7, 2026
c4d4e1f
Add Str8ts and real-newspaper OCR regressions
senegrom Sep 7, 2026
eec9e8b
Document Str8ts and real newspaper OCR measurements
senegrom Sep 7, 2026
b032cec
Preserve complete OCR clues and keep structural errors editable
senegrom Sep 8, 2026
d862eab
Preserve scanner review state and editor drafts
senegrom Sep 8, 2026
bd4d6b8
Preserve scan layouts and handle transparent photos and multi-tab upd…
senegrom Sep 8, 2026
f9d6d8e
Expose scan box settings and preserve keyboard selection focus
senegrom Sep 8, 2026
ee82dc0
Stop stale camera capture and preserve initializing solvers across up…
senegrom Sep 8, 2026
d013123
Pause solver update fixture without blocking service-worker activation
senegrom Sep 8, 2026
a41cb2a
Keep solver archives resolvable through existing tabs and controllers
senegrom Sep 8, 2026
cbeed32
Read update diagnostics after activation completes
senegrom Sep 8, 2026
ecc7c4c
Resolve historical solver requests throughout activation
senegrom Sep 8, 2026
68f90a2
Merge branch 'master' into browser-scanner
senegrom Sep 8, 2026
2155df9
Satisfy the pinned ruff rule set on the scanner branch
senegrom Sep 8, 2026
e74992b
Make the camera-lifecycle regression portable to WebKit without media…
senegrom Sep 9, 2026
5613728
Read every digit three times and let the readings vote
senegrom Sep 9, 2026
fa7feb6
Explain scans that read nothing, and announce updates at the top of t…
senegrom Sep 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
87 changes: 87 additions & 0 deletions .github/workflows/browser-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
name: Build and deploy phone scanner
on:
push:
branches: [browser-scanner]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: gridpuzzle-browser-pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.14'
- uses: actions/setup-node@v6
with:
node-version: '22'
- run: python -m pip install -e '.[dev]'
- name: Native adapter and full solver regressions
run: python -m pytest -q tests -m 'not slow'
- name: Geometry and model tests
run: node --test web/tests/*.test.js
- name: Build self-hosted application
run: python scripts/build_web.py
- name: Retain build for independent testing
uses: actions/upload-artifact@v7
with:
name: scanner-static-build
path: _site
retention-days: 7
- name: Install browser test runtime
run: |
npm install --no-save --package-lock=false --ignore-scripts playwright@1.63.0
npx playwright install --with-deps chromium webkit
- name: Cross-tab solver update regressions
run: node scripts/solver_update_regressions.cjs
- name: Chromium and mobile WebKit acceptance tests
run: node scripts/browser_smoke.cjs
- name: Scanner variation, review and real-newspaper regressions
run: |
node scripts/browser_regressions.cjs
node scripts/newspaper_regressions.cjs
- name: Upload screenshots and test report
if: always()
uses: actions/upload-artifact@v7
with:
name: browser-test-report
path: browser-artifacts
if-no-files-found: ignore
- name: Upload static Pages site
uses: actions/upload-pages-artifact@v3
with:
path: _site
configure:
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
steps:
- name: Check Pages configuration
id: pages
uses: actions/configure-pages@v6
- name: Explain the one-time repository setting
if: failure()
run: |
echo '::error::Pages is not enabled for Actions. A repository owner must set Settings > Pages > Source to GitHub Actions, then re-run this job. The workflow token cannot grant itself repository administration permission.'
deploy:
needs: [build, configure]
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
# The default github-pages environment may be restricted to the default
# branch. This branch has its own Pages environment so the deployment can
# originate from browser-scanner without weakening that default policy.
environment:
name: gridpuzzle-browser-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Publish the tested branch artifact
id: deployment
uses: actions/deploy-pages@v4
23 changes: 23 additions & 0 deletions .github/workflows/browser-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Browser branch tests
on:
pull_request:
permissions:
contents: read
concurrency:
group: browser-tests-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
unit:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: '22'
- name: Browser model, lifecycle and safety unit tests
run: node --test web/tests/*.test.js
- name: Check every browser module parses
run: find web -name '*.js' -not -path '*/vendor/*' -exec node --check {} \;
- name: Explain full-browser coverage
run: echo 'The browser-scanner push workflow is the single full Chromium/WebKit + Python deployment gate; PR CI intentionally avoids duplicating that expensive suite.'
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,11 @@ test.py
mypuz/
_test/
solve*.ipynb

# browser scanner build and acceptance outputs
node_modules/
_site/
_preview/
browser-artifacts/
# ruff
.ruff_cache/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 11 additions & 0 deletions Examples/BrowserScanner/Newspaper/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Real newspaper scanner fixtures

These are user-provided newspaper puzzle photographs from 2026-09-07, cropped to the puzzle grid and downsampled to keep the repository and browser regression suite small. They are real newsprint images, not generated OCR fixtures.

- `2026-09-07-sudoku.webp`: shaded 9×9 Sudoku with paper texture and uneven illumination.
- `2026-09-07-str8ts.webp`: 9×9 Str8ts with solid black separators, including numbered black cells.
- `ground-truth.json`: hand-checked printed clues and Str8ts black-cell geometry.

`scripts/newspaper_regressions.cjs` runs the production scanner and self-hosted Tesseract.js pipeline against both images in Chromium and WebKit. Wrong, missing, or invented clues are acceptable only when the corresponding cell is explicitly flagged for review. The suite also enforces minimum correct-transcription counts and exact Str8ts black-cell geometry.

The images live outside `web/`, so they are not shipped in the GitHub Pages application or included in the offline PWA bundle.
37 changes: 37 additions & 0 deletions Examples/BrowserScanner/Newspaper/ground-truth.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"fixtures": [
{
"name": "2026-09-07-sudoku",
"image": "2026-09-07-sudoku.webp",
"type": "sudoku",
"cells": [
null, null, null, null, 8, null, null, 3, null,
8, null, null, 7, null, null, null, null, null,
null, null, null, 9, null, 5, null, null, 4,
null, null, null, 2, 9, null, 7, null, null,
7, null, null, 8, 3, null, null, 2, 5,
null, 1, null, null, null, null, 4, 9, null,
null, null, null, null, null, null, null, 5, null,
null, 8, null, null, 4, null, null, null, null,
2, 3, null, null, null, 7, null, null, null
]
},
{
"name": "2026-09-07-str8ts",
"image": "2026-09-07-str8ts.webp",
"type": "str8ts",
"black": [2, 3, 7, 8, 18, 19, 22, 23, 30, 35, 38, 42, 45, 50, 57, 58, 61, 62, 72, 73, 77, 78],
"cells": [
9, null, "#", 6, null, null, null, "#", "#",
null, null, null, 1, 4, null, 6, 5, null,
"#", "#", null, 2, "#", "#", null, null, null,
3, null, null, "#", 9, null, null, null, 5,
null, null, "#", 8, null, null, "#", null, null,
"#", null, null, null, null, 1, null, null, null,
null, 7, null, 9, "#", null, 3, 2, "#",
null, null, null, 4, null, 5, null, null, 8,
7, "#", null, null, null, "#", "#", null, null
]
}
]
}
Loading
Loading