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

Each row on /explore says why it sits where it does in plain numbers: forks, ships, likes and age #13504

Merged opened this

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

Merged

Each app row on /explore now carries one line such as 3 forks, 5 ships, 1 like, updated 2 days ago, and the API and MCP rows carry the same text as figures. explore-first-view.test.ts, explore-parity.test.ts and explore.test.ts asserted the old row wording and I changed them (below).

Notes

shipped production is serving it deploy 5ac4f27

opened this

Each app row on /explore now carries one line such as 3 forks, 5 ships, 1 like, updated 2 days ago, and the API and MCP rows carry the same text as figures. explore-first-view.test.ts, explore-parity.test.ts and explore.test.ts asserted the old row wording and I changed them (below). I ran the explore tests, tsc and the gate, and the gate rewrapped comments, which are committed. I did not run the check that the issue's bun scripts/fast.ts step is meant for, because it named 2241 test files, so I ran the explore suites by hand.

  • Source of the figures: the line comes from figuresOf in src/actions/explore.ts. It reads the numbers already on the row, so there is no extra query per row.
  • Wording:

- Likes appear only when there are any. - The age is days since the last merged pull: "updated today", "updated yesterday", or "never shipped". - Person and forge rows have no line.

  • Layout: the line leads the row's meta, ahead of the description. The meta is already a single ellipsised line, so at 360 px it is the description that gets cut, not the figures.
  • Test: test/explorer-why.test.ts checks the line against a hand count, then loads a seeded app's /explore row and the API answer, and checks the description is escaped.
  • Page and API: the web row and the API/MCP figures field are one function, so they cannot drift apart. The existing why field is untouched.

Existing tests I changed. They asserted the old row wording, so I updated them rather than the code:

  • Row text: on app rows the line replaces the old one-signal phrase, so the rows no longer say "shipped this month" or "1 fork" on their own.
  • Age link: the page no longer shows "shipped 1d ago" with the exact date in a tooltip. It says "updated yesterday" in plain text.
  • Row size: I raised the per-row markup budget in test/explore-first-view.test.ts from 500 to 600 bytes for the extra line.

Not done: no per-row "why it ranks here" weighting beyond the figures. The page has no new CSS or component class.

To try: open /explore?q=kind:app, or call /api/v1/explore and read items[].figures.

The push hook refused the first push without a "Try:" commit, so the branch ends with an empty commit that gives one.

Closes #13483

1 earlier comment · 1 event
commented

Each app row on /explore now carries one line such as 3 forks, 5 ships, 1 like, updated 2 days ago, and the API and MCP rows carry the same text as figures. explore-first-view.test.ts, explore-parity.test.ts and explore.test.ts asserted the old row wording and I changed them (below). I ran the explore tests, tsc and the gate, and the gate rewrapped comments, which are committed. I did not run the check that the issue's bun scripts/fast.ts step is meant for, because it named 2241 test files, so I ran the explore suites by hand.

  • Source of the figures: the line comes from figuresOf in src/actions/explore.ts. It reads the numbers already on the row, so there is no extra query per row.
  • Wording:

- Likes appear only when there are any. - The age is days since the last merged pull: "updated today", "updated yesterday", or "never shipped". - Person and forge rows have no line.

  • Layout: the line leads the row's meta, ahead of the description. The meta is already a single ellipsised line, so at 360 px it is the description that gets cut, not the figures.
  • Test: test/explorer-why.test.ts checks the line against a hand count, then loads a seeded app's /explore row and the API answer, and checks the description is escaped.
  • Page and API: the web row and the API/MCP figures field are one function, so they cannot drift apart. The existing why field is untouched.

Existing tests I changed. They asserted the old row wording, so I updated them rather than the code:

  • Row text: on app rows the line replaces the old one-signal phrase, so the rows no longer say "shipped this month" or "1 fork" on their own.
  • Age link: the page no longer shows "shipped 1d ago" with the exact date in a tooltip. It says "updated yesterday" in plain text.
  • Row size: I raised the per-row markup budget in test/explore-first-view.test.ts from 500 to 600 bytes for the extra line.

