Skip to content

Feat/ios restriction#32

Open
michael-on-code wants to merge 10 commits into
mainfrom
feat/ios-restriction
Open

Feat/ios restriction#32
michael-on-code wants to merge 10 commits into
mainfrom
feat/ios-restriction

Conversation

@michael-on-code

@michael-on-code michael-on-code commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Issue

https://github.com/iblai/iblai-platform/issues/805

Checklist

  • Tests were added/updated according to the feature/bugfix/change made
  • Version was rolled according to semver requirements
  • API endpoints openapi schema was updated if applicable

Changes

image

@michael-on-code michael-on-code added the run-tests Trigger PR validation pipeline label Mar 16, 2026
@claude

claude Bot commented Mar 16, 2026

Copy link
Copy Markdown

Code Quality Review

  • Quality: Clean, well-structured feature with good test coverage (71+ tests across new/modified files). Redux slice, modal, and hook all follow existing patterns consistently.
  • Issues: useOS in hooks/use-os.ts is not a true React hook (no useState/useEffect) — runs platform detection on every render. Renaming to a plain utility or wrapping with useMemo would be more accurate/efficient. Minor: duplicate useAppDispatch/useAppSelector import lines in user-user-actions.tsx.
  • Suggestions: Consider adding isAdmin to the useCallback deps array in use-402-error-check.ts (pre-existing gap, but isAppleDevice was correctly added). Hardcoded https://www.ibl.ai/pricing URL is acceptable for a stable external link.

Summary

Solid iOS restriction flow implementation with proper early-return logic and comprehensive tests. The useOS hook naming is a minor misnomer but causes no bugs; the feature logic and Redux integration are correct.

@claude

claude Bot commented Mar 16, 2026

Copy link
Copy Markdown

UI/UX Review

  • Accessibility: Modal uses semantic <Dialog>, <DialogTitle>, <DialogDescription> — good foundation. Focus trap behavior should be verified (ensure focus lands on the primary CTA on open). External link includes proper rel="noopener noreferrer" and target="_blank"
  • UX Concerns: No visible close (X) button — Escape is the only secondary dismiss path, which is not discoverable for touch/mouse users. Toast + modal stacking may feel abrupt; consider if the toast is necessary before the modal appears.
  • Suggestions: Add an accessible close icon button (aria-label="Close") for WCAG 2.1 AA compliance. Confirm focus is set to primary CTA on modal open. Verify ibl-button-primary meets 4.5:1 color contrast ratio.

Summary

Solid implementation with clear messaging and intentional flow for Apple device restrictions. The main gap is the missing close button — relying solely on Escape for dismissal hurts both accessibility compliance and mobile usability.

michael-on-code and others added 4 commits March 27, 2026 20:22
- Add on_navigation handler to intercept external URLs and open in Safari on iOS
- Register tauri_plugin_os in lib.rs for mobile builds
- Add isTauriApp() guard in use-os hook to prevent errors outside Tauri
- Update capabilities with OS permissions and opener URL allowlist
- Remove target="_blank" from pricing link (unsupported in WKWebView)
- Close modal when pricing link is clicked
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-tests Trigger PR validation pipeline

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants