@dxos/shell 0.6.14-main.8b352a0 → 0.6.14-staging.4b6f9cf

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.
Files changed (64) hide show
  1. package/dist/bundle/shell.mjs +5168 -5065
  2. package/dist/bundle/shell.mjs.map +1 -1
  3. package/dist/bundle/shell.umd.js +57 -57
  4. package/dist/bundle/shell.umd.js.map +1 -1
  5. package/dist/bundle/style.css +1 -1
  6. package/dist/lib/browser/meta.json +1 -1
  7. package/dist/lib/browser/react.mjs +50 -53
  8. package/dist/lib/browser/react.mjs.map +3 -3
  9. package/dist/lib/browser/testing/index.mjs +2 -0
  10. package/dist/lib/browser/testing/index.mjs.map +2 -2
  11. package/dist/lib/node/meta.json +1 -1
  12. package/dist/lib/node/react.cjs +34 -37
  13. package/dist/lib/node/react.cjs.map +3 -3
  14. package/dist/lib/node/testing/index.cjs +2 -0
  15. package/dist/lib/node/testing/index.cjs.map +2 -2
  16. package/dist/lib/node-esm/meta.json +1 -1
  17. package/dist/lib/node-esm/react.mjs +50 -53
  18. package/dist/lib/node-esm/react.mjs.map +3 -3
  19. package/dist/lib/node-esm/testing/index.mjs +2 -0
  20. package/dist/lib/node-esm/testing/index.mjs.map +2 -2
  21. package/dist/types/src/components/DeviceList/DeviceListItem.d.ts.map +1 -1
  22. package/dist/types/src/components/DeviceList/DeviceListItem.js +4 -10
  23. package/dist/types/src/components/DeviceList/DeviceListItem.js.map +1 -1
  24. package/dist/types/src/components/Panel/Action.d.ts +2 -0
  25. package/dist/types/src/components/Panel/Action.d.ts.map +1 -1
  26. package/dist/types/src/components/Panel/Action.js +16 -14
  27. package/dist/types/src/components/Panel/Action.js.map +1 -1
  28. package/dist/types/src/panels/IdentityPanel/IdentityPanel.d.ts.map +1 -1
  29. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js +13 -6
  30. package/dist/types/src/panels/IdentityPanel/IdentityPanel.js.map +1 -1
  31. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts +1 -0
  32. package/dist/types/src/panels/IdentityPanel/IdentityPanelProps.d.ts.map +1 -1
  33. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.d.ts.map +1 -1
  34. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js +3 -3
  35. package/dist/types/src/panels/IdentityPanel/steps/IdentityActionChooser.js.map +1 -1
  36. package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.d.ts.map +1 -1
  37. package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.js +5 -0
  38. package/dist/types/src/panels/IdentityPanel/useEdgeAgentsHandlers.js.map +1 -1
  39. package/dist/types/src/panels/SpacePanel/SpacePanel.d.ts.map +1 -1
  40. package/dist/types/src/panels/SpacePanel/SpacePanel.js +2 -2
  41. package/dist/types/src/panels/SpacePanel/SpacePanel.js.map +1 -1
  42. package/dist/types/src/panels/SpacePanel/SpacePanelProps.d.ts +1 -0
  43. package/dist/types/src/panels/SpacePanel/SpacePanelProps.d.ts.map +1 -1
  44. package/dist/types/src/panels/SpacePanel/steps/SpaceManager.d.ts.map +1 -1
  45. package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js +5 -3
  46. package/dist/types/src/panels/SpacePanel/steps/SpaceManager.js.map +1 -1
  47. package/dist/types/src/playwright/invitations-manager.d.ts.map +1 -1
  48. package/dist/types/src/playwright/invitations-manager.js +9 -1
  49. package/dist/types/src/playwright/invitations-manager.js.map +1 -1
  50. package/dist/types/src/testing/shell-manager.d.ts.map +1 -1
  51. package/dist/types/src/testing/shell-manager.js +2 -0
  52. package/dist/types/src/testing/shell-manager.js.map +1 -1
  53. package/package.json +25 -25
  54. package/src/components/DeviceList/DeviceListItem.tsx +38 -42
  55. package/src/components/Panel/Action.tsx +40 -31
  56. package/src/panels/IdentityPanel/IdentityPanel.tsx +13 -3
  57. package/src/panels/IdentityPanel/IdentityPanelProps.ts +1 -0
  58. package/src/panels/IdentityPanel/steps/IdentityActionChooser.tsx +5 -3
  59. package/src/panels/IdentityPanel/useEdgeAgentsHandlers.ts +7 -0
  60. package/src/panels/SpacePanel/SpacePanel.tsx +2 -1
  61. package/src/panels/SpacePanel/SpacePanelProps.ts +1 -0
  62. package/src/panels/SpacePanel/steps/SpaceManager.tsx +5 -3
  63. package/src/playwright/invitations-manager.ts +8 -1
  64. package/src/testing/shell-manager.ts +2 -0
@@ -577,7 +577,7 @@ import React9, { forwardRef as forwardRef2 } from "react";
577
577
  import { generateName as generateName2 } from "@dxos/display-name";
578
578
  import { Device, DeviceType, DeviceKind } from "@dxos/react-client/halo";
579
579
  import { ConnectionState } from "@dxos/react-client/mesh";
580
- import { ListItem as ListItem2, Avatar as Avatar3, useId as useId3, Tag, useTranslation as useTranslation6, DropdownMenu as DropdownMenu2, Button as Button5, Tooltip as Tooltip5 } from "@dxos/react-ui";
580
+ import { ListItem as ListItem2, Avatar as Avatar3, useId as useId3, Tag, useTranslation as useTranslation6, DropdownMenu as DropdownMenu2, Button as Button5 } from "@dxos/react-ui";
581
581
  import { getSize as getSize5 } from "@dxos/react-ui-theme";
582
582
  import { keyToFallback as keyToFallback2 } from "@dxos/util";
583
583
  var iconProps = {
@@ -587,7 +587,7 @@ var iconProps = {
587
587
  x: 8,
588
588
  y: 8
589
589
  };
590
- var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickEdit, onClickReset, onClickRecover, onClickJoinExisting, classNames, connectionState, onAgentDestroy, ...props }, forwardedRef) => {
590
+ var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickEdit, onClickReset, onClickRecover, onClickJoinExisting, classNames, connectionState, onAgentDestroy: _, ...props }, forwardedRef) => {
591
591
  const { t } = useTranslation6("os");
592
592
  const fallbackValue = keyToFallback2(device.deviceKey);
593
593
  const labelId = useId3("identityListItem__label");
@@ -621,21 +621,7 @@ var DeviceListItem = /* @__PURE__ */ forwardRef2(({ device, onClickAdd, onClickE
621
621
  classNames: "flex-1 text-sm truncate"
622
622
  }, displayName), isCurrent && /* @__PURE__ */ React9.createElement(Tag, {
623
623
  color: "primary"
624
- }, t("current device tag label")), device.profile?.type === DeviceType.AGENT_MANAGED ? /* @__PURE__ */ React9.createElement(Tooltip5.Root, null, /* @__PURE__ */ React9.createElement(Tooltip5.Trigger, {
625
- asChild: true
626
- }, /* @__PURE__ */ React9.createElement(Button5, {
627
- variant: "ghost",
628
- classNames: "pli-0 is-[--rail-action] bs-[--rail-action]",
629
- "data-testid": "agent.destroy",
630
- onClick: onAgentDestroy
631
- }, /* @__PURE__ */ React9.createElement("span", {
632
- className: "sr-only"
633
- }, t("destroy agent label")), /* @__PURE__ */ React9.createElement(Power2, {
634
- className: getSize5(5)
635
- }))), /* @__PURE__ */ React9.createElement(Tooltip5.Portal, null, /* @__PURE__ */ React9.createElement(Tooltip5.Content, {
636
- side: "bottom",
637
- classNames: "z-50"
638
- }, t("destroy agent label")))) : device.kind === DeviceKind.CURRENT && /* @__PURE__ */ React9.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React9.createElement(DropdownMenu2.Trigger, {
624
+ }, t("current device tag label")), device.kind === DeviceKind.CURRENT && /* @__PURE__ */ React9.createElement(DropdownMenu2.Root, null, /* @__PURE__ */ React9.createElement(DropdownMenu2.Trigger, {
639
625
  asChild: true
640
626
  }, /* @__PURE__ */ React9.createElement(Button5, {
641
627
  variant: "ghost",
@@ -703,7 +689,7 @@ import { X } from "@phosphor-icons/react";
703
689
  import { formatDistanceToNow } from "date-fns";
704
690
  import React12, { useCallback as useCallback2 } from "react";
705
691
  import { Invitation, useInvitationStatus } from "@dxos/react-client/invitations";
706
- import { Button as Button7, ListItem as ListItem3, useTranslation as useTranslation8, Avatar as Avatar4, useThemeContext as useThemeContext4, Tooltip as Tooltip6 } from "@dxos/react-ui";
692
+ import { Button as Button7, ListItem as ListItem3, useTranslation as useTranslation8, Avatar as Avatar4, useThemeContext as useThemeContext4, Tooltip as Tooltip5 } from "@dxos/react-ui";
707
693
  import { focusRing, getSize as getSize7, mx as mx9 } from "@dxos/react-ui-theme";
708
694
  import { hexToEmoji } from "@dxos/util";
709
695
 
@@ -834,11 +820,11 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
834
820
  status: avatarStatus,
835
821
  animation: avatarAnimation,
836
822
  reverseEffects
837
- }), /* @__PURE__ */ React12.createElement(Tooltip6.Root, null, /* @__PURE__ */ React12.createElement(Avatar4.Root, {
823
+ }), /* @__PURE__ */ React12.createElement(Tooltip5.Root, null, /* @__PURE__ */ React12.createElement(Avatar4.Root, {
838
824
  ...avatarProps,
839
825
  animation: avatarAnimation,
840
826
  status: avatarStatus
841
- }, /* @__PURE__ */ React12.createElement(Tooltip6.Trigger, {
827
+ }, /* @__PURE__ */ React12.createElement(Tooltip5.Trigger, {
842
828
  asChild: true
843
829
  }, /* @__PURE__ */ React12.createElement(Avatar4.Frame, {
844
830
  tabIndex: 0,
@@ -848,10 +834,10 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
848
834
  ]
849
835
  }, /* @__PURE__ */ React12.createElement(Avatar4.Fallback, {
850
836
  text: hexToEmoji(invitationId)
851
- })))), /* @__PURE__ */ React12.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip6.Content, {
837
+ })))), /* @__PURE__ */ React12.createElement(Tooltip5.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip5.Content, {
852
838
  side: "left",
853
839
  classNames: "z-[70]"
854
- }, t(multiUse ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */ React12.createElement(Tooltip6.Arrow, null)))), showShare && invitationUrl ? /* @__PURE__ */ React12.createElement(Tooltip6.Root, null, /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Tooltip6.Trigger, {
840
+ }, t(multiUse ? "invite many qr label" : "invite one qr label"), /* @__PURE__ */ React12.createElement(Tooltip5.Arrow, null)))), showShare && invitationUrl ? /* @__PURE__ */ React12.createElement(Tooltip5.Root, null, /* @__PURE__ */ React12.createElement(React12.Fragment, null, /* @__PURE__ */ React12.createElement(Tooltip5.Trigger, {
855
841
  asChild: true
856
842
  }, /* @__PURE__ */ React12.createElement(Button7, {
857
843
  variant: "ghost",
@@ -864,7 +850,7 @@ var InvitationListItemImpl = ({ invitation, invitationStatus: propsInvitationSta
864
850
  }, /* @__PURE__ */ React12.createElement("span", null, t("open share panel label")))), /* @__PURE__ */ React12.createElement(CopyButtonIconOnly, {
865
851
  variant: "ghost",
866
852
  value: invitationUrl
867
- })), /* @__PURE__ */ React12.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip6.Content, {
853
+ })), /* @__PURE__ */ React12.createElement(Tooltip5.Portal, null, /* @__PURE__ */ React12.createElement(Tooltip5.Content, {
868
854
  side: "left",
869
855
  classNames: "z-[70]"
870
856
  }, invitationHasLifetime && /* @__PURE__ */ React12.createElement("span", null, "Expires ", invitationTimeLeft)))) : showAuthCode ? /* @__PURE__ */ React12.createElement(AuthCode, {
@@ -961,7 +947,8 @@ var defaultActions = {
961
947
  }
962
948
  };
963
949
  var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
964
- const { classNames, variant, isFull = true, actions = defaultActions, activeAction: propsActiveAction, onChangeActiveAction, defaultActiveAction, ...rest } = props;
950
+ const { classNames, variant, isFull = true, actions = defaultActions, activeAction: propsActiveAction, onChangeActiveAction, defaultActiveAction, "data-testid": testId, ...rest } = props;
951
+ const dropdownTestId = testId && `${testId}.more`;
965
952
  const [activeActionKey2 = Object.keys(actions)[0], setActiveAction] = useControllableState3({
966
953
  prop: propsActiveAction,
967
954
  onChange: onChangeActiveAction,
@@ -980,6 +967,7 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
980
967
  ],
981
968
  ref: forwardedRef,
982
969
  variant,
970
+ "data-testid": testId,
983
971
  onClick: activeAction.onClick
984
972
  }, activeAction.icon && /* @__PURE__ */ React15.createElement(activeAction.icon, {
985
973
  className: getSize8(5)
@@ -989,19 +977,21 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
989
977
  classNames: [
990
978
  "bs-11 flex-none rounded-is-none",
991
979
  classNames
992
- ]
980
+ ],
981
+ "data-testid": dropdownTestId
993
982
  }, /* @__PURE__ */ React15.createElement("span", {
994
983
  className: "sr-only"
995
984
  }, t("invite options label")), /* @__PURE__ */ React15.createElement(CaretDown3, {
996
985
  className: getSize8(4)
997
- }))), /* @__PURE__ */ React15.createElement(DropdownMenu3.Content, null, /* @__PURE__ */ React15.createElement(DropdownMenu3.Viewport, null, Object.entries(actions).map(([id, action]) => {
986
+ }))), /* @__PURE__ */ React15.createElement(DropdownMenu3.Portal, null, /* @__PURE__ */ React15.createElement(DropdownMenu3.Content, null, /* @__PURE__ */ React15.createElement(DropdownMenu3.Viewport, null, Object.entries(actions).map(([id, action]) => {
998
987
  return /* @__PURE__ */ React15.createElement(DropdownMenu3.CheckboxItem, {
999
988
  key: id,
1000
989
  "aria-labelledby": `${id}__label`,
1001
990
  "aria-describedby": `${id}__description`,
1002
991
  checked: activeActionKey2 === id,
1003
992
  onCheckedChange: (checked) => checked && setActiveAction(id),
1004
- classNames: "gap-2"
993
+ classNames: "gap-2",
994
+ "data-testid": action.testId
1005
995
  }, action.icon && /* @__PURE__ */ React15.createElement(action.icon, {
1006
996
  className: getSize8(5)
1007
997
  }), /* @__PURE__ */ React15.createElement("div", {
@@ -1018,7 +1008,7 @@ var BifurcatedAction = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
1018
1008
  weight: "bold",
1019
1009
  className: getSize8(4)
1020
1010
  })));
1021
- })), /* @__PURE__ */ React15.createElement(DropdownMenu3.Arrow, null))));
1011
+ })), /* @__PURE__ */ React15.createElement(DropdownMenu3.Arrow, null)))));
1022
1012
  });
