Skip to content

Add prominent loading spinner to AI vial/syringe scanner#377

Draft
Copilot wants to merge 2 commits intomainfrom
copilot/fix-376
Draft

Add prominent loading spinner to AI vial/syringe scanner#377
Copilot wants to merge 2 commits intomainfrom
copilot/fix-376

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Sep 13, 2025

Enhanced the AI vial/syringe scanning functionality with a prominent loading indicator to improve user experience during scan processing. The existing loading state was functional but lacked visual feedback, causing users to potentially think the app was unresponsive during the AI analysis phase.

Changes Made

Enhanced Global Loading Overlay

Added a large white ActivityIndicator spinner to the global loading overlay that appears during AI scan processing:

// Before: Text-only loading
{isProcessing && (
  <View style={styles.loadingOverlay}>
    <Text style={styles.loadingText}>{processingMessage}</Text>
  </View>
)}

// After: Prominent spinner + enhanced text
{isProcessing && (
  <View style={styles.loadingOverlay}>
    <ActivityIndicator size="large" color="#fff" />
    <Text style={styles.loadingText}>{processingMessage}</Text>
  </View>
)}

Improved Typography and Messaging

  • Enhanced text styling: Increased font size to 18px, added medium font weight (500), and improved spacing
  • Better processing messages: More user-friendly messages throughout the scan workflow:
    • "Preparing your scan..." (initial state)
    • "Capturing photo..." (during photo capture)
    • "Processing image..." (during image processing)
    • "AI is analyzing your scan..." (during OpenAI analysis)

Maintained Existing Functionality

  • Preserves all existing button-level loading indicators in the scan screen
  • Keeps existing error handling and timeout mechanisms intact
  • No breaking changes to the scanning workflow

User Experience Benefits

  • Clear visual feedback during the AI processing phase prevents user confusion
  • Professional appearance with consistent loading patterns across the app
  • Trust and safety alignment with SafeDose's emphasis on clarity during safety-critical operations
  • Reduced perceived latency through immediate visual confirmation that processing is occurring

The changes are minimal and surgical, focusing specifically on enhancing the visual feedback during AI scan processing without modifying the core scanning logic or error handling.

Fixes #376.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • cdp.expo.dev
    • Triggering command: node /home/REDACTED/.npm/_npx/249ca9fcd30c476a/node_modules/.bin/expo export --platform web --non-interactive (dns block)

If you need me to access, download, or install something from one of these locations, you can either:


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel bot commented Sep 13, 2025

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

Project Deployment Preview Comments Updated (UTC)
safe-dose Ready Ready Preview Comment Sep 13, 2025 8:10pm

Co-authored-by: rodneyg <6868495+rodneyg@users.noreply.github.com>
Copilot AI changed the title [WIP] Add Loading State to AI Vial/Syringe Scanner Add prominent loading spinner to AI vial/syringe scanner Sep 13, 2025
Copilot AI requested a review from rodneyg September 13, 2025 20:10
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.

Add Loading State to AI Vial/Syringe Scanner

2 participants