@hydranium/glsp-client-theia 1.0.0-next.160 → 1.0.0-next.169

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 (51) hide show
  1. package/README.md +17 -6
  2. package/lib/browser/client-contribution.d.ts +82 -25
  3. package/lib/browser/client-contribution.d.ts.map +1 -1
  4. package/lib/browser/client-contribution.js +218 -53
  5. package/lib/browser/client-contribution.js.map +1 -1
  6. package/lib/browser/diagram-loader.d.ts +2 -5
  7. package/lib/browser/diagram-loader.d.ts.map +1 -1
  8. package/lib/browser/diagram-loader.js +2 -7
  9. package/lib/browser/diagram-loader.js.map +1 -1
  10. package/lib/browser/diagram-widget.d.ts +18 -23
  11. package/lib/browser/diagram-widget.d.ts.map +1 -1
  12. package/lib/browser/diagram-widget.js +31 -24
  13. package/lib/browser/diagram-widget.js.map +1 -1
  14. package/lib/browser/glsp-client-theia-module.d.ts.map +1 -1
  15. package/lib/browser/glsp-client-theia-module.js +2 -0
  16. package/lib/browser/glsp-client-theia-module.js.map +1 -1
  17. package/lib/browser/glsp-client.d.ts +17 -0
  18. package/lib/browser/glsp-client.d.ts.map +1 -0
  19. package/lib/browser/glsp-client.js +23 -0
  20. package/lib/browser/glsp-client.js.map +1 -0
  21. package/lib/browser/glsp-diagram-manager.d.ts +22 -0
  22. package/lib/browser/glsp-diagram-manager.d.ts.map +1 -1
  23. package/lib/browser/glsp-diagram-manager.js +73 -0
  24. package/lib/browser/glsp-diagram-manager.js.map +1 -1
  25. package/lib/browser/glsp-theia-frontend-module.d.ts.map +1 -1
  26. package/lib/browser/glsp-theia-frontend-module.js +1 -0
  27. package/lib/browser/glsp-theia-frontend-module.js.map +1 -1
  28. package/lib/browser/index.d.ts +2 -0
  29. package/lib/browser/index.d.ts.map +1 -1
  30. package/lib/browser/index.js +2 -0
  31. package/lib/browser/index.js.map +1 -1
  32. package/lib/browser/status-overlay.d.ts +23 -0
  33. package/lib/browser/status-overlay.d.ts.map +1 -0
  34. package/lib/browser/status-overlay.js +52 -0
  35. package/lib/browser/status-overlay.js.map +1 -0
  36. package/lib/node/glsp-server-connection-handler.d.ts +4 -9
  37. package/lib/node/glsp-server-connection-handler.d.ts.map +1 -1
  38. package/lib/node/glsp-server-connection-handler.js +4 -1
  39. package/lib/node/glsp-server-connection-handler.js.map +1 -1
  40. package/package.json +7 -9
  41. package/src/browser/client-contribution.ts +243 -54
  42. package/src/browser/diagram-loader.ts +3 -9
  43. package/src/browser/diagram-widget.ts +34 -24
  44. package/src/browser/glsp-client-theia-module.ts +3 -1
  45. package/src/browser/glsp-client.ts +20 -0
  46. package/src/browser/glsp-diagram-manager.ts +85 -2
  47. package/src/browser/glsp-theia-frontend-module.ts +2 -1
  48. package/src/browser/index.ts +2 -0
  49. package/src/browser/status-overlay.ts +43 -0
  50. package/src/node/glsp-server-connection-handler.ts +6 -10
  51. package/style/diagram-loading.css +2 -5
package/README.md CHANGED
@@ -21,7 +21,9 @@ if you are mounting a hydranium GLSP diagram in a Theia application.
21
21
  - **`createGlspClientTheiaModule(context, options)`** — the standard per-diagram
22
22
  bindings, all unconditional: the cross-head `ChannelLogger`,
23
23
  `HydraniumGlspActionDispatcher`, `HydraniumDiagramLoader`,
24
- `HydraniumHiddenBoundsUpdater`, and `HydraniumGlspMessageService`. Each
24
+ `HydraniumHiddenBoundsUpdater`, `HydraniumGlspMessageService`, and
25
+ `HydraniumStatusOverlay`, which keeps GLSP's status overlay on the page after
26
+ sprotty's first render replaces the diagram's base div. Each
25
27
  replaces a GLSP default with a strict superset of its behaviour, so a head that
26
28
  wants the original rebinds that one token back.
27
29
  - **Loading feedback that cannot silently vanish.** `HydraniumDiagramLoader`
@@ -47,10 +49,20 @@ if you are mounting a hydranium GLSP diagram in a Theia application.
47
49
  `NoOpExternalMarkerManager` instead: markers still decorate the diagram, but
48
50
  Theia's Problems view stops double-listing them.
49
51
  **`AbstractHydraniumGlspDiagramManager`** derives the language-correlated
50
- getters from one descriptor plus a label.
51
- - **`HydraniumGlspClientContribution`** — for a server that starts late: it tails
52
- the Output channel for a server-printed ready marker and defers `start` until a
53
- workspace is open.
52
+ getters from one descriptor plus a label, and `reopen` replaces a diagram
53
+ with a fresh widget in the same tab position, as the Retry of a failed load
54
+ does. It reopens every diagram when their client is lost, and a failed one
55
+ when a client starts.
56
+ - **`HydraniumGlspClientContribution`** — for a server that starts late: it
57
+ defers `start` until a workspace is open, fails a start that takes longer than
58
+ `startupTimeoutMs` (30 s by default), and starts a fresh client after a failed
59
+ start or a lost connection, after a delay that grows while clients keep
60
+ failing, reporting each attempt through `client-theia`'s
61
+ `ConnectionReporter`. `onDidStartClient` and `onDidLoseClient` announce each
62
+ client, and each start and loss is logged to the application-scope
63
+ `ChannelLogger` an adopter binds with `bindChannelLogger`. Its client is
64
+ `HydraniumGlspClient`, which ends a session without the server once the
65
+ connection is gone.
54
66
  - **`HydraniumGlspSaveable`** — the diagram widget's saveable. Each save is a
55
67
  `RequestSaveModelAction` the server answers: the save resolves on its own
56
68
  response, and rejects on its own rejection or after 10 s rather than GLSP's
@@ -85,7 +97,6 @@ hydranium GLSP server. The declared peer dependencies are:
85
97
  | `@hydranium/client-theia` | `^1.0.0-next` |
86
98
  | `@hydranium/protocol` | `^1.0.0-next` |
87
99
  | `@theia/core` | `^1.70.0` |
88
- | `@theia/output` | `^1.70.0` |
89
100
  | `@theia/process` | `^1.70.0` |
90
101
  | `@theia/workspace` | `^1.70.0` |
91
102
  | `inversify` | `^6.0.0` |
@@ -6,48 +6,105 @@
6
6
  *
7
7
  * SPDX-License-Identifier: MIT
8
8
  ********************************************************************************/
9
- import { type GLSPClient } from '@eclipse-glsp/client';
9
+ import { type GLSPClient, type InitializeResult } from '@eclipse-glsp/client';
10
10
  import { BaseGLSPClientContribution } from '@eclipse-glsp/theia-integration';
11
- import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
11
+ import { ChannelLogger, ConnectionReporter, type ConnectionTarget } from '@hydranium/client-theia/lib/browser';
12
+ import { type Channel, Emitter, Event } from '@theia/core';
13
+ import { Deferred } from '@theia/core/lib/common/promise-util';
12
14
  import { WorkspaceService } from '@theia/workspace/lib/browser';
13
- /** Options for `HydraniumGlspClientContribution`. The channel name is the
14
- * Theia Output channel both the LSP and GLSP sides write to (so log lines
15
- * interleave); the ready marker is a server-printed substring that signals
16
- * "the GLSP server is accepting client connections". */
15
+ export declare const DEFAULT_GLSP_CLIENT_STARTUP_TIMEOUT_MS = 30000;
16
+ /** Options for `HydraniumGlspClientContribution`. */
17
17
  export interface ClientContributionOptions {
18
18
  readonly languageContributionId: string;
19
- readonly channelName: string;
20
- readonly readyMarker: string;
19
+ /** How long a start may take, from the workspace opening to the server
20
+ * answering `initializeServer`, before it fails; `0` or less waits for good. */
21
+ readonly startupTimeoutMs?: number;
21
22
  }
22
23
  /**
23
24
  * Theia GLSP client contribution for adopters whose GLSP server runs in a
24
25
  * sideloaded VS Code extension process (or any other deferred-start setup).
25
- * The behaviours adopters reliably need are lifted:
26
26
  *
27
- * 1. `waitForBackendConnected`: tail the OutputChannel for a server-printed
28
- * ready marker. While a socket connection might open earlier, the GLSP
29
- * server typically does internal initialisation before it can accept
30
- * client connections — we wait for it to say so.
31
- * 2. `start`: defer until a workspace is opened. If Theia starts without a
32
- * workspace, this prevents the frontend-backend connection (and its
33
- * "connecting" progress spinner) from firing prematurely.
27
+ * The client starts once a workspace is open and sends its first request at
28
+ * once; the backend handler holds it until its socket to the server is up. A
29
+ * start that fails, and a connection lost after one succeeded, start a fresh
30
+ * client after a backoff, for as long as the contribution lives. Each start is
31
+ * reported through the {@link ConnectionReporter}, and announced through
32
+ * {@link onDidStartClient} and {@link onDidLoseClient}.
34
33
  *
35
34
  * A `GLSPClient` override filtering inbound messages by clientId is
36
35
  * deliberately NOT provided: upstream's `BaseJsonrpcGLSPClient.onActionMessage`
37
- * already filters by clientId, so the `TheiaJsonrpcGLSPClient` returned by
38
- * `BaseGLSPClientContribution.createGLSPClient` is correct as-is.
36
+ * already filters by clientId.
39
37
  */
40
38
  export declare class HydraniumGlspClientContribution extends BaseGLSPClientContribution {
41
- protected outputChannelManager: OutputChannelManager;
42
39
  protected readonly workspaceService: WorkspaceService;
40
+ protected readonly connectionReporter: ConnectionReporter;
41
+ protected readonly logger: ChannelLogger;
43
42
  readonly id: string;
44
- protected readonly channelName: string;
45
- protected readonly readyMarker: string;
43
+ /** Delay before the restart following each consecutive failed start or lost
44
+ * client; the last repeats. */
45
+ protected readonly restartDelaysMs: readonly number[];
46
+ /** How long a client must stay up before the restart delays start over, so
47
+ * a server that fails right after starting is not restarted at once. */
48
+ protected readonly restartEscalationResetMs: number;
49
+ protected consecutiveFailures: number;
50
+ protected restartTimer?: ReturnType<typeof setTimeout>;
51
+ /** When the current client started; `0` once a restart has taken it into account. */
52
+ protected startedAt: number;
53
+ /** Clients started so far, which numbers them in the log: they share {@link id}. */
54
+ protected startedClients: number;
55
+ /** The attempt waiting for a channel, if any. */
56
+ protected channelRequest?: Deferred<Channel>;
57
+ protected disposed: boolean;
58
+ protected readonly clientStartedEmitter: Emitter<GLSPClient>;
59
+ protected readonly clientLostEmitter: Emitter<void>;
60
+ /** Fires with each client once it has started and its server has answered. */
61
+ readonly onDidStartClient: Event<GLSPClient>;
62
+ /** Fires when the started client stops; {@link glspClient} already waits
63
+ * for its replacement then. */
64
+ readonly onDidLoseClient: Event<void>;
46
65
  constructor(options: ClientContributionOptions);
47
- /** Wait for the server to print its ready marker into the OutputChannel.
48
- * Resolves immediately if the marker is already present (server started
49
- * before the client contribution mounted). */
50
- protected waitForBackendConnected(): Promise<void>;
66
+ /** The client every diagram load awaits; after a failed start, a fresh one. */
67
+ get glspClient(): Promise<GLSPClient>;
68
+ /** Start a fresh client over a fresh channel at once, if the last start failed. */
69
+ restart(): Promise<GLSPClient>;
70
+ /** Point {@link glspClient} at a fresh client still to start, and tear down
71
+ * the old one's channel. */
72
+ protected replaceClient(): void;
73
+ /** Settles the promise current when it began, so a start a restart overtook
74
+ * cannot settle its successor. */
75
+ protected activateClient(): Promise<void>;
76
+ /** Run `restart` after the delay for the failures so far, and return that delay. */
77
+ protected scheduleRestart(restart: () => void): number;
78
+ /** Once `client` stops, replace it and start its replacement after the
79
+ * restart delay, unless a dispose stopped it. */
80
+ protected restartOnLoss(client: GLSPClient): void;
81
+ /** Start the client and initialize its server, rejecting on failure; the
82
+ * caller settles {@link glspClient}. */
51
83
  protected start(glspClient: GLSPClient): Promise<void>;
84
+ /** Without upstream's own error notification, which would duplicate the reporter's. */
85
+ protected initialize(glspClient: GLSPClient): Promise<InitializeResult>;
86
+ /** Upstream's base client, without the notifications of its Theia subclass,
87
+ * which would duplicate the reporter's. */
88
+ protected createGLSPClient(connectionProvider: Parameters<BaseGLSPClientContribution['createGLSPClient']>[0]): Promise<GLSPClient>;
89
+ /**
90
+ * Whichever channel arrives goes to the attempt waiting now, and one that
91
+ * arrives with none waiting is closed. Theia holds each open until its
92
+ * websocket is back, and after an outage every held open past the first
93
+ * throws "already open" without reaching its handler, so the first to arrive
94
+ * has to serve the latest attempt. Without Theia's replay, which would be a
95
+ * second opener of the same path.
96
+ */
97
+ protected createChannelConnection(): ReturnType<BaseGLSPClientContribution['createChannelConnection']>;
98
+ /** Also closes the channel: upstream leaves a Theia channel open, and the
99
+ * next one on the same path then cannot open. */
100
+ protected disposeChannel(connection: Parameters<BaseGLSPClientContribution['disposeChannel']>[0], channel: Channel): Promise<void>;
101
+ /** Also fails a start in flight, so nothing reports it after this. */
102
+ dispose(): void;
103
+ protected workspaceOpened(): Promise<void>;
104
+ protected get connectionTarget(): ConnectionTarget;
105
+ /** One object per contribution: the reporter keys what it has shown on it. */
106
+ protected cachedConnectionTarget?: ConnectionTarget;
107
+ protected unreachableMessage(): string;
108
+ protected startupTimeoutMessage(): string;
52
109
  }
53
110
  //# sourceMappingURL=client-contribution.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/client-contribution.ts"],"names":[],"mapp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,CAAC;IAOhD,SAAS,KAAK,gBAAgB,IAAI,gBAAgB,CAKjD;IACD,8EAA8E;IAC9E,SAAS,CAAC,sBAAsB,CAAC,EAAE,gBAAgB,CAAC;IAEpD,SAAS,CAAC,kBAAkB,IAAI,MAAM;IAItC,SAAS,CAAC,qBAAqB,IAAI,MAAM;CAO3C"}
