Finish the basecoat consolidation: aria-label, stale prose, format

dcbe8a46684c · AtlantisPleb · · parent 7285e05753b2

Finish the basecoat consolidation: aria-label, stale prose, format

- flash dismiss control: aria-label "close" -> "Dismiss notice". The control
  is icon-only, so its accessible name is the only name it has; "close"
  names the gesture, not the thing being acted on. Lane C found this and
  correctly refused to weaken the assertion to [aria-label] to force green,
  handing it off because the component was being rewritten concurrently.
- component_catalog + components_live: prose still told readers CoreComponents
  is "styled with DaisyUI", which is now false and user-visible.
- components_live: dropped a dangling "link link-hover" that rendered as a
  plain anchor once DaisyUI was gone.
- mix format normalisation across three files.

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/component_catalog.ex
  • modified lib/openagents_web/components/core_components.ex
  • modified lib/openagents_web/live/admin_forge_live.ex
  • modified lib/openagents_web/live/components_live.ex
  • modified test/openagents_web/controllers/sarah_error_json_test.exs
  • modified test/support/providers/test.ex

Diff

6 files changed, +34 -23

lib/openagents_web/component_catalog.ex modified +2 -2

@@ -12,8 +12,8 @@ defmodule OpenAgentsWeb.ComponentCatalog do

12 12
13 13
  Two component sets ship in this repo and they are catalogued separately:
14 14
15
    * `OpenAgentsWeb.CoreComponents` — the Phoenix-generated set, styled with
16
      DaisyUI. Imported by `use OpenAgentsWeb, :live_view`.
15
    * `OpenAgentsWeb.CoreComponents` — the Phoenix-generated set, restyled onto
16
      basecoat. Imported by `use OpenAgentsWeb, :live_view`.
17 17
    * `OpenAgentsWeb.SarahUI` — the Sarah interface primitives, imported
18 18
      separately via `sarah_html_helpers`. `button`, `input`, and `icon` exist
19 19
      in both sets, which is why the SarahUI slugs are prefixed `sarah-`.
lib/openagents_web/components/core_components.ex modified +9 -1

@@ -86,7 +86,15 @@ defmodule OpenAgentsWeb.CoreComponents do

86 86
          <p :if={@title} class="font-semibold">{@title}</p>
87 87
          <p>{msg}</p>
88 88
        </section>
89
        <button type="button" class="group self-start cursor-pointer" aria-label={gettext("close")}>
89
        <%!-- The control is icon-only, so its accessible name is the only name it
90
        has. "close" describes the gesture; "Dismiss notice" describes what the
91
        user is acting on, which is what a screen reader needs when the button
92
        is announced out of context. IconAffordancesTest guards this. --%>
93
        <button
94
          type="button"
95
          class="group self-start cursor-pointer"
96
          aria-label={gettext("Dismiss notice")}
97
        >
90 98
          <.icon name="hero-x-mark" class="size-5 opacity-40 group-hover:opacity-70" />
91 99
        </button>
92 100
      </div>
lib/openagents_web/live/admin_forge_live.ex modified +13 -13

@@ -43,19 +43,19 @@ defmodule OpenAgentsWeb.AdminForgeLive do

43 43
44 44
      socket =
45 45
        case Targets.promote(socket.assigns.repo, sha, operator, commit_store: &git_store/2) do
46
        {:ok, _target} ->
47
          put_flash(socket, :info, "Promoted #{String.slice(sha, 0, 12)} as the fleet target.")
48
49
        {:error, :unknown_sha} ->
50
          put_flash(
51
            socket,
52
            :error,
53
            "That commit is not in the forge — only pushed commits are promotable."
54
          )
55
56
        {:error, _reason} ->
57
          put_flash(socket, :error, "Promotion failed.")
58
      end
46
          {:ok, _target} ->
47
            put_flash(socket, :info, "Promoted #{String.slice(sha, 0, 12)} as the fleet target.")
48
49
          {:error, :unknown_sha} ->
50
            put_flash(
51
              socket,
52
              :error,
53
              "That commit is not in the forge — only pushed commits are promotable."
54
            )
55
56
          {:error, _reason} ->
57
            put_flash(socket, :error, "Promotion failed.")
58
        end
59 59
60 60
      {:noreply, load(socket)}
61 61
    end
lib/openagents_web/live/components_live.ex modified +4 -2

@@ -109,7 +109,7 @@ defmodule OpenAgentsWeb.ComponentsLive do

109 109
      <p class="text-base-content/70 mb-8 text-pretty max-w-[68ch]">
110 110
        Live examples of every reusable function component in this repository, drawn from
111 111
        <code>OpenAgentsWeb.CoreComponents</code>
112
        (the Phoenix set, styled with DaisyUI), <code>OpenAgentsWeb.SarahUI</code>
112
        (the Phoenix set, restyled onto basecoat), <code>OpenAgentsWeb.SarahUI</code>
113 113
        (the Sarah interface primitives), and <code>OpenAgentsWeb.Layouts</code>. <code>button</code>, <code>input</code>, and
114 114
        <code>icon</code>
115 115
        exist in both component sets, so the SarahUI entries are listed separately.

@@ -222,7 +222,9 @@ defmodule OpenAgentsWeb.ComponentsLive do

222 222
      <:col :let={row} label="Repository">{row.repo}</:col>
223 223
      <:col :let={row} label="State">{row.state}</:col>
224 224
      <:action :let={row}>
225
        <.link navigate={~p"/"} class="link link-hover">View {row.repo}</.link>
225
        <.link navigate={~p"/"} class="underline underline-offset-2 hover:no-underline">
226
          View {row.repo}
227
        </.link>
226 228
      </:action>
227 229
    </.table>
228 230
    """
test/openagents_web/controllers/sarah_error_json_test.exs modified +1

@@ -1,5 +1,6 @@

1 1
defmodule OpenAgentsWeb.SarahErrorJSONTest do
2 2
  use OpenAgentsWeb.SarahConnCase, async: true
3
3 4
  test "renders 404" do
4 5
    assert OpenAgentsWeb.ErrorJSON.render("404.json", %{}) == %{errors: %{detail: "Not Found"}}
5 6
  end
test/support/providers/test.ex modified +5 -5

@@ -53,12 +53,12 @@ defmodule OpenAgents.Providers.Test do

53 53
        :ok
54 54
55 55
      "[inspect-persona]" ->
56
        # The re-namespacing port rewrote this literal to "You are OpenAgents.",
57
        # but it is not a module name — it is a quote from the installed
58
        # persona document (`priv/sarah/persona/sarah.v1.md`, which still reads
59
        # "You are Sarah. You are an OpenAgent built by OpenAgents."). Asserting
60
        # the shipped persona text is the whole point of this branch.
56 61
        result =
57
          # The re-namespacing port rewrote this literal to "You are OpenAgents.",
58
          # but it is not a module name — it is a quote from the installed
59
          # persona document (`priv/sarah/persona/sarah.v1.md`, which still reads
60
          # "You are Sarah. You are an OpenAgent built by OpenAgents."). Asserting
61
          # the shipped persona text is the whole point of this branch.
62 62
          if String.contains?(request.instructions, "You are Sarah.") and
63 63
               String.contains?(request.instructions, "You are an OpenAgent") and
64 64
               String.contains?(request.instructions, "sarah.role.general_collaborator.v1") do

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