Skip to content

Add Live Tennis app - #3248

Open
bensynapse wants to merge 1 commit into
tidbyt:mainfrom
bensynapse:add-live-tennis-app
Open

Add Live Tennis app#3248
bensynapse wants to merge 1 commit into
tidbyt:mainfrom
bensynapse:add-live-tennis-app

Conversation

@bensynapse

Copy link
Copy Markdown

Live Tennis

Adds apps/livetennisscoreslive, point-by-point tennis scores for the ATP, WTA,
Challenger and ITF tours, one match per page.

Animated 640x320 render (pixlet render --gif --magnify 10) attached in a comment below.

+----------------------------------+
| Toronto                       QF |  tournament + round; bg colour = tour
|   Alcaraz                1  2 40 |  sets won / games this set / current point
| * Sinner                 1  1 AD |  green dot = this player is serving
| 6-3 4-6                     LIVE |  completed sets          live / tiebreak
+----------------------------------+

What it shows

  • The current point (0 / 15 / 30 / 40 / AD) — updated live, in yellow.
  • Live tiebreak scores — the point column turns orange and the status reads TB.
  • Sets won (white) and games in the current set (blue), aligned in columns across both rows.
  • A green dot next to whoever is serving.
  • Completed sets summarised along the bottom (6-3 4-6), width-budgeted so an extended
    final set can't overflow.
  • The header background identifies the tour at zero pixel cost: blue = ATP,
    magenta = WTA, brown = Challenger, grey = ITF.

Settings

Field Type Notes
API key schema.Text Free key, 1,000 requests/day: https://livetennisapi.com/subscribe/free
Tour schema.Dropdown All / ATP / WTA / Challenger / ITF
Rotation speed schema.Dropdown 3–6 s per match
Show rankings schema.Toggle Off by default

How it differs from the existing ATP Tennis / WTA Tennis apps

Those apps are ESPN-backed and show per-set game scores for a tournament you pick
from a dropdown
, plus completed and upcoming matches — and they do that well. This app
is deliberately narrower and deeper: it shows the in-game state (current point and
live tiebreak score) that ESPN's linescores doesn't carry, across all four tours in
one app with no tournament to choose
. They're complementary; I'd expect people to run
both.

Request rate

One http.get per render with ttl_seconds = 120, using Pixlet's built-in HTTP cache
(no cache.star). That's a ceiling of 86400 / 120 = 720 upstream requests/day per
key+tour combination, inside the free tier's 1,000/day.

Error and empty states

Every path renders something readable rather than failing: no key configured
(NEED A KEY), HTTP 401 (BAD KEY), HTTP 429 (OVER QUOTA), any other non-200
(API ERROR + the status code), an unexpected body (BAD DATA), no live matches
(NO MATCHES + the selected tour), an unfilled draw slot (TBD) and a match that
hasn't started scoring yet (About to start).

Verification

  • pixlet check apps/livetennisscorespasses (pixlet v0.34.0, matching PIXLET_VERSION).
  • pixlet format and pixlet lint — clean.
  • Render time measured at ~0.03 s against the 1 s limit. The onboarding/error screens
    are deliberately static rather than scrolling; an earlier marquee version measured
    0.6–0.8 s, uncomfortably close to the cap on a cold CI runner.
  • Every render path (live multi-match rotation, single match with the scrolling header,
    live tiebreak, null player name, null score, rankings toggle, empty result, HTTP 401,
    malformed body) was rendered against recorded fixtures served from localhost and
    the resulting frames were inspected individually. The screenshot above comes from
    those fixtures, not from live data.

Disclosures

  • Vendor relationship: I am affiliated with the Live Tennis API
    (livetennisapi.com), the data source this app uses. I'm submitting it as a community
    app, not as an ad — it's free-tier only, there's no paid upsell in the app, the user
    brings their own key, and I've tried to be even-handed above about what the existing
    ATP/WTA Tennis apps already do better. Happy to adjust the wording, the name, or drop
    it entirely if a vendor-authored app isn't something you want in the repo.
  • No embedded key. I deliberately did not ship an encrypted vendor key via
    pixlet encrypt / secret.decrypt, because a single shared key would blow through the
    1,000/day free tier the moment more than a handful of devices installed the app. If
    you'd prefer the app to work out of the box, I can provision a high-quota key for
    Tidbyt and add it that way — just say the word.
  • AI assistance: this app was written with AI assistance (Claude). I've reviewed
    every line, and everything claimed above was verified by actually running
    pixlet check / pixlet format / pixlet lint and by rendering and viewing each
    state, not by assuming. I couldn't find any policy on AI-assisted contributions in
    CONTRIBUTING.md, the CLA, or tidbyt.dev, so I'm disclosing it unprompted; tell me if
    that's a problem.
  • One implementation note for review: main() reads an un-documented config key
    dev_api_base, which is not in the schema and is accepted only if it points at
    http://127.0.0.1: or http://localhost:. It exists so pixlet render can be pointed
    at a local fixture server to test the render paths without a live match or a real key.
    It can't redirect a real installation's traffic anywhere. Happy to remove it if you'd
    rather it wasn't there.

I have read the CLA Document and I hereby sign the CLA

@tidbyt

tidbyt Bot commented Jul 26, 2026

Copy link
Copy Markdown

⚠️ The automated review process is experimental and likely has bugs. Please bear with us as we iron out the kinks and enable you to ship changes at high velocity 🚀

Next Steps

Hello! Thank you so much for your change 🤜 🤛 . There are a few things you need to do:

  • Sign the CLA if you haven't already
  • Ensure your build is green! Any problem will display a proposed solution to try out
  • Get a review, either by Tidbyt Bot or by a Tidbyt engineer

Manual Review Required

Hang tight! A Tidbyt engineer will be by shortly to review your change. Here is what they will be looking for:

Test Details
App Dir All files are in a single app directory
🟡 Modules Usage of http.star requires review
Original Author The original author matches the PR author

@tidbyt-bot

tidbyt-bot commented Jul 26, 2026

Copy link
Copy Markdown

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@bensynapse

Copy link
Copy Markdown
Author

Here's the animated render, as the checklist asks for — pixlet render --gif --magnify 10, 640×320, 4 frames:

Live Tennis

A note on why it's linked rather than attached: this repo gitignores *.gif, so it can't ride along in the PR itself, and I'm submitting via CLI rather than the web UI. It's hosted from a branch on my own fork of this repo, so nothing third-party is involved — happy to re-attach it inline if you'd prefer.

Frames, in order: a live ATP match at deuce with the serving dot, the same match after a point, a WTA tiebreak, and the no-live-matches state.

@bensynapse
bensynapse force-pushed the add-live-tennis-app branch from 7d8ca62 to c078ac7 Compare August 2, 2026 01:35
@bensynapse

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

@bensynapse

Copy link
Copy Markdown
Author

recheck

@bensynapse

Copy link
Copy Markdown
Author

Checking in after three weeks — everything on the submission checklist is done from my side: CI green, CLA signed, and the animated render posted above. The automated reply mentioned a Tidbyt engineer would come by, so this is just a polite bump to keep it from drifting toward the stale-bot window. Happy to make any changes review turns up.

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.

2 participants