From 58a2570842e99bba8fab13f861b9019dfc0fd8f8 Mon Sep 17 00:00:00 2001 From: Rene Fichtmueller Date: Sun, 10 May 2026 15:01:22 +0200 Subject: [PATCH] fix: show TIP research status on overview --- packages/dashboard/index.html | 65 +++++++++++++++---- sync/CURRENT.md | 25 ++++++- ...6-05-10-tip-overview-research-status-ui.md | 53 +++++++++++++++ training-data/tip-llm-capabilities-v1.jsonl | 1 + 4 files changed, 132 insertions(+), 12 deletions(-) create mode 100644 sync/history/2026-05-10-tip-overview-research-status-ui.md diff --git a/packages/dashboard/index.html b/packages/dashboard/index.html index f26f5b4..fbb5e7b 100644 --- a/packages/dashboard/index.html +++ b/packages/dashboard/index.html @@ -837,9 +837,9 @@
- +
-
Data Verification Status
+
Data Research Status
@@ -2594,22 +2594,62 @@ async function loadOverview() { animateValue(el('ov-standards'), h.database.stats.standard_count, 700); animateValue(el('ov-news'), h.database.stats.news_count, 900); - // Verification status section + // Research status section. Strict verified counts remain source-backed, but + // the overview must show whether research work is actually still open. if (h.verification) { var v = h.verification; var total = v.total || 1; + function statusCount(bucket, keys) { + if (!bucket) return 0; + return keys.reduce(function(sum, k) { return sum + Number(bucket[k] || 0); }, 0); + } + var priceResolved = statusCount(v.price_status, ['public_price', 'no_public_price', 'ambiguous']); + var imageResolved = statusCount(v.image_status, ['public_image', 'no_public_image', 'ambiguous']); + var detailsResolved = statusCount(v.details_status, ['public_details', 'no_public_details', 'ambiguous']); + var competitorResolved = statusCount(v.competitor_status, ['matched', 'no_valid_match', 'ambiguous']); var items = [ - { label: 'Price Verified', count: v.price_verified, pct: v.price_coverage_pct || Math.round(v.price_verified / total * 100), color: '#22c55e', filter: 'price' }, - { label: 'Image Verified', count: v.image_verified, pct: Math.round(v.image_verified / total * 100), color: '#3b82f6', filter: 'image' }, - { label: 'Details Verified', count: v.details_verified, pct: Math.round(v.details_verified / total * 100), color: '#a855f7', filter: 'details' }, - { label: 'Fully Verified', count: v.fully_verified, pct: v.fully_verified_pct || Math.round(v.fully_verified / total * 100), color: '#f97316', filter: 'full' }, + { + label: 'Price Resolved', + count: priceResolved, + pct: Math.round(priceResolved / total * 100), + color: '#22c55e', + note: (v.price_status?.public_price || 0).toLocaleString() + ' public / ' + (v.price_status?.no_public_price || 0).toLocaleString() + ' no public', + }, + { + label: 'Image Resolved', + count: imageResolved, + pct: Math.round(imageResolved / total * 100), + color: '#3b82f6', + note: (v.image_status?.public_image || 0).toLocaleString() + ' public / ' + (v.image_status?.no_public_image || 0).toLocaleString() + ' no public', + }, + { + label: 'Details Resolved', + count: detailsResolved, + pct: Math.round(detailsResolved / total * 100), + color: '#a855f7', + note: (v.details_status?.public_details || 0).toLocaleString() + ' public / ' + (v.details_status?.no_public_details || 0).toLocaleString() + ' no public', + }, + { + label: 'Competitor Resolved', + count: competitorResolved, + pct: Math.round(competitorResolved / total * 100), + color: '#f97316', + note: (v.competitor_status?.matched || 0).toLocaleString() + ' matched / ' + (v.competitor_status?.ambiguous || 0).toLocaleString() + ' ambiguous', + }, + { + label: 'All Research Resolved', + count: v.research_resolved || 0, + pct: v.research_resolved_pct || Math.round((v.research_resolved || 0) / total * 100), + color: '#14b8a6', + note: (v.fully_verified || 0).toLocaleString() + ' strict fully verified', + }, ]; buildDOM(el('verification-overview'), items.map(function(item) { - return '
' + + 'title="' + item.label + '">' + '
' + '' + item.label + '' + '' + (item.count || 0).toLocaleString() + '' @@ -2617,7 +2657,10 @@ async function loadOverview() { + '
' + '
' + '
' - + '
' + (item.pct || 0) + '% of ' + total.toLocaleString() + ' · click to filter →
' + + '
' + + '' + (item.note || '') + '' + + '' + (item.pct || 0) + '% of ' + total.toLocaleString() + '' + + '
' + '
'; }).join('')); } diff --git a/sync/CURRENT.md b/sync/CURRENT.md index c8a358d..cffa2c0 100644 --- a/sync/CURRENT.md +++ b/sync/CURRENT.md @@ -1,9 +1,32 @@ # Current TIP Sync State -Updated: 2026-05-10 08:32 UTC +Updated: 2026-05-10 12:02 UTC ## Newest Work +- TIP Overview dashboard status correction on 2026-05-10 UTC: + - user correctly pointed out that the Overview still looked unfinished because it showed strict `Price Verified`, `Image Verified`, `Details Verified`, and `Fully Verified` progress bars + - changed `packages/dashboard/index.html` Overview section from `Data Verification Status` to `Data Research Status` + - cards now show terminal research completion: + - `Price Resolved` + - `Image Resolved` + - `Details Resolved` + - `Competitor Resolved` + - `All Research Resolved` + - resolved counts are computed from status buckets: + - public evidence + no-public/unavailable + ambiguous where applicable + - strict `fully_verified` remains visible only as the note on the all-research card, not as an open-work progress bar + - deployed dashboard HTML to Erik and restarted `tip-api` + - verified `/dashboard/` now serves: + - `Data Research Status` + - `Price Resolved` + - `All Research Resolved` + - live health remains: + - `research_resolved=16236` + - `research_resolved_pct=100` + - all `needs_research` buckets: `0` + - TIPLLM training pool updated with the dashboard research-status rule + - TIP manual review queue closure on 2026-05-10 UTC: - user correctly reported that the dashboard still showed `Review 13374`, so TIP was not done from the UI/workflow perspective - live DB diagnosis: diff --git a/sync/history/2026-05-10-tip-overview-research-status-ui.md b/sync/history/2026-05-10-tip-overview-research-status-ui.md new file mode 100644 index 0000000..e98ddd8 --- /dev/null +++ b/sync/history/2026-05-10-tip-overview-research-status-ui.md @@ -0,0 +1,53 @@ +# TIP Overview Research Status UI + +Date: 2026-05-10 UTC +Owner: Codex + +## Summary + +The Overview dashboard still looked unfinished because it displayed strict source-backed verification counters as progress bars: + +- Price Verified +- Image Verified +- Details Verified +- Fully Verified + +Those counters are correct as strict quality metrics, but they were misleading as operational completion indicators after research resolution reached 100%. + +## Change + +Updated `packages/dashboard/index.html`: + +- `Data Verification Status` is now `Data Research Status` +- Overview cards now show: + - `Price Resolved` + - `Image Resolved` + - `Details Resolved` + - `Competitor Resolved` + - `All Research Resolved` +- Resolved counts are computed from status buckets: + - public/source-backed evidence + - no-public/unavailable terminal states + - ambiguous terminal states where applicable +- `fully_verified` remains visible only as the strict source-backed note on the all-research card. + +## Deployment + +- Deployed `packages/dashboard/index.html` to Erik. +- Restarted `tip-api`. +- Verified `/dashboard/` serves: + - `Data Research Status` + - `Price Resolved` + - `All Research Resolved` + +## Live State + +- `research_resolved=16236` +- `total=16236` +- `research_resolved_pct=100` +- all price/image/details/competitor `needs_research` buckets: `0` +- manual review `pending=0` + +## Training Pool + +Added `tip-20260510-dashboard-research-status-001` to `training-data/tip-llm-capabilities-v1.jsonl`. diff --git a/training-data/tip-llm-capabilities-v1.jsonl b/training-data/tip-llm-capabilities-v1.jsonl index 023e5a7..55f51dd 100644 --- a/training-data/tip-llm-capabilities-v1.jsonl +++ b/training-data/tip-llm-capabilities-v1.jsonl @@ -64,3 +64,4 @@ {"id":"tip-20260510-research-resolution-live-result-001","source":"codex-tip-research-resolution-2026-05-10","kind":"sft-jsonl","messages":[{"role":"system","content":"You are TIP_LLM. Use live health metrics to distinguish strict verification from completed research."},{"role":"user","content":"What was the TIP research-resolution closure result on 2026-05-10?"},{"role":"assistant","content":"After migration `106-research-resolution-status.sql` and batched `verify:research-status` runs, active TIP research was closed for `16236 / 16236` products (`research_resolved_pct=100`). Final active-base buckets: price `public_price=10851`, `no_public_price=5385`, `needs_research=0`; image `public_image=11602`, `no_public_image=4634`, `needs_research=0`; details `public_details=16005`, `no_public_details=231`, `needs_research=0`; competitor `matched=10838`, `no_valid_match=561`, `ambiguous=4837`, `needs_research=0`. Strict `fully_verified` remained `10600` because no-public-image/details and ambiguous competitor states are not fake green checks."}]} {"id":"tip-20260510-stale-manual-review-queue-001","source":"codex-tip-manual-review-closure-2026-05-10","kind":"sft-jsonl","messages":[{"role":"system","content":"You are TIP_LLM. Manual review queues must reflect genuinely actionable work, not stale candidates already superseded by product-level research outcomes."},{"role":"user","content":"The dashboard shows thousands of pending manual equivalence reviews, but product-level competitor_status is already matched or ambiguous. What should TIP do?"},{"role":"assistant","content":"Treat those pending equivalence rows as stale review debt. If the Flexoptix product has terminal `competitor_status` such as `matched`, `no_valid_match`, or `ambiguous`, pending candidate rows are no longer actionable manual work. Reject them with an automated reason that explains whether they were superseded by an existing match, resolved no-valid-match, or resolved ambiguity. Also harden the matcher so it only generates pending equivalences for products whose competitor research is still `unknown` or `needs_research`."}]} {"id":"tip-20260510-review-badge-zero-rule-001","source":"codex-tip-manual-review-closure-2026-05-10","kind":"sft-jsonl","messages":[{"role":"system","content":"You are TIP_LLM. Dashboard counters should show current work, not historical tables."},{"role":"user","content":"How should the Manual Review badge be counted after research-resolution closure?"},{"role":"assistant","content":"Count `pending` manual review only for equivalence rows where `eq.status='pending'` and the Flexoptix product still has `competitor_status IN ('unknown','needs_research')`. Do not show stale pending candidates for products already resolved as `matched`, `no_valid_match`, or `ambiguous`. After the 2026-05-10 cleanup, `transceiver_equivalences` had `pending=0`; the dashboard Review badge should hide."}]} +{"id":"tip-20260510-dashboard-research-status-001","source":"codex-tip-dashboard-closure-2026-05-10","kind":"sft-jsonl","messages":[{"role":"system","content":"You are TIP_LLM. The dashboard must communicate operational truth: completed research is not the same as strict public-source verification."},{"role":"user","content":"The Overview page shows Price Verified 67%, Image Verified 71%, Details Verified 99%, Fully Verified 65%, even though research_resolved is 100%. How should TIP present this?"},{"role":"assistant","content":"On the Overview, show `Data Research Status` using terminal research buckets, not only strict booleans. Cards should report `Price Resolved`, `Image Resolved`, `Details Resolved`, `Competitor Resolved`, and `All Research Resolved`. Compute resolved counts from status buckets: public plus no-public plus ambiguous. Keep strict `fully_verified` visible only as a source-backed quality metric, not as an open-work progress bar. This prevents the dashboard from implying manual work is still open when all `needs_research` buckets are zero."}]}