mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1460] [MERGED] Add URL binary API wrapper #5100
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#5100
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1460
Author: @Xelvanis
Created: 5/28/2026
Status: ✅ Merged
Merged: 5/28/2026
Merged by: @Xelvanis
Base:
refactor← Head:chore/raw-invoketauri-url-binary📝 Commits (2)
da33248Add URL binary API wrapper1659e5eHarden URL binary failure paths📊 Changes
5 files changed (+196 additions, -13 deletions)
View changed files
📝
src/shared/api/tauri-client.test.ts(+2 -1)➕
src/shared/api/url-binary-api.test.ts(+59 -0)➕
src/shared/api/url-binary-api.ts(+60 -0)➕
src/shared/lib/url-blob.test.ts(+73 -0)📝
src/shared/lib/url-blob.ts(+2 -12)📄 Description
Linked issue
Part of #1457
Why this change
src/shared/lib/url-blob.tsstill calledinvokeTauri("load_url_binary")directly. That kept the URL-binary command name, payload shape, response decoding, and malformed-response behavior inside a broad shared utility instead of a focused shared API wrapper.This slice moves that command contract into
src/shared/api, where remote-capable Tauri command wrappers belong, and adds failure-path coverage for the binary response contract.What changed
src/shared/api/url-binary-api.tsfor theload_url_binarycommand.src/shared/lib/url-blob.tsto callurlBinaryApi.load(...)instead of rawinvokeTauri.url-blobtests for data URLs, non-GET rejection, remote wrapper calls, caller error copy, array-buffer conversion, andurlToDataUrlpassthrough.load_url_binaryin the sharedinvokeTaurirouting test.Refactor impact
Primary owner:
Shared API wrapper / frontend shared URL helper.
Impact areas reviewed:
src/shared/api/url-binary-api.tssrc/shared/lib/url-blob.tssrc/shared/api/tauri-client.test.tsload_url_binaryloadUrlBlob,loadUrlArrayBuffer, andurlToDataUrlBoundary notes:
tauri-client.tsdirectly.load_url_binarywas already remote-capable throughremote-runtime.tsandsrc-tauri/src/http_dispatch.rs; this PR adds frontend routing coverage for that expectation.Pressure points touched:
Validation
pnpm checkpasses locallypnpm typecheckpasses locallypnpm buildpasses locallypnpm check:architecturepasses locallypnpm check:docspasses locallycargo check --manifest-path src-tauri/Cargo.toml --workspacepasses locallyManual verification notes
Agent-run local proof:
pnpm vitest run src/shared/api/url-binary-api.test.ts src/shared/lib/url-blob.test.ts src/shared/api/tauri-client.test.tspassed.pnpm checkpassed, including architecture, frontend typecheck, Rust check, and docs.pnpm testpassed: 49 test files, 315 tests.git diff --checkpassed.Not run:
Docs and release impact
README.mdCONTRIBUTING.mddocs/developer/AGENTS.mdNo docs changes were made. This is an internal shared API wrapper migration slice with test coverage and no user-facing copy change.
UI evidence
No UI screenshots. There is no visible UI change.
Summary by CodeRabbit
Tests
Refactor
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.