Public: anyone can read this; the crew can change it.

/explore has a chip that keeps only apps with a live preview #16147

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

The "Live now" chip on /explore now shows how many apps it keeps. Most of this issue was already on main, so the change is only that count. The tests I ran pass and tsc and design-lint are clean.

Notes

shipped production is serving it deploy 496afdb

opened this

The "Live now" chip on /explore now shows how many apps it keeps. Most of this issue was already on main, so the change is only that count. The tests I ran pass and tsc and design-lint are clean. I didn't run the full suite, since the forge runs it on push.

What already held on main: the chip itself (#14532, commit 0b8940b78) filters on the server and survives a reload, because it is a plain link to ?live=yes. The filter does not mean "has a live preview". It means the app had a production heartbeat in the last 30 days, and I treated that as the issue's "live". If you want it to mean "has a preview environment", say so, because that would be a different filter.

What changed: src/web/studio/explore.ts computes the chip's number from the same ranking and the same grouping as the list.

  • When the chip is on, the number is the list's own total.
  • When it is off, the number is what you would get by turning it on, with your other filters kept.

Tests: test/explore-quick-filters.test.ts has a new test that the number equals the length of the list the chip opens, stays the same once the chip is on, and follows other filters such as week=1. It fails without the change. I also loosened that file's link() helper so it still finds the chip's link now that it carries a number.

Left out: no separate new test file, because the existing chip tests already cover this. The count is one extra cached call to the explore ranking per page view, and I did not time it separately.

Try it: open /explore?kind=app and read the number on "Live now". Click it and the list shows that many apps.

[
  {"go": "/explore?kind=app", "look": "the Live now chip under More filters", "expect": "it shows a number"},
  {"go": "/explore?kind=app&live=yes", "look": "the count line and the list", "expect": "the chip's number equals the apps listed"}
]

Closes #16142

2 earlier comments
commented

The "Live now" chip on /explore now shows how many apps it keeps. Most of this issue was already on main, so the change is only that count. The tests I ran pass and tsc and design-lint are clean. I didn't run the full suite, since the forge runs it on push.

What already held on main: the chip itself (#14532, commit 0b8940b78) filters on the server and survives a reload, because it is a plain link to ?live=yes. The filter does not mean "has a live preview". It means the app had a production heartbeat in the last 30 days, and I treated that as the issue's "live". If you want it to mean "has a preview environment", say so, because that would be a different filter.

What changed: src/web/studio/explore.ts computes the chip's number from the same ranking and the same grouping as the list.

  • When the chip is on, the number is the list's own total.
  • When it is off, the number is what you would get by turning it on, with your other filters kept.

Tests: test/explore-quick-filters.test.ts has a new test that the number equals the length of the list the chip opens, stays the same once the chip is on, and follows other filters such as week=1. It fails without the change. I also loosened that file's link() helper so it still finds the chip's link now that it carries a number.

Left out: no separate new test file, because the existing chip tests already cover this. The count is one extra cached call to the explore ranking per page view, and I did not time it separately.

Try it: open /explore?kind=app and read the number on "Live now". Click it and the list shows that many apps.

[
  {"go": "/explore?kind=app", "look": "the Live now chip under More filters", "expect": "it shows a number"},
  {"go": "/explore?kind=app&live=yes", "look": "the count line and the list", "expect": "the chip's number equals the apps listed"}
]
commented

<!-- look-pages b5fbc8e25aaa --> Look pages for b5fbc8e, from the gate:

  • look pages (inferred): this pull changes src/web/studio/explore.ts; the forge pictures /explore (src/web/studio/explore.ts), the pages whose routes import it. A "Looks: <path>" or "No look: <why>" line in a commit message overrides
commented

The Live now chip on /explore now shows how many apps it keeps, and that number matches the list you get when you click it. The change is in src/web/studio/explore.ts, with a test in test/explore-quick-filters.test.ts.

The feedback was the gate's automatic look-pages note, not a request for changes. It inferred that /explore is the page to picture, which is correct, so I changed nothing and pushed nothing new. I didn't re-run the tests or the type check this turn; the last run was before this feedback.

Left out: no other chip counts changed.

Try it: open /explore?kind=app and read the number on the Live now chip. It should equal the number of cards listed.

[
  {"go": "/explore?kind=app", "look": "the number on the Live now chip", "expect": "it equals the number of app cards listed below", "ask": "does the chip's count match the list when you click it?"}
]
Approved

Approved. The chip carries a count from the same ranking as the list, and the test covers on, off and the week filter. In the preview, /explore?kind=app shows 0 on the chip and the list is empty, so it is consistent. Two things I would do next: (1) the pill follows the link text with no space, so a screen reader may read it as "Live now0". Add a visually hidden space or aria-label, e.g. "Live now, 2 apps". (2) When the count is 0 the chip is still a link to an empty list. Consider showing it as muted and not a link, or saying so in plain words.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs