Feat braille and latex side by side and in sync - #12
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the web editor so the Braille pane is edited/stored as NABCC ASCII (instead of Unicode braille glyphs) to improve screen-reader braille display compatibility (per Issue #11), while keeping the Braille↔LaTeX panes side-by-side and synchronized. It also adds an OCR-based import path for photos of physical braille pages, including model-fetching/build plumbing and CI pinning for local file dependencies.
Changes:
- Switch Braille pane canonical/editable content to NABCC ASCII and add in-UI NVDA setup instructions.
- Add photo OCR upload path via a dedicated web worker (onnxruntime-web + brailleocr-web).
- Add build-time model fetching and update CI workflows to clone pinned upstream tags for local dependencies.
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.js | Excludes onnxruntime-web from Vite pre-bundling to avoid dev-server wasm URL issues. |
| src/routes/+page.svelte | Updates Braille pane to NABCC ASCII, adds NVDA instructions, and adds file upload dispatch for BRF/BRL vs image OCR. |
| src/lib/sync.svelte.js | Removes Unicode-glyph display transform so sync operates directly on ASCII braille in the Braille pane. |
| src/lib/ocr/ocrWorker.js | Adds a dedicated worker that runs the OCR pipeline and returns Unicode braille text. |
| src/lib/ocr/ocrClient.js | Adds the main-thread worker wrapper and model URL resolution. |
| src/lib/ocr/imageDecode.js | Adds worker-side image decode into the tensor layout expected by the OCR pipeline. |
| scripts/fetch-models.mjs | Adds a build-time script to download ONNX models into static/models/. |
| pnpm-lock.yaml | Locks new deps (onnxruntime-web, local brailleocr-web) and transitive packages. |
| package.json | Adds deps and ensures dev/build fetch both liblouis assets and OCR models. |
| dataset.version | Pins the dataset tag used to fetch OCR model files. |
| brailleocr.version | Pins the brailleocr tag that CI clones for the local file dependency. |
| braille2latex.version | Pins the braille2latex tag that CI clones for the local file dependency. |
| .gitignore | Ignores generated static/models/ outputs. |
| .github/workflows/test.yml | Updates CI to clone pinned braille2latex and brailleocr tags. |
| .github/workflows/lint.yml | Updates CI to clone pinned braille2latex and brailleocr tags. |
| .github/workflows/deploy.yml | Updates deploy workflow to clone pinned deps before build. |
| .github/workflows/check-brailleocr-release.yml | Adds scheduled workflow to detect when brailleocr.version is behind upstream. |
| .github/workflows/check-braille2latex-release.yml | Adds scheduled workflow to detect when braille2latex.version is behind upstream. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…ide-and-in-sync' into feat-braille-and-latex-side-by-side-and-in-sync
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.
Fixes #11