@opengeni/react 7.6.1-canary.37073905159001 → 7.6.1

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 (136) hide show
  1. package/README.md +2 -19
  2. package/dist/{browser-viewer-63TXMINB.js → browser-viewer-5X47I6T2.js} +5 -6
  3. package/dist/{chunk-TKB4SB44.js → chunk-45GE35O7.js} +2 -10
  4. package/dist/chunk-45GE35O7.js.map +1 -0
  5. package/dist/{chunk-DOJWJQ3F.js → chunk-5EXGU7UF.js} +3 -3
  6. package/dist/{chunk-YN7I3STW.js → chunk-6NEZPF53.js} +32 -153
  7. package/dist/chunk-6NEZPF53.js.map +1 -0
  8. package/dist/{chunk-I7IWRQLN.js → chunk-BI57CQUV.js} +2 -2
  9. package/dist/{chunk-6ZSWSH4I.js → chunk-CHPKSLPN.js} +1 -3
  10. package/dist/chunk-CHPKSLPN.js.map +1 -0
  11. package/dist/{chunk-Q5QBEZIQ.js → chunk-DV2DBNPQ.js} +29 -48
  12. package/dist/chunk-DV2DBNPQ.js.map +1 -0
  13. package/dist/{chunk-RDKBXMWX.js → chunk-FGBCYQOT.js} +74 -120
  14. package/dist/chunk-FGBCYQOT.js.map +1 -0
  15. package/dist/{chunk-AAG4R3QN.js → chunk-KGENSZKS.js} +3 -4
  16. package/dist/chunk-KGENSZKS.js.map +1 -0
  17. package/dist/{chunk-YQEAA6LT.js → chunk-KZ73RL76.js} +3 -7
  18. package/dist/chunk-KZ73RL76.js.map +1 -0
  19. package/dist/{chunk-LFXYGZWK.js → chunk-LZ3KHA55.js} +60 -169
  20. package/dist/chunk-LZ3KHA55.js.map +1 -0
  21. package/dist/{chunk-2QUSQVF2.js → chunk-UINDK6C3.js} +3 -3
  22. package/dist/{chunk-UTRTG6LH.js → chunk-UJRYEWZI.js} +8 -48
  23. package/dist/chunk-UJRYEWZI.js.map +1 -0
  24. package/dist/{chunk-XOAMRDDK.js → chunk-VGIKFIO2.js} +3 -6
  25. package/dist/chunk-VGIKFIO2.js.map +1 -0
  26. package/dist/{chunk-ELCE5SXV.js → chunk-WZ55DVGK.js} +4 -8
  27. package/dist/chunk-WZ55DVGK.js.map +1 -0
  28. package/dist/{chunk-IQUCRAT7.js → chunk-XA6R7DJQ.js} +3 -3
  29. package/dist/{chunk-TOAH2BKA.js → chunk-YCGBREUV.js} +2 -6
  30. package/dist/{chunk-TOAH2BKA.js.map → chunk-YCGBREUV.js.map} +1 -1
  31. package/dist/{chunk-HNFCAQ5R.js → chunk-YRYF2GLG.js} +31 -39
  32. package/dist/chunk-YRYF2GLG.js.map +1 -0
  33. package/dist/{chunk-GISEVGS6.js → chunk-YSMMDOOE.js} +2 -10
  34. package/dist/chunk-YSMMDOOE.js.map +1 -0
  35. package/dist/{chunk-CWWKTNKK.js → chunk-Z3DISEQN.js} +18 -35
  36. package/dist/chunk-Z3DISEQN.js.map +1 -0
  37. package/dist/client.d.ts +1 -4
  38. package/dist/commands/types.d.ts +0 -2
  39. package/dist/components/approval-surface.d.ts +0 -15
  40. package/dist/composer.js +7 -8
  41. package/dist/{computer-viewer-X2MBRZY4.js → computer-viewer-7GF35SNY.js} +4 -5
  42. package/dist/connect.js +3 -3
  43. package/dist/hooks/use-browser-session.d.ts +0 -4
  44. package/dist/hooks/use-composer.d.ts +0 -2
  45. package/dist/hooks/use-computer-session.d.ts +0 -2
  46. package/dist/hooks/use-file-attachments.d.ts +0 -2
  47. package/dist/hooks/use-session-events.d.ts +1 -1
  48. package/dist/hooks/use-workspace-sessions.d.ts +5 -15
  49. package/dist/index.d.ts +2 -2
  50. package/dist/index.js +21 -28
  51. package/dist/index.js.map +1 -1
  52. package/dist/interaction.d.ts +1 -1
  53. package/dist/interaction.js +5 -6
  54. package/dist/interaction.js.map +1 -1
  55. package/dist/{latest-question-CNEZ5KAN.js → latest-question-3BJGKQQ6.js} +3 -3
  56. package/dist/lib/format.d.ts +3 -27
  57. package/dist/lib/interaction-errors.d.ts +0 -3
  58. package/dist/machines.js +4 -5
  59. package/dist/{model-policy-picker-menu-JSA64TNN.js → model-policy-picker-menu-PUTA5JOB.js} +4 -4
  60. package/dist/model-policy.js +1 -1
  61. package/dist/provider.d.ts +1 -5
  62. package/dist/{queue-surface-implementation-HENWYFWA.js → queue-surface-implementation-2CAQAIHM.js} +2 -3
  63. package/dist/{queue-surface-implementation-HENWYFWA.js.map → queue-surface-implementation-2CAQAIHM.js.map} +1 -1
  64. package/dist/realtime.js +2 -2
  65. package/dist/{sandbox-files-BBC47SLD.js → sandbox-files-AEJTWGT4.js} +3 -4
  66. package/dist/session-ui.d.ts +1 -1
  67. package/dist/session-ui.js +12 -13
  68. package/dist/session-ui.js.map +1 -1
  69. package/dist/session.js +6 -7
  70. package/dist/usage.js +1 -2
  71. package/dist/usage.js.map +1 -1
  72. package/package.json +3 -3
  73. package/src/client.ts +1 -5
  74. package/src/commands/registry.ts +15 -18
  75. package/src/commands/types.ts +0 -2
  76. package/src/components/approval-surface.tsx +42 -166
  77. package/src/components/browser-viewer.tsx +9 -38
  78. package/src/components/composer.tsx +2 -9
  79. package/src/components/computer-viewer.tsx +30 -160
  80. package/src/components/generated-video-player.tsx +2 -4
  81. package/src/components/human-input-form.tsx +5 -18
  82. package/src/components/message-timeline.tsx +2 -4
  83. package/src/components/open-geni-chat.tsx +4 -11
  84. package/src/components/queue-surface-state.tsx +1 -3
  85. package/src/components/session-chrome.tsx +2 -5
  86. package/src/components/session-commands-panel.tsx +1 -3
  87. package/src/components/session-conversation.tsx +2 -4
  88. package/src/components/session-list.tsx +5 -7
  89. package/src/components/session-mcp-capability-card.tsx +1 -11
  90. package/src/hooks/internal.ts +2 -3
  91. package/src/hooks/use-browser-session.ts +79 -115
  92. package/src/hooks/use-composer.ts +31 -70
  93. package/src/hooks/use-computer-session.ts +6 -57
  94. package/src/hooks/use-file-attachments.ts +3 -16
  95. package/src/hooks/use-goal.ts +1 -2
  96. package/src/hooks/use-session-capabilities.ts +2 -3
  97. package/src/hooks/use-session-events.ts +8 -15
  98. package/src/hooks/use-slash-commands.ts +11 -6
  99. package/src/hooks/use-turn-queue.ts +1 -2
  100. package/src/hooks/use-workspace-sessions.ts +7 -40
  101. package/src/index.ts +2 -7
  102. package/src/interaction.ts +0 -1
  103. package/src/lib/format.ts +9 -73
  104. package/src/lib/interaction-errors.ts +0 -15
  105. package/src/model-policy.ts +0 -5
  106. package/src/provider.tsx +4 -12
  107. package/src/session-ui.ts +1 -1
  108. package/src/timeline/projection.ts +1 -12
  109. package/styles/compiled.css +0 -14
  110. package/dist/chunk-6ZSWSH4I.js.map +0 -1
  111. package/dist/chunk-AAG4R3QN.js.map +0 -1
  112. package/dist/chunk-CWWKTNKK.js.map +0 -1
  113. package/dist/chunk-ELCE5SXV.js.map +0 -1
  114. package/dist/chunk-GISEVGS6.js.map +0 -1
  115. package/dist/chunk-HNFCAQ5R.js.map +0 -1
  116. package/dist/chunk-LFXYGZWK.js.map +0 -1
  117. package/dist/chunk-Q5QBEZIQ.js.map +0 -1
  118. package/dist/chunk-RDKBXMWX.js.map +0 -1
  119. package/dist/chunk-TKB4SB44.js.map +0 -1
  120. package/dist/chunk-UGLEYEMP.js +0 -33
  121. package/dist/chunk-UGLEYEMP.js.map +0 -1
  122. package/dist/chunk-UTRTG6LH.js.map +0 -1
  123. package/dist/chunk-XOAMRDDK.js.map +0 -1
  124. package/dist/chunk-YN7I3STW.js.map +0 -1
  125. package/dist/chunk-YQEAA6LT.js.map +0 -1
  126. package/dist/lib/error-message.d.ts +0 -7
  127. package/src/lib/error-message.ts +0 -37
  128. /package/dist/{browser-viewer-63TXMINB.js.map → browser-viewer-5X47I6T2.js.map} +0 -0
  129. /package/dist/{chunk-DOJWJQ3F.js.map → chunk-5EXGU7UF.js.map} +0 -0
  130. /package/dist/{chunk-I7IWRQLN.js.map → chunk-BI57CQUV.js.map} +0 -0
  131. /package/dist/{chunk-2QUSQVF2.js.map → chunk-UINDK6C3.js.map} +0 -0
  132. /package/dist/{chunk-IQUCRAT7.js.map → chunk-XA6R7DJQ.js.map} +0 -0
  133. /package/dist/{computer-viewer-X2MBRZY4.js.map → computer-viewer-7GF35SNY.js.map} +0 -0
  134. /package/dist/{latest-question-CNEZ5KAN.js.map → latest-question-3BJGKQQ6.js.map} +0 -0
  135. /package/dist/{model-policy-picker-menu-JSA64TNN.js.map → model-policy-picker-menu-PUTA5JOB.js.map} +0 -0
  136. /package/dist/{sandbox-files-BBC47SLD.js.map → sandbox-files-AEJTWGT4.js.map} +0 -0