1023
1013
  var Action = /* @__PURE__ */ forwardRef3((props, forwardedRef) => {
1024
1014
  const { children, classNames, variant, isFull = true, ...rest } = props;
@@ -1253,7 +1243,7 @@ import { useClient as useClient6 } from "@dxos/react-client";
1253
1243
  import { useIdentity, useDevices, useHaloInvitations as useHaloInvitations2 } from "@dxos/react-client/halo";
1254
1244
  import { useInvitationStatus as useInvitationStatus2 } from "@dxos/react-client/invitations";
1255
1245
  import { useNetworkStatus, ConnectionState as ConnectionState2 } from "@dxos/react-client/mesh";
1256
- import { Avatar as Avatar6, Input as Input2, Toolbar as Toolbar3, Tooltip as Tooltip7, useId as useId6, useTranslation as useTranslation14 } from "@dxos/react-ui";
1246
+ import { Avatar as Avatar6, Input as Input2, Toolbar as Toolbar3, Tooltip as Tooltip6, useId as useId6, useTranslation as useTranslation14 } from "@dxos/react-ui";
1257
1247
  import { getSize as getSize13 } from "@dxos/react-ui-theme";
1258
1248
  import { hexToEmoji as hexToEmoji4, hexToHue as hexToHue2, keyToFallback as keyToFallback3 } from "@dxos/util";
1259
1249
 
@@ -1421,7 +1411,7 @@ var IdentityActionChooser = (props) => {
1421
1411
  });
1422
1412
  };
