← back to Stock Vshape Viewer
Fix scan race: await autoLoadMatches before printing 'loaded top N' (message now truthful + test deterministic); 3x14/14 green
368c737ab8ad88797b3f38ed370a9a88c7e4d577 · 2026-08-27 14:17:08 -0700 · Steve
Files touched
Diff
commit 368c737ab8ad88797b3f38ed370a9a88c7e4d577
Author: Steve <steve@designerwallcoverings.com>
Date: Thu Aug 27 14:17:08 2026 -0700
Fix scan race: await autoLoadMatches before printing 'loaded top N' (message now truthful + test deterministic); 3x14/14 green
---
public/app.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/public/app.js b/public/app.js
index 6c256ef..e3b03a0 100644
--- a/public/app.js
+++ b/public/app.js
@@ -585,8 +585,8 @@ function pollScan(job) {
if (j.done) {
const btn = document.getElementById('scan-btn'); btn.disabled = false; btn.textContent = '⚡ Scan NASDAQ + DJIA (≥$8)';
const N = 12;
+ await autoLoadMatches(j.matches || [], N); // wait until the board actually has them
document.getElementById('scan-prog').innerHTML += `<div style="margin-top:4px;color:#6f83a8">done in ${(j.elapsedMs/1000).toFixed(0)}s · loaded top ${Math.min(N, j.matchCount)} into the board · ◈ = cheap far-dated options · click any to add more</div>`;
- autoLoadMatches(j.matches || [], N);
enrichResultsOptions();
return;
}
← 93ee25b Add GO button at bottom of filter section — runs the scan wi
·
back to Stock Vshape Viewer
·
DTD 7/8-B rework: gate dip-depth reward on newHigh (kill fal d251eb0 →