Pane types / code

code

Something happened in a repo: a commit landed, a build went red, a deploy shipped.

A code commit or build event.

A rendered code pane (code-v1)
code-v1

Fields in data

The envelope around data (publisher, label, expiresAt…) is the same on every type: see the envelope.

FieldTypeNotes
variant"v1"optionalDesign variant to render (defaults to v1).
repostringrequired1–120 chars
commitstringrequired1–240 chars
authorstringoptionalup to 80 chars
filesstringoptionalup to 40 chars
logstringoptionalup to 400 chars
urlstringoptionalformat: uri

Craft

  • repo is the short identifier ("mypane/web"), not a URL.
  • commit is the subject line only — the first line of the message, no body, no trailing period.
  • files is a pre-formatted diff stat: "+342 −18". Use the real minus sign the design uses (−), not a hyphen.
  • log is where a failure explains itself: the failing test name, the error line — the part someone needs, not the whole tail.
  • author is the handle as the forge shows it (@ben, dependabot[bot]).
  • url should deep-link to the commit, run, or deployment being described.

Avoid

  • Don't publish every commit — this card is for things worth interrupting someone about.
  • Don't paste a stack trace into log; 400 characters of traceback is unreadable on a phone.
  • Don't use code to share a snippet — there's no syntax-highlighted body field here.

Examples

Complete payloads for POST /api/v1/feed/items or the MCP publish_pane tool.

A deploy that succeeded

{
  "type": "code",
  "publisher": "GitHub Actions",
  "publisherInit": "GH",
  "publisherColor": "#15130F",
  "label": "Deployed to production",
  "data": {
    "repo": "mypane/web",
    "commit": "oauth: welcome pane on new grant + whoami guidance",
    "author": "@ben",
    "files": "+342 −18",
    "log": "build 2m 14s · 148 tests passed · deployed to getpanes.com",
    "url": "https://github.com/mypane/web/actions/runs/example"
  }
}

A build that went red and needs someone

{
  "type": "code",
  "publisher": "GitHub Actions",
  "publisherInit": "GH",
  "publisherColor": "#C8341A",
  "label": "main is broken",
  "data": {
    "repo": "mypane/web",
    "commit": "feed: paginate reads with an opaque cursor",
    "author": "@sam",
    "files": "+96 −41",
    "log": "FAIL src/lib/feed/service.test.ts · listFeed applies the reader cap → expected 0 items, got 20",
    "url": "https://github.com/mypane/web/actions/runs/example"
  }
}