@@ -20,89 +20,254 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
20
20
  return function (target, key) { decorator(target, key, paramIndex); }
21
21
  };
22
22
  Object.defineProperty(exports, "__esModule", { value: true });
23
- exports.HydraniumGlspClientContribution = void 0;
23
+ exports.HydraniumGlspClientContribution = exports.DEFAULT_GLSP_CLIENT_STARTUP_TIMEOUT_MS = void 0;
24
+ const client_1 = require("@eclipse-glsp/client");
24
25
  const theia_integration_1 = require("@eclipse-glsp/theia-integration");
26
+ const common_1 = require("@eclipse-glsp/theia-integration/lib/common");
27
+ const browser_1 = require("@hydranium/client-theia/lib/browser");
28
+ const core_1 = require("@theia/core");
25
29
  const promise_util_1 = require("@theia/core/lib/common/promise-util");
26
30
  const inversify_1 = require("@theia/core/shared/inversify");
27
- const output_channel_1 = require("@theia/output/lib/browser/output-channel");
28
- const browser_1 = require("@theia/workspace/lib/browser");
31
+ const browser_2 = require("@theia/workspace/lib/browser");
32
+ const glsp_client_1 = require("./glsp-client");
33
+ exports.DEFAULT_GLSP_CLIENT_STARTUP_TIMEOUT_MS = 30_000;
29
34
  /**
30
35
  * Theia GLSP client contribution for adopters whose GLSP server runs in a
31
36
  * sideloaded VS Code extension process (or any other deferred-start setup).
32
- * The behaviours adopters reliably need are lifted:
33
37
  *
34
- * 1. `waitForBackendConnected`: tail the OutputChannel for a server-printed
35
- * ready marker. While a socket connection might open earlier, the GLSP
36
- * server typically does internal initialisation before it can accept
37
- * client connections — we wait for it to say so.
38
- * 2. `start`: defer until a workspace is opened. If Theia starts without a
39
- * workspace, this prevents the frontend-backend connection (and its
40
- * "connecting" progress spinner) from firing prematurely.
38
+ * The client starts once a workspace is open and sends its first request at
39
+ * once; the backend handler holds it until its socket to the server is up. A
40
+ * start that fails, and a connection lost after one succeeded, start a fresh
41
+ * client after a backoff, for as long as the contribution lives. Each start is
42
+ * reported through the {@link ConnectionReporter}, and announced through
43
+ * {@link onDidStartClient} and {@link onDidLoseClient}.
41
44
  *
42
45
  * A `GLSPClient` override filtering inbound messages by clientId is
43
46
  * deliberately NOT provided: upstream's `BaseJsonrpcGLSPClient.onActionMessage`
44
- * already filters by clientId, so the `TheiaJsonrpcGLSPClient` returned by
45
- * `BaseGLSPClientContribution.createGLSPClient` is correct as-is.
47
+ * already filters by clientId.
46
48
  */
