@vitrinka/web 0.7.1 → 0.7.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @vitrinka/web
2
2
 
3
+ ## 0.7.2
4
+
5
+ - **One pill when the extension starts in this tab.** The extension's hello
6
+ can reach the page before its claim does. The page then showed its quiet
7
+ "Recording in another tab" pill beside the extension's own, and kept it
8
+ after the claim landed, because the HUD heard only a change of leader. A
9
+ change of the claim's holder now reaches the HUD too, so the page's pill
10
+ hides as soon as the claim is read. Since 0.6.0.
11
+
3
12
  ## 0.7.1
4
13
 
5
14
  - **Report a problem hands focus back.** Closing the card returns focus to
@@ -29,6 +29,8 @@ let stopping = null;
29
29
  let face = 'none';
30
30
  let remoteStop = null;
31
31
  let pingTimer = null;
32
+ /** The claim holder `refresh` last announced. */
33
+ let claimBy = null;
32
34
  // -- what this document knows --------------------------------------------------
33
35
  function heldClaim() {
34
36
  if (!env)
@@ -133,15 +135,22 @@ function armPing() {
133
135
  pingTimer = null;
134
136
  }
135
137
  }
136
- /** Re-derive the claim and who leads; announce a change of leader to the lanes and the HUD. */
138
+ /**
139
+ * Re-derive the claim and who leads; announce a change of leader or of the
140
+ * claim's holder to the lanes and the HUD. The HUD's remote face reads the
141
+ * holder (`followingElsewhere`), and the extension's hello can land before
142
+ * its claim: a holder arriving under an unchanged leader announces too.
143
+ */
137
144
  function refresh() {
138
145
  if (!env)
139
146
  return;
140
147
  syncClaim();
141
148
  const next = computeFollowing();
142
- if (next === leadState.following)
149
+ const by = readClaim(env)?.by ?? null;
150
+ if (next === leadState.following && by === claimBy)
143
151
  return;
144
152
  leadState.following = next;
153
+ claimBy = by;
145
154
  armPing();
146
155
  notify();
147
156
  }
@@ -297,6 +306,7 @@ function resetLead() {
297
306
  if (pingTimer)
298
307
  clearInterval(pingTimer);
299
308
  pingTimer = null;
309
+ claimBy = null;
300
310
  if (leadState.following !== null) {
301
311
  leadState.following = null;
302
312
  notify();
@@ -1,3 +1,3 @@
1
1
  /** Sent as `meta.recorder` and written as `data-vitrinka-page`; bumped with the package version. */
2
- export declare const RECORDER_VERSION = "0.7.1";
3
- export declare const RECORDER_ID = "web/0.7.1";
2
+ export declare const RECORDER_VERSION = "0.7.2";
3
+ export declare const RECORDER_ID = "web/0.7.2";
@@ -1,3 +1,3 @@
1
1
  /** Sent as `meta.recorder` and written as `data-vitrinka-page`; bumped with the package version. */
2
- export const RECORDER_VERSION = '0.7.1';
2
+ export const RECORDER_VERSION = '0.7.2';
3
3
  export const RECORDER_ID = `web/${RECORDER_VERSION}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vitrinka/web",
3
- "version": "0.7.1",
3
+ "version": "0.7.2",
4
4
  "description": "vitrinka toolkit for React DOM apps — the journey recorder (capture manual-testing sessions: rrweb DOM stream, clicks, navigation, network, console, notes) and Report a problem (a reporter's button, marks and the last minutes, cs/en), straight into vitrinka.",
5
5
  "license": "Elastic-2.0",
6
6
  "repository": {