mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #1456] [MERGED] Add haptics API wrapper #5096
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#5096
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/1456
Author: @Xelvanis
Created: 5/28/2026
Status: ✅ Merged
Merged: 5/28/2026
Merged by: @Xelvanis
Base:
refactor← Head:chore/raw-invoketauri-haptics📝 Commits (2)
b7b2054Add haptics API wrapper5903c4fCover local-only haptic routing📊 Changes
5 files changed (+95 additions, -10 deletions)
View changed files
📝
src/features/runtime/haptics/hooks/use-haptic.ts(+8 -8)➕
src/shared/api/haptics-api.test.ts(+48 -0)➕
src/shared/api/haptics-api.ts(+13 -0)📝
src/shared/api/integration-gateway.ts(+3 -2)📝
src/shared/api/tauri-client.test.ts(+23 -0)📄 Description
Linked issue
Refs #1457
Why this change
Feature/runtime haptics were still calling raw Tauri commands directly. This moves those calls behind a focused shared API wrapper so feature code uses the same boundary pattern as the rest of the refactor lane.
What changed
src/shared/api/haptics-api.tsfor haptic status, connection, scan, command, stop-scan, and stop-all calls.hapticsApiinstead of importinginvokeTauridirectly.Refactor impact
tauri-client;hapticsApiowns raw invoke calls; haptic commands remain desktop-native/local-only and are not added to the remote runtime allowlist; engine code continues using the integration port throughintegrationGateway.Validation
pnpm typecheckpnpm buildcargo check --manifest-path src-tauri/Cargo.tomlpnpm check:architecturepnpm exec vitest run src/shared/api/haptics-api.test.ts src/shared/api/tauri-client.test.tsManual verification notes
Run locally before opening this draft:
pnpm exec vitest run src/shared/api/haptics-api.test.ts src/shared/api/tauri-client.test.ts- 2 files, 13 tests passed.pnpm typecheck- passed.pnpm check:architecture- passed.git diff --check- passed.Test intent gate: added tests are intentional.
haptics-api.test.tspins the wrapper command names and payload shape; the widenedtauri-client.test.tsnegative control keeps every haptic command local-only under remote runtime configuration.Docs and release impact
No changelog update made: this repository has no
CHANGELOG.md, and the change is an internal adapter migration with no intended user-visible behavior change.No documentation update needed for the same reason.
UI evidence
No UI evidence attached; this branch does not intentionally change visible UI.
Summary by CodeRabbit
Tests
Chores
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.