• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive-studio / 27125868977
71%
main: 71%

Build:
Build:
LAST BUILD BRANCH: fix/auto-2316
DEFAULT BRANCH: main
Ran 08 Jun 2026 08:43AM UTC
Jobs 1
Files 522
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Jun 2026 08:38AM UTC coverage: 70.76% (+0.3%) from 70.508%
27125868977

Pull #2311

github

peppescg
feat(main): allow tray menu template builder injection

Add a module-level template builder slot and a setter so downstream
consumers can recompose the tray menu without forking the module:

    import { setMenuTemplateBuilder, createStatusMenuItem, ... } from './system-tray'

    setMenuTemplateBuilder((running) => [
      createStatusMenuItem(running),
      // ... omit or add entries as needed
    ])

The default `createMenuTemplate` is unchanged; callers that do not invoke
the setter get the exact same template as today. `setupTrayMenu` now
invokes `menuTemplateBuilder(running)` instead of `createMenuTemplate`
directly so the swap actually reaches `Menu.buildFromTemplate`.

Combined with the helper exports from #2302, this forms a minimal,
consumer-agnostic dependency-injection seam — upstream stays unaware of
who consumes it, while overlays/packagers can compose any menu they need.

The setter accepts `(running: boolean) => Electron.MenuItemConstructorOptions[]`
(broader than the default's inferred type) so consumers are free to mix
in any valid Electron menu item shape.

Tests cover default behavior preservation, custom builder routing through
`Menu.buildFromTemplate`, and `toolHiveIsRunning` propagation via
`updateTrayStatus`.

Refs: #2310

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Pull Request #2311: feat(main): allow tray menu template builder injection

5222 of 8004 branches covered (65.24%)

3 of 3 new or added lines in 1 file covered. (100.0%)

7739 of 10937 relevant lines covered (70.76%)

115.04 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27125868977.1 08 Jun 2026 08:43AM UTC 522
70.76
GitHub Action Run
Source Files on build 27125868977
  • Tree
  • List 522
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #27125868977
  • Pull Request #2311
  • PR Base - main (#26951542378)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc