Skip to content

Add tactile consent feedback to the iOS app (haptics + press style) - #79

Merged
mohabbis merged 1 commit into
mainfrom
claude/ui-ux-improvements-z1gznr
Jul 15, 2026
Merged

Add tactile consent feedback to the iOS app (haptics + press style)#79
mohabbis merged 1 commit into
mainfrom
claude/ui-ux-improvements-z1gznr

Conversation

@mohabbis

Copy link
Copy Markdown
Owner

A focused UX pass on the iOS app. Lumen's whole identity is consent-before-action and calm, Apple-tier polish — but the app had no haptic feedback anywhere and no press feedback on buttons. This adds a small, centralized tactile layer at the moments that matter, so approving something actually feels like a deliberate, confirmed action.

What changed

New (Lumen/Support/)

  • LumenHaptics — a @MainActor enum that is the single place that speaks to the Taptic Engine (success / warning / error / selection / impact). All feedback is suppressed under XCTest so headless unit runs stay silent, matching the XCTestConfigurationFilePath guard already used in RootView.
  • PressableButtonStyle.buttonStyle(.pressable): the label eases down slightly and dims while pressed, honoring Reduce Motion (drops the scale, keeps the gentle dim).

Wired into the consent path (view models are the single source of truth for user-initiated actions, so automated geofence/schedule runs deliberately stay silent):

  • SceneViewModel.execute — success / error haptic on a scene run.
  • SceneViewModel.toggleFavorite — a selection tick.
  • HomeViewModel.executeScene — success / error haptic on the dashboard "Apply".
  • HomeDashboardView — a soft bump only on an actual arrival/departure change (not on every screen appearance).
  • SceneApprovalSheet + LumenActionView "Apply" CTAs — .pressable press feel.

TestsLumenTests/LumenHapticsTests.swift asserts the XCTest guard disables haptics and that every entry point is a safe no-op while disabled.

A note on verification

This session ran on Linux, where the iOS target cannot be compiled or run (xcodebuild / the Simulator need macOS + Xcode). These changes were made by reasoning about the source and deliberately follow the repo's existing patterns:

  • New files land under the synchronized-folder targets (Lumen/, LumenTests/), so they're picked up automatically without editing project.pbxproj.
  • The helper uses stable UIKit feedback generators and is @MainActor; every call site is already on the main actor.
  • The XCTest no-op guard means the existing suite (and the new tests) never touch the Taptic Engine.

Please build and run in Xcode to confirm the feel before merging — I couldn't exercise it here.

🤖 Generated with Claude Code

https://claude.ai/code/session_01PE4HFdLKjK4er6BBAgbgrb


Generated by Claude Code

Lumen's identity is consent-before-action and calm, Apple-tier polish, but
the app had no haptic feedback anywhere and no press feedback on buttons.
This adds a small, centralized tactile layer at the moments that matter.

New (Lumen/Support/):
- LumenHaptics: a @mainactor enum that is the single place that speaks to
  the Taptic Engine — success / warning / error / selection / impact. All
  feedback is suppressed under XCTest so headless unit runs stay silent.
- PressableButtonStyle: a `.buttonStyle(.pressable)` that eases the label
  down and dims it while pressed, honoring Reduce Motion (drops the scale).

Wired into the consent path (view models are the single source of truth for
user-initiated actions, so automated geofence/schedule runs stay silent):
- SceneViewModel.execute: success/error haptic on scene run.
- SceneViewModel.toggleFavorite: selection tick.
- HomeViewModel.executeScene: success/error haptic on the dashboard apply.
- HomeDashboardView: soft bump only on an actual arrival/departure change.
- SceneApprovalSheet + LumenActionView "Apply" CTAs: `.pressable` press feel.

Tests (LumenTests/LumenHapticsTests.swift): assert the XCTest guard disables
haptics and that every entry point is a safe no-op while disabled.

Note: this environment is Linux, so the iOS target could not be compiled or
run here — changes were made by reasoning about the source and follow the
repo's existing patterns (synchronized-folder targets, pure/testable helpers,
the XCTest env guard used in RootView). Build and run in Xcode to verify feel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PE4HFdLKjK4er6BBAgbgrb
@vercel

vercel Bot commented Jul 15, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
lumen-idpz Ready Ready Preview, Comment Jul 15, 2026 12:21am

@mohabbis
mohabbis marked this pull request as ready for review July 15, 2026 00:25
@mohabbis
mohabbis merged commit ce41d2a into main Jul 15, 2026
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.

2 participants