Extension targets
A target is a named place in the Sessions UI. An extension declares the targets it renders into, and each one gets its own module and its own typed API.
Target names
Target names are DNS-style: dot-separated, kebab-case labels, most general first — <surface>.<resource>.<place>.<slot>.
business | publicsessiondetailsblock | row{
"handle": "session-note",
"name": "Session note",
"targets": [
{
"target": "business.session.details.block",
"module": "./business.tsx",
"query": "./SessionNoteQuery.graphql"
},
{
"target": "public.session.detail-list.row",
"module": "./public.tsx",
"query": "./SessionNoteQuery.graphql"
}
]
}Declaring targets
Each entry in targets names a target, the module whose default export renders it, and optionally a .graphql file with its live query.
Point each target at its own module, and name the target again in extension(target, …): TypeScript then gives api that target’s exact shape — api.mutate only exists on business targets — and the host checks at runtime that the module is mounted where you meant.
Blocks and rows
The last label of a target’s name says what kind of space you get.
*.block*.row<sessions-detail-row> elements, and <sessions-detail-row-skeleton> while you load.Targets
Two targets today, both beside one session. More surfaces follow the same shape.