Fix/favicon generator - #344
Merged
Merged
Conversation
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
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
ThreatCrush Security Scan1 finding(s) MEDIUM: 1
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
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.
No description provided.