Repository navigation
Preview harness: find Chromium on Linux and Windows - #154
Merged
juancguerrerodev merged 7 commits intoNov 28, 2026
Merged
juancguerrerodev merged 7 commits into
juancguerrerodev merged 7 commits into
Conversation
Abraham2106
marked this pull request as ready for review
November 27, 2026 22:50
…odingLabs#146) Signed-off-by: daocuong11 <ldcuong11@gmail.com>
browser.test.mjs gives findChromium() a made-up disk and checks each system's cache folder and executable, PLAYWRIGHT_BROWSERS_PATH, HERMIT_PREVIEW_CHROMIUM, revisions compared as numbers, the fallback when a revision is incomplete, and the message when nothing is found. Run it with: node --test apps/mobile/preview/browser.test.mjs Signed-off-by: Abraham2106 <165726674+Abraham2106@users.noreply.github.com>
…eenshots shoot.mjs, clips.mjs and words.mjs looked for a headless Chromium only in the Apple silicon folder of Playwright's macOS cache, so the harness ran on no other system. They now share apps/mobile/preview/browser.mjs, which uses HERMIT_PREVIEW_CHROMIUM first, then the newest chromium_headless_shell in Playwright's cache for the system it runs on (comparing revision numbers, not text), and otherwise stops with a message that names the variable. It never downloads a browser. mascot/proof.mjs keeps its own full Chrome lookup. CONTRIBUTING.md gains "Screenshots for a UI change": the install command (pnpm install --ignore-workspace), build, shoot with a filter, where the pictures land, how to add a shot and how to point the harness at a browser. build.mjs points there instead of a README that doesn't exist. Refs DojoCodingLabs#18 Signed-off-by: Abraham2106 <165726674+Abraham2106@users.noreply.github.com>
Without them the build warns that it can't find expo/tsconfig.base, which the app's tsconfig.json extends. Refs DojoCodingLabs#18 Signed-off-by: Abraham2106 <165726674+Abraham2106@users.noreply.github.com>
…s again The app now imports applyBiometricName (_layout.tsx) and pauseDownloadWhenLeaving (download.tsx), and the preview's stand-in for src/adapters had neither, so pnpm build stopped with "No matching export". Both are no-ops in the preview: the copy keeps its default biometric name, and there is no download to pause. Signed-off-by: Abraham2106 <165726674+Abraham2106@users.noreply.github.com>
juancguerrerodev
force-pushed
the
fix/preview-browser-lookup
branch
from
November 28, 2026 22:56
9ccf1a4 to
5335108
Compare
Contributor
|
Merged, thanks, Abraham! And good catch on the two missing stubs: main had broken the harness build, and this put it back. Contributors on Linux and Windows can take screenshots now. 🦀 |
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.
What and why
Closes #18
The preview harness found a browser only on an Apple silicon Mac.
shoot.mjs,clips.mjsandwords.mjsnow shareapps/mobile/preview/browser.mjs:HERMIT_PREVIEW_CHROMIUMfirst, then the newestchromium_headless_shell-*in Playwright's cache for the current system, and otherwise a message that names the variable. It never downloads a browser, andmascot/proof.mjsis unchanged. CONTRIBUTING.md gains "Screenshots for a UI change", andbuild.mjspoints there.Vision fit
Open development (ROADMAP.md, Now): contributors on Linux and Windows can take the screenshots AGENTS.md asks for.
Non-negotiables
Checklist
acceptedproposal.browser.test.mjs, 17 tests, is the first commit and fails there. Run it withnode --test apps/mobile/preview/browser.test.mjs.)pnpm check:privacy,pnpm typecheck,pnpm lint,pnpm testandnode scripts/guard/check.mjs --patterns scripts/guard/patterns.txt. (On Ubuntu; see Tried on for Windows.)packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes. (n/a: no UI strings.)Model path
packages/model,agent,skillsoreval, the prompt, the router, tool descriptions, normalizers, examples or the model file.Screenshots
New dependencies and network calls
n/a
AI agents
Tried on
pnpm build+pnpm shoot aboutwrite About's 4 pictures with no errors.pnpm testfails there for reasons already onmain(paths fromURL().pathname, CRLF checkouts), unrelated to this.HERMIT_PREVIEW_CHROMIUM, it stops with a message that names the variable.Install:
pnpm install --ignore-workspaceinapps/mobile/preview, afterpnpm installat the root.Notes
main, the harness build fails because iOS: a stopped model download resumes from NSURLSession's resume data (#127) #132 and iOS: permission prompts in both languages, and copy that says Face ID or Touch ID #135 addedpauseDownloadWhenLeavingandapplyBiometricNameto the adapters but not to the preview stubs. The last commit adds both as no-ops, so this issue's "Done when" can pass. It also fixes one test path for Windows. I can split the stubs out if you prefer.docs/build/open-questions.mdstill mentionsdocs/previewin a resolved log entry; I left that history as it is.