@@ -1,11 +1,10 @@
1
1
  import {
2
2
  InteractionInterventionBanner,
3
- isInteractionControlUnavailable,
4
3
  isNonRetryableInteractionError,
5
4
  isSourcePlacementChangedError,
6
5
  useInteractionInterventions,
7
6
  useInteractionInvalidation
8
- } from "./chunk-GISEVGS6.js";
7
+ } from "./chunk-YSMMDOOE.js";
9
8
  import {
10
9
  copyTextToClipboard
11
10
  } from "./chunk-JVYQRRC4.js";
@@ -14,7 +13,7 @@ import {
14
13
  } from "./chunk-RHREZ7BO.js";
15
14
  import {
16
15
  formatBytes
17
- } from "./chunk-UTRTG6LH.js";
16
+ } from "./chunk-UJRYEWZI.js";
18
17
  import {
19
18
  STREAM_CLOSE_REASON_NORMAL,
20
19
  STREAM_KIND_BROWSER,
@@ -26,7 +25,7 @@ import {
26
25
  } from "./chunk-5J4FOW6Q.js";
27
26
  import {
28
27
  usePageLiveActivity
29
- } from "./chunk-YQEAA6LT.js";
28
+ } from "./chunk-KZ73RL76.js";
30
29
  import {
31
30
  useEmbeddedBrowserInteraction
32
31
  } from "./chunk-NEXLLTP4.js";
