[PR #1588] [MERGED] [codex] Restore haptic controls #5126

Closed
opened 2026-10-22 04:13:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/1588
Author: @Xelvanis
Created: 5/29/2026
Status: ✅ Merged
Merged: 5/29/2026
Merged by: @Xelvanis

Base: refactor ← Head: restore/knip-haptic-controls


📝 Commits (3)

  • c51c873 Restore haptic stop controls
  • 85e232d Handle haptic action failures
  • dbf9486 Bypass haptic rate limit for stops

📊 Changes

3 files changed (+270 additions, -21 deletions)

View changed files

📝 src-tauri/src/commands/storage/integrations/haptic.rs (+60 -11)
➕ src/features/modes/shared/chat-ui/components/settings/HapticConnectionPanel.test.tsx (+141 -0)
📝 src/features/modes/shared/chat-ui/components/settings/HapticConnectionPanel.tsx (+69 -10)

📄 Description

Linked issue

Part of #1566

Why this change

  • Restores the practical haptic control wiring surfaced by the Knip restore pass so connected Intiface devices can be scanned, stopped individually, and stopped as a group from the chat settings panel.
  • Hardens the failure path so haptic action errors are shown instead of disappearing silently.
  • Fixes the native command path so manual stop commands are not blocked by the normal haptic command rate limit.

What changed

  • Restored Stop scan, Stop all, and per-device Stop controls in the haptic settings panel.
  • Added panel-level action error state that clears on retry and displays the most recent haptic action failure.
  • Added component coverage for restored scan/stop routing and haptic action failure display.
  • Updated the Rust haptic command handler so action: "stop" bypasses the command throttle while non-stop commands remain rate-limited.
  • Added Rust unit coverage for stop-vs-non-stop rate-limit behavior.

Refactor impact

Primary owner:

  • Shared mode UI haptic settings and Rust haptic integration command handling.

Impact areas reviewed:

  • features/modes/shared/chat-ui haptic settings panel behavior.
  • features/runtime/haptics hook contracts.
  • src/shared/api/haptics-api.ts command wrapper contract.
  • src-tauri/src/commands/storage/integrations/haptic.rs native haptic command behavior.

Boundary notes:

  • UI remains in src/features; it uses the existing runtime haptics hooks and focused shared API wrapper.
  • No engine imports or raw Tauri calls were added from feature code.
  • Rust owns the privileged Intiface command behavior and rate-limit enforcement.
  • Haptic commands remain local-only in the existing Tauri path; no remote-runtime allowlist changes were made.

Pressure points touched:

  • Shared mode UI settings component.
  • Rust integrations command implementation.

Validation

  • pnpm check passes locally
  • pnpm typecheck passes locally
  • pnpm build passes locally
  • pnpm check:architecture passes locally
  • pnpm check:docs passes locally
  • cargo check --manifest-path src-tauri/Cargo.toml --workspace passes locally
  • Rust clippy/tests were run for Rust behavior changes
  • Browser or Tauri app manual verification completed
  • Playwright, screenshot, or recording evidence added for UI changes
  • Remote runtime smoke checked when relevant

Manual verification notes

Commands run locally:

  • pnpm test -- src/features/modes/shared/chat-ui/components/settings/HapticConnectionPanel.test.tsx
  • pnpm test -- src/shared/api/haptics-api.test.ts
  • cargo test --manifest-path src-tauri/Cargo.toml haptic --lib
  • cargo check --manifest-path src-tauri/Cargo.toml
  • pnpm typecheck
  • pnpm lint:eslint
  • pnpm check:architecture
  • pnpm check:unused
  • pnpm build
  • git diff --check

Manual Tauri + real Intiface device QA was not run.

Docs and release impact

  • No docs changes needed
  • Updated README.md
  • Updated CONTRIBUTING.md
  • Updated docs/developer/
  • Updated repo skills or AGENTS.md
  • Confirmed this PR does not restore old staging/package-workspace/release claims

No docs changes were made; this is a focused restore/failure-path hardening slice for existing haptic controls.

UI evidence

No screenshots or recordings added; native Intiface device QA remains manual.

Summary by CodeRabbit

Release Notes

  • New Features

    • Added "Stop all" button to simultaneously control multiple haptic devices.
    • Added ability to cancel device scanning with "Stop scan" toggle.
    • Improved error messaging for failed haptic actions with centralized feedback.
  • Tests

    • Added comprehensive test suite for haptic connection controls.

Review Change Stack


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/1588 **Author:** [@Xelvanis](https://github.com/Xelvanis) **Created:** 5/29/2026 **Status:** ✅ Merged **Merged:** 5/29/2026 **Merged by:** [@Xelvanis](https://github.com/Xelvanis) **Base:** `refactor` ← **Head:** `restore/knip-haptic-controls` --- ### 📝 Commits (3) - [`c51c873`](https://github.com/Pasta-Devs/Marinara-Engine/commit/c51c87329f48d5c38a326ce9cb8477750a7d0093) Restore haptic stop controls - [`85e232d`](https://github.com/Pasta-Devs/Marinara-Engine/commit/85e232dcd635f2555c472d41e88baff1cbb699f5) Handle haptic action failures - [`dbf9486`](https://github.com/Pasta-Devs/Marinara-Engine/commit/dbf948636a2f0092a92dcc67c99070344b2e0d11) Bypass haptic rate limit for stops ### 📊 Changes **3 files changed** (+270 additions, -21 deletions) <details> <summary>View changed files</summary> 📝 `src-tauri/src/commands/storage/integrations/haptic.rs` (+60 -11) ➕ `src/features/modes/shared/chat-ui/components/settings/HapticConnectionPanel.test.tsx` (+141 -0) 📝 `src/features/modes/shared/chat-ui/components/settings/HapticConnectionPanel.tsx` (+69 -10) </details> ### 📄 Description ## Linked issue Part of #1566 ## Why this change - Restores the practical haptic control wiring surfaced by the Knip restore pass so connected Intiface devices can be scanned, stopped individually, and stopped as a group from the chat settings panel. - Hardens the failure path so haptic action errors are shown instead of disappearing silently. - Fixes the native command path so manual stop commands are not blocked by the normal haptic command rate limit. ## What changed - Restored `Stop scan`, `Stop all`, and per-device `Stop` controls in the haptic settings panel. - Added panel-level action error state that clears on retry and displays the most recent haptic action failure. - Added component coverage for restored scan/stop routing and haptic action failure display. - Updated the Rust haptic command handler so `action: "stop"` bypasses the command throttle while non-stop commands remain rate-limited. - Added Rust unit coverage for stop-vs-non-stop rate-limit behavior. ## Refactor impact Primary owner: - Shared mode UI haptic settings and Rust haptic integration command handling. Impact areas reviewed: - `features/modes/shared/chat-ui` haptic settings panel behavior. - `features/runtime/haptics` hook contracts. - `src/shared/api/haptics-api.ts` command wrapper contract. - `src-tauri/src/commands/storage/integrations/haptic.rs` native haptic command behavior. Boundary notes: - UI remains in `src/features`; it uses the existing runtime haptics hooks and focused shared API wrapper. - No engine imports or raw Tauri calls were added from feature code. - Rust owns the privileged Intiface command behavior and rate-limit enforcement. - Haptic commands remain local-only in the existing Tauri path; no remote-runtime allowlist changes were made. Pressure points touched: - Shared mode UI settings component. - Rust integrations command implementation. ## Validation - [ ] `pnpm check` passes locally - [ ] `pnpm typecheck` passes locally - [ ] `pnpm build` passes locally - [ ] `pnpm check:architecture` passes locally - [ ] `pnpm check:docs` passes locally - [ ] `cargo check --manifest-path src-tauri/Cargo.toml --workspace` passes locally - [ ] Rust clippy/tests were run for Rust behavior changes - [ ] Browser or Tauri app manual verification completed - [ ] Playwright, screenshot, or recording evidence added for UI changes - [ ] Remote runtime smoke checked when relevant ### Manual verification notes Commands run locally: - `pnpm test -- src/features/modes/shared/chat-ui/components/settings/HapticConnectionPanel.test.tsx` - `pnpm test -- src/shared/api/haptics-api.test.ts` - `cargo test --manifest-path src-tauri/Cargo.toml haptic --lib` - `cargo check --manifest-path src-tauri/Cargo.toml` - `pnpm typecheck` - `pnpm lint:eslint` - `pnpm check:architecture` - `pnpm check:unused` - `pnpm build` - `git diff --check` Manual Tauri + real Intiface device QA was not run. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated `README.md` - [ ] Updated `CONTRIBUTING.md` - [ ] Updated `docs/developer/` - [ ] Updated repo skills or `AGENTS.md` - [ ] Confirmed this PR does not restore old staging/package-workspace/release claims No docs changes were made; this is a focused restore/failure-path hardening slice for existing haptic controls. ## UI evidence No screenshots or recordings added; native Intiface device QA remains manual. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Release Notes * **New Features** * Added "Stop all" button to simultaneously control multiple haptic devices. * Added ability to cancel device scanning with "Stop scan" toggle. * Improved error messaging for failed haptic actions with centralized feedback. * **Tests** * Added comprehensive test suite for haptic connection controls. <!-- review_stack_entry_start --> [![Review Change Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/Pasta-Devs/Marinara-Engine/pull/1588?utm_source=github_walkthrough&utm_medium=github&utm_campaign=change_stack) <!-- review_stack_entry_end --> <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-22 04:13:33 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#5126
No description provided.