Skip to content

Ask for a star or a coffee when a tool delivers - #91

Merged
aghyad97 merged 3 commits into
mainfrom
feat/support-receipt
Aug 7, 2026
Merged

aghyad97 merged 3 commits into
mainfrom
feat/support-receipt

Conversation

@aghyad97

@aghyad97 aghyad97 commented Aug 6, 2026

Copy link
Copy Markdown
Owner

Three changes.

Support receipt. Every tool saves through src/lib/download.ts, so that one pathway now publishes a result and a receipt prints what the browser actually measured: filename, byte count, and 0 bytes uploaded for on-device tools. Only measured values render. The Star and Coffee links show on every receipt, gated only by a permanent dismissal; it always auto-hides, and the timer pauses on hover and focus. While the ask is up the top bar's coffee pill stands down, keeping one coffee CTA per screen. Adds a closing block on the landing and one line near the top of the README.

Background removal was broken for everyone. imgly's onnxruntime-web peer resolved to 1.26.0-dev after deduping with the copy Transformers.js pulls, while imgly still fetches wasm built against 1.21.0. Newer JS calling older wasm exports failed on the session-creation path, so it broke with or without WebGPU. Fixed with an npm alias plus a webpack redirect scoped to imgly's issuer, because Transformers.js needs 1.26.0-dev and vits-web needs 1.18.0.

Background-removal card. The card is 184px wide, so status + Download + delete never fit on one line. Delete moves to an overlay on the thumbnail, status becomes a dot on the filename line, Download gets the foot.

Strings translated across all 17 locales. Arabic and Persian opt out of the mono/uppercase/letter-spacing treatment, since letter-spacing breaks Arabic joining; filenames and byte counts are isolated as LTR runs so they do not reorder in an RTL line.

Verified in a browser at 390 / 1280 / 1440 / 1680, light and dark, LTR and RTL. Typecheck clean, 1357 tests, 0 lint errors.

Note: bun install needed after pulling.

The installed peer resolved to 1.26.0-dev after deduping with the copy
@huggingface/transformers pulls, while imgly still fetches its wasm and model
from background-removal-data/1.7.0, which is built against 1.21.0. The newer JS
called wasm exports the older binary does not have, so background removal failed
for everyone: 'webgpuInit is not a function' where WebGPU is available and
'_OrtGetInputOutputMetadata is not a function' where it is not. Both are on the
session-creation path, so a CPU fallback would not have helped.

onnxruntime-web-imgly is an npm alias of 1.21.0, and a NormalModuleReplacement
rewrites onnxruntime-web requests only when the issuer is inside imgly. It has
to be scoped: transformers needs 1.26.0-dev and vits-web needs 1.18.0, so all
three consumers keep their own copy. bun 1.1.26 supports neither scoped
resolutions nor nested overrides, which is why this lives in webpack config.
Every tool saves through src/lib/download.ts, so that single pathway now
publishes a result and a receipt prints the facts the browser actually
measured: filename, byte count, and '0 bytes uploaded' for on-device tools.
Only measured values render; downloadUrl and downloadDataUrl cannot know a size
and stay silent rather than guess. Star count is live from the GitHub API and
hidden on failure.

The links show on every receipt, gated only by a permanent dismissal. It always
auto-hides, and the timer pauses on hover and focus so it cannot vanish
mid-reach. While the ask is up the top bar's coffee pill stands down, keeping
one coffee CTA per screen.

Also adds a closing block on the landing asking for a star, and one line near
the top of the README. Strings are translated across all 17 locales. Arabic and
Persian opt out of the mono, uppercase and letter-spacing treatment, since
letter-spacing breaks Arabic joining and the mono stack has no coverage for
those scripts; filenames and byte counts are isolated as LTR runs so they do
not reorder inside an RTL line.
The card is 184px wide with 12px padding, so a status label, a Download button
and a delete button never fit on one line. Delete moves to an always-visible
overlay on the thumbnail, status becomes a coloured dot on the filename line,
and Download gets the foot to itself. The visible status label is dropped once
Download exists, since the button's presence already says it, and is kept for
screen readers.
@vercel

vercel Bot commented Aug 6, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
browserytools Ready Ready Preview Aug 6, 2026 7:21pm

Request Review

@aghyad97
aghyad97 enabled auto-merge (squash) August 6, 2026 19:31
@aghyad97 aghyad97 closed this Aug 7, 2026
auto-merge was automatically disabled August 7, 2026 05:15

Pull request was closed

@aghyad97 aghyad97 reopened this Aug 7, 2026
@aghyad97
aghyad97 merged commit 00e8d94 into main Aug 7, 2026
4 checks passed
@aghyad97
aghyad97 deleted the feat/support-receipt branch August 7, 2026 09:46

This branch was successfully deployed

1 active deployment
Preview — ef1b8b1c Deployed Aug 6, 2026 by vercel[bot]
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.

1 participant