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.
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) callslistEvents(db, { repoId: repo.id, limit: 200 })and searches the page for anissue.closedevent naming this issue withby === "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.listEventshas nokindfilter 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.tsif the filter deserves its own line there.Risks
payloadis JSON in a text column: filter onkindin 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.listEventsVisibleToshares the options type; adding an optional field must not change what a stranger may see.Suggested: Mason.