Inspiration

A text that looks like it came from a grandchild can turn an ordinary moment into a rushed decision. The recipient gets asked to buy a gift card, share the code, and keep the request a secret. We built Bifocal to give older adults time to look at what the message is asking them to do and decide what to do next.

What it does

Bifocal adds a side panel to desktop Chrome. It checks open Gmail messages, incoming texts in Google Messages for web, and supported sites where the user enables website checks. When it finds a warning sign, it quotes the relevant text and suggests a next step in plain language.

At a supported action, such as the gift-card purchase in our demo, Bifocal opens Pause. The person can go back, ask a trusted contact, or hold for five seconds to continue. In the signed-in build, they can review a short summary before sending it to their contact. The reply appears on the original risk card.

How we built it

We built the Chrome extension with WXT, React, and TypeScript. Firebase AI Logic runs Gemini Nano on-device for private checks. The hosted demo uses hybrid inference for its built-in fictional samples, so it can fall back to Gemini 3.5 Flash-Lite when Nano is unavailable. Pasted text stays on the device.

The hosted sample path uses Firebase Authentication and reCAPTCHA Enterprise App Check. Cloud Firestore handles trusted-contact invitations, requests, and replies. Firebase Hosting serves the demo and extension download.

Challenges we ran into

Chrome focuses a button before firing its click event. That focus was using up the one-time permission granted by a completed Pause hold, so the next click could open the warning again. We tied the permission to the exact action and added a regression test.

We also had to handle browsers where Nano was still downloading or unavailable. Bifocal uses basic local rules in that case and labels the result so the user can tell how it was checked.

Accomplishments that we're proud of

We shipped a public demo that lets someone compare a scam warning with an ordinary message and practice Pause at a fictional checkout.

We also published a benchmark on 65 held-out fictional messages. Gemini Nano returned 61 valid screenings and flagged 29 of the 31 scams with valid results. Both cloud runs flagged all 32 labeled scams. The redacted cloud run marked zero of the 33 legitimate messages as high risk. See the results.

What we learned

A risk label tells someone to pay attention. The exact words that triggered it and a clear next step help them act. We validate that each model-generated quote appears in the text it checked.

What's next for Bifocal

We want to cover more checkout patterns and expand the evaluation with legitimate messages that resemble scams, especially bank alerts and sign-in reminders. Those cases will help us improve the warnings people see when the right answer is to carry on.

Built With

  • chrome
  • cloud-firestore
  • firebase-ai-logic
  • firebase-app-check
  • firebase-authentication
  • firebase-hosting
  • gemini-3-5-flash-lite
  • gemini-nano
  • react
  • tailwindcss
  • typescript
  • vite
  • wxt
Share this project:

Updates

Submission history