Repository navigation
Conversation
The camera previously behaved like a page on the navigator stack: Scanner.tsx drew its own header with a back button, callers swapped their whole screen for it, and the Scan quick actions pushed SendForm onto the stack with a sendInfo.scan flag just to open the camera there, breaking back navigation. The camera now lives on top of a modal (fixes #742): - Scanner.tsx is a pure camera view (video + decode engines only); it also now stops the camera on unmount for all engines. - New ScanModal component: portal-based full-screen modal (role=dialog, slide-up animation, reduced-motion fallback, Escape and explicit close/cancel to dismiss) that emits the sanitized capture through onCapture to the invoking component. - Send form, Notes form, Server settings and Asset import render the modal over the page instead of replacing it, so form state stays visible and back behaves. - Home and Bitcoin detail Scan actions open the modal in place; on capture they navigate to Send with the recipient prefilled via sendInfo.scannedData (replaces the sendInfo.scan hack). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EvXfpmSRpupgCShjckrn5d
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
arkana-ai-bot
left a comment
There was a problem hiding this comment.
This PR has been open for 30+ days without review. @tiero is anyone looking at this?
arkana-ai-bot
left a comment
There was a problem hiding this comment.
This PR has been open for 40+ days without review. @tiero is anyone looking at this?
|
This PR has been open for 50+ days without review. @tiero is anyone looking at this? |
Summary
This PR refactors the Scanner component to separate concerns between the camera capture logic and the modal UI wrapper. The Scanner component is now a pure camera view that only handles video capture and data reporting, while a new ScanModal component manages the modal chrome (header, buttons, implementation switching).
Key Changes
Scanner component refactored: Removed all modal UI elements (Header, Content, Buttons) and props related to modal management (close, label, onSwitch). Scanner now only renders the video feed and error state.
New ScanModal component: Created a new modal wrapper that handles:
Scanner implementation abstraction: Extracted scanner implementation types and utilities:
ScannerImplementationtype ('qr' | 'qrmini' | 'mills')scannerImplementationLabelmapping for UI displaynextScannerImplementationfunction for cycling through implementationscalculateMiniScanRegionfunction moved to module levelSimplified Scanner props: New minimal interface with only
implementation,onData, andonErrorUpdated all Scanner consumers: Replaced direct Scanner usage with ScanModal in:
Flow context update: Changed
SendInfo.scanboolean toSendInfo.scannedDatastring to pass captured data directlyImplementation Details
https://claude.ai/code/session_01EvXfpmSRpupgCShjckrn5d