@marimo-team/islands 0.26.1-dev118 → 0.26.1-dev121
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/dist/{ErrorBoundary-Gr2Kt5kj.js → ErrorBoundary-CgTA4k9x.js} +1 -1
- package/dist/{code-visibility-BFFe0rT7.js → code-visibility-B8EvGyEi.js} +1 -1
- package/dist/{common-7eNIhSN-.js → common-e8HwKSAH.js} +1 -1
- package/dist/{data-grid-overlay-editor-B37-1-8n.js → data-grid-overlay-editor-gge326JC.js} +1 -1
- package/dist/{feedback-button-CpQcgVuz.js → feedback-button-AYmGV5D6.js} +2 -2
- package/dist/{glide-data-editor-BxTlDHV5.js → glide-data-editor-CSdUM_oQ.js} +3 -3
- package/dist/{globals-ljOLdTJr.js → globals-2iTWbh50.js} +1 -1
- package/dist/main.js +6 -6
- package/dist/{number-overlay-editor-DGKTstav.js → number-overlay-editor-C0_f1K1u.js} +1 -1
- package/dist/{reveal-component-BLJMkx2N.js → reveal-component-DD01cPtC.js} +2 -2
- package/package.json +1 -1
- package/src/components/editor/chrome/wrapper/__tests__/attachment-status.test.tsx +36 -21
- package/src/components/editor/chrome/wrapper/footer-items/attachment-status.tsx +87 -65
|
@@ -148,7 +148,7 @@ function L(e) {
|
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/components/editor/boundary/ErrorBoundary.tsx
|
|
151
|
-
var R = (0, T.lazy)(() => import("./feedback-button-
|
|
151
|
+
var R = (0, T.lazy)(() => import("./feedback-button-AYmGV5D6.js").then((e) => ({ default: e.FeedbackModal }))), z = (e) => {
|
|
152
152
|
let t = (0, w.c)(2), n;
|
|
153
153
|
return t[0] === e.children ? n = t[1] : (n = /* @__PURE__ */ (0, N.jsx)(O, {
|
|
154
154
|
FallbackComponent: B,
|
|
@@ -14,7 +14,7 @@ function y() {
|
|
|
14
14
|
return e.warn("Failed to get version from mount config"), null;
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
var b = y() || "0.26.1-
|
|
17
|
+
var b = y() || "0.26.1-dev121", x = l(b), S = l(!0);
|
|
18
18
|
l(null);
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/core/wasm/state.ts
|
|
@@ -35,7 +35,7 @@ import { o as Ea } from "./dist-BG-7Qpaj.js";
|
|
|
35
35
|
import { t as Da } from "./useAsyncData-P5-Oovhq.js";
|
|
36
36
|
import { i as Oa, n as ka, o as Aa, r as ja } from "./loader-C9-qRO3m.js";
|
|
37
37
|
import { n as W, t as G } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
38
|
-
import { n as Ma, t as Na } from "./ErrorBoundary-
|
|
38
|
+
import { n as Ma, t as Na } from "./ErrorBoundary-CgTA4k9x.js";
|
|
39
39
|
import { t as Pa } from "./useIframeCapabilities-_0KX0nu_.js";
|
|
40
40
|
import { W as Fa, n as Ia } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
41
41
|
var La = H("arrow-down-wide-narrow", [
|
|
@@ -2,7 +2,7 @@ import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
3
|
import { t as n } from "./react-dom-DdqGVp5N.js";
|
|
4
4
|
import { c as r, l as i, u as a } from "./data-grid-types-DBNnjiYJ.js";
|
|
5
|
-
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-
|
|
5
|
+
import { a as o, i as s, n as c, r as l } from "./glide-data-editor-CSdUM_oQ.js";
|
|
6
6
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/data-grid-overlay-editor-style.js
|
|
7
7
|
var u = /* @__PURE__ */ e(t(), 1), d = /* @__PURE__ */ e(n(), 1), f = /*#__PURE__*/ o("div")({
|
|
8
8
|
name: "DataGridOverlayEditorStyle",
|
|
@@ -4,13 +4,13 @@ import { t as r } from "./react-Bgs_wQh3.js";
|
|
|
4
4
|
import { t as i } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { t as a } from "./copy-icon-zP4__HPI.js";
|
|
6
6
|
import { A as o, L as s, Y as c, i as l, j as u, n as d, sn as f, tn as p, z as m } from "./error-entries-B4LgfizR.js";
|
|
7
|
-
import { n as h, t as ee } from "./globals-
|
|
7
|
+
import { n as h, t as ee } from "./globals-2iTWbh50.js";
|
|
8
8
|
import { r as g } from "./assertNever-B9_7z-dW.js";
|
|
9
9
|
import { t as _ } from "./jsx-runtime-D8btoEHk.js";
|
|
10
10
|
import { Wt as te, h as v, wt as ne } from "./use-restore-focus-CCfk-ey2.js";
|
|
11
11
|
import { a as re, i as ie, n as ae, r as oe } from "./dialog-DfKgafXJ.js";
|
|
12
12
|
import { t as se } from "./useAsyncData-P5-Oovhq.js";
|
|
13
|
-
import { t as ce } from "./code-visibility-
|
|
13
|
+
import { t as ce } from "./code-visibility-B8EvGyEi.js";
|
|
14
14
|
//#region src/components/ui/skeleton.tsx
|
|
15
15
|
var y = /* @__PURE__ */ e(r(), 1), b = i(), x = _(), S = (e) => {
|
|
16
16
|
let n = (0, b.c)(8), r, i;
|
|
@@ -14,7 +14,7 @@ import { t as F } from "./jsx-runtime-D8btoEHk.js";
|
|
|
14
14
|
import { f as ae, r as I } from "./use-restore-focus-CCfk-ey2.js";
|
|
15
15
|
import { t as oe } from "./useEvent-BoN7U38T.js";
|
|
16
16
|
import { n as L, t as se } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
|
|
17
|
-
import { t as ce } from "./ErrorBoundary-
|
|
17
|
+
import { t as ce } from "./ErrorBoundary-CgTA4k9x.js";
|
|
18
18
|
import { A as le, C as ue, D as de, E as fe, F as pe, I as me, L as he, M as ge, N as R, O as z, P as _e, R as ve, S as ye, T as be, _ as xe, a as Se, b as B, c as Ce, d as we, f as V, g as Te, h as Ee, i as De, j as H, k as Oe, l as ke, m as Ae, n as je, o as Me, p as Ne, r as U, s as Pe, t as Fe, u as Ie, v as Le, w as Re, x as ze, y as Be, z as Ve } from "./data-grid-types-DBNnjiYJ.js";
|
|
19
19
|
//#region ../node_modules/.pnpm/@emotion+memoize@0.9.0/node_modules/@emotion/memoize/dist/emotion-memoize.esm.js
|
|
20
20
|
function He(e) {
|
|
@@ -7061,7 +7061,7 @@ function ds(e, t, n, r, i) {
|
|
|
7061
7061
|
}
|
|
7062
7062
|
//#endregion
|
|
7063
7063
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/node_modules/@glideapps/glide-data-grid/dist/esm/data-editor/data-editor.js
|
|
7064
|
-
var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-
|
|
7064
|
+
var fs = /* @__PURE__ */ e(Tr(), 1), ps = /* @__PURE__ */ e(kr(), 1), ms = W.lazy(async () => await import("./data-grid-overlay-editor-gge326JC.js")), hs = 0;
|
|
7065
7065
|
function gs(e) {
|
|
7066
7066
|
return (0, fs.default)((0, ps.default)((0, ps.default)(e).filter((e) => e.span !== void 0).map((e) => (0, ao.default)((e.span?.[0] ?? 0) + 1, (e.span?.[1] ?? 0) + 1))));
|
|
7067
7067
|
}
|
|
@@ -9284,7 +9284,7 @@ function Ys(e, t, n, r, i) {
|
|
|
9284
9284
|
}
|
|
9285
9285
|
//#endregion
|
|
9286
9286
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/node_modules/@glideapps/glide-data-grid/dist/esm/cells/number-cell.js
|
|
9287
|
-
var Xs = W.lazy(async () => await import("./number-overlay-editor-
|
|
9287
|
+
var Xs = W.lazy(async () => await import("./number-overlay-editor-C0_f1K1u.js")), Zs = {
|
|
9288
9288
|
getAccessibilityString: (e) => e.data?.toString() ?? "",
|
|
9289
9289
|
kind: U.Number,
|
|
9290
9290
|
needsHover: (e) => e.hoverEffect === !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { h as e } from "./tooltip-D-9pDheN.js";
|
|
2
2
|
import { wt as t } from "./use-restore-focus-CCfk-ey2.js";
|
|
3
|
-
import { r as n } from "./code-visibility-
|
|
3
|
+
import { r as n } from "./code-visibility-B8EvGyEi.js";
|
|
4
4
|
var r = e("triangle-alert", [
|
|
5
5
|
["path", {
|
|
6
6
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
package/dist/main.js
CHANGED
|
@@ -6,7 +6,7 @@ import { i as x, n as S, r as C, t as w } from "./copy-icon-zP4__HPI.js";
|
|
|
6
6
|
import { $ as T, Bt as E, E as D, Et as O, F as k, Ft as A, G as j, I as M, It as N, K as P, L as F, Lt as I, M as L, Mt as R, Nt as z, O as B, P as ee, Pt as te, Q as ne, Rt as re, Tt as ie, Vt as ae, _ as oe, _t as se, a as ce, at as le, b as ue, bt as de, c as fe, dt as pe, ft as me, ht as he, i as ge, j as _e, kt as ve, lt as ye, n as be, nt as xe, o as Se, ot as Ce, rt as we, st as Te, tt as Ee, ut as De, yt as Oe } from "./html-to-image-CIkwg7mv.js";
|
|
7
7
|
import { a as ke, f as Ae, h as je, i as Me, m as Ne, n as Pe, o as Fe, r as Ie, t as Le } from "./tooltip-D-9pDheN.js";
|
|
8
8
|
import { D as Re, E as ze, S as Be, T as Ve, _ as He, a as Ue, c as We, d as Ge, f as Ke, g as qe, h as Je, i as Ye, l as Xe, m as Ze, n as Qe, o as $e, p as et, r as tt, s as nt, t as rt, u as it, v as at, w as ot, x as st, y as ct } from "./spec-BEp9O9dy.js";
|
|
9
|
-
import { $ as lt, $t as ut, A as dt, An as ft, At as pt, B as mt, Bt as ht, C as gt, D as _t, Dn as vt, Dt as yt, E as bt, En as xt, Et as St, F as Ct, Ft as wt, G as Tt, Gt as Et, H as Dt, Ht as Ot, I as kt, It as At, J as jt, Jt as Mt, K as Nt, Kt as Pt, L as Ft, Lt as It, M as Lt, Mn as Rt, Mt as zt, N as Bt, Nt as Vt, O as Ht, On as Ut, Ot as Wt, P as Gt, Pt as Kt, Q as qt, Qt as Jt, R as Yt, Rt as Xt, S as Zt, Sn as Qt, St as $t, T as en, Tn as tn, Tt as nn, U as rn, Ut as an, V as on, Vt as sn, W as cn, Wt as ln, X as un, Xt as dn, Y as fn, Yt as pn, Z as mn, Zt as hn, _ as gn, _n, _t as vn, an as yn, at as bn, b as xn, bn as Sn, bt as Cn, c as wn, cn as Tn, ct as En, d as Dn, dn as On, dt as kn, en as An, f as jn, fn as Mn, ft as Nn, g as Pn, gn as Fn, gt as In, h as Ln, hn as Rn, ht as zn, in as Bn, it as Vn, j as Hn, jn as Un, jt as Wn, k as Gn, kn as Kn, kt as qn, ln as Jn, lt as Yn, m as Xn, mn as Zn, mt as Qn, nn as $n, on as er, ot as tr, p as nr, pn as rr, pt as ir, q as ar, qt as or, r as sr, rn as cr, rt as lr, sn as ur, st as dr, t as fr, tn as pr, u as mr, un as hr, ut as gr, v as _r, vn as vr, vt as yr, w as br, wn as xr, x as Sr, xn as Cr, xt as wr, y as Tr, yn as Er, yt as Dr, z as Or, zt as kr } from "./common-
|
|
9
|
+
import { $ as lt, $t as ut, A as dt, An as ft, At as pt, B as mt, Bt as ht, C as gt, D as _t, Dn as vt, Dt as yt, E as bt, En as xt, Et as St, F as Ct, Ft as wt, G as Tt, Gt as Et, H as Dt, Ht as Ot, I as kt, It as At, J as jt, Jt as Mt, K as Nt, Kt as Pt, L as Ft, Lt as It, M as Lt, Mn as Rt, Mt as zt, N as Bt, Nt as Vt, O as Ht, On as Ut, Ot as Wt, P as Gt, Pt as Kt, Q as qt, Qt as Jt, R as Yt, Rt as Xt, S as Zt, Sn as Qt, St as $t, T as en, Tn as tn, Tt as nn, U as rn, Ut as an, V as on, Vt as sn, W as cn, Wt as ln, X as un, Xt as dn, Y as fn, Yt as pn, Z as mn, Zt as hn, _ as gn, _n, _t as vn, an as yn, at as bn, b as xn, bn as Sn, bt as Cn, c as wn, cn as Tn, ct as En, d as Dn, dn as On, dt as kn, en as An, f as jn, fn as Mn, ft as Nn, g as Pn, gn as Fn, gt as In, h as Ln, hn as Rn, ht as zn, in as Bn, it as Vn, j as Hn, jn as Un, jt as Wn, k as Gn, kn as Kn, kt as qn, ln as Jn, lt as Yn, m as Xn, mn as Zn, mt as Qn, nn as $n, on as er, ot as tr, p as nr, pn as rr, pt as ir, q as ar, qt as or, r as sr, rn as cr, rt as lr, sn as ur, st as dr, t as fr, tn as pr, u as mr, un as hr, ut as gr, v as _r, vn as vr, vt as yr, w as br, wn as xr, x as Sr, xn as Cr, xt as wr, y as Tr, yn as Er, yt as Dr, z as Or, zt as kr } from "./common-e8HwKSAH.js";
|
|
10
10
|
import { a as Ar, n as jr, s as Mr, t as Nr } from "./useLifecycle-yjK7JsRL.js";
|
|
11
11
|
import { t as Pr } from "./check-BqF09bSG.js";
|
|
12
12
|
import { A as Fr, C as Ir, D as Lr, M as Rr, O as zr, a as Br, c as Vr, d as Hr, i as Ur, k as Wr, l as Gr, n as Kr, o as qr, r as Jr, s as Yr, t as Xr, w as Zr, x as Qr } from "./select-Buk3aXi1.js";
|
|
@@ -16,7 +16,7 @@ import { $t as Fi, A as Ii, At as Li, Bt as Ri, C as zi, Ct as Bi, Dt as Vi, Ft
|
|
|
16
16
|
import { a as Da, d as Oa, i as ka, n as Aa, o as ja, r as Ma, s as Na, t as Pa, u as Fa } from "./process-output-PS9YSLNu.js";
|
|
17
17
|
import { t as Ia } from "./pencil-D7jyZPnP.js";
|
|
18
18
|
import { a as La, c as Ra, d as za, f as Ba, i as Va, l as Ha, r as Ua } from "./glide-utils-BRcuSTCx.js";
|
|
19
|
-
import { n as Wa, t as Ga } from "./globals-
|
|
19
|
+
import { n as Wa, t as Ga } from "./globals-2iTWbh50.js";
|
|
20
20
|
import { a as Ka, i as qa, n as Ja, r as Ya, s as Xa, t as Za } from "./assertNever-B9_7z-dW.js";
|
|
21
21
|
import { t as Qa } from "./react-dom-DdqGVp5N.js";
|
|
22
22
|
import { t as $a } from "./jsx-runtime-D8btoEHk.js";
|
|
@@ -42,9 +42,9 @@ import { p as lc } from "./dist-BidYR5m4.js";
|
|
|
42
42
|
import { t as uc } from "./useAsyncData-P5-Oovhq.js";
|
|
43
43
|
import { n as dc, t as fc } from "./semaphore-8KhQouXt.js";
|
|
44
44
|
import { o as pc, r as mc, s as hc } from "./loader-C9-qRO3m.js";
|
|
45
|
-
import { t as gc } from "./ErrorBoundary-
|
|
45
|
+
import { t as gc } from "./ErrorBoundary-CgTA4k9x.js";
|
|
46
46
|
import { G as _c, W as vc } from "./vega-loader.browser-Co9gYE8Z.js";
|
|
47
|
-
import { a as yc, c as bc, i as xc, l as Sc, o as Cc, s as wc, t as Tc } from "./code-visibility-
|
|
47
|
+
import { a as yc, c as bc, i as xc, l as Sc, o as Cc, s as wc, t as Tc } from "./code-visibility-B8EvGyEi.js";
|
|
48
48
|
import { t as Ec } from "./esm-DY8dGAjJ.js";
|
|
49
49
|
//#region ../node_modules/.pnpm/iconify-icon@2.3.0/node_modules/iconify-icon/dist/iconify-icon.mjs
|
|
50
50
|
var Dc = Object.freeze({
|
|
@@ -13101,7 +13101,7 @@ function XO(e, t) {
|
|
|
13101
13101
|
}
|
|
13102
13102
|
//#endregion
|
|
13103
13103
|
//#region src/plugins/impl/DataEditorPlugin.tsx
|
|
13104
|
-
var ZO = J.lazy(() => import("./glide-data-editor-
|
|
13104
|
+
var ZO = J.lazy(() => import("./glide-data-editor-CSdUM_oQ.js").then((e) => e.t)), QO = MD("marimo-data-editor", { cssStyles: [tO, nO] }).withData(K({
|
|
13105
13105
|
initialValue: K({ edits: U(K({
|
|
13106
13106
|
rowIdx: G(),
|
|
13107
13107
|
columnId: W(),
|
|
@@ -32996,7 +32996,7 @@ function TW(e) {
|
|
|
32996
32996
|
}
|
|
32997
32997
|
//#endregion
|
|
32998
32998
|
//#region src/components/editor/renderers/slides-layout/slides-layout.tsx
|
|
32999
|
-
var EW = J.lazy(() => import("./reveal-component-
|
|
32999
|
+
var EW = J.lazy(() => import("./reveal-component-DD01cPtC.js")), DW = (e) => {
|
|
33000
33000
|
let t = (0, X.c)(33), { layout: n, setLayout: r, cells: i, mode: a } = e, o = Mo(Ws), s = a === "read" || o, c = Mo(ga) > 1, [l, u] = (0, J.useState)(null), d;
|
|
33001
33001
|
t[0] !== i || t[1] !== n ? (d = CB(i, n), t[0] = i, t[1] = n, t[2] = d) : d = t[2];
|
|
33002
33002
|
let { slideCells: f, skippedIds: p, noOutputIds: m, slideTypes: h, startCellIndex: g } = d, _;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as e } from "./rolldown-runtime-BPCzCO3I.js";
|
|
2
2
|
import { t } from "./react-Bgs_wQh3.js";
|
|
3
|
-
import { a as n } from "./glide-data-editor-
|
|
3
|
+
import { a as n } from "./glide-data-editor-CSdUM_oQ.js";
|
|
4
4
|
//#region ../node_modules/.pnpm/@glideapps+glide-data-grid@6.0.4-alpha24_lodash@4.18.1_marked@15.0.12_react-dom@19.3.1__a94b4518d090e84da26f3a68e82f2953/node_modules/@glideapps/glide-data-grid/dist/esm/internal/data-grid-overlay-editor/private/number-overlay-editor-style.js
|
|
5
5
|
var r = /* @__PURE__ */ e(t()), i = /*#__PURE__*/ n("div")({
|
|
6
6
|
name: "NumberOverlayEditorStyle",
|
|
@@ -3,14 +3,14 @@ import { g as t, h as n, m as r, r as i, t as a } from "./button-Z2R2272J.js";
|
|
|
3
3
|
import { t as o } from "./react-Bgs_wQh3.js";
|
|
4
4
|
import { t as s } from "./compiler-runtime-C5KHtL5D.js";
|
|
5
5
|
import { h as c, t as l } from "./tooltip-D-9pDheN.js";
|
|
6
|
-
import { Cn as u, En as d, Sn as f, dn as p, et as m, f as h, i as g, l as _, n as v, nt as y, r as b, t as x, tt as S, u as C } from "./common-
|
|
6
|
+
import { Cn as u, En as d, Sn as f, dn as p, et as m, f as h, i as g, l as _, n as v, nt as y, r as b, t as x, tt as S, u as C } from "./common-e8HwKSAH.js";
|
|
7
7
|
import { M as w } from "./select-Buk3aXi1.js";
|
|
8
8
|
import { X as T } from "./dropdown-menu-Dge_SmqE.js";
|
|
9
9
|
import { t as E } from "./jsx-runtime-D8btoEHk.js";
|
|
10
10
|
import { Wt as D, i as O, p as k, qt as A } from "./use-restore-focus-CCfk-ey2.js";
|
|
11
11
|
import { t as j } from "./useEvent-BoN7U38T.js";
|
|
12
12
|
import { o as ee } from "./static-state-D-aT9dOr.js";
|
|
13
|
-
import { n as te, t as ne } from "./code-visibility-
|
|
13
|
+
import { n as te, t as ne } from "./code-visibility-B8EvGyEi.js";
|
|
14
14
|
/* empty css */
|
|
15
15
|
var M = c("sticky-note", [["path", {
|
|
16
16
|
d: "M21 9a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 15 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2z",
|
package/package.json
CHANGED
|
@@ -95,20 +95,35 @@ describe("AttachmentStatus", () => {
|
|
|
95
95
|
{ ...AGENT, id: "c1", kind: "client", name: "Browser" },
|
|
96
96
|
]);
|
|
97
97
|
expect(screen.getAllByTestId("footer-attachment-status")).toHaveLength(1);
|
|
98
|
-
expect(screen.getByLabelText("2 agents
|
|
98
|
+
expect(screen.getByLabelText("Paired with 2 agents")).toBeInTheDocument();
|
|
99
99
|
expect(screen.getByRole("heading", { name: "Pi" })).toBeInTheDocument();
|
|
100
100
|
expect(
|
|
101
101
|
screen.getByRole("heading", { name: "Claude Code" }),
|
|
102
102
|
).toBeInTheDocument();
|
|
103
|
-
expect(screen.
|
|
104
|
-
expect(screen.
|
|
103
|
+
expect(screen.queryByText("a1")).not.toBeInTheDocument();
|
|
104
|
+
expect(screen.queryByText("a2")).not.toBeInTheDocument();
|
|
105
105
|
expect(screen.queryByText("Browser")).not.toBeInTheDocument();
|
|
106
|
-
expect(screen.getAllByText(/^
|
|
106
|
+
expect(screen.getAllByText(/^Paired /, { selector: "p" })).toHaveLength(2);
|
|
107
107
|
});
|
|
108
108
|
|
|
109
|
+
it.each(["Pi", null])(
|
|
110
|
+
"shows connection IDs only for duplicate names: %s",
|
|
111
|
+
(name) => {
|
|
112
|
+
const { store } = renderStatus([
|
|
113
|
+
{ ...AGENT, name },
|
|
114
|
+
{ ...AGENT, id: "a2", name },
|
|
115
|
+
]);
|
|
116
|
+
expect(screen.getByText("a1")).toBeVisible();
|
|
117
|
+
expect(screen.getByText("a2")).toBeVisible();
|
|
118
|
+
act(() => store.set(attachmentsAtom, [{ ...AGENT, name }]));
|
|
119
|
+
expect(screen.queryByText("a1")).not.toBeInTheDocument();
|
|
120
|
+
expect(screen.queryByText("a2")).not.toBeInTheDocument();
|
|
121
|
+
},
|
|
122
|
+
);
|
|
123
|
+
|
|
109
124
|
it("uses Agent when no name was supplied", () => {
|
|
110
125
|
renderStatus([{ ...AGENT, name: null }]);
|
|
111
|
-
expect(screen.getByLabelText("Agent
|
|
126
|
+
expect(screen.getByLabelText("Paired with Agent")).toBeInTheDocument();
|
|
112
127
|
});
|
|
113
128
|
|
|
114
129
|
it.each(["{Enter}", " "])("opens from the keyboard with %j", async (key) => {
|
|
@@ -117,14 +132,14 @@ describe("AttachmentStatus", () => {
|
|
|
117
132
|
act(() => vi.advanceTimersByTime(3000));
|
|
118
133
|
vi.useRealTimers();
|
|
119
134
|
const user = userEvent.setup();
|
|
120
|
-
const button = screen.getByRole("button", { name: "Pi
|
|
135
|
+
const button = screen.getByRole("button", { name: "Paired with Pi" });
|
|
121
136
|
expect(button.tagName).toBe("BUTTON");
|
|
122
137
|
expect(button).toHaveAttribute("type", "button");
|
|
123
138
|
await user.tab();
|
|
124
139
|
expect(button).toHaveFocus();
|
|
125
140
|
await user.keyboard(key);
|
|
126
141
|
expect(button).toHaveAttribute("aria-expanded", "true");
|
|
127
|
-
expect(screen.getByText(/^
|
|
142
|
+
expect(screen.getByText(/^Paired /, { selector: "p" })).toBeInTheDocument();
|
|
128
143
|
await user.keyboard("{Escape}");
|
|
129
144
|
expect(button).toHaveAttribute("aria-expanded", "false");
|
|
130
145
|
expect(button).toHaveFocus();
|
|
@@ -137,7 +152,7 @@ describe("AttachmentStatus", () => {
|
|
|
137
152
|
document.body.append(editor);
|
|
138
153
|
editor.focus();
|
|
139
154
|
act(() => store.set(attachmentsAtom, [AGENT]));
|
|
140
|
-
const trigger = screen.getByRole("button", { name: "Pi
|
|
155
|
+
const trigger = screen.getByRole("button", { name: "Paired with Pi" });
|
|
141
156
|
expect(trigger).toHaveAttribute("aria-expanded", "true");
|
|
142
157
|
expect(editor).toHaveFocus();
|
|
143
158
|
act(() => vi.advanceTimersByTime(3000));
|
|
@@ -151,18 +166,18 @@ describe("AttachmentStatus", () => {
|
|
|
151
166
|
const { store } = renderStatus();
|
|
152
167
|
act(() => vi.advanceTimersByTime(3000));
|
|
153
168
|
act(() => store.set(attachmentsAtom, [{ ...AGENT, name: "New name" }]));
|
|
154
|
-
expect(screen.getByLabelText("New name
|
|
169
|
+
expect(screen.getByLabelText("Paired with New name")).toHaveAttribute(
|
|
155
170
|
"aria-expanded",
|
|
156
171
|
"false",
|
|
157
172
|
);
|
|
158
173
|
act(() => store.set(attachmentsAtom, [AGENT, { ...AGENT, id: "a2" }]));
|
|
159
|
-
expect(screen.getByLabelText("2 agents
|
|
174
|
+
expect(screen.getByLabelText("Paired with 2 agents")).toHaveAttribute(
|
|
160
175
|
"aria-expanded",
|
|
161
176
|
"true",
|
|
162
177
|
);
|
|
163
178
|
act(() => vi.advanceTimersByTime(3000));
|
|
164
179
|
act(() => store.set(attachmentsAtom, [AGENT]));
|
|
165
|
-
expect(screen.getByLabelText("Pi
|
|
180
|
+
expect(screen.getByLabelText("Paired with Pi")).toHaveAttribute(
|
|
166
181
|
"aria-expanded",
|
|
167
182
|
"false",
|
|
168
183
|
);
|
|
@@ -171,7 +186,7 @@ describe("AttachmentStatus", () => {
|
|
|
171
186
|
it("keeps manually opened details open past the automatic timeout", () => {
|
|
172
187
|
vi.useFakeTimers();
|
|
173
188
|
renderStatus();
|
|
174
|
-
const trigger = screen.getByLabelText("Pi
|
|
189
|
+
const trigger = screen.getByLabelText("Paired with Pi");
|
|
175
190
|
fireEvent.click(trigger);
|
|
176
191
|
fireEvent.click(trigger);
|
|
177
192
|
act(() => vi.advanceTimersByTime(5000));
|
|
@@ -181,7 +196,7 @@ describe("AttachmentStatus", () => {
|
|
|
181
196
|
it("keeps manual confirmation open when another agent connects", () => {
|
|
182
197
|
vi.useFakeTimers();
|
|
183
198
|
const { store } = renderStatus();
|
|
184
|
-
const trigger = screen.getByLabelText("Pi
|
|
199
|
+
const trigger = screen.getByLabelText("Paired with Pi");
|
|
185
200
|
fireEvent.click(trigger);
|
|
186
201
|
fireEvent.click(trigger);
|
|
187
202
|
fireEvent.click(screen.getByRole("button", { name: "Disconnect Pi" }));
|
|
@@ -222,13 +237,13 @@ describe("AttachmentStatus", () => {
|
|
|
222
237
|
const details = screen.getByRole("dialog");
|
|
223
238
|
fireEvent.pointerEnter(details);
|
|
224
239
|
act(() => vi.advanceTimersByTime(5000));
|
|
225
|
-
expect(screen.getByLabelText("Pi
|
|
240
|
+
expect(screen.getByLabelText("Paired with Pi")).toHaveAttribute(
|
|
226
241
|
"aria-expanded",
|
|
227
242
|
"true",
|
|
228
243
|
);
|
|
229
244
|
fireEvent.pointerLeave(details);
|
|
230
245
|
act(() => vi.advanceTimersByTime(3000));
|
|
231
|
-
expect(screen.getByLabelText("Pi
|
|
246
|
+
expect(screen.getByLabelText("Paired with Pi")).toHaveAttribute(
|
|
232
247
|
"aria-expanded",
|
|
233
248
|
"false",
|
|
234
249
|
);
|
|
@@ -239,11 +254,11 @@ describe("AttachmentStatus", () => {
|
|
|
239
254
|
{ ...AGENT, identity: "same" },
|
|
240
255
|
{ ...AGENT, id: "a2", identity: "same" },
|
|
241
256
|
]);
|
|
242
|
-
expect(screen.getByLabelText("Pi
|
|
257
|
+
expect(screen.getByLabelText("Paired with Pi")).toBeInTheDocument();
|
|
243
258
|
expect(
|
|
244
259
|
screen.getAllByRole("button", { name: "Disconnect Pi" }),
|
|
245
260
|
).toHaveLength(2);
|
|
246
|
-
for (const text of screen.getAllByText(/^
|
|
261
|
+
for (const text of screen.getAllByText(/^Paired /, { selector: "p" })) {
|
|
247
262
|
expect(text).not.toHaveTextContent("Invalid Date");
|
|
248
263
|
}
|
|
249
264
|
});
|
|
@@ -256,7 +271,7 @@ describe("AttachmentStatus", () => {
|
|
|
256
271
|
act(() =>
|
|
257
272
|
store.set(attachmentsAtom, [{ ...AGENT, id: "a2", identity: "same" }]),
|
|
258
273
|
);
|
|
259
|
-
expect(screen.getByLabelText("Pi
|
|
274
|
+
expect(screen.getByLabelText("Paired with Pi")).toHaveAttribute(
|
|
260
275
|
"aria-expanded",
|
|
261
276
|
"false",
|
|
262
277
|
);
|
|
@@ -278,11 +293,11 @@ describe("AttachmentStatus", () => {
|
|
|
278
293
|
{ attachment_id: "a1" },
|
|
279
294
|
),
|
|
280
295
|
);
|
|
281
|
-
expect(screen.getByLabelText("2 agents
|
|
296
|
+
expect(screen.getByLabelText("Paired with 2 agents")).toBeInTheDocument();
|
|
282
297
|
act(() =>
|
|
283
298
|
store.set(attachmentsAtom, [{ ...AGENT, id: "a2", name: "Codex" }]),
|
|
284
299
|
);
|
|
285
|
-
expect(screen.getByLabelText("Codex
|
|
300
|
+
expect(screen.getByLabelText("Paired with Codex")).toBeInTheDocument();
|
|
286
301
|
expect(
|
|
287
302
|
screen.queryByRole("button", { name: "Disconnect Pi" }),
|
|
288
303
|
).not.toBeInTheDocument();
|
|
@@ -320,7 +335,7 @@ describe("AttachmentStatus", () => {
|
|
|
320
335
|
duration: 5000,
|
|
321
336
|
}),
|
|
322
337
|
);
|
|
323
|
-
expect(screen.getByLabelText("Pi
|
|
338
|
+
expect(screen.getByLabelText("Paired with Pi")).toBeInTheDocument();
|
|
324
339
|
expect(screen.getByRole("button", { name: "Disconnect Pi" })).toBeEnabled();
|
|
325
340
|
});
|
|
326
341
|
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
/* Copyright 2026 Marimo. All rights reserved. */
|
|
2
2
|
|
|
3
3
|
import { useAtomValue } from "jotai";
|
|
4
|
-
import {
|
|
5
|
-
BotIcon,
|
|
6
|
-
CheckIcon,
|
|
7
|
-
Loader2Icon,
|
|
8
|
-
UnplugIcon,
|
|
9
|
-
XIcon,
|
|
10
|
-
} from "lucide-react";
|
|
4
|
+
import { BotIcon, ExternalLinkIcon, Loader2Icon } from "lucide-react";
|
|
11
5
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
12
6
|
import { Button } from "@/components/ui/button";
|
|
7
|
+
import { ExternalLink } from "@/components/ui/links";
|
|
13
8
|
import {
|
|
14
9
|
Popover,
|
|
15
10
|
PopoverContent,
|
|
@@ -79,10 +74,15 @@ export function AttachmentStatus() {
|
|
|
79
74
|
return null;
|
|
80
75
|
}
|
|
81
76
|
const identities = new Set(agents.map((agent) => agent.identity ?? agent.id));
|
|
77
|
+
const nameCounts = new Map<string, number>();
|
|
78
|
+
for (const agent of agents) {
|
|
79
|
+
const name = attachmentLabel(agent);
|
|
80
|
+
nameCounts.set(name, (nameCounts.get(name) ?? 0) + 1);
|
|
81
|
+
}
|
|
82
82
|
const label =
|
|
83
83
|
identities.size === 1
|
|
84
|
-
?
|
|
85
|
-
:
|
|
84
|
+
? `Paired with ${attachmentLabel(agents[0])}`
|
|
85
|
+
: `Paired with ${identities.size} agents`;
|
|
86
86
|
|
|
87
87
|
return (
|
|
88
88
|
<Popover
|
|
@@ -96,6 +96,7 @@ export function AttachmentStatus() {
|
|
|
96
96
|
<PopoverTrigger asChild={true}>
|
|
97
97
|
<FooterItem
|
|
98
98
|
asChild={true}
|
|
99
|
+
className="text-xs"
|
|
99
100
|
tooltip={label}
|
|
100
101
|
selected={open}
|
|
101
102
|
data-testid="footer-attachment-status"
|
|
@@ -110,7 +111,7 @@ export function AttachmentStatus() {
|
|
|
110
111
|
</FooterItem>
|
|
111
112
|
</PopoverTrigger>
|
|
112
113
|
<PopoverContent
|
|
113
|
-
className="w-
|
|
114
|
+
className="w-72 p-1 text-sm"
|
|
114
115
|
side="top"
|
|
115
116
|
align="start"
|
|
116
117
|
onOpenAutoFocus={preserveEditorFocus}
|
|
@@ -130,22 +131,39 @@ export function AttachmentStatus() {
|
|
|
130
131
|
stopTimer();
|
|
131
132
|
}}
|
|
132
133
|
>
|
|
133
|
-
<
|
|
134
|
+
<div className="flex items-center justify-between px-2 py-1.5">
|
|
135
|
+
<h4 className="font-semibold">Paired agents</h4>
|
|
136
|
+
<ExternalLink href="https://links.marimo.app/docs-marimo-pair">
|
|
137
|
+
<span className="text-xs font-normal flex items-center gap-1">
|
|
138
|
+
Docs
|
|
139
|
+
<ExternalLinkIcon className="w-3 h-3" />
|
|
140
|
+
</span>
|
|
141
|
+
</ExternalLink>
|
|
142
|
+
</div>
|
|
143
|
+
<div className="-mx-1 my-1 h-px bg-border" />
|
|
134
144
|
<div className="max-h-72 overflow-auto divide-y">
|
|
135
145
|
{agents.map((attachment) => (
|
|
136
|
-
<AttachmentStatusItem
|
|
146
|
+
<AttachmentStatusItem
|
|
147
|
+
key={attachment.id}
|
|
148
|
+
attachment={attachment}
|
|
149
|
+
hasDuplicateName={
|
|
150
|
+
(nameCounts.get(attachmentLabel(attachment)) ?? 0) > 1
|
|
151
|
+
}
|
|
152
|
+
/>
|
|
137
153
|
))}
|
|
138
154
|
</div>
|
|
139
|
-
<p className="px-4 py-3 border-t text-xs text-muted-foreground">
|
|
140
|
-
Disconnect removes the notebook connection. The agent session keeps
|
|
141
|
-
running.
|
|
142
|
-
</p>
|
|
143
155
|
</PopoverContent>
|
|
144
156
|
</Popover>
|
|
145
157
|
);
|
|
146
158
|
}
|
|
147
159
|
|
|
148
|
-
function AttachmentStatusItem({
|
|
160
|
+
function AttachmentStatusItem({
|
|
161
|
+
attachment,
|
|
162
|
+
hasDuplicateName,
|
|
163
|
+
}: {
|
|
164
|
+
attachment: Attachment;
|
|
165
|
+
hasDuplicateName: boolean;
|
|
166
|
+
}) {
|
|
149
167
|
const stableSessionId = useAtomValue(stableSessionIdAtom);
|
|
150
168
|
const [state, setState] = useState<"idle" | "confirming" | "disconnecting">(
|
|
151
169
|
"idle",
|
|
@@ -179,59 +197,63 @@ function AttachmentStatusItem({ attachment }: { attachment: Attachment }) {
|
|
|
179
197
|
};
|
|
180
198
|
|
|
181
199
|
return (
|
|
182
|
-
<div className="
|
|
183
|
-
<div className="
|
|
184
|
-
<h5 className="font-medium"
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
ref={disconnectButton}
|
|
203
|
-
size="icon"
|
|
204
|
-
variant="outlineDestructive"
|
|
205
|
-
disabled={disconnecting || !stableSessionId}
|
|
206
|
-
onClick={confirming ? disconnect : () => setState("confirming")}
|
|
207
|
-
aria-label={disconnectLabel}
|
|
208
|
-
title={disconnectLabel}
|
|
209
|
-
aria-busy={disconnecting}
|
|
210
|
-
>
|
|
211
|
-
{disconnecting ? (
|
|
212
|
-
<Loader2Icon className="size-3.5 animate-spin" aria-hidden={true} />
|
|
213
|
-
) : confirming ? (
|
|
214
|
-
<CheckIcon className="size-3.5" aria-hidden={true} />
|
|
215
|
-
) : (
|
|
216
|
-
<UnplugIcon className="size-3.5" aria-hidden={true} />
|
|
200
|
+
<div className="px-2 py-1.5">
|
|
201
|
+
<div className="flex items-center justify-between gap-2">
|
|
202
|
+
<h5 className="min-w-0 truncate font-medium" title={label}>
|
|
203
|
+
{label}
|
|
204
|
+
</h5>
|
|
205
|
+
<div className="flex shrink-0 items-center gap-2">
|
|
206
|
+
{confirming && (
|
|
207
|
+
<Button
|
|
208
|
+
size="xs"
|
|
209
|
+
variant="ghost"
|
|
210
|
+
disabled={disconnecting}
|
|
211
|
+
onClick={() => {
|
|
212
|
+
setState("idle");
|
|
213
|
+
disconnectButton.current?.focus();
|
|
214
|
+
}}
|
|
215
|
+
aria-label={`Cancel disconnect ${label}`}
|
|
216
|
+
title={`Cancel disconnect ${label}`}
|
|
217
|
+
>
|
|
218
|
+
Cancel
|
|
219
|
+
</Button>
|
|
217
220
|
)}
|
|
218
|
-
</Button>
|
|
219
|
-
{confirming && (
|
|
220
221
|
<Button
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
|
|
222
|
+
ref={disconnectButton}
|
|
223
|
+
size="xs"
|
|
224
|
+
variant={confirming ? "destructive" : "outline"}
|
|
225
|
+
className="gap-1.5 shadow-none"
|
|
226
|
+
disabled={disconnecting || !stableSessionId}
|
|
227
|
+
onClick={confirming ? disconnect : () => setState("confirming")}
|
|
228
|
+
aria-label={disconnectLabel}
|
|
229
|
+
title={disconnectLabel}
|
|
230
|
+
aria-busy={disconnecting}
|
|
230
231
|
>
|
|
231
|
-
|
|
232
|
+
{disconnecting && (
|
|
233
|
+
<Loader2Icon
|
|
234
|
+
className="size-3.5 animate-spin"
|
|
235
|
+
aria-hidden={true}
|
|
236
|
+
/>
|
|
237
|
+
)}
|
|
238
|
+
{disconnecting
|
|
239
|
+
? "Disconnecting…"
|
|
240
|
+
: confirming
|
|
241
|
+
? "Disconnect?"
|
|
242
|
+
: "Disconnect"}
|
|
232
243
|
</Button>
|
|
233
|
-
|
|
244
|
+
</div>
|
|
234
245
|
</div>
|
|
246
|
+
<p className="text-xs text-muted-foreground">
|
|
247
|
+
Paired{" "}
|
|
248
|
+
{timeAgo(attachment.created_at).replace(/^(Today|Yesterday)/, (day) =>
|
|
249
|
+
day.toLowerCase(),
|
|
250
|
+
)}
|
|
251
|
+
</p>
|
|
252
|
+
{hasDuplicateName && (
|
|
253
|
+
<p className="text-xs font-mono text-muted-foreground break-all">
|
|
254
|
+
{attachment.id}
|
|
255
|
+
</p>
|
|
256
|
+
)}
|
|
235
257
|
</div>
|
|
236
258
|
);
|
|
237
259
|
}
|