feng-x commited on
Commit
2307298
·
verified ·
1 Parent(s): a2c2ee5

Upload folder using huggingface_hub

Browse files
AGENTS.md CHANGED
@@ -252,7 +252,9 @@ median. The precise median is retained, while a half-up 0.1 mm value is used
252
  for `recommend_ring_size()`; exact midpoint ties prefer the smaller size. Raw
253
  shot fields remain unchanged. The visible result cards prefer the separate
254
  `session_recommendation` object. A single footer below the cards reads
255
- `Based on N measurements. (Please measure at least 3 times for best reliability)`
 
 
256
  The admin Records table preserves its raw-shot columns and adds a separate
257
  `Session Recommendation` summary column with an on-demand JSON view; legacy
258
  rows display `—` in that column.
 
252
  for `recommend_ring_size()`; exact midpoint ties prefer the smaller size. Raw
253
  shot fields remain unchanged. The visible result cards prefer the separate
254
  `session_recommendation` object. A single footer below the cards reads
255
+ `Based on N measurements of your right/left hand. (For best reliability, take
256
+ at least 3 measurements using the same hand.)` The line is left-aligned on
257
+ both web surfaces and matches the following feedback hint's `0.95rem` size.
258
  The admin Records table preserves its raw-shot columns and adds a separate
259
  `Session Recommendation` summary column with an on-demand JSON view; legacy
260
  rows display `—` in that column.
CLAUDE.md CHANGED
@@ -252,7 +252,9 @@ median. The precise median is retained, while a half-up 0.1 mm value is used
252
  for `recommend_ring_size()`; exact midpoint ties prefer the smaller size. Raw
253
  shot fields remain unchanged. The visible result cards prefer the separate
254
  `session_recommendation` object. A single footer below the cards reads
255
- `Based on N measurements. (Please measure at least 3 times for best reliability)`
 
 
256
  The admin Records table preserves its raw-shot columns and adds a separate
257
  `Session Recommendation` summary column with an on-demand JSON view; legacy
258
  rows display `—` in that column.
 
252
  for `recommend_ring_size()`; exact midpoint ties prefer the smaller size. Raw
253
  shot fields remain unchanged. The visible result cards prefer the separate
254
  `session_recommendation` object. A single footer below the cards reads
255
+ `Based on N measurements of your right/left hand. (For best reliability, take
256
+ at least 3 measurements using the same hand.)` The line is left-aligned on
257
+ both web surfaces and matches the following feedback hint's `0.95rem` size.
258
  The admin Records table preserves its raw-shot columns and adds a separate
259
  `Session Recommendation` summary column with an on-demand JSON view; legacy
260
  rows display `—` in that column.
tests/test_session_evidence.js CHANGED
@@ -10,29 +10,29 @@ const source = fs.readFileSync(
10
 
11
  function loadHelper() {
12
  const window = {};
13
- vm.runInNewContext(source, { window, Number, Object });
14
  return window.SessionEvidence;
15
  }
16
 
17
- test("formats singular and recommended measurement guidance", () => {
18
  const helper = loadHelper();
19
  assert.equal(
20
- helper.text({ successful_shots: 1 }),
21
- "Based on 1 measurement. (Please measure at least 3 times for best reliability)",
22
  );
23
  });
24
 
25
- test("uses the session shot count and keeps guidance after three", () => {
26
  const helper = loadHelper();
27
  assert.equal(
28
- helper.text({ successful_shots: 3 }),
29
- "Based on 3 measurements. (Please measure at least 3 times for best reliability)",
30
  );
31
  });
32
 
33
- test("falls back to per-finger counts and hides empty evidence", () => {
34
  const helper = loadHelper();
35
  assert.equal(helper.text({ per_finger: { index: { sample_count: 2 } } }),
36
- "Based on 2 measurements. (Please measure at least 3 times for best reliability)");
37
  assert.equal(helper.text({ per_finger: {} }), "");
38
  });
 
10
 
11
  function loadHelper() {
12
  const window = {};
13
+ vm.runInNewContext(source, { window, Number, Object, String });
14
  return window.SessionEvidence;
15
  }
16
 
17
+ test("formats singular left-hand evidence and guidance", () => {
18
  const helper = loadHelper();
19
  assert.equal(
20
+ helper.text({ successful_shots: 1, handedness: "Left" }),
21
+ "Based on 1 measurement of your left hand. (For best reliability, take at least 3 measurements using the same hand.)",
22
  );
23
  });
24
 
25
+ test("uses the session shot count and identifies the right hand", () => {
26
  const helper = loadHelper();
27
  assert.equal(
28
+ helper.text({ successful_shots: 3, handedness: "Right" }),
29
+ "Based on 3 measurements of your right hand. (For best reliability, take at least 3 measurements using the same hand.)",
30
  );
31
  });
32
 
33
+ test("falls back to per-finger counts without inventing a hand", () => {
34
  const helper = loadHelper();
35
  assert.equal(helper.text({ per_finger: { index: { sample_count: 2 } } }),
36
+ "Based on 2 measurements. (For best reliability, take at least 3 measurements using the same hand.)");
37
  assert.equal(helper.text({ per_finger: {} }), "");
38
  });
web_demo/static/mobile/mobile.css CHANGED
@@ -772,8 +772,8 @@ body {
772
  }
773
 
774
  .finger-count {
775
- text-align: center;
776
- font-size: 0.85rem;
777
  color: var(--ink-soft);
778
  margin-top: 8px;
779
  margin-bottom: 12px;
 
772
  }
773
 
774
  .finger-count {
775
+ text-align: left;
776
+ font-size: 0.95rem;
777
  color: var(--ink-soft);
778
  margin-top: 8px;
779
  margin-bottom: 12px;
web_demo/static/shared/session-evidence.js CHANGED
@@ -23,9 +23,12 @@
23
  const count = measurementCount(payload);
24
  if (!count) return "";
25
  const noun = count === 1 ? "measurement" : "measurements";
26
- return `Based on ${count} ${noun}. (Please measure at least 3 times for best reliability)`;
 
 
 
 
27
  }
28
 
29
  global.SessionEvidence = { measurementCount, text };
30
  })(window);
31
-
 
23
  const count = measurementCount(payload);
24
  if (!count) return "";
25
  const noun = count === 1 ? "measurement" : "measurements";
26
+ const handedness = String(payload && payload.handedness || "").toLowerCase();
27
+ const hand = handedness === "left" || handedness === "right"
28
+ ? ` of your ${handedness} hand`
29
+ : "";
30
+ return `Based on ${count} ${noun}${hand}. (For best reliability, take at least 3 measurements using the same hand.)`;
31
  }
32
 
33
  global.SessionEvidence = { measurementCount, text };
34
  })(window);
 
web_demo/static/styles.css CHANGED
@@ -525,8 +525,8 @@ pre {
525
  }
526
 
527
  .finger-count {
528
- text-align: center;
529
- font-size: 0.85rem;
530
  color: var(--ink-soft);
531
  }
532
 
 
525
  }
526
 
527
  .finger-count {
528
+ text-align: left;
529
+ font-size: 0.95rem;
530
  color: var(--ink-soft);
531
  }
532