Skip to content

Handle null speed values by showing placeholder#79

Open
google-labs-jules[bot] wants to merge 10 commits into
devfrom
speed-null-handling-9237057639772706340
Open

Handle null speed values by showing placeholder#79
google-labs-jules[bot] wants to merge 10 commits into
devfrom
speed-null-handling-9237057639772706340

Conversation

@google-labs-jules
Copy link
Copy Markdown
Contributor

  • Modified handlePosition in src/app.ts to process speed === null.
  • Updated renderSpeed in src/app.ts to accept number | null.
  • Implemented logic in renderSpeed to call showPlaceholder() when speed is null.
  • Ensured timestamp updates occur for null speed updates to maintain data freshness state.
  • Verified with unit tests ensuring placeholder appears upon receiving null speed.

PR created automatically by Jules for task 9237057639772706340 started by @samuel-skean

Updates the geolocation handler to accept `null` speed values (common when stationary or acquiring fix) as valid updates rather than ignoring them. This triggers the UI to display the placeholder text instead of stale speed data, while correctly updating data freshness timestamps to prevent false warnings.
@google-labs-jules
Copy link
Copy Markdown
Contributor Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

Base automatically changed from jules/log-handle-position-delay-16374561037322828186 to dev January 10, 2026 20:10
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages Bot commented Jan 10, 2026

Deploying speedometer with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6341583
Status: ✅  Deploy successful!
Preview URL: https://0a2f2f81.speedometer-f1o.pages.dev
Branch Preview URL: https://speed-null-handling-92370576.speedometer-f1o.pages.dev

View logs

google-labs-jules Bot and others added 9 commits January 11, 2026 05:30
- Replace static "Got it" button with dynamic button in `#info-popover`
- Add `checkPermissions` logic using `navigator.permissions` API
- Update popover UI state based on permission status (prompt vs granted)
- Use `data-action` attribute for button behavior stability
- Ensure popover remains open when asking for permissions
- Hide warning message and switch to "Got it" when permissions are granted
- Implement `onLocationSuccess` callback pattern to update popover UI immediately when location data is received.
- Fixes issue where popover state would not update after user granted permissions in native prompt.
- Ensures consistent "Ask" -> "Granted" transition regardless of browser event limitations (e.g. onchange reliability).
- Moves landscape CSS overrides to the end of the style block to fix specificity issues.
- Hides unknown speed message when data becomes stale to avoid visual clutter.
- Adds new test case for stale data hiding logic.
…147974545

Add unknown speed message and remove GPS warmup logic
…gic-2853070433236340321

Dynamic Permission Logic in Info Popover
@samuel-skean samuel-skean marked this pull request as ready for review January 12, 2026 21:27
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