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
Check · Review · Land · Live done — Landed and live in production.
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
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
emptyStatehelper insrc/web/studio/explore.ts. - Tests: a new suite in
test/explore.test.tsruns 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:orsort: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. 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:
- 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.
- 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.
An empty
/explorewith no query now says "Nothing public yet" and offers a button to make the first app.bun x tsc --noEmitis clean andtest/explore.test.tspasses. I didn't run the full suite./apps/new./signin?next=/apps/new.emptyStatehelper insrc/web/studio/explore.ts.test/explore.test.tsruns on a fresh forge with nothing public. It covers the no-query page signed in and signed out, and a query with no hits.kind:orsort: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.explorePage.Closes #4110