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

A shipped tell finds its change by asking for the event, not scanning 200 #107

shipped production is serving it opened this has it

Landed in pull #219 · run

opened this

A shipped tell links to the change that shipped it, and the link is found by reading the last 200 events and hoping the one it wants is among them.

shippedBy (src/web/studio/tell.ts:53) calls listEvents(db, { repoId: repo.id, limit: 200 }) and searches the page for an issue.closed event naming this issue with by === "merge". On an app with a few hundred recent events, a tell that was shipped a week ago quietly loses its change: the page falls back to the plain state badge, and a reader is told an issue is closed with no word about what closed it. listEvents has no kind filter and no way to ask about one issue (src/core/events.ts:141-163), so today there is nothing better to call.

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

Acceptance

Files I expect to change

src/core/events.ts, src/web/studio/tell.ts, test/studio.test.ts, test/events.test.ts if the filter deserves its own line there.

Risks

payload is JSON in a text column: filter on kind in SQL and keep the issue-number match in TypeScript rather than reaching into JSON from the query — the bound stays small and the code stays readable. listEventsVisibleTo shares the options type; adding an optional field must not change what a stranger may see.

Suggested: Mason.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs