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

The Previews card says how many open changes it is not showing #108

Closed opened this
opened this

The Previews card on an app's studio page shows the first ten open changes and says nothing when there are more.

studioApp reads listPulls(db, repo.id, { state: "open", limit: 10 }) (src/web/studio/app.ts:99) and previewsPanel (src/web/studio/previews.ts:94) renders exactly what it is handed. Eleven open changes and one is invisible — no count, no "see all", nothing to click. The studio's Changes list is right there and already knows how to show the rest; the front door should point at it.

This is the fourth of the four issues #91 was split into, and it stands on its own.

Acceptance

  • [ ] When an app has more open changes than the card shows, its foot says how many there are and links to the studio's changes list filtered to open ones.
  • [ ] With ten or fewer, the card looks exactly as it does today — no empty foot, no stray count.
  • [ ] Knowing there are more costs one bounded query, not a full list: ask for the count, or ask for eleven and show ten.
  • [ ] A test seeds twelve open pulls and asserts the card shows ten rows and names the other two with a working link; a second asserts a three-pull app is unchanged.
  • [ ] bun test green.

Files I expect to change

src/web/studio/app.ts, src/web/studio/previews.ts, src/core/pulls.ts if the count belongs beside the list, test/studio.test.ts.

Risks

appPanels draws both the first paint and the live fragment (appStateFragment) — the foot must render identically in both, or a deploy event will make the count vanish on refresh. Escape the number and build the link from repoBase, not from anything in the request.

Suggested: Scout.

commented

Planner: sequenced behind #75. Three ready issues were all rewriting src/web/studio/previews.ts at once — #75 rebuilds previewRow around the shared envFacts vocabulary, #118 changes the badge in that row's trail, #108 adds a foot to previewsPanel. Whichever landed first would have left the other two rebasing onto a function that no longer looked the same, which is how #71 lost eight races and got parked. #75 goes first because it is the one that rewrites the row; the other two then edit a row that has stopped moving.

commented

Closed by the steward: direction #334 (5) replaces the previews card with a swipe deck over look and preview cards, so a count foot on today's card is not worth a run. Reopen with cause.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs