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

stacklok / toolhive-studio / 27135833260
71%

Build:
DEFAULT BRANCH: main
Ran 08 Jun 2026 11:58AM UTC
Jobs 1
Files 522
Run time 1min
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 11:54AM UTC coverage: 70.76% (+0.3%) from 70.508%
27135833260

push

github

web-flow
feat(main): allow tray menu template builder injection (#2311)

* 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>

* chore(main): export MenuTemplateBuilder type for downstream consumers

Promote the MenuTemplateBuilder type alias from module-private to exported
so TypeScript consumers can import the exact signature they need to satisfy
without re-declaring it.

No runtime change. Follows up on Copilot review feedback on #2311.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

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.06 hits per line

Jobs
ID Job ID Ran Files Coverage
1 27135833260.1 08 Jun 2026 11:58AM UTC 522
70.76
GitHub Action Run
Source Files on build 27135833260
  • 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 #27135833260
  • f487ce67 on github
  • Prev Build on v0.36.1 (#27014270792)
  • Next Build on main (#27143536021)
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