Put our own mark on the cards, not Phoenix's

b01780f305dc · AtlantisPleb · · parent 9b37da1c6125

Put our own mark on the cards, not Phoenix's

`priv/static/images/logo.svg` was still the stock `phx.new` logo, and the
Open Graph templates embedded its path data verbatim -- so every card that
crawlers, Slack, and X rendered carried the Phoenix bird, and the component
library showed it too, once labelled as the OpenAgents model logo.

The mark is now the product's own power glyph, redrawn as geometry rather
than traced: the ring's centre, radius, stroke, bar, and the arc's 26-degree
gap were measured off the 256-pixel variant inside `favicon.ico` and divided
down to a 48-unit box, so the vector matches the raster the application shell
already renders beside the wordmark. Two stroked paths rather than a fill,
because a ring with a gap drawn as a fill is four paths and a subtraction and
loses the round caps that give the glyph its weight.

The committed fallback card is regenerated. Its typography still comes from
whatever fontconfig offers rather than the release image's pinned Geist, so
it reads slightly differently from a live card; that only shows when the
rasterizer is unavailable, which the image no longer is.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016o8HwTaqLKEWCHTjsjFtrB
Co-Authored-By
Claude Opus 5 (1M context) <noreply@anthropic.com>

Deploy story

What this commit did to the running system — joined from the forge receipt chain, the part a commit page elsewhere cannot show.

Not deployed through the forge lane

No push, promotion, build, or deploy receipt references this commit (receipts are scanned over a bounded recent window). Changes shipped by full node replacement carry their proof in the release gate receipt instead.

Changed files

  • modified lib/openagents_web/og/brand_mark.ex
  • modified lib/openagents_web/og/templates.ex
  • modified priv/static/images/logo.svg
  • modified priv/static/images/og-card-default.png

Diff

4 files changed, +60 -18

lib/openagents_web/og/brand_mark.ex modified +46 -11

@@ -1,19 +1,54 @@

1 1
defmodule OpenAgentsWeb.OG.BrandMark do
2 2
  @moduledoc """
3
  The brand mark's own path data, taken verbatim from
4
  `priv/static/images/logo.svg`. Kept as data so the card templates embed
5
  our real glyph without reading files at render time or emitting remote
6
  references.
3
  The OpenAgents mark, as geometry rather than as a file.
4
5
  The product's mark is the power glyph in `priv/static/favicon.ico` — the same
6
  image the application shell renders beside the wordmark. The card templates
7
  cannot read a file at render time and must emit no remote reference, so the
8
  glyph lives here as path data.
9
10
  `priv/static/images/logo.svg` carries the same two paths for the pages that
11
  reference a file rather than this module; both were derived from the same
12
  measurements, and a change to one belongs in the other.
13
14
  It is a redrawing, not a trace: the ring's centre, radius, stroke, and the
15
  arc's gap were measured off the icon's 256-pixel variant and divided down to
16
  a 48-unit box, so the vector matches the raster it came from at any size a
17
  card is scaled to. That is why the numbers below are not round.
18
19
  Both paths are strokes, not fills. A stroked ring is one arc and one line; the
20
  same shape as a fill would be four paths and a subtraction, and it would lose
21
  the round caps that give the glyph its weight.
7 22
  """
8 23
9
  @path "m26.371 33.477-.552-.1c-3.92-.729-6.397-3.1-7.57-6.829-.733-2.324.597-4.035 3.035-4.148 1.995-.092 3.362 1.055 4.57 2.39 1.557 1.72 2.984 3.558 4.514 5.305 2.202 2.515 4.797 4.134 8.347 3.634 3.183-.448 5.958-1.725 8.371-3.828.363-.316.761-.592 1.144-.886l-.241-.284c-2.027.63-4.093.841-6.205.735-3.195-.16-6.24-.828-8.964-2.582-2.486-1.601-4.319-3.746-5.19-6.611-.704-2.315.736-3.934 3.135-3.6.948.133 1.746.56 2.463 1.165.583.493 1.143 1.015 1.738 1.493 2.8 2.25 6.712 2.375 10.265-.068-5.842-.026-9.817-3.24-13.308-7.313-1.366-1.594-2.7-3.216-4.095-4.785-2.698-3.036-5.692-5.71-9.79-6.623C12.8-.623 7.745.14 2.893 2.361 1.926 2.804.997 3.319 0 4.149c.494 0 .763.006 1.032 0 2.446-.064 4.28 1.023 5.602 3.024.962 1.457 1.415 3.104 1.761 4.798.513 2.515.247 5.078.544 7.605.761 6.494 4.08 11.026 10.26 13.346 2.267.852 4.591 1.135 7.172.555ZM10.751 3.852c-.976.246-1.756-.148-2.56-.962 1.377-.343 2.592-.476 3.897-.528-.107.848-.607 1.306-1.336 1.49Zm32.002 37.924c-.085-.626-.62-.901-1.04-1.228-1.857-1.446-4.03-1.958-6.333-2-1.375-.026-2.735-.128-4.031-.61-.595-.22-1.26-.505-1.244-1.272.015-.78.693-1 1.31-1.184.505-.15 1.026-.247 1.6-.382-1.46-.936-2.886-1.065-4.787-.3-2.993 1.202-5.943 1.06-8.926-.017-1.684-.608-3.179-1.563-4.735-2.408l-.077.057c1.29 2.115 3.034 3.817 5.004 5.271 3.793 2.8 7.936 4.471 12.784 3.73A66.714 66.714 0 0 1 37 40.877c1.98-.16 3.866.398 5.753.899Zm-9.14-30.345c-.105-.076-.206-.266-.42-.069 1.745 2.36 3.985 4.098 6.683 5.193 4.354 1.767 8.773 2.07 13.293.51 3.51-1.21 6.033-.028 7.343 3.38.19-3.955-2.137-6.837-5.843-7.401-2.084-.318-4.01.373-5.962.94-5.434 1.575-10.485.798-15.094-2.553Zm27.085 15.425c.708.059 1.416.123 2.124.185-1.6-1.405-3.55-1.517-5.523-1.404-3.003.17-5.167 1.903-7.14 3.972-1.739 1.824-3.31 3.87-5.903 4.604.043.078.054.117.066.117.35.005.699.021 1.047.005 3.768-.17 7.317-.965 10.14-3.7.89-.86 1.685-1.817 2.544-2.71.716-.746 1.584-1.159 2.645-1.07Zm-8.753-4.67c-2.812.246-5.254 1.409-7.548 2.943-1.766 1.18-3.654 1.738-5.776 1.37-.374-.066-.75-.114-1.124-.17l-.013.156c.135.07.265.151.405.207.354.14.702.308 1.07.395 4.083.971 7.992.474 11.516-1.803 2.221-1.435 4.521-1.707 7.013-1.336.252.038.503.083.756.107.234.022.479.255.795.003-2.179-1.574-4.526-2.096-7.094-1.872Zm-10.049-9.544c1.475.051 2.943-.142 4.486-1.059-.452.04-.643.04-.827.076-2.126.424-4.033-.04-5.733-1.383-.623-.493-1.257-.974-1.889-1.457-2.503-1.914-5.374-2.555-8.514-2.5.05.154.054.26.108.315 3.417 3.455 7.371 5.836 12.369 6.008Zm24.727 17.731c-2.114-2.097-4.952-2.367-7.578-.537 1.738.078 3.043.632 4.101 1.728a13 13 0 0 0 1.182 1.106c1.6 1.29 4.311 1.352 5.896.155-1.861-.726-1.861-.726-3.601-2.452Zm-21.058 16.06c-1.858-3.46-4.981-4.24-8.59-4.008a9.667 9.667 0 0 1 2.977 1.39c.84.586 1.547 1.311 2.243 2.055 1.38 1.473 3.534 2.376 4.962 2.07-.656-.412-1.238-.848-1.592-1.507Zl-.006.006-.036-.004.021.018.012.053Za.127.127 0 0 0 .015.043c.005.008.038 0 .058-.002Zl-.008.01.005.026.024.014Z"
24
  # Measured from the 256px favicon: ring centre (126, 132), outer radius 70,
25
  # stroke 16, bar from y=61 to y=116 on the centre line, and an arc gap of
26
  # ±26° about the top. Divided by 149 (the glyph's own height) and multiplied
27
  # by 48.
28
  @size 48
29
  @stroke 5.15
30
  @ring_radius 20.0
31
32
  # The gap sits at the top, so the arc runs from 26° clockwise round to 334°,
33
  # measuring from twelve o'clock. Endpoints: 24 ± 20·sin 26°, 25.45 − 20·cos 26°.
34
  @ring "M32.77 7.47A#{@ring_radius} #{@ring_radius} 0 1 1 15.23 7.47"
35
  @bar "M24 2.58V20.29"
36
37
  @doc "The ring's arc, as SVG path data on a 48×48 canvas."
38
  def ring, do: @ring
39
40
  @doc "The bar above the ring, as SVG path data on the same canvas."
41
  def bar, do: @bar
42
43
  @doc "Both paths of the mark, in drawing order."
44
  def paths, do: [@ring, @bar]
10 45
11
  @doc "The raw SVG path data for the brand mark, on its own 71x48 canvas."
12
  def path, do: @path
46
  @doc "Stroke width the paths are drawn with, in canvas units."
47
  def stroke_width, do: @stroke
13 48
14
  @doc "Width of the mark's native viewBox."
15
  def width, do: 71
49
  @doc "Width of the mark's viewBox."
50
  def width, do: @size
16 51
17
  @doc "Height of the mark's native viewBox."
18
  def height, do: 48
52
  @doc "Height of the mark's viewBox."
53
  def height, do: @size
19 54
end
lib/openagents_web/og/templates.ex modified +11 -2

@@ -271,14 +271,23 @@ defmodule OpenAgentsWeb.OG.Templates do

271 271
  end
272 272
273 273
  defp footer do
274
    # The mark is drawn a shade smaller than the wordmark's cap height, which
275
    # is what keeps a glyph from outweighing the words beside it.
274 276
    scale = 0.62
275 277
    translate_y = @footer_y - trunc(BrandMark.height() * scale)
276 278
279
    # Strokes, not fills: the glyph is a ring with a gap and a bar, and both
280
    # keep their round caps only as strokes. `vector-effect` is deliberately
281
    # absent — the card is rasterized once at a fixed size, so the stroke
282
    # scales with the group exactly as the geometry does.
277 283
    mark =
278 284
      tag("g",
279 285
        transform: "translate(#{@margin}, #{translate_y}) scale(#{scale})",
280
        fill: @muted,
281
        content: [tag("path", d: BrandMark.path())]
286
        fill: "none",
287
        stroke: @muted,
288
        "stroke-width": BrandMark.stroke_width(),
289
        "stroke-linecap": "round",
290
        content: Enum.map(BrandMark.paths(), &tag("path", d: &1))
282 291
      )
283 292
284 293
    wordmark =
priv/static/images/logo.svg modified +3 -5

@@ -1,6 +1,4 @@

1
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 71 48" fill="currentColor" aria-hidden="true">
2
  <path
3
    d="m26.371 33.477-.552-.1c-3.92-.729-6.397-3.1-7.57-6.829-.733-2.324.597-4.035 3.035-4.148 1.995-.092 3.362 1.055 4.57 2.39 1.557 1.72 2.984 3.558 4.514 5.305 2.202 2.515 4.797 4.134 8.347 3.634 3.183-.448 5.958-1.725 8.371-3.828.363-.316.761-.592 1.144-.886l-.241-.284c-2.027.63-4.093.841-6.205.735-3.195-.16-6.24-.828-8.964-2.582-2.486-1.601-4.319-3.746-5.19-6.611-.704-2.315.736-3.934 3.135-3.6.948.133 1.746.56 2.463 1.165.583.493 1.143 1.015 1.738 1.493 2.8 2.25 6.712 2.375 10.265-.068-5.842-.026-9.817-3.24-13.308-7.313-1.366-1.594-2.7-3.216-4.095-4.785-2.698-3.036-5.692-5.71-9.79-6.623C12.8-.623 7.745.14 2.893 2.361 1.926 2.804.997 3.319 0 4.149c.494 0 .763.006 1.032 0 2.446-.064 4.28 1.023 5.602 3.024.962 1.457 1.415 3.104 1.761 4.798.513 2.515.247 5.078.544 7.605.761 6.494 4.08 11.026 10.26 13.346 2.267.852 4.591 1.135 7.172.555ZM10.751 3.852c-.976.246-1.756-.148-2.56-.962 1.377-.343 2.592-.476 3.897-.528-.107.848-.607 1.306-1.336 1.49Zm32.002 37.924c-.085-.626-.62-.901-1.04-1.228-1.857-1.446-4.03-1.958-6.333-2-1.375-.026-2.735-.128-4.031-.61-.595-.22-1.26-.505-1.244-1.272.015-.78.693-1 1.31-1.184.505-.15 1.026-.247 1.6-.382-1.46-.936-2.886-1.065-4.787-.3-2.993 1.202-5.943 1.06-8.926-.017-1.684-.608-3.179-1.563-4.735-2.408l-.077.057c1.29 2.115 3.034 3.817 5.004 5.271 3.793 2.8 7.936 4.471 12.784 3.73A66.714 66.714 0 0 1 37 40.877c1.98-.16 3.866.398 5.753.899Zm-9.14-30.345c-.105-.076-.206-.266-.42-.069 1.745 2.36 3.985 4.098 6.683 5.193 4.354 1.767 8.773 2.07 13.293.51 3.51-1.21 6.033-.028 7.343 3.38.19-3.955-2.137-6.837-5.843-7.401-2.084-.318-4.01.373-5.962.94-5.434 1.575-10.485.798-15.094-2.553Zm27.085 15.425c.708.059 1.416.123 2.124.185-1.6-1.405-3.55-1.517-5.523-1.404-3.003.17-5.167 1.903-7.14 3.972-1.739 1.824-3.31 3.87-5.903 4.604.043.078.054.117.066.117.35.005.699.021 1.047.005 3.768-.17 7.317-.965 10.14-3.7.89-.86 1.685-1.817 2.544-2.71.716-.746 1.584-1.159 2.645-1.07Zm-8.753-4.67c-2.812.246-5.254 1.409-7.548 2.943-1.766 1.18-3.654 1.738-5.776 1.37-.374-.066-.75-.114-1.124-.17l-.013.156c.135.07.265.151.405.207.354.14.702.308 1.07.395 4.083.971 7.992.474 11.516-1.803 2.221-1.435 4.521-1.707 7.013-1.336.252.038.503.083.756.107.234.022.479.255.795.003-2.179-1.574-4.526-2.096-7.094-1.872Zm-10.049-9.544c1.475.051 2.943-.142 4.486-1.059-.452.04-.643.04-.827.076-2.126.424-4.033-.04-5.733-1.383-.623-.493-1.257-.974-1.889-1.457-2.503-1.914-5.374-2.555-8.514-2.5.05.154.054.26.108.315 3.417 3.455 7.371 5.836 12.369 6.008Zm24.727 17.731c-2.114-2.097-4.952-2.367-7.578-.537 1.738.078 3.043.632 4.101 1.728a13 13 0 0 0 1.182 1.106c1.6 1.29 4.311 1.352 5.896.155-1.861-.726-1.861-.726-3.601-2.452Zm-21.058 16.06c-1.858-3.46-4.981-4.24-8.59-4.008a9.667 9.667 0 0 1 2.977 1.39c.84.586 1.547 1.311 2.243 2.055 1.38 1.473 3.534 2.376 4.962 2.07-.656-.412-1.238-.848-1.592-1.507Zl-.006.006-.036-.004.021.018.012.053Za.127.127 0 0 0 .015.043c.005.008.038 0 .058-.002Zl-.008.01.005.026.024.014Z"
4
    fill="#FD4F00"
5
  />
1
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" fill="none" stroke="currentColor" stroke-width="5.15" stroke-linecap="round" aria-hidden="true">
2
  <path d="M32.77 7.47A20.0 20.0 0 1 1 15.23 7.47" />
3
  <path d="M24 2.58V20.29" />
6 4
</svg>
priv/static/images/og-card-default.png modified

Binary file. Nothing to show as text.

This page updates live while a promote is in flight · changelog