1423
1413
  var IdentityActionChooserImpl = ({ devices, connectionState, agentHostingEnabled, onClickAdd, onClickJoinExisting, onClickRecover, onClickReset, ...agentProps }) => {
1424
- const managedDeviceAvailable = devices.find((device) => device.profile?.type === DeviceType2.AGENT_MANAGED);
1414
+ const edgeDeviceAvailable = devices.find((device) => device.profile?.type === DeviceType2.AGENT_MANAGED && device.profile?.os?.toUpperCase() === "EDGE");
1425
1415
  return /* @__PURE__ */ React25.createElement("div", {
1426
1416
  role: "none",
1427
1417
  className: "bs-40 grow overflow-y-auto overflow-x-hidden"
@@ -1430,10 +1420,10 @@ var IdentityActionChooserImpl = ({ devices, connectionState, agentHostingEnabled
1430
1420
  connectionState,
1431
1421
  onClickAdd,
1432
1422
  onClickJoinExisting,
1433
- onClickRecover,
1423
+ onClickRecover: agentProps.agentStatus === "created" ? onClickRecover : void 0,
1434
1424
  onClickReset,
1435
1425
  onAgentDestroy: agentProps.onAgentDestroy
1436
- }), !managedDeviceAvailable && agentHostingEnabled && /* @__PURE__ */ React25.createElement(AgentConfig, agentProps));
1426
+ }), !edgeDeviceAvailable && agentHostingEnabled && /* @__PURE__ */ React25.createElement(AgentConfig, agentProps));
1437
1427
  };
1438
1428
 
1439
1429
  // packages/sdk/shell/src/panels/IdentityPanel/steps/ProfileForm.tsx
@@ -1449,6 +1439,7 @@ import { useClient as useClient5 } from "@dxos/react-client";
1449
1439
  import { useEffect as useEffect2, useState as useState6 } from "react";
1450
1440
  import { invariant } from "@dxos/invariant";
1451
1441
  import { QueryAgentStatusResponse } from "@dxos/protocols/proto/dxos/client/services";
1442
+ import { EdgeReplicationSetting } from "@dxos/protocols/proto/dxos/echo/metadata";
1452
1443
  import { useClient as useClient3 } from "@dxos/react-client";
1453
1444
  var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/IdentityPanel/useEdgeAgentsHandlers.ts";
1454
1445
  var useEdgeAgentHandlers = ({ identity }) => {
@@ -1485,7 +1476,7 @@ var useEdgeAgentHandlers = ({ identity }) => {
1485
1476
  const onAgentCreate = async () => {
1486
1477
  invariant(identity, "Identity not found", {
1487
1478
  F: __dxlog_file3,
1488
- L: 56,
1479
+ L: 58,
1489
1480
  S: void 0,
1490
1481
  A: [
1491
1482
  "identity",
@@ -1507,6 +1498,7 @@ var useEdgeAgentHandlers = ({ identity }) => {
1507
1498
  setValidationMessage("");
1508
1499
  try {
1509
1500
  await service.createAgent();
1501
+ await Promise.all(client.spaces.get().map((space) => space?.internal.setEdgeReplicationPreference(EdgeReplicationSetting.ENABLED)));
1510
1502
  setAgentStatus("created");
1511
1503
  } catch (err) {
1512
1504
  setAgentStatus("error");
@@ -1871,7 +1863,7 @@ var __dxlog_file6 = "/home/runner/work/dxos/dxos/packages/sdk/shell/src/panels/I
1871
1863
  var viewStyles = "pbs-1 pbe-3 pli-3";
1872
1864
  var getHueValue = (identity) => identity?.profile?.data?.hue || hexToHue2(identity?.identityKey.toHex() ?? "0");
1873
1865
  var getEmojiValue = (identity) => identity?.profile?.data?.emoji || hexToEmoji4(identity?.identityKey.toHex() ?? "0");
1874
- var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
1866
+ var IdentityHeading = ({ titleId, title, identity, hideRecover, onDone, onUpdateProfile, connectionState, onChangeConnectionState }) => {
1875
1867
  const client = useClient6();
1876
1868
  const fallbackValue = keyToFallback3(identity.identityKey);
1877
1869
  const { t } = useTranslation14("os");
@@ -1904,7 +1896,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
1904
1896
  const handleRecoveryCode = async () => {
1905
1897
  invariant3(client.services.services.IdentityService, "IdentityService not available", {
1906
1898
  F: __dxlog_file6,
1907
- L: 76,
1899
+ L: 77,
1908
1900
  S: void 0,
1909
1901
  A: [
1910
1902
  "client.services.services.IdentityService",
@@ -1915,7 +1907,6 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
1915
1907
  void setTextValue(seedphrase);
1916
1908
  };
1917
1909
  const isConnected = connectionState === ConnectionState2.ONLINE;
1918
- const isProduction = client.config.values.runtime?.app?.env?.DX_ENVIRONMENT === "production";
1919
1910
  return /* @__PURE__ */ React29.createElement(Heading, {
1920
1911
  titleId,
1921
1912
  title,
@@ -1959,7 +1950,7 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
1959
1950
  hue,
1960
1951
  onChangeHue: setHue,
1961
1952
  classNames: "bs-[--rail-action]"
1962
- }), /* @__PURE__ */ React29.createElement(Tooltip7.Root, null, /* @__PURE__ */ React29.createElement(Tooltip7.Trigger, {
1953
+ }), /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
1963
1954
  asChild: true
1964
1955
  }, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
1965
1956
  classNames: "bs-[--rail-action]",
@@ -1969,20 +1960,20 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
1969
1960
  className: "sr-only"
1970
1961
  }, t(publicKeyCopied ? "copy success label" : "copy self public key label")), /* @__PURE__ */ React29.createElement(Key, {
1971
1962
  className: getSize13(5)
1972
- }))), /* @__PURE__ */ React29.createElement(Tooltip7.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip7.Content, {
1963
+ }))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
1973
1964
  side: "bottom",
1974
1965
  classNames: "z-50"
1975
- }, t(publicKeyCopied ? "copy success label" : "copy self public key label"), /* @__PURE__ */ React29.createElement(Tooltip7.Arrow, null)))), !isProduction && /* @__PURE__ */ React29.createElement(Tooltip7.Root, null, /* @__PURE__ */ React29.createElement(Tooltip7.Trigger, {
1966
+ }, t(publicKeyCopied ? "copy success label" : "copy self public key label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null)))), !hideRecover && /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
1976
1967
  asChild: true
1977
1968
  }, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
1978
1969
  classNames: "bs-[--rail-action]",
1979
1970
  onClick: handleRecoveryCode
1980
1971
  }, /* @__PURE__ */ React29.createElement(FirstAidKit2, {
1981
1972
  className: getSize13(5)
1982
- }))), /* @__PURE__ */ React29.createElement(Tooltip7.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip7.Content, {
1973
+ }))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
1983
1974
  side: "bottom",
1984
1975
  classNames: "z-50"
1985
- }, t("create recovery code label"), /* @__PURE__ */ React29.createElement(Tooltip7.Arrow, null)))), /* @__PURE__ */ React29.createElement(Tooltip7.Root, null, /* @__PURE__ */ React29.createElement(Tooltip7.Trigger, {
1976
+ }, t("create recovery code label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null)))), /* @__PURE__ */ React29.createElement(Tooltip6.Root, null, /* @__PURE__ */ React29.createElement(Tooltip6.Trigger, {
1986
1977
  asChild: true
1987
1978
  }, /* @__PURE__ */ React29.createElement(Toolbar3.Button, {
1988
1979
  classNames: [
@@ -1996,10 +1987,10 @@ var IdentityHeading = ({ titleId, title, identity, onDone, onUpdateProfile, conn
1996
1987
  className: getSize13(5)
1997
1988
  }) : /* @__PURE__ */ React29.createElement(Plugs, {
1998
1989
  className: getSize13(5)
1999
- }))), /* @__PURE__ */ React29.createElement(Tooltip7.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip7.Content, {
1990
+ }))), /* @__PURE__ */ React29.createElement(Tooltip6.Portal, null, /* @__PURE__ */ React29.createElement(Tooltip6.Content, {
2000
1991
  side: "bottom",
2001
1992
  classNames: "z-50"
2002
- }, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ React29.createElement(Tooltip7.Arrow, null)))))));
1993
+ }, t(isConnected ? "disconnect label" : "connect label"), /* @__PURE__ */ React29.createElement(Tooltip6.Arrow, null)))))));
2003
1994
  };