47
49
  let HydraniumGlspClientContribution = class HydraniumGlspClientContribution extends theia_integration_1.BaseGLSPClientContribution {
48
- outputChannelManager;
49
50
  workspaceService;
51
+ connectionReporter;
52
+ logger;
50
53
  id;
51
- channelName;
52
- readyMarker;
54
+ /** Delay before the restart following each consecutive failed start or lost
55
+ * client; the last repeats. */
56
+ restartDelaysMs = [1_000, 2_000, 4_000, 8_000];
57
+ /** How long a client must stay up before the restart delays start over, so
58
+ * a server that fails right after starting is not restarted at once. */
59
+ restartEscalationResetMs = 30_000;
60
+ consecutiveFailures = 0;
61
+ restartTimer;
62
+ /** When the current client started; `0` once a restart has taken it into account. */
63
+ startedAt = 0;
64
+ /** Clients started so far, which numbers them in the log: they share {@link id}. */
65
+ startedClients = 0;
66
+ /** The attempt waiting for a channel, if any. */
67
+ channelRequest;
68
+ disposed = false;
69
+ clientStartedEmitter = new core_1.Emitter();
70
+ clientLostEmitter = new core_1.Emitter();
71
+ /** Fires with each client once it has started and its server has answered. */
72
+ onDidStartClient = this.clientStartedEmitter.event;
73
+ /** Fires when the started client stops; {@link glspClient} already waits
74
+ * for its replacement then. */
75
+ onDidLoseClient = this.clientLostEmitter.event;
53
76
  constructor(options) {
54
77
  super();
55
78
  this.id = options.languageContributionId;
56
- this.channelName = options.channelName;
57
- this.readyMarker = options.readyMarker;
58
- }
59
- /** Wait for the server to print its ready marker into the OutputChannel.
60
- * Resolves immediately if the marker is already present (server started
61
- * before the client contribution mounted). */
62
- async waitForBackendConnected() {
63
- const channel = this.outputChannelManager.getChannel(this.channelName);
64
- const channelText = channel.resource?.textModel?.getValue() ?? '';
65
- if (channelText.includes(this.readyMarker)) {
79
+ this.glspClientStartupTimeout = options.startupTimeoutMs ?? exports.DEFAULT_GLSP_CLIENT_STARTUP_TIMEOUT_MS;
80
+ }
81
+ /** The client every diagram load awaits; after a failed start, a fresh one. */
82
+ get glspClient() {
83
+ return this.glspClientDeferred.state === 'rejected' ? this.restart() : this.glspClientDeferred.promise;
84
+ }
85
+ /** Start a fresh client over a fresh channel at once, if the last start failed. */
86
+ restart() {
87
+ if (!this.disposed && this.glspClientDeferred.state === 'rejected') {
88
+ this.replaceClient();
89
+ void this.activateClient();
90
+ }
91
+ return this.glspClientDeferred.promise;
92
+ }
93
+ /** Point {@link glspClient} at a fresh client still to start, and tear down
94
+ * the old one's channel. */
95
+ replaceClient() {
96
+ clearTimeout(this.restartTimer);
97
+ // Replaced before the old channel goes, so the old client stopping is
98
+ // not taken for a loss of the new one.
99
+ this.glspClientDeferred = new promise_util_1.Deferred();
100
+ this.toDispose.dispose();
101
+ // Upstream refuses to open a channel while the collection is disposed.
102
+ this.toDispose.push(core_1.Disposable.NULL);
103
+ }
104
+ /** Settles the promise current when it began, so a start a restart overtook
105
+ * cannot settle its successor. */
106
+ async activateClient() {
107
+ const pending = this.glspClientDeferred;
108
+ await this.workspaceOpened();
109
+ if (this.disposed) {
66
110
  return;
67
111
  }
68
- const deferred = new promise_util_1.Deferred();
69
- const channelListener = channel.onContentChange(() => {
70
- const text = channel.resource?.textModel?.getValue() ?? '';
71
- if (text.includes(this.readyMarker)) {
72
- channelListener.dispose();
73
- deferred.resolve();
112
+ const attempt = this.connectionReporter.connecting(this.connectionTarget);
113
+ const timeout = this.glspClientStartupTimeout > 0
114
+ ? setTimeout(() => pending.reject(new Error(this.startupTimeoutMessage())), this.glspClientStartupTimeout)
115
+ : undefined;
116
+ pending.promise.then(client => {
117
+ clearTimeout(timeout);
118
+ attempt.connected();
119
+ this.startedAt = Date.now();
120
+ this.logger.info(`[${this.id}] Diagram client ${++this.startedClients} started.`);
121
+ this.clientStartedEmitter.fire(client);
122
+ this.restartOnLoss(client);
123
+ }, (error) => {
124
+ clearTimeout(timeout);
125
+ if (this.disposed) {
126
+ attempt.cancelled();
127
+ return;
74
128
  }
129
+ attempt.failed(error instanceof Error ? error.message : String(error), () => void this.restart());
130
+ this.scheduleRestart(() => {
131
+ if (this.glspClientDeferred === pending) {
132
+ void this.restart();
133
+ }
134
+ });
75
135
  });
76
- return deferred.promise;
136
+ try {
137
+ const connection = await this.createConnection();
138
+ // Ahead of the client's own listener, whose teardown rejects with a
139
+ // transport message instead.
140
+ connection.onClose(() => pending.reject(new Error(this.unreachableMessage())));
141
+ const client = await this.createGLSPClient(connection);
142
+ connection.onDispose(() => client.stop());
143
+ await this.start(client);
144
+ pending.resolve(client);
145
+ }
146
+ catch (error) {
147
+ pending.reject(error);
148
+ }
77
149
  }
150
+ /** Run `restart` after the delay for the failures so far, and return that delay. */
151
+ scheduleRestart(restart) {
152
+ if (this.startedAt > 0 && Date.now() - this.startedAt >= this.restartEscalationResetMs) {
153
+ this.consecutiveFailures = 0;
154
+ }
155
+ this.startedAt = 0;
156
+ const delay = this.restartDelaysMs[Math.min(this.consecutiveFailures, this.restartDelaysMs.length - 1)];
157
+ this.consecutiveFailures++;
158
+ clearTimeout(this.restartTimer);
159
+ this.restartTimer = setTimeout(restart, delay);
160
+ return delay;
161
+ }
162
+ /** Once `client` stops, replace it and start its replacement after the
163
+ * restart delay, unless a dispose stopped it. */
164
+ restartOnLoss(client) {
165
+ const listener = client.onCurrentStateChanged(state => {
166
+ if (state !== client_1.ClientState.ServerError && state !== client_1.ClientState.Stopped) {
167
+ return;
168
+ }
169
+ listener.dispose();
170
+ if (!this.disposed) {
171
+ this.replaceClient();
172
+ this.clientLostEmitter.fire();
173
+ const delay = this.scheduleRestart(() => void this.activateClient());
174
+ // Upstream's client has just logged that it will not be restarted, which holds for it alone.
175
+ this.logger.info(`[${this.id}] Diagram client ${this.startedClients} lost; starting a fresh one in ${delay} ms.`);
176
+ }
177
+ });
178
+ }
179
+ /** Start the client and initialize its server, rejecting on failure; the
180
+ * caller settles {@link glspClient}. */
78
181
  async start(glspClient) {
79
- // Defer starting the GLSP client until a workspace is opened. If Theia
80
- // starts without a workspace, this prevents creating the frontend-
81
- // backend connection (and showing the "connecting" progress) prematurely.
182
+ await glspClient.start();
183
+ await this.initialize(glspClient);
184
+ }
185
+ /** Without upstream's own error notification, which would duplicate the reporter's. */
186
+ async initialize(glspClient) {
187
+ return glspClient.initializeServer(await this.createInitializeParameters());
188
+ }
189
+ /** Upstream's base client, without the notifications of its Theia subclass,
190
+ * which would duplicate the reporter's. */
191
+ async createGLSPClient(connectionProvider) {
192
+ return new glsp_client_1.HydraniumGlspClient({ id: this.id, connectionProvider });
193
+ }
194
+ /**
195
+ * Whichever channel arrives goes to the attempt waiting now, and one that
196
+ * arrives with none waiting is closed. Theia holds each open until its
197
+ * websocket is back, and after an outage every held open past the first
198
+ * throws "already open" without reaching its handler, so the first to arrive
199
+ * has to serve the latest attempt. Without Theia's replay, which would be a
200
+ * second opener of the same path.
201
+ */
202
+ async createChannelConnection() {
203
+ this.channelRequest?.reject(new Error('A newer start took over the channel request.'));
204
+ const request = new promise_util_1.Deferred();
205
+ this.channelRequest = request;
206
+ this.connectionProvider.listen(common_1.GLSPContribution.getPath(this), (_path, channel) => {
207
+ const waiting = this.channelRequest;
208
+ this.channelRequest = undefined;
209
+ if (waiting && !this.disposed) {
210
+ waiting.resolve(channel);
211
+ }
212
+ else {
213
+ channel.close();
214
+ }
215
+ }, false);
216
+ const channel = await request.promise;
217
+ const connection = (0, common_1.createChannelConnection)(channel);
218
+ this.toDispose.push(core_1.Disposable.create(() => this.disposeChannel(connection, channel)));
219
+ return connection;
220
+ }
221
+ /** Also closes the channel: upstream leaves a Theia channel open, and the
222
+ * next one on the same path then cannot open. */
223
+ async disposeChannel(connection, channel) {
224
+ await super.disposeChannel(connection, channel);
225
+ channel.close();
226
+ }
227
+ /** Also fails a start in flight, so nothing reports it after this. */
228
+ dispose() {
229
+ this.disposed = true;
230
+ clearTimeout(this.restartTimer);
231
+ this.glspClientDeferred.promise.catch(() => undefined);
232
+ this.glspClientDeferred.reject(new Error('The diagram client was disposed.'));
233
+ this.clientStartedEmitter.dispose();
234
+ this.clientLostEmitter.dispose();
235
+ super.dispose();
236
+ }
237
+ async workspaceOpened() {
82
238
  const roots = this.workspaceService.tryGetRoots();
83
- if (!roots || roots.length === 0) {
84
- await new Promise(resolve => {
85
- const disposable = this.workspaceService.onWorkspaceChanged(changedRoots => {
86
- if (changedRoots && changedRoots.length > 0) {
87
- disposable.dispose();
88
- resolve();
89
- }
90
- });
91
- });
239
+ if (roots.length === 0) {
240
+ await core_1.Event.toPromise(core_1.Event.filter(this.workspaceService.onWorkspaceChanged, changedRoots => changedRoots.length > 0));
92
241
  }
93
- await this.waitForBackendConnected();
94
- return super.start(glspClient);
242
+ }
243
+ get connectionTarget() {
244
+ return (this.cachedConnectionTarget ??= {
245
+ connectingMessage: core_1.nls.localize('hydranium/glsp-client-theia/diagram-server-connecting', 'Connecting to the diagram server…'),
246
+ connectedMessage: core_1.nls.localize('hydranium/glsp-client-theia/diagram-server-connected', 'Connected to the diagram server.')
247
+ });
248
+ }
249
+ /** One object per contribution: the reporter keys what it has shown on it. */
250
+ cachedConnectionTarget;
251
+ unreachableMessage() {
252
+ return core_1.nls.localize('hydranium/glsp-client-theia/diagram-server-unreachable', 'Could not connect to the diagram server.');
253
+ }
254
+ startupTimeoutMessage() {
255
+ return core_1.nls.localize('hydranium/glsp-client-theia/diagram-server-timeout', 'The diagram server did not answer within {0} seconds.', String(Math.round(this.glspClientStartupTimeout / 1000)));
95
256
  }
96
257
  };
97
258
  exports.HydraniumGlspClientContribution = HydraniumGlspClientContribution;
98
259
  __decorate([
99
- (0, inversify_1.inject)(output_channel_1.OutputChannelManager),
100
- __metadata("design:type", output_channel_1.OutputChannelManager)
101
- ], HydraniumGlspClientContribution.prototype, "outputChannelManager", void 0);
102
- __decorate([
103
- (0, inversify_1.inject)(browser_1.WorkspaceService),
104
- __metadata("design:type", browser_1.WorkspaceService)
260
+ (0, inversify_1.inject)(browser_2.WorkspaceService),
261
+ __metadata("design:type", browser_2.WorkspaceService)
105
262
  ], HydraniumGlspClientContribution.prototype, "workspaceService", void 0);
263
+ __decorate([
264
+ (0, inversify_1.inject)(browser_1.ConnectionReporter),
265
+ __metadata("design:type", Object)
266
+ ], HydraniumGlspClientContribution.prototype, "connectionReporter", void 0);
267
+ __decorate([
268
+ (0, inversify_1.inject)(browser_1.ChannelLogger),
269
+ __metadata("design:type", browser_1.ChannelLogger)
270
+ ], HydraniumGlspClientContribution.prototype, "logger", void 0);
106
271
  exports.HydraniumGlspClientContribution = HydraniumGlspClientContribution = __decorate([
107
272
  (0, inversify_1.injectable)(),
108
273
  __param(0, (0, inversify_1.unmanaged)()),
@@ -1 +1 @@
1
- {"version":3,"file":"client-contribution.js","sourceRoot":"","sources":["../../src/browser/client-contribution.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;AAGlF,uEAA6E;AAC7E,sEAA+D;AAC/D,4DAA6E;AAC7E,6EAAgF;AAChF,0DAAgE;AAYhE;;;;;;;;;;;;;;;;;GAiBG;AAEI,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,8CAA0B;IACpC,oBAAoB,CAAwB;IACvC,gBAAgB,CAAoB;IAExE,EAAE,CAAS;IACD,WAAW,CAAS;IACpB,WAAW,CAAS;IAEvC,YAAyB,OAAkC;QACxD,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC,sBAAsB,CAAC;QACzC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;QACvC,IA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AAC,EAAE,CAAC;wBAC3C,UAAU,CAAC,OAAO,EAAE,CAAC;wBACrB,OAAO,EAAE,CAAC;oBACb,CAAC;gBACJ,CAAC,CAAC,CAAC;YACN,CAAC,CAAC,CAAC;QACN,CAAC;QACD,MAAM,IAAI,CAAC,uBAAuB,EAAE,CAAC;QACrC,OAAO,KAAK,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;IAClC,CAAC;CACH,CAAA;AAtDY,0EAA+B;AACD;IAAvC,IAAA,kBAAM,EAAC,qCAAoB,CAAC;8BAAkC,qCAAoB;6EAAC;AACvC;IAA5C,IAAA,kBAAM,EAAC,0BAAgB,CAAC;8BAAuC,0BAAgB;yEAAC;0CAFvE,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;IASG,WAAA,IAAA,qBAAS,GAAE,CAAA;;GARd,+BAA+B,CAsD3C"}
1
+ {"version":3,"file":"client-contribution.js","sourceRoot":"","sources":["../../src/browser/client-contribution.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;;;;;;;;;;;AAElF,iDAA2F;AAC3F,uEAA6E;AAC7E,uEAAuG;AACvG,iEAA+G;AAC/G,sCAA4E;AAC5E,sEAA+D;AAC/D,4DAA6E;AAC7E,0DAAgE;AAChE,+CAAoD;AAEvC,QAAA,sCAAsC,GAAG,MAAM,CAAC;AAU7D;;;;;;;;;;;;;;GAcG;AAEI,IAAM,+BAA+B,GAArC,MAAM,+BAAgC,SAAQ,8CAA0B;IAC/B,gBAAgB,CAAoB;IAClC,kBAAkB,CAAsB;IAC7C,MAAM,CAAiB;IAExD,EAAE,CAAS;IAEpB;oCACgC;IACb,eAAe,GAAsB,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IACrF;6EACyE;IACtD,wBAAwB,GAAW,MAAM,CAAC;IACnD,mBAAmB,GAAG,CAAC,CAAC;IACxB,YAAY,CAAiC;IACvD,qFAAqF;IAC3E,SAAS,GAAG,CAAC,CAAC;IACx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,CAAC,QAAQ,CAAC,sDAAsD,EAAE,kCAAkC,CAAC;SAC5H,CAAC,CAAC;IACN,CAAC;IACD,8EAA8E;IACpE,sBAAsB,CAAoB;IAE1C,kBAAkB;QACzB,OAAO,UAAG,CAAC,QAAQ,CAAC,wDAAwD,EAAE,0CAA0C,CAAC,CAAC;IAC7H,CAAC;IAES,qBAAqB;QAC5B,OAAO,UAAG,CAAC,QAAQ,CAChB,oDAAoD,EACpD,uDAAuD,EACvD,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,wBAAwB,GAAG,IAAI,CAAC,CAAC,CAC1D,CAAC;IACL,CAAC;CACH,CAAA;AAnPY,0EAA+B;AACI;IAA5C,IAAA,kBAAM,EAAC,0BAAgB,CAAC;8BAAuC,0BAAgB;yEAAC;AAClC;IAA9C,IAAA,kBAAM,EAAC,4BAAkB,CAAC;;2EAA4D;AAC7C;IAAzC,IAAA,kBAAM,EAAC,uBAAa,CAAC;8BAA6B,uBAAa;+DAAC;0CAHvD,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;IAgCG,WAAA,IAAA,qBAAS,GAAE,CAAA;;GA/Bd,+BAA+B,CAmP3C"}
@@ -26,8 +26,7 @@ export interface DiagramLoadFailure {
26
26
  readonly error: unknown;
27
27
  /**
28
28
  * Whether the `severity: 'ERROR'` {@link StatusAction} reached the action
29
- * dispatcher — i.e. whether GLSP's `StatusOverlay` is now displaying this
30
- * failure.
29
+ * dispatcher. It says nothing about whether a status overlay shows it.
31
30
  *
32
31
  * `false` means the report itself failed, which happens when the action
33
32
  * dispatcher is the thing that could not initialize. A consumer that covers
@@ -111,9 +110,7 @@ export declare class HydraniumDiagramLoader extends DiagramLoader {
111
110
  /**
112
111
  * The sentence a failed load is reported with, on every surface that reports
113
112
  * it. Public because the canvas overlay is one of those surfaces and lives in
114
- * another class: it renders this failure exactly when the `StatusAction` did
115
- * not land, so a second copy of the sentence there could only ever drift
116
- * unseen.
113
+ * another class, where a second copy of the sentence would drift.
117
114
  *
118
115
  * **The seam and the catalogue key answer different questions, so it carries
119
116
  * both.** Overriding this method changes the WORDING for every user of one
@@ -1 +1 @@
1
- {"version":3,"file":"diagram-loader.d.ts","sourceRoot":"","sources":["../../src/browser/diagram-loader.ts"],"names":[],"mappings":"AAAA;;;;;;;kFAOkF;AAElF,OAAO,EAAE,aAAa,EAAE,KAAK,qBAAqB,EAAgB,MAAM,sBAAsB,CAAC;AAC/F,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAI/C;;;;;;GAMG;AACH,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAEzE,MAAM,WAAW,kBAAkB;IAChC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;CAC5B;AAED,MAAM,WAAW,kBAAkB;IAChC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC1B,iFAAiF;IACjF,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IACxB;;;;;;;;;;;OAWG;IACH,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBACa,sBAAuB,SAAQ,aAAa;IAC/B,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAG,aAAa,CAAC;IAElE,SAAS,CAAC,QAAQ,CAAC,OAAO,+BAAsC;IAChE,SAAS,CAAC,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAEvC;;;+DAG2D;IAC3D,IAAI,WAAW,IAAI,kBAAkB,GAAG,SAAS,CAEhD;IAED;uEACmE;IACnE,eAAe,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAI/B,IAAI,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAcnE;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,MAAM,CAAC,OAAO,E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;uEACmE;IACnE,eAAe,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAI/B,IAAI,CAAC,OAAO,CAAC,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC;IAWnE;;;;;;;;;;;OAWG;IACH,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,kBAAkB,GAAG,IAAI;IAQnD;;;;;;;;;;;OAWG;cACa,iBAAiB,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;IAYjE;;;;;;;;;;;;;;;;OAgBG;IACH,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM;IAItC;qFACiF;IACjF,SAAS,CAAC,WAAW,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM;CAG7C"}
@@ -76,10 +76,7 @@ let HydraniumDiagramLoader = class HydraniumDiagramLoader extends client_1.Diagr
76
76
  this.settle({ status: 'loaded' });
77
77
  }
78
78
  catch (err) {
79
- // Report first, settle second, and carry whether the report landed: a
80
- // consumer that uncovers the canvas on settle then finds the error
81
- // already on the status overlay — or learns that it has to render the
82
- // failure itself because nothing else can.
79
+ // Report first, settle second, and carry whether the report landed.
83
80
  const surfaced = await this.reportLoadFailure(err);
84
81
  this.settle({ status: 'failed', error: err, surfaced });
85
82
  }
@@ -130,9 +127,7 @@ let HydraniumDiagramLoader = class HydraniumDiagramLoader extends client_1.Diagr
130
127
  /**
131
128
  * The sentence a failed load is reported with, on every surface that reports
132
129
  * it. Public because the canvas overlay is one of those surfaces and lives in
133
- * another class: it renders this failure exactly when the `StatusAction` did
134
- * not land, so a second copy of the sentence there could only ever drift
135
- * unseen.
130
+ * another class, where a second copy of the sentence would drift.
136
131
  *
137
132
  * **The seam and the catalogue key answer different questions, so it carries
138
133
  * both.** Overriding this method changes the WORDING for every user of one
@@ -1 +1 @@
1
- {"version":3,"file":"diagram-loader.js","sourceRoot":"","sources":["../../src/browser/diagram-loader.ts"],"names":[],"mappings":";AAAA;;;;;;;kFAOkF;;;;;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