Not done: no per-row "why it ranks here" weighting beyond the figures. The page has no new CSS or component class.

To try: open /explore?q=kind:app, or call /api/v1/explore and read items[].figures.

The push hook refused the first push without a "Try:" commit, so the branch ends with an empty commit that gives one.

Changes requested — before the latest push

The web row and the API answer work in the preview ('0 forks, 0 ships, never shipped · A preview's sample app', escaped). Fix these in one round:

  1. (first) Terminal parity: the TUI explorer rows (src/tui/screens/dashboard.ts:1625) still use whyOf and never say the figures line. What the page says, the terminal must say too. Use figuresOf there and add a test.
  2. Design: the row now drops the <time> element with the absolute date in its title, so the exact date is gone for everyone, and the old test that checked it was loosened to match. Keep updated <time ...> so the date stays reachable.
  3. The line replaces the ranking signal on app rows, so sorts by use (awake hours) no longer show their reason, and likes are hidden at zero. The issue says 'the same figures the rank uses': show the figure the active sort ranks by, or say why not.
  4. figuresOf re-implements the age wording of shippedWords just above it; reuse it rather than keep two.
  5. Tests were weakened: explore.test.ts now matches a regex instead of 'shipped this month', and the row-size budget went 500 to 600 bytes. Tighten the assertion, and keep the budget unless the row really needs it.
  6. Docs: docs/features/explore.md should describe the figures line and the figures API/MCP field.
  7. Box 2 asks for one line at 360 px; nothing proves it. Show a phone picture or a CSS assertion that the meta stays one ellipsised line.
commented

Each app row on /explore now opens with its figures, and the terminal says the same line. Tests for the explorer, its first view, parity, the terminal and the new figures all pass, and tsc, the gate and design-lint are clean. I did not run the full suite or take a phone screenshot.

  1. Terminal parity: the TUI explorer rows in dashboard.ts now use figuresOf for apps. People and forges keep their why phrase. The new test/tui-explore-figures.test.ts only checks that the code calls figuresOf; it does not draw a row.
  2. Date reachable: the page row reads N forks, N ships, shipped <time …> with the absolute date in the title. I restored the old regex assertion in explore-parity.test.ts.
  3. Sort's own figure: figuresOf and the new figureCounts take the active sort. Forks and ships are always said, even at zero. Likes show when above zero or when the sort is likes. sort:use adds N h in use. These cases are tested.
  4. Age wording: figuresOf now reuses shippedWords, so the duplicate age code is gone. The wording is "shipped", not "updated": that is shippedWords' phrase. The page shows the relative <time> ("1h ago"), while the API and terminal say "shipped 2 days ago".
  5. Tests: explore.test.ts asserts the exact 0 forks, 3 ships, shipped <time datetime= row instead of a regex. shipped this month is gone because the row now says 3 ships. The row-size budget is 520, not 500, because the real row measured 502.7 bytes. If you want 500 held, I'd have to shorten the line's wording.
  6. Docs: docs/features/explore.md has a new section on the figures line and the figures API/MCP field.
  7. One line at 360 px: this is a CSS assertion in explorer-why.test.ts that .row-meta is block, hidden, nowrap and ellipsised. The line is longer now, so it will truncate on a phone.
Approved

Earlier asks are met. The sort's own figure is always on the line, the dated <time> is back, the age goes through shippedWords, the docs are in docs/features/explore.md and not the README, and the terminal rows say the same line. The preview shows 0 forks, 0 ships, never shipped · description on the row, and the API carries figures. Meta is one ellipsised line, so at 360px the description is cut and the figures are not.

Two things I would do next:

  1. Non-blocking: test/tui-explore-figures.test.ts greps the source for figuresOf(. Drive the row builder with a seeded row instead, so it fails on behaviour.
  2. Non-blocking: dashboard.ts parses the explore line twice in the row builder. Parse it once.
Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs