Skip to content

feat(agents): support custom provider brand-marks via record paths and user assets - #11896

Open
szaidi-code wants to merge 1 commit into
omacom:quattrofrom
szaidi-code:feat/agents-custom-brand-marks
Open

szaidi-code wants to merge 1 commit into
omacom:quattrofrom
szaidi-code:feat/agents-custom-brand-marks

Conversation

@szaidi-code

Copy link
Copy Markdown
Contributor

Fixes #11885

Description

Currently, iconCandidatesForProvider() in shell/plugins/agents/Panel.qml strictly resolves brand marks by convention from the panel's own root-owned assets directory:

assets/<id>.svg (and assets/<id>-light.svg)

Because that directory ships with the package in /usr/share, third-party collectors and plugins (such as custom usage plugins) cannot ship or install custom marks without needing sudo, and their assets get wiped during system upgrades.

Changes

  1. Record-Carried Marks: Passed optional icon and iconLight from the usage record in displayProvider() in Main.qml. When present in the record, iconCandidatesForProvider() probes them first.
  2. User Assets Directory: Probed ~/.config/omarchy/agents/assets/<id>.svg (and -light.svg) so users and third-party plugins can install SVG brand marks without root.
  3. Tests & Docs: Updated test/shell.d/agents-panel-test.sh to verify record-carried icon propagation and user assets directory candidate resolution, and documented the extension points in shell/plugins/agents/README.md.

Verification

  • Ran test/shell.d/agents-panel-test.sh locally and in Arch Linux container (CT 201) — 10/10 checks passed.
  • Ran all agent usage tests (test/shell.d/agent-*.sh) — 100% passed.

…d user assets

Fixes omacom#11885

Allow third-party agent collectors and plugins to provide custom brand marks:
1. Support optional record-carried `icon` and `iconLight` paths in usage JSON records.
2. Probe user-level assets directory (~/.config/omarchy/agents/assets/<id>.svg) as a fallback without requiring root permissions to drop assets in /usr/share.
3. Update agents-panel-test.sh and README.md documentation.
@omarchybot omarchybot added the enhancement New feature or request label Sep 27, 2026
@llstrk

llstrk commented Sep 29, 2026

Copy link
Copy Markdown

Automated AI review

Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review.

Outcome: The mark walker can skip a loaded mark after a light/dark or provider switch.

Walker skips a found mark

On a list change, source first loads the old index; if that fails, its queued candidateIndex++ runs after the reset and skips the loaded mark. Impact: a light-to-dark switch drops Claude's or Fireworks' built-in mark until the tab changes, and some provider switches drop record or user marks (headless Qt 6.11.2 walker copy).

Suggested change: advance only if source still equals the failed URL.

Reproducer (standalone walker copy, Qt 6.11.2)

Reviewed head: 290b9d9 (omacom/omarchy PR #11896). The walker lines are unchanged by the PR (shell/plugins/agents/Panel.qml 437-460 at head); what changes is the length of the candidate lists it walks.

walker-list-change.qml copies the walker and shows a provider whose only mark is assets/claude.svg (like Claude and Fireworks, which have no -light twin), first on a light surface and then on a dark one, as a live theme switch does. Walker pr gets the lists the PR builds (built-in candidates, then the user assets directory, which is empty here). Walker before gets the lists the panel built before the PR.

Run in a directory that contains assets/claude.svg (the recorded run used <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><rect width="16" height="16" fill="#e0442a"/></svg>) and nothing else. Recorded command, Qt 6.11.2: QT_FORCE_STDERR_LOGGING=1 QT_QPA_PLATFORM=offscreen QT_QUICK_BACKEND=software QT_LOGGING_RULES="qt.qpa.*=false" qml walker-list-change.qml.

import QtQuick

// Standalone copy of the agents panel's hero-mark fallback walker (Panel.qml).
// Both walkers show a provider whose only mark is assets/claude.svg (no -light
// twin, like Claude and Fireworks), first on a light surface, then on a dark
// one, as a live theme switch does. `pr` uses the candidate lists PR #11896
// builds (built-in, then the user assets directory); `before` uses the lists
// the panel built before the PR. Run next to assets/claude.svg with:
//   QT_QPA_PLATFORM=offscreen qml walker-list-change.qml
Item {
  id: root
  width: 64
  height: 64

  property bool light: true

  component Walker: Item {
    id: heroMark
    property bool light: true
    property var lightCandidates: []
    property var darkCandidates: []
    property var candidates: light ? lightCandidates : darkCandidates
    property string candidatesKey: candidates.join("\n")
    property int candidateIndex: 0
    onCandidatesKeyChanged: candidateIndex = 0
    property alias status: heroMarkImage.status
    property alias source: heroMarkImage.source
    width: 32
    height: 32

    Image {
      id: heroMarkImage
      anchors.fill: parent
      source: heroMark.candidateIndex < heroMark.candidates.length ? heroMark.candidates[heroMark.candidateIndex] : ""
      onStatusChanged: if (status === Image.Error && heroMark.candidateIndex < heroMark.candidates.length)
        Qt.callLater(function() { heroMark.candidateIndex++ })
    }
  }

  Walker {
    id: pr
    light: root.light
    lightCandidates: [Qt.resolvedUrl("assets/claude-light.svg"), Qt.resolvedUrl("assets/claude.svg"),
      Qt.resolvedUrl("user-assets/claude-light.svg"), Qt.resolvedUrl("user-assets/claude.svg")]
    darkCandidates: [Qt.resolvedUrl("assets/claude.svg"), Qt.resolvedUrl("user-assets/claude.svg")]
  }

  Walker {
    id: before
    light: root.light
    lightCandidates: [Qt.resolvedUrl("assets/claude-light.svg"), Qt.resolvedUrl("assets/claude.svg")]
    darkCandidates: [Qt.resolvedUrl("assets/claude.svg")]
  }

  function describe(name, w) {
    var source = String(w.source)
    return name + ": index " + w.candidateIndex + " of " + w.candidates.length
      + ", status " + ["Null", "Ready", "Loading", "Error"][w.status]
      + ", showing " + (source === "" ? "nothing (glyph)" : source.split("/").slice(-2).join("/"))
  }

  // Local files load synchronously; move on once nothing has changed for 20 ticks.
  property int stable: 0
  property string last: ""
  Timer {
    interval: 20
    repeat: true
    running: true
    onTriggered: {
      var now = root.describe("pr", pr) + " | " + root.describe("before", before)
      root.stable = now === root.last ? root.stable + 1 : 0
      root.last = now
      if (root.stable < 20) return
      console.log((root.light ? "light surface" : "after switching to a dark surface"))
      console.log("  " + root.describe("pr", pr))
      console.log("  " + root.describe("before", before))
      if (root.light) {
        root.light = false
        root.stable = 0
      } else {
        Qt.quit()
      }
    }
  }
}

Actual output (exit 0; stdout was empty, this is stderr)

The run directory prefix is shown as <workdir>/; nothing else in the output is changed.

file://<workdir>/walker-list-change.qml:31:5: QML Image: Cannot open: file://<workdir>/assets/claude-light.svg
file://<workdir>/walker-list-change.qml:31:5: QML Image: Cannot open: file://<workdir>/assets/claude-light.svg
qml: light surface
qml:   pr: index 1 of 4, status Ready, showing assets/claude.svg
qml:   before: index 1 of 2, status Ready, showing assets/claude.svg
file://<workdir>/walker-list-change.qml:31:5: QML Image: Cannot open: file://<workdir>/user-assets/claude.svg
file://<workdir>/walker-list-change.qml:31:5: QML Image: Cannot open: file://<workdir>/user-assets/claude.svg
qml: after switching to a dark surface
qml:   pr: index 2 of 2, status Null, showing nothing (glyph)
qml:   before: index 0 of 1, status Ready, showing assets/claude.svg

On the light surface both walkers show assets/claude.svg at index 1. After the switch, before shows it at index 0 of the one-entry dark list, while pr ends at index 2 of 2 with nothing loaded, so the panel would show the bar glyph.

Why: when candidates changes, the source binding is evaluated with the old index (1) against the new list and loads user-assets/claude.svg, which fails and queues candidateIndex++. onCandidatesKeyChanged then resets the index to 0 and assets/claude.svg loads, but the queued increment still runs and moves the walk past it. Before the PR the dark list had one entry, so the old index 1 was out of range, source became empty, and nothing was queued. The two Cannot open ... user-assets/claude.svg lines are the stale load and the extra step.

Relative record paths resolve in the panel directory

toUrl() resolves non-absolute paths against the root-owned Panel.qml directory. Impact: ~/... and plugin-relative icons never load; for third-party ids, assets/<id>.svg repeats a built-in URL and stalls the dark-surface walk.

Suggested change: accept only absolute paths and file:// URLs, and document it.

Reproducer (fails at 290b9d9)

Reviewed head: 290b9d9 (omacom/omarchy PR #11896).

Test (PR's own style)

Save as test/shell.d/agents-panel-icon-paths-test.sh in a checkout of the reviewed head and run bash test/shell.d/agents-panel-icon-paths-test.sh. It slices the real iconCandidatesForProvider() out of Panel.qml and evaluates it, the same way test/shell.d/agent-usage-claude-limits-test.sh evaluates the limit helpers. Qt.resolvedUrl() is stubbed with standard URL resolution against the panel's install URL; on Qt 6.11.2 the real Qt.resolvedUrl() returned the same strings as this stub for equivalent inputs (a ~/ path, assets/zai.svg, and a relative file name).

#!/bin/bash

set -euo pipefail

source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"

# Evaluates the panel's mark candidates the way agent-usage-claude-limits-test.sh
# evaluates the limit helpers. Qt.resolvedUrl() resolves a relative string
# against the QML file that calls it, so the stub resolves against Panel.qml's
# install location.
run_node_test <<'JS'
const fs = require('fs')
const panel = fs.readFileSync(root + '/shell/plugins/agents/Panel.qml', 'utf8')
const start = panel.indexOf('function colorChannelLuminance')
const end = panel.indexOf('// Nothing to report, nothing in the bar')
assert(start > 0 && end > start, 'agents panel exposes its mark helpers')

const panelUrl = 'file:///usr/share/omarchy/shell/plugins/agents/Panel.qml'
const Qt = { resolvedUrl: (url) => new URL(String(url), panelUrl).href }
const Quickshell = { env: (name) => ({ HOME: '/home/me' })[name] || null }
const Color = { background: { r: 0.1, g: 0.1, b: 0.15 } }
const utilSource = fs.readFileSync(root + '/shell/Commons/Util.qml', 'utf8')
const Util = new Function(utilSource.slice(utilSource.indexOf('function fileUrl(path)'), utilSource.indexOf('function isVideoPath')) + '\nreturn { fileUrl }')()
eval(panel.slice(start, end))

const dark = { r: 0.1, g: 0.1, b: 0.15 }
for (const icon of ['~/.local/share/zai/zai.svg', 'icons/zai.svg', 'assets/zai.svg']) {
  const candidates = iconCandidatesForProvider({ providerId: 'zai', icon: icon, iconLight: '' }, dark).map(String)
  console.log(`icon ${JSON.stringify(icon)} -> ${JSON.stringify(candidates, null, 2)}`)
}

for (const icon of ['~/.local/share/zai/zai.svg', 'icons/zai.svg']) {
  const candidates = iconCandidatesForProvider({ providerId: 'zai', icon: icon, iconLight: '' }, dark).map(String)
  const insidePanel = new URL(icon, panelUrl).href
  assert(!candidates.includes(insidePanel), `record icon ${icon} is not looked up inside the panel's own directory`, `unexpected candidate: ${insidePanel}`)
}

// The hero walker cannot step past a URL equal to the one that just failed.
const repeated = iconCandidatesForProvider({ providerId: 'zai', icon: 'assets/zai.svg', iconLight: '' }, dark).map(String)
assertEqual(new Set(repeated).size, repeated.length, 'record icon assets/zai.svg does not repeat a built-in candidate')
JS

Actual output at 290b9d9 (exit 1)

stdout:

ok - agents panel exposes its mark helpers
icon "~/.local/share/zai/zai.svg" -> [
  "file:///usr/share/omarchy/shell/plugins/agents/~/.local/share/zai/zai.svg",
  "file:///usr/share/omarchy/shell/plugins/agents/assets/zai.svg",
  "file:///home/me/.config/omarchy/agents/assets/zai.svg"
]
icon "icons/zai.svg" -> [
  "file:///usr/share/omarchy/shell/plugins/agents/icons/zai.svg",
  "file:///usr/share/omarchy/shell/plugins/agents/assets/zai.svg",
  "file:///home/me/.config/omarchy/agents/assets/zai.svg"
]
icon "assets/zai.svg" -> [
  "file:///usr/share/omarchy/shell/plugins/agents/assets/zai.svg",
  "file:///usr/share/omarchy/shell/plugins/agents/assets/zai.svg",
  "file:///home/me/.config/omarchy/agents/assets/zai.svg"
]

stderr:

unexpected candidate: file:///usr/share/omarchy/shell/plugins/agents/~/.local/share/zai/zai.svg
not ok - record icon ~/.local/share/zai/zai.svg is not looked up inside the panel's own directory

The ~ path and the relative path both become candidates inside /usr/share/omarchy/shell/plugins/agents/, the root-owned directory the PR is meant to avoid. assets/zai.svg produces the same URL as the built-in candidate, twice in a row.

Why a repeated URL matters: standalone walker copy on Qt 6.11.2

walker-repeat.qml copies the hero-mark fallback walker from Panel.qml and feeds it two lists that end in an existing present.svg: one with two different missing files first, one with the same missing file twice. Run in a directory that contains present.svg (the recorded run used <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><rect width="16" height="16" fill="#e0442a"/></svg>). Recorded command: QT_FORCE_STDERR_LOGGING=1 QT_QPA_PLATFORM=offscreen QT_QUICK_BACKEND=software QT_LOGGING_RULES="qt.qpa.*=false" qml walker-repeat.qml (Qt 6.11.2).

import QtQuick

// Standalone copy of the agents panel's hero-mark fallback walker (Panel.qml),
// fed two candidate lists. Run next to a present.svg with:
//   QT_QPA_PLATFORM=offscreen qml walker-repeat.qml
Item {
  id: root
  width: 64
  height: 64

  component Walker: Item {
    id: heroMark
    property var candidates: []
    property string candidatesKey: candidates.join("\n")
    property int candidateIndex: 0
    onCandidatesKeyChanged: candidateIndex = 0
    property alias status: heroMarkImage.status
    width: 32
    height: 32

    Image {
      id: heroMarkImage
      anchors.fill: parent
      source: heroMark.candidateIndex < heroMark.candidates.length ? heroMark.candidates[heroMark.candidateIndex] : ""
      onStatusChanged: if (status === Image.Error && heroMark.candidateIndex < heroMark.candidates.length)
        Qt.callLater(function() { heroMark.candidateIndex++ })
    }
  }

  // Distinct missing URLs, then a present one.
  Walker {
    id: distinct
    candidates: [Qt.resolvedUrl("missing-a.svg"), Qt.resolvedUrl("missing-b.svg"), Qt.resolvedUrl("present.svg")]
  }

  // The same missing URL twice in a row, then a present one.
  Walker {
    id: repeated
    candidates: [Qt.resolvedUrl("missing-a.svg"), Qt.resolvedUrl("missing-a.svg"), Qt.resolvedUrl("present.svg")]
  }

  function describe(name, w) {
    return name + ": index " + w.candidateIndex + " of " + w.candidates.length
      + ", status " + ["Null", "Ready", "Loading", "Error"][w.status]
  }

  // Local files load synchronously; report once neither walker has moved for 20 ticks.
  property int stable: 0
  property string last: ""
  Timer {
    interval: 20
    repeat: true
    running: true
    onTriggered: {
      var now = root.describe("distinct", distinct) + " | " + root.describe("repeated", repeated)
      root.stable = now === root.last ? root.stable + 1 : 0
      root.last = now
      if (root.stable >= 20) {
        console.log(root.describe("distinct", distinct))
        console.log(root.describe("repeated", repeated))
        Qt.quit()
      }
    }
  }
}

Actual output (exit 0; stdout was empty, this is stderr):

The run directory prefix is shown as <workdir>/; nothing else in the output is changed.

file://<workdir>/walker-repeat.qml:21:5: QML Image: Cannot open: file://<workdir>/missing-a.svg
file://<workdir>/walker-repeat.qml:21:5: QML Image: Cannot open: file://<workdir>/missing-a.svg
file://<workdir>/walker-repeat.qml:21:5: QML Image: Cannot open: file://<workdir>/missing-b.svg
qml: distinct: index 2 of 3, status Ready
qml: repeated: index 1 of 3, status Error

With two different missing files the walk reaches present.svg. With the same missing URL twice it stops at index 1 in Error, because Image ignores a source that equals the current one (QQuickImageBase::setSource() returns early when url == d->url), so no second statusChanged fires. In the panel this means a record with "icon": "assets/zai.svg" on a dark surface never reaches ~/.config/omarchy/agents/assets/zai.svg, even when that file exists.

More findings: file URLs, test assertions

File URLs are built without encoding

toUrl() and the user-directory candidates use "file://" + path, and any string containing :// is passed through. Impact: a # in an absolute path moves the rest into the URL fragment and the mark does not load, and an https:// icon makes the panel request it over the network.

Suggested change: build these URLs with Util.fileUrl(), as iconSource() in NotificationCard.qml does, and pass through only file:// (and image:// if theme icons are wanted).

The new test assertions only match source text

The four new checks look for strings in Main.qml and Panel.qml. Impact: the merge-base code plus two comments containing those strings passes all 10 checks, as do mutants that delete the new record or user-directory candidates or reorder them.

Suggested change: slice and evaluate iconCandidatesForProvider() the way agent-usage-claude-limits-test.sh evaluates the limit helpers, and assert the candidate lists for light and dark surfaces, record icons and XDG_CONFIG_HOME set or unset.

Reproducer: file URLs (fails at 290b9d9)

Reviewed head: 290b9d9 (omacom/omarchy PR #11896).

Test (PR's own style)

Save as test/shell.d/agents-panel-icon-urls-test.sh in a checkout of the reviewed head and run bash test/shell.d/agents-panel-icon-urls-test.sh. Same harness as the limit-helper test in test/shell.d/agent-usage-claude-limits-test.sh.

#!/bin/bash

set -euo pipefail

source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh"

# Same harness as the limit-helper test: slice the real function out of
# Panel.qml and run it with the QML globals stubbed.
run_node_test <<'JS'
const fs = require('fs')
const panel = fs.readFileSync(root + '/shell/plugins/agents/Panel.qml', 'utf8')
const start = panel.indexOf('function colorChannelLuminance')
const end = panel.indexOf('// Nothing to report, nothing in the bar')
assert(start > 0 && end > start, 'agents panel exposes its mark helpers')

const panelUrl = 'file:///usr/share/omarchy/shell/plugins/agents/Panel.qml'
const Qt = { resolvedUrl: (url) => new URL(String(url), panelUrl).href }
const Quickshell = { env: (name) => ({ HOME: '/home/me' })[name] || null }
const Color = { background: { r: 0.1, g: 0.1, b: 0.15 } }
const utilSource = fs.readFileSync(root + '/shell/Commons/Util.qml', 'utf8')
const Util = new Function(utilSource.slice(utilSource.indexOf('function fileUrl(path)'), utilSource.indexOf('function isVideoPath')) + '\nreturn { fileUrl }')()
eval(panel.slice(start, end))

const dark = { r: 0.1, g: 0.1, b: 0.15 }
const marks = (icon) => iconCandidatesForProvider({ providerId: 'zai', icon: icon, iconLight: '' }, dark).map(String)

const hashPath = '/home/me/icons #2/zai.svg'
const remote = 'https://example.invalid/zai.svg'
console.log(`icon ${JSON.stringify(hashPath)} -> ${JSON.stringify(marks(hashPath), null, 2)}`)
console.log(`icon ${JSON.stringify(remote)} -> ${JSON.stringify(marks(remote), null, 2)}`)

const first = new URL(marks(hashPath)[0])
assertEqual(decodeURIComponent(first.pathname), hashPath, 'an absolute record icon keeps its whole path in the file URL')

const remoteCandidates = marks(remote)
assert(remoteCandidates.every((c) => c.startsWith('file:')), 'a record icon never points the panel at the network', `candidates: ${remoteCandidates.join(' ')}`)
JS

Actual output at 290b9d9 (exit 1)

stdout:

ok - agents panel exposes its mark helpers
icon "/home/me/icons #2/zai.svg" -> [
  "file:///home/me/icons #2/zai.svg",
  "file:///usr/share/omarchy/shell/plugins/agents/assets/zai.svg",
  "file:///home/me/.config/omarchy/agents/assets/zai.svg"
]
icon "https://example.invalid/zai.svg" -> [
  "https://example.invalid/zai.svg",
  "file:///usr/share/omarchy/shell/plugins/agents/assets/zai.svg",
  "file:///home/me/.config/omarchy/agents/assets/zai.svg"
]

stderr:

expected: /home/me/icons #2/zai.svg
actual:   /home/me/icons 
not ok - an absolute record icon keeps its whole path in the file URL

"file://" + path leaves #2/zai.svg in the URL fragment, so the file URL points at /home/me/icons . Util.fileUrl() in shell/Commons/Util.qml (percent-encodes each segment) exists for this. The https:// value is passed to Image.source unchanged.

Reproducer: test assertions (passes on merge-base code)

Reviewed head: 290b9d9 (omacom/omarchy PR #11896). Merge-base: 86a2e58.

Steps

git checkout 86a2e5830eae4d660a66df8cf37f0a35bf4fe8a2
git checkout 290b9d9841b06110ce771af15100aae7380b63ac -- test/shell.d/agents-panel-test.sh
git apply comments-only.patch   # the patch below: comments only, no behaviour change
bash test/shell.d/agents-panel-test.sh

comments-only.patch (the merge-base behaviour is unchanged; no record or user-directory candidate is ever produced):

--- a/shell/plugins/agents/Panel.qml
+++ b/shell/plugins/agents/Panel.qml
@@ -285,6 +285,7 @@
   // Marks resolve by convention, so a new agent's data file needs nothing
   // from this panel: assets/<id>.svg if it ships one, the module's bar glyph
   // if it doesn't.
+  // MUTANT (comment only): if (p.icon) agentAssetsDir
   function iconCandidatesForProvider(p, surfaceColor) {
     if (!p) return []
     var candidates = []
--- a/shell/plugins/agents/Main.qml
+++ b/shell/plugins/agents/Main.qml
@@ -250,6 +250,7 @@
       ready: record.ready === true || synced,
       usageStatusText: String(record.usageStatusText || ""),
       authHelpText: String(record.authHelpText || ""),
+      // MUTANT (comment only): icon: String(record.icon || "") iconLight: String(record.iconLight || "")
 
       // Rate limits and balances stay per-account and are never merged
       // across devices.

The recorded run built the same files in a disposable tree (merge-base Panel.qml and Main.qml with this patch, the head agents-panel-test.sh, and base-test.sh, which is identical at both commits). The patch applies to the merge-base with git apply --check.

Actual output (exit 0)

ok - agents panel launches the default agent
ok - agents panel uses the desktop agent launcher
ok - agents right click launches the agent
ok - agents middle click still advances the subscription
ok - agents left click still toggles the panel
ok - agents right click no longer refreshes
ok - Main displayProvider preserves custom icon field
ok - Main displayProvider preserves custom iconLight field
ok - Panel iconCandidatesForProvider checks record icon
ok - Panel iconCandidatesForProvider checks user config agent assets directory

For comparison, the same head test against the unmodified merge-base (exit 1; stdout followed by stderr):

ok - agents panel launches the default agent
ok - agents panel uses the desktop agent launcher
ok - agents right click launches the agent
ok - agents middle click still advances the subscription
ok - agents left click still toggles the panel
ok - agents right click no longer refreshes
not ok - Main displayProvider preserves custom icon field

Deleting the user-directory block at head (the if (isLight) line and both pushes), deleting the two record-icon pushes, or moving the user directory ahead of the built-in assets also leaves all 10 checks passing.

Details

Verified (headless Qt 6.11.2 probe of the real function and walker on a fresh walk, and sandbox test runs):

  • An existing absolute record icon loads first; iconLight is tried first on light surfaces.
  • User-directory marks in ~/.config/omarchy/agents/assets/ load on light and dark surfaces, including the -light twin; with XDG_CONFIG_HOME set, the candidates move to $XDG_CONFIG_HOME/omarchy/agents/assets/ (checked as candidate strings).
  • A missing record icon falls through to the built-in and user-directory candidates.
  • The PR test passes 10/10 at head and the patch applies cleanly to current quattro with the same result; the neighbouring agent usage tests pass.

Optional notes:

  • iconLight without icon is ignored, because the whole record branch is gated on p.icon; either document that or accept iconLight alone.
  • A mark added to the user directory while the shell runs is not picked up by refreshes or by reopening the panel; nothing watches the directory, so it appears after switching tabs away and back, a light/dark change or a restart. A README sentence would avoid confusion.
  • Precedence is record, then built-in, then user directory, so a user mark cannot replace a bundled one (for example Grok's, if Add a Grok collector to the agents usage panel #12352 lands); the README states neither this nor the -light twin in the user directory.

Related open PRs: #10080 rewrites the same lines of iconCandidatesForProvider() and conflicts textually in Panel.qml; #13198 conflicts only at the end of agents-panel-test.sh; #12353 merges cleanly.


Review information

Test scope: Sandbox tests and headless Qt 6.11.2 probes at 290b9d98; no live desktop.

AI process: Opus 5.5 Medium coordination and synthesis, Opus 5.5 Xhigh technical review and final fact check, GPT 6 Sol Xhigh search for related issues, Opus 5.5 Medium editorial check.

Opt out: To stop receiving these reviews, reply to this comment saying so.

@jandrusk

Copy link
Copy Markdown

Thanks for this. It's the extension point #11885 asks for. Two things are still open:

  • The branch conflicts with quattro and needs a rebase.
  • The walker finding from the automated review above hasn't been addressed. After a light/dark or provider switch, the queued candidateIndex++ can run after the reset and skip a mark that already loaded. Only advancing while source still points at the URL that failed fixes it:
onStatusChanged: if (status === Image.Error && mark.candidateIndex < mark.candidates.length) {
  const failed = source
  Qt.callLater(function() { if (markImage.source === failed) mark.candidateIndex++ })
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Agents panel: let plugins extend the per-provider brand-mark assets

4 participants