Skip to content

Conversation

@devin-ai-integration
Copy link
Contributor

Summary

This PR activates the existing plugins/network infrastructure to disable the listen button when the user is offline and has selected a cloud-based STT model. Local models (Whisper Quantized*, Argmax am-*) will continue to work offline.

Changes:

  • Add NetworkProvider to main-app-layout.tsx to provide network status context
  • Expose isLocalModel from useSTTConnection hook (was already calculated internally)
  • Update useListenButtonState to check network status and disable button when offline with cloud model
  • Display warning message: "Network unavailable. Switch to a local model to continue."

Review & Testing Checklist for Human

  • Verify network detection works: Disconnect from network and confirm isOnline becomes false (the network plugin pings google.com/generate_204 every 2 seconds)
  • Test offline + cloud model: Select a cloud STT model (e.g., Deepgram, or hyprnote "cloud"), go offline, and verify the listen button is disabled with the warning tooltip
  • Test offline + local model: Select a local model (Quantized* or am-*), go offline, and verify the listen button remains enabled
  • Check for context errors: Ensure no crashes occur from useNetwork being called outside NetworkProvider - all listen button usages should be within MainAppLayout

Recommended test plan:

  1. Start the app with a cloud model selected
  2. Disconnect network (or use network throttling to simulate offline)
  3. Verify listen button shows disabled state with tooltip
  4. Switch to a local model in settings
  5. Verify listen button becomes enabled again

Notes

- Add NetworkProvider to main-app-layout.tsx to provide network status context
- Modify useSTTConnection to return isLocalModel flag
- Update useListenButtonState to disable listen button when offline and using cloud model
- Show appropriate warning message when network is unavailable

Co-Authored-By: yujonglee <[email protected]>
@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 11, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Dec 11, 2025

Deploy Preview for hyprnote-storybook ready!

Name Link
🔨 Latest commit f8faf82
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/693a5b1edbc046000897e08e
😎 Deploy Preview https://deploy-preview-2214--hyprnote-storybook.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@netlify
Copy link

netlify bot commented Dec 11, 2025

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit f8faf82
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/693a5b1efb10730008dab372
😎 Deploy Preview https://deploy-preview-2214--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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.

1 participant