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

An empty /explore with no query says nothing is public yet and how to make the first app, not 'clear the line' #4121

Merged opened this

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

Merged

An empty `/explore` with no query now says "Nothing public yet" and offers a button to make the first app. `bun x tsc --noEmit` is clean and `test/explore.test.ts` passes. I didn't run the full suite.

shipped production is serving it deploy fb6f20c

opened this

An empty /explore with no query now says "Nothing public yet" and offers a button to make the first app. bun x tsc --noEmit is clean and test/explore.test.ts passes. I didn't run the full suite.

  • Signed in: the empty state shows a "Make an app" button to /apps/new.
  • Signed out: it shows "Sign in to make one", linking to /signin?next=/apps/new.
  • With a query: an empty result still says "Nothing matches. Clear the line to see everything you can."
  • Where: the change is a small emptyState helper in src/web/studio/explore.ts.
  • Tests: a new suite in test/explore.test.ts runs on a fresh forge with nothing public. It covers the no-query page signed in and signed out, and a query with no hits.
  • Wording choices: I picked the "Make an app" label and the note "Make the first app and it shows up here." The issue didn't specify them.
  • Filters: a line with only kind: or sort: counts as a query, so it still says "Nothing matches" rather than "Nothing public yet". I read the issue's wording that way, but it could be read the other way.
  • #3801: I didn't rebase onto it. If it lands first, the one place to reconcile is the empty-state branch at the end of explorePage.

Closes #4110

commented

An empty /explore with no query now says "Nothing public yet" and offers a button to make the first app. bun x tsc --noEmit is clean and test/explore.test.ts passes. I didn't run the full suite.

  • Signed in: the empty state shows a "Make an app" button to /apps/new.
  • Signed out: it shows "Sign in to make one", linking to /signin?next=/apps/new.
  • With a query: an empty result still says "Nothing matches. Clear the line to see everything you can."
  • Where: the change is a small emptyState helper in src/web/studio/explore.ts.
  • Tests: a new suite in test/explore.test.ts runs on a fresh forge with nothing public. It covers the no-query page signed in and signed out, and a query with no hits.
  • Wording choices: I picked the "Make an app" label and the note "Make the first app and it shows up here." The issue didn't specify them.
  • Filters: a line with only kind: or sort: counts as a query, so it still says "Nothing matches" rather than "Nothing public yet". I read the issue's wording that way, but it could be read the other way.
  • #3801: I didn't rebase onto it. If it lands first, the one place to reconcile is the empty-state branch at the end of explorePage.
Approved

Approved. The preview's bare /explore (signed out) shows "Nothing public yet", the one-sentence note and one primary sign-in link to /signin?next=/apps/new. It uses empty() and btn() with an <a> for navigation, so it works with JavaScript off and has exactly one action. Tests cover the signed-in and signed-out empty states and that a query still says "Nothing matches". The change adds no read or write path, so the security and terminal-door items do not apply.

Two things I would do next:

  1. Build the sign-in link with the helper in src/web/chrome.ts:102 instead of a hand-written string, so the next-parameter encoding lives in one place.
  2. Decide whether a line with only kind: or sort: should count as no query. Today it says "Nothing matches", which is defensible but worth a sentence in the README.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs