agent-discover 1.2.3 → 1.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/agent-desk-plugin.json +1 -1
- package/dist/ui/app.js +5 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [1.2.4] - 2026-04-11
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- **`src/ui/app.js`** `initTheme()`: added a null-guard before attaching the click handler on `#theme-toggle`. The element is absent when agent-discover's UI is mounted as an embedded plugin inside agent-desk's shadow DOM (the host drives theming), and the unguarded `toggle.addEventListener` was throwing `TypeError: Cannot read properties of null` during plugin init. That crash cascaded into (a) the Discover view rendering completely blank in agent-desk, and (b) every view switch firing a renderer pageerror. The sibling `updateThemeIcon` helper already had the guard; `initTheme` just forgot. One-line fix: `if (!toggle) return;` before the listener wiring.
|
|
13
|
+
|
|
8
14
|
## [1.2.3] - 2026-04-09
|
|
9
15
|
|
|
10
16
|
### Documentation
|
package/agent-desk-plugin.json
CHANGED
package/dist/ui/app.js
CHANGED
|
@@ -107,6 +107,11 @@
|
|
|
107
107
|
document.documentElement.getAttribute('data-theme') === 'dark' ? 'dark' : 'light';
|
|
108
108
|
updateThemeIcon(currentTheme);
|
|
109
109
|
|
|
110
|
+
// When mounted as an embedded plugin inside agent-desk, the shadow root
|
|
111
|
+
// may not contain a #theme-toggle element (the host drives theming).
|
|
112
|
+
// Bail out gracefully instead of throwing on the click wiring.
|
|
113
|
+
if (!toggle) return;
|
|
114
|
+
|
|
110
115
|
toggle.addEventListener('click', function () {
|
|
111
116
|
var isDark = document.documentElement.getAttribute('data-theme') === 'dark';
|
|
112
117
|
var next = isDark ? 'light' : 'dark';
|
package/package.json
CHANGED