2004
1995
  var IdentityPanelImpl = (props) => {
2005
1996
  const { identity, titleId, activeView, onUpdateProfile, onResetStorage, onRecover, onJoinNewIdentity, IdentityActionChooser: IdentityActionChooserComponent = IdentityActionChooser, InvitationManager: InvitationManagerComponent = InvitationManager, connectionState, onChangeConnectionState, onDone, ...rest } = props;
@@ -2016,10 +2007,12 @@ var IdentityPanelImpl = (props) => {
2016
2007
  t
2017
2008
  ]);
2018
2009
  const onCancelReset = () => rest.send?.("unchooseAction");
2010
+ const hideRecover = rest.agentStatus !== "created";
2019
2011
  return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(IdentityHeading, {
2020
2012
  identity,
2021
2013
  titleId,
2022
2014
  title,
2015
+ hideRecover,
2023
2016
  onDone,
2024
2017
  onUpdateProfile,
2025
2018
  connectionState,
@@ -2089,7 +2082,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
2089
2082
  if (!identity) {
2090
2083
  log6.error("IdentityPanel rendered with no active identity.", void 0, {
2091
2084
  F: __dxlog_file6,
2092
- L: 278,
2085
+ L: 288,
2093
2086
  S: void 0,
2094
2087
  C: (f, a) => f(...a)
2095
2088
  });
@@ -2106,7 +2099,7 @@ var IdentityPanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => co
2106
2099
  const subscription = identityService.subscribe((state) => {
2107
2100
  log6("[state]", state, {
2108
2101
  F: __dxlog_file6,
2109
- L: 291,
2102
+ L: 301,
2110
2103
  S: void 0,
2111
2104
  C: (f, a) => f(...a)
2112
2105
  });
@@ -3776,6 +3769,7 @@ var SpaceManager = (props) => {
3776
3769
  label: t("invite one label"),
3777
3770
  description: t("invite one description"),
3778
3771
  icon: UserPlus,
3772
+ testId: "spaces-panel.invite-one",
3779
3773
  onClick: useCallback7(() => {
3780
3774
  const invitation = space.share?.({
3781
3775
  type: Invitation8.Type.INTERACTIVE,
@@ -3787,13 +3781,15 @@ var SpaceManager = (props) => {
3787
3781
  const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
3788
3782
  }
3789
3783
  }, [
3790
- space
3784
+ space,
3785
+ target
3791
3786
  ])
3792
3787
  },
3793
3788
  inviteMany: {
3794
3789
  label: t("invite many label"),
3795
3790
  description: t("invite many description"),
3796
3791
  icon: UsersThree,
3792
+ testId: "spaces-panel.invite-many",
3797
3793
  onClick: useCallback7(() => {
3798
3794
  const invitation = space.share?.({
3799
3795
  type: Invitation8.Type.DELEGATED,
@@ -3805,7 +3801,8 @@ var SpaceManager = (props) => {
3805
3801
  const subscription = invitation.subscribe((invitation2) => handleInvitationEvent(invitation2, subscription));
3806
3802
  }
3807
3803
  }, [
3808
- space
3804
+ space,
3805
+ target
3809
3806
  ])
3810
3807
  }
3811
3808
  };
@@ -3828,7 +3825,7 @@ var SpaceManagerImpl = (props) => {
3828
3825
  }
3829
3826
  }
3830
3827
  };
3831
- const [activeAction, setInternalActiveAction] = useState13(localStorage.getItem(activeActionKey) ?? "inviteOne");
3828
+ const [activeAction, setInternalActiveAction] = useState13(localStorage.getItem(activeActionKey) ?? "inviteMany");
3832
3829
  const setActiveAction = (nextAction) => {
3833
3830
  setInternalActiveAction(nextAction);
3834
3831
  localStorage.setItem(activeActionKey, nextAction);
@@ -3887,8 +3884,8 @@ var SpacePanelHeading = ({ titleId, space, onDone }) => {
3887
3884
  }, name ?? space.key.truncate())));
3888
3885
  };
3889
3886
  var SpacePanelImpl = (props) => {
3890
- const { titleId, activeView, space, target, SpaceManager: SpaceManagerComponent = SpaceManager, InvitationManager: InvitationManagerComponent = InvitationManager, ...rest } = props;
3891
- return /* @__PURE__ */ React40.createElement(React40.Fragment, null, /* @__PURE__ */ React40.createElement(SpacePanelHeading, {
3887
+ const { titleId, activeView, space, hideHeading, target, SpaceManager: SpaceManagerComponent = SpaceManager, InvitationManager: InvitationManagerComponent = InvitationManager, ...rest } = props;
3888
+ return /* @__PURE__ */ React40.createElement(React40.Fragment, null, !hideHeading && /* @__PURE__ */ React40.createElement(SpacePanelHeading, {
3892
3889
  ...rest,
3893
3890
  titleId,
3894
3891
  space
@@ -3930,7 +3927,7 @@ var SpacePanel = ({ titleId: propsTitleId, createInvitationUrl = (code) => code,
3930
3927
  const subscription = spaceService.subscribe((state) => {
3931
3928
  log13("[state]", state, {
3932
3929
  F: __dxlog_file13,
3933
- L: 94,
3930
+ L: 95,
3934
3931
  S: void 0,
3935
3932
  C: (f, a) => f(...a)
3936
3933
  });
@@ -4035,7 +4032,7 @@ import React47, { StrictMode } from "react";
4035
4032
  import { createRoot } from "react-dom/client";
4036
4033
  import { DEFAULT_CLIENT_CHANNEL, DEFAULT_SHELL_CHANNEL } from "@dxos/client-protocol";
4037
4034
  import { AgentHostingProvider, ClientProvider, ClientServicesProxy, Config, ShellDisplay as ShellDisplay2 } from "@dxos/react-client";
4038
- import { Button as Button11, Dialog as Dialog3, ThemeProvider, Tooltip as Tooltip8, useTranslation as useTranslation26 } from "@dxos/react-ui";
4035
+ import { Button as Button11, Dialog as Dialog3, ThemeProvider, Tooltip as Tooltip7, useTranslation as useTranslation26 } from "@dxos/react-ui";
4039
4036
  import { defaultTx } from "@dxos/react-ui-theme";
4040
4037
  import { createIFramePort } from "@dxos/rpc-tunnel";
4041
4038
 
@@ -4539,7 +4536,7 @@ var runShell = async (config = new Config()) => {
4539
4536
  config,
4540
4537
  services,
4541
4538
  noBanner: true
4542
- }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip8.Provider, null, /* @__PURE__ */ React47.createElement(AgentHostingProvider, null, /* @__PURE__ */ React47.createElement(Shell, {
4539
+ }, /* @__PURE__ */ React47.createElement(ClipboardProvider, null, /* @__PURE__ */ React47.createElement(Tooltip7.Provider, null, /* @__PURE__ */ React47.createElement(AgentHostingProvider, null, /* @__PURE__ */ React47.createElement(Shell, {
4543
4540
  runtime
4544
4541
  }))))))));
4545
4542
  } catch {