@@ -36,6 +35,7 @@ import {
36
35
 
37
36
  // src/components/browser-viewer.tsx
38
37
  import { interactionControlFailureFromError } from "@opengeni/sdk/interaction";
38
+ import { OpenGeniApiError as OpenGeniApiError2 } from "@opengeni/sdk";
39
39
  import {
40
40
  BugIcon,
41
41
  ArchiveIcon,
@@ -875,8 +875,6 @@ function useBrowserSession(options) {
875
875
  const [state, setState] = useState5(() => emptyState4(browserSessionId, enabled));
876
876
  const visible = state.browserSessionId === browserSessionId ? state : emptyState4(browserSessionId, enabled);
877
877
  const refreshBlocked = isNonRetryableInteractionError(visible.error);
878
- const inputFailureRef = useRef5(visible.inputFailure);
879
- inputFailureRef.current = visible.inputFailure;
880
878
  const selectedTargetIdRef = useRef5(visible.selectedTargetId);
881
879
  selectedTargetIdRef.current = visible.selectedTargetId;
882
880
  const selectedTargetRef = useRef5(
@@ -907,81 +905,72 @@ function useBrowserSession(options) {
907
905
  requestRef.current.controller?.abort();
908
906
  requestRef.current = { id, controller: null };
909
907
  }, []);
910
- const refreshInventory = useCallback5(
911
- async (checkInput = false) => {
912
- if (!enabled || !browserSessionId) return;
913
- const checkedInputFailure = inputFailureRef.current;
914
- const id = requestRef.current.id + 1;
915
- requestRef.current.controller?.abort();
916
- const controller = new AbortController();
917
- requestRef.current = { id, controller };
908
+ const refresh = useCallback5(async () => {
909
+ if (!enabled || !browserSessionId) return;
910
+ const id = requestRef.current.id + 1;
911
+ requestRef.current.controller?.abort();
912
+ const controller = new AbortController();
913
+ requestRef.current = { id, controller };
914
+ try {
915
+ const [session, targetResponse] = await Promise.all([
916
+ client.getBrowserSession(workspaceId, browserSessionId, {
917
+ signal: controller.signal
918
+ }),
919
+ client.listBrowserTargets(workspaceId, browserSessionId, {
920
+ signal: controller.signal
921
+ })
922
+ ]);
923
+ if (!mountedRef.current || requestRef.current.id !== id) return;
924
+ const selected = chooseTarget(targetResponse.targets, selectedTargetIdRef.current);
925
+ selectedTargetIdRef.current = selected?.id ?? null;
926
+ const previousObservation = observationRef.current.browserSessionId === browserSessionId ? observationRef.current.observation : null;
927
+ const retainedObservation = selected && previousObservation && sameObservationTarget(previousObservation, selected) ? previousObservation : null;
928
+ observationRef.current = { browserSessionId, observation: retainedObservation };
929
+ setState(
930
+ (current) => current.browserSessionId === browserSessionId ? {
931
+ ...current,
932
+ session,
933
+ targets: targetResponse.targets,
934
+ selectedTargetId: selected?.id ?? null,
935
+ observation: retainedObservation,
936
+ loading: false,
937
+ error: null
938
+ } : current
939
+ );
940
+ if (!selected || !semanticObservationEnabledRef.current) return;
918
941
  try {
919
- const [session, targetResponse] = await Promise.all([
920
- client.getBrowserSession(workspaceId, browserSessionId, {
921
- signal: controller.signal
922
- }),
923
- client.listBrowserTargets(workspaceId, browserSessionId, {
924
- signal: controller.signal
925
- })
926
- ]);
942
+ const observation = await client.observeBrowserTarget(
943
+ workspaceId,
944
+ browserSessionId,
945
+ selected.id,
946
+ { signal: controller.signal }
947
+ );
927
948
  if (!mountedRef.current || requestRef.current.id !== id) return;
928
- const selected = chooseTarget(targetResponse.targets, selectedTargetIdRef.current);
929
- selectedTargetIdRef.current = selected?.id ?? null;
930
- const previousObservation = observationRef.current.browserSessionId === browserSessionId ? observationRef.current.observation : null;
931
- const retainedObservation = selected && previousObservation && sameObservationTarget(previousObservation, selected) ? previousObservation : null;
932
- observationRef.current = { browserSessionId, observation: retainedObservation };
949
+ observationRef.current = { browserSessionId, observation };
950
+ lastObservationAtRef.current = Date.now();
933
951
  setState(
934
- (current) => current.browserSessionId === browserSessionId ? {
935
- ...current,
936
- session,
937
- targets: targetResponse.targets,
938
- selectedTargetId: selected?.id ?? null,
939
- observation: retainedObservation,
940
- loading: false,
941
- error: null,
942
- // Media and background polling cannot confirm an input outcome.
943
- // Only an explicit fresh check clears the notice it began with.
944
- inputFailure: checkInput && session.id === browserSessionId && targetResponse.browserSessionId === browserSessionId && current.inputFailure === checkedInputFailure ? null : current.inputFailure
945
- } : current
952
+ (current) => current.browserSessionId === browserSessionId && current.selectedTargetId === observation.target.id ? { ...current, observation } : current
946
953
  );
947
- if (!selected || !semanticObservationEnabledRef.current) return;
948
- try {
949
- const observation = await client.observeBrowserTarget(
950
- workspaceId,
951
- browserSessionId,
952
- selected.id,
953
- { signal: controller.signal }
954
- );
955
- if (!mountedRef.current || requestRef.current.id !== id) return;
956
- observationRef.current = { browserSessionId, observation };
957
- lastObservationAtRef.current = Date.now();
958
- setState(
959
- (current) => current.browserSessionId === browserSessionId && current.selectedTargetId === observation.target.id ? { ...current, observation } : current
960
- );
961
- } catch (cause) {
962
- if (controller.signal.aborted || !mountedRef.current || requestRef.current.id !== id)
963
- return;
964
- void cause;
965
- }
966
954
  } catch (cause) {
967
955
  if (controller.signal.aborted || !mountedRef.current || requestRef.current.id !== id)
968
956
  return;
969
- setState(
970
- (current) => current.browserSessionId === browserSessionId ? {
971
- ...current,
972
- loading: false,
973
- error: cause instanceof Error ? cause : new Error(String(cause))
974
- } : current
975
- );
976
- } finally {
977
- if (requestRef.current.id === id) {
978
- requestRef.current = { id, controller: null };
979
- }
957
+ void cause;
980
958
  }
981
- },
982
- [browserSessionId, client, enabled, workspaceId]
983
- );
984
- const refresh = useCallback5(async () => await refreshInventory(true), [refreshInventory]);
959
+ } catch (cause) {
960
+ if (controller.signal.aborted || !mountedRef.current || requestRef.current.id !== id) return;
961
+ setState(
962
+ (current) => current.browserSessionId === browserSessionId ? {
963
+ ...current,
964
+ loading: false,
965
+ error: cause instanceof Error ? cause : new Error(String(cause))
966
+ } : current
967
+ );
968
+ } finally {
969
+ if (requestRef.current.id === id) {
970
+ requestRef.current = { id, controller: null };
971
+ }
972
+ }
973
+ }, [browserSessionId, client, enabled, workspaceId]);
985
974
  const refreshSemantic = useCallback5(async () => {
986
975
  if (!enabled || !browserSessionId) return;
987
976
  const target = selectedTargetRef.current;
@@ -1019,12 +1008,12 @@ function useBrowserSession(options) {
1019
1008
  setState(
1020
1009
  (current) => current.browserSessionId === browserSessionId ? { ...current, loading: true } : emptyState4(browserSessionId, true)
1021
1010
  );
1022
- void refreshInventory();
1011
+ void refresh();
1023
1012
  return () => {
1024
1013
  mountedRef.current = false;
1025
1014
  invalidateRefresh();
1026
1015
  };
1027
- }, [browserSessionId, enabled, invalidateRefresh, refreshInventory]);
1016
+ }, [browserSessionId, enabled, invalidateRefresh, refresh]);
1028
1017
  useEffect5(() => {
1029
1018
  const previous = previousSemanticObservationRef.current;
1030
1019
  previousSemanticObservationRef.current = {
@@ -1046,16 +1035,16 @@ function useBrowserSession(options) {
1046
1035
  useEffect5(() => {
1047
1036
  if (!enabled || !pageLive || visible.mutating || refreshBlocked) return;
1048
1037
  const timer = setInterval(() => {
1049
- if (!requestRef.current.controller) void refreshInventory();
1038
+ if (!requestRef.current.controller) void refresh();
1050
1039
  }, pollIntervalMs);
1051
1040
  return () => clearInterval(timer);
1052
- }, [enabled, pageLive, pollIntervalMs, refreshInventory, refreshBlocked, visible.mutating]);
1041
+ }, [enabled, pageLive, pollIntervalMs, refresh, refreshBlocked, visible.mutating]);
1053
1042
  useEffect5(() => {
1054
1043
  if (!enabled || !browserSessionId || !pageLive || refreshBlocked) return;
1055
1044
  let disposed = false;
1056
1045
  const heartbeat = () => {
1057
1046
  void client.heartbeatBrowserSession(workspaceId, browserSessionId).catch(() => {
1058
- if (!disposed) void refreshInventory();
1047
+ if (!disposed) void refresh();
1059
1048
  });
1060
1049
  };
1061
1050
  const timer = setInterval(heartbeat, 3e4);
@@ -1063,7 +1052,7 @@ function useBrowserSession(options) {
1063
1052
  disposed = true;
1064
1053
  clearInterval(timer);
1065
1054
  };
1066
- }, [browserSessionId, client, enabled, pageLive, refreshInventory, refreshBlocked, workspaceId]);
1055
+ }, [browserSessionId, client, enabled, pageLive, refresh, refreshBlocked, workspaceId]);
1067
1056
  const runMutation = useCallback5(
1068
1057
  async (scopeBrowserSessionId, operation) => {
1069
1058
  invalidateRefresh();
@@ -1233,16 +1222,6 @@ function useBrowserSession(options) {
1233
1222
  observationMode,
1234
1223
  action
1235
1224
  });
1236
- if (receipt.state !== "completed") {
1237
- const inputFailure = {
1238
- operationId: receipt.operationId,
1239
- state: receipt.state,
1240
- error: receipt.error
1241
- };
1242
- setState(
1243
- (current) => current.browserSessionId === browserSessionId ? { ...current, inputFailure } : current
1244
- );
1245
- }
1246
1225
  if (receipt.observation) {
1247
1226
  observationRef.current = {
1248
1227
  browserSessionId,
@@ -1331,7 +1310,6 @@ function useBrowserSession(options) {
1331
1310
  loading: visible.loading,
1332
1311
  mutating: visible.mutating,
1333
1312
  error: visible.error,
1334
- inputFailure: visible.inputFailure,
1335
1313
  refresh,
1336
1314
  observeForInput,
1337
1315
  actFromObservation,
@@ -1353,8 +1331,7 @@ function emptyState4(browserSessionId, loading) {
1353
1331
  observation: null,
1354
1332
  loading,
1355
1333
  mutating: false,
1356
- error: null,
1357
- inputFailure: null
1334
+ error: null
1358
1335
  };
1359
1336
  }
1360
1337
  function chooseTarget(targets, preferredId) {
@@ -2288,7 +2265,7 @@ function BrowserViewer({
2288
2265
  setHasLiveFrame(frameIsLive);
2289
2266
  }, [frameIsLive]);
2290
2267
  const supportsLiveFrames = (browser.session ?? selectedRegistrySession)?.capabilities.liveFrames === true;
2291
- const controlUnavailable = isInteractionControlUnavailable(browser.error);
2268
+ const controlUnavailable = isBrowserControlUnavailable(browser.error);
2292
2269
  const connectionError = controlUnavailable ? browser.error : frames.error ?? browser.error;
2293
2270
  const selectedPlacement = (browser.session ?? selectedRegistrySession)?.placement;
2294
2271
  const selectedChromeGenerationLoss = selectedPlacement?.kind === "attached_device" && isAttachedChromeGenerationLossError(connectionError);
@@ -2666,30 +2643,6 @@ function BrowserViewer({
2666
2643
  }
2667
2644
  }
2668
2645
  ),
2669
- browser.inputFailure ? /* @__PURE__ */ jsxs2(
2670
- "div",
2671
- {
2672
- role: "alert",
2673
- "aria-label": "Browser input status",
2674
- className: "flex shrink-0 items-center gap-2 border-t border-og-border bg-og-surface-1 px-3 py-2 text-og-xs",
2675
- children: [
2676
- /* @__PURE__ */ jsx2(CircleAlertIcon, { className: "size-4 shrink-0 text-og-status-failed" }),
2677
- /* @__PURE__ */ jsxs2("div", { className: "min-w-0 flex-1", children: [
2678
- /* @__PURE__ */ jsx2("span", { className: "font-medium", children: browser.inputFailure.state === "failed" ? "Browser input failed" : "Input result unknown" }),
2679
- /* @__PURE__ */ jsx2("p", { className: "text-og-fg-subtle", children: browser.inputFailure.error?.message ?? "Inspect the page before continuing." })
2680
- ] }),
2681
- /* @__PURE__ */ jsx2(
2682
- "button",
2683
- {
2684
- type: "button",
2685
- onClick: () => void browser.refresh(),
2686
- className: "shrink-0 rounded border border-og-border px-2 py-1 transition hover:bg-og-surface-2",
2687
- children: "Check browser"
2688
- }
2689
- )
2690
- ]
2691
- }
2692
- ) : null,
2693
2646
  /* @__PURE__ */ jsxs2("div", { className: "relative flex min-h-0 min-w-0 flex-1 overflow-hidden", children: [
2694
2647
  /* @__PURE__ */ jsx2(
2695
2648
  BrowserViewport,
@@ -2775,7 +2728,6 @@ function BrowserViewer({
2775
2728
  profile: selectedProfile,
2776
2729
  target: browser.selectedTarget,
2777
2730
  observation: browser.observation,
2778
- inputFailure: browser.inputFailure,
2779
2731
  connectionState: displayConnectionState,
2780
2732
  refreshing: registry.refreshing,
2781
2733
  diagnosticsOpen: diagnosticsView !== null,
@@ -3969,7 +3921,6 @@ function BrowserStatusBar(props) {
3969
3921
  }
3970
3922
  ),
3971
3923
  /* @__PURE__ */ jsx2("span", { children: props.connectionState === "live" ? "Live" : props.connectionState === "semantic" ? "Semantic" : browserConnectionLabel(props.connectionState) }),
3972
- props.inputFailure ? /* @__PURE__ */ jsx2("span", { className: "text-og-status-failed", children: props.inputFailure.state === "failed" ? "Input failed" : "Input result unknown" }) : null,
3973
3924
  /* @__PURE__ */ jsx2("span", { children: props.profile?.name ?? "Temporary browser" }),
3974
3925
  /* @__PURE__ */ jsx2("span", { className: "min-w-0 flex-1 truncate", children: props.target?.title }),
3975
3926
  props.refreshing ? /* @__PURE__ */ jsx2(LoaderCircleIcon, { className: "size-3 animate-spin" }) : null,
@@ -4446,6 +4397,9 @@ function attachedChromeGenerationLoss(sessions) {
4446
4397
  );
4447
4398
  return lost?.placement.kind === "attached_device" ? { deviceId: lost.placement.deviceId } : null;
4448
4399
  }
4400
+ function isBrowserControlUnavailable(error) {
4401
+ return error instanceof OpenGeniApiError2 && (error.status >= 500 || error.status === 0);
4402
+ }
4449
4403
  function isAttachedChromeGenerationLossError(error) {
4450
4404
  if (!error) return false;
4451
4405
  return /placement instance changed|controller authority changed/i.test(error.message);
@@ -4517,4 +4471,4 @@ export {
4517
4471
  useBrowserFrameStream,
4518
4472
  BrowserViewer
4519
4473
  };
4520
- //# sourceMappingURL=chunk-RDKBXMWX.js.map
4474
+ //# sourceMappingURL=chunk-FGBCYQOT.js.map