Skip to content

Fix/favicon generator - #344

Merged
itsmeakhil merged 8 commits into
release-v0.1.18from
fix/favicon-generator
Sep 7, 2026
Merged

Fix/favicon generator#344
itsmeakhil merged 8 commits into
release-v0.1.18from
fix/favicon-generator

Conversation

@itsmeakhil

Copy link
Copy Markdown
Collaborator

No description provided.

dependabot Bot and others added 3 commits September 7, 2026 08:44
Bumps [@vercel/analytics](https://github.com/vercel/analytics/tree/HEAD/packages/web) from 1.6.1 to 2.0.1.
- [Release notes](https://github.com/vercel/analytics/releases)
- [Commits](https://github.com/vercel/analytics/commits/v2.0.1/packages/web)

---
updated-dependencies:
- dependency-name: "@vercel/analytics"
  dependency-version: 2.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
…vercel/analytics-2.0.1

chore(deps): Bump @vercel/analytics from 1.6.1 to 2.0.1
The Tauri webview registers no download handler, so wry answers every
`<a download>` navigation with WKNavigationActionPolicy::Cancel — the
anchor click file-saver performs is silently dropped and no file is ever
written. Both "Download favicon.ico" and "Download all (.zip)" (and the
per-size PNG links) did nothing in the shipped app.

Add `saveFile()`, which on desktop asks for a path with the native Save
dialog and writes the bytes with plugin-fs, and falls back to the anchor
download on web. The dialog grants the picked path into the fs scope, the
same pattern collection-files.ts already relies on; `fs:allow-write-file`
is added to the capability set so binary writes are permitted.

Also fixes a dead guard in downloadIco: `icon!.bytes` threw before the
`images.some((i) => !i.png)` check could run. buildIcoBytes() now returns
null when a size is still missing.

Failures surface as toasts instead of unhandled rejections, and the
previously hardcoded "Failed to load image" string goes through next-intl
with translations for all 27 locales.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S5dugrrsqWvHDSeVhgNhSU
@vercel

vercel Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated
mydevtools-tech Ready Ready Preview Sep 7, 2026 7:58pm UTC

@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown

ThreatCrush Security Scan

1 finding(s)

MEDIUM: 1

Severity Rule Location
MEDIUM js-unsafe-yaml-load apps/desktop-ui/src/lib/import/insomnia.ts:290

Snippets are redacted; ThreatCrush never prints matched credential material.

The Tauri webview registers no download handler, so wry cancels every
`<a download>` navigation — the same reason the favicon generator's
downloads did nothing. All 32 remaining tools that built an anchor by
hand (or called file-saver) were dead in the desktop app for exactly
that reason: exports from Base64, UUID, SVG optimizer, gitignore, Docker
Compose, notes, bookmarks, tasks, the password vault, the API client,
S3 Drive, the data explorers, and the rest.

Move all 41 call sites onto downloadFile(), the fire-and-forget wrapper
around saveFile() — native Save dialog plus a plugin-fs write on
desktop, anchor download on web — so a failed write surfaces as a toast
rather than an unhandled rejection.

saveFile now takes a Blob or ArrayBuffer as well as bytes or a string,
which is what most call sites already had in hand. Two exports that read
back a canvas as a data: URL (code screenshot, gradient wallpaper) now
take the toBlob path instead, and file-saver is dropped as a dependency
now that nothing imports it.

Covered by src/lib/desktop/__tests__/save-file.test.ts: filename, byte
fidelity, Blob passthrough and the failure toast.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S5dugrrsqWvHDSeVhgNhSU
CI installs with --frozen-lockfile, which fails while pnpm-lock.yaml
still lists file-saver and @types/file-saver as desktop-ui specifiers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S5dugrrsqWvHDSeVhgNhSU
Removes the Download button from the JSON Schema generator along with the
handler, the FILE_EXT table it was the only user of, and the now-dead
`download` key in all 27 locales. Copy and Clear are untouched.

The previous sweep searched only src/components and src/app, so 17 more
downloads were left broken in the desktop app for the same reason (wry
cancels the anchor navigation):

* 10 hand-built anchors under src/lib — collection exports (Postman, HAR,
  Insomnia, OpenAPI, Postman environments), the JUnit run report, the
  encrypted backup, the JSON import/export helpers, and triggerDownload.
* 7 XLSX.writeFile calls, which build an anchor inside SheetJS — task
  export, email validator results and template, and the MongoDB
  csv/tsv/xlsx export.

triggerDownload is gone; its callers use downloadFile directly. Workbooks
go through the new downloadWorkbook(), which serializes with XLSX.write
and hands the bytes to downloadFile with the right mime type.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S5dugrrsqWvHDSeVhgNhSU
apps/desktop-ui has no HTTP API routes — `/api/v1/...` is only the Rust
local router's contract. Outside the Tauri window `apiFetch` fell through
to a plain fetch, so every data call hit Next's 404 page and `apiRequest`
threw the whole HTML document as its error message.

Return a 501 with a readable detail instead, and do the same for the
api-client proxy (which parsed that HTML with `res.json()`).

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S5dugrrsqWvHDSeVhgNhSU
The previous commit failed every `/api/...` path outside the Tauri window,
including `/api/proxy` and `/api/proxy-grpc` — those are real HTTP endpoints
and their transports are covered by tests that mock `fetch`, so 9 tests in
graphql-introspect, grpc-native and grpc-reflection broke.

Only `/api/v1/*` and `/api/backend/*` have no HTTP equivalent, so only those
fail fast now; everything else is a plain fetch pass-through again.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S5dugrrsqWvHDSeVhgNhSU
@itsmeakhil
itsmeakhil merged commit 0a2472a into release-v0.1.18 Sep 7, 2026
5 of 6 checks passed
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