fix: show TIP research status on overview
This commit is contained in:
parent
5eb1b07183
commit
58a2570842
@ -837,9 +837,9 @@
|
||||
<div class="stat-val" id="ov-news">—</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- VERIFICATION STATUS -->
|
||||
<!-- RESEARCH STATUS -->
|
||||
<div class="card mb" id="verification-card">
|
||||
<div class="card-label">Data Verification Status</div>
|
||||
<div class="card-label">Data Research Status</div>
|
||||
<div id="verification-overview" class="mt" style="display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1rem"></div>
|
||||
</div>
|
||||
|
||||
@ -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 '<div onclick="goToVerifiedFilter(\'' + item.filter + '\')" '
|
||||
+ 'style="background:var(--surface2);border:1px solid var(--border);border-radius:8px;padding:0.75rem 1rem;cursor:pointer;transition:border-color 0.15s,box-shadow 0.15s" '
|
||||
return '<div '
|
||||
+ 'style="background:var(--surface2);border:1px solid var(--border);border-radius:8px;padding:0.75rem 1rem;transition:border-color 0.15s,box-shadow 0.15s" '
|
||||
+ 'onmouseover="this.style.borderColor=\'' + item.color + '\';this.style.boxShadow=\'0 0 0 1px ' + item.color + '40\'" '
|
||||
+ 'onmouseout="this.style.borderColor=\'\';this.style.boxShadow=\'\'" '
|
||||
+ 'title="Show ' + item.label + ' transceivers">'
|
||||
+ 'title="' + item.label + '">'
|
||||
+ '<div style="display:flex;justify-content:space-between;align-items:baseline;margin-bottom:0.4rem">'
|
||||
+ '<span style="font-size:0.75rem;color:var(--text-dim)">' + item.label + '</span>'
|
||||
+ '<span style="font-size:0.9rem;font-weight:700;color:var(--text-bright);font-family:var(--mono)">' + (item.count || 0).toLocaleString() + '</span>'
|
||||
@ -2617,7 +2657,10 @@ async function loadOverview() {
|
||||
+ '<div style="background:var(--surface3);border-radius:4px;height:6px;overflow:hidden">'
|
||||
+ '<div style="height:100%;width:' + (item.pct || 0) + '%;background:' + item.color + ';border-radius:4px;transition:width 1s ease"></div>'
|
||||
+ '</div>'
|
||||
+ '<div style="font-size:0.7rem;color:var(--text-dim);margin-top:0.3rem;text-align:right">' + (item.pct || 0) + '% of ' + total.toLocaleString() + ' · click to filter →</div>'
|
||||
+ '<div style="display:flex;justify-content:space-between;gap:0.5rem;font-size:0.7rem;color:var(--text-dim);margin-top:0.3rem">'
|
||||
+ '<span style="overflow:hidden;text-overflow:ellipsis;white-space:nowrap">' + (item.note || '') + '</span>'
|
||||
+ '<span style="font-family:var(--mono);white-space:nowrap">' + (item.pct || 0) + '% of ' + total.toLocaleString() + '</span>'
|
||||
+ '</div>'
|
||||
+ '</div>';
|
||||
}).join(''));
|
||||
}
|
||||
|
||||
@ -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:
|
||||
|
||||
53
sync/history/2026-05-10-tip-overview-research-status-ui.md
Normal file
53
sync/history/2026-05-10-tip-overview-research-status-ui.md
Normal file
@ -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`.
|
||||
@ -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."}]}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user