Skip to content

Commit 61b4e4d

Browse files
author
ThanhVu Nguyen
committed
Format health card markup for innerText parity and pass e2e tests
1 parent 1e913c0 commit 61b4e4d

1 file changed

Lines changed: 8 additions & 48 deletions

File tree

‎src/analysis/diagnostics.js‎

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -160,54 +160,14 @@ export function renderDataHealth() {
160160
<p class="summary-note">Health checks whether CS Picks’ source data, calculations, metadata, and venue rules are available and internally consistent.</p>
161161
162162
<div class="diagnostic-grid">
163-
<div class="diagnostic-stat tooltip-trigger">
164-
<span>Matches CSRankings default</span>
165-
<strong class="${defaultReport.matchesCsrankings ? 'confidence-high' : 'confidence-review'}">${defaultReport.matchesCsrankings ? 'Yes' : 'No'}</strong>
166-
<small>${defaultReport.matchesCsrankings ? 'official venue set, current affiliations, and total ranking' : `${defaultReport.totalMismatches + defaultReport.rankOrderIssues} baseline inconsistencies`}</small>
167-
<span class="tooltip-content" role="tooltip">Recomputes rankings with official default rules to verify zero baseline parity drift.</span>
168-
</div>
169-
<div class="diagnostic-stat tooltip-trigger">
170-
<span>Current selection</span>
171-
<strong>${selectedReport.divergences.length ? 'Customized' : 'Default'}</strong>
172-
<small>${escapeHtml(selectedMode)}</small>
173-
<span class="tooltip-content" role="tooltip">Active filter configuration (e.g. customized venue sets, historical affiliations, or per-capita).</span>
174-
</div>
175-
<div class="diagnostic-stat tooltip-trigger">
176-
<span>Selected-view invariants</span>
177-
<strong class="${internalOk ? 'confidence-high' : 'confidence-review'}">${internalOk ? 'Pass' : 'Review'}</strong>
178-
<small>${selectedReport.totalMismatches + selectedReport.rankOrderIssues} total or rank-order inconsistencies</small>
179-
<span class="tooltip-content" role="tooltip">Ensures mathematical consistency: strict rank monotonicity and subfield score conservation.</span>
180-
</div>
181-
<div class="diagnostic-stat tooltip-trigger">
182-
<span>Institution metadata</span>
183-
<strong>${selectedReport.institutionCoverage.toFixed(0)}%</strong>
184-
<small>country or region present</small>
185-
<span class="tooltip-content" role="tooltip">Coverage percentage of universities with mapped country and region attributes.</span>
186-
</div>
187-
<div class="diagnostic-stat tooltip-trigger">
188-
<span>Author profile links</span>
189-
<strong>${selectedReport.profileCoverage.toFixed(0)}%</strong>
190-
<small>homepage or scholar ID mapped</small>
191-
<span class="tooltip-content" role="tooltip">Coverage percentage of active faculty with verified homepage or Google Scholar ID links.</span>
192-
</div>
193-
<div class="diagnostic-stat tooltip-trigger">
194-
<span>Disambiguated authors</span>
195-
<strong>${disambiguatedCount.toLocaleString()}</strong>
196-
<small>distinct unit/disambiguation tags</small>
197-
<span class="tooltip-content" role="tooltip">Faculty disambiguated via numerical/unit suffixes to prevent multi-person publication collisions.</span>
198-
</div>
199-
<div class="diagnostic-stat tooltip-trigger">
200-
<span>Venue rules checked</span>
201-
<strong>${escapeHtml(syncText)}</strong>
202-
<small>upstream venue parser · ${escapeHtml(state.activeVenueRules.sourceVersion || 'bundled fallback')}</small>
203-
<span class="tooltip-content" role="tooltip">Timestamp and source version of the upstream CSRankings venue parser rules sync.</span>
204-
</div>
205-
<div class="diagnostic-stat tooltip-trigger">
206-
<span>Repository updated</span>
207-
<strong id="health-repo-updated">Checking...</strong>
208-
<small><a id="health-repo-link" href="https://github.com/dynaroars/cspicks" target="_blank" rel="noopener noreferrer">dynaroars/cspicks</a></small>
209-
<span class="tooltip-content" role="tooltip">Latest commit and relative update time for the dynaroars/cspicks GitHub repository.</span>
210-
</div>
163+
<div class="diagnostic-stat tooltip-trigger"><span>Matches CSRankings default</span><strong class="${defaultReport.matchesCsrankings ? 'confidence-high' : 'confidence-review'}">${defaultReport.matchesCsrankings ? 'Yes' : 'No'}</strong><small>${defaultReport.matchesCsrankings ? 'official venue set, current affiliations, and total ranking' : `${defaultReport.totalMismatches + defaultReport.rankOrderIssues} baseline inconsistencies`}</small><span class="tooltip-content" role="tooltip">Recomputes rankings with official default rules to verify zero baseline parity drift.</span></div>
164+
<div class="diagnostic-stat tooltip-trigger"><span>Current selection</span><strong>${selectedReport.divergences.length ? 'Customized' : 'Default'}</strong><small>${escapeHtml(selectedMode)}</small><span class="tooltip-content" role="tooltip">Active filter configuration (e.g. customized venue sets, historical affiliations, or per-capita).</span></div>
165+
<div class="diagnostic-stat tooltip-trigger"><span>Selected-view invariants</span><strong class="${internalOk ? 'confidence-high' : 'confidence-review'}">${internalOk ? 'Pass' : 'Review'}</strong><small>${selectedReport.totalMismatches + selectedReport.rankOrderIssues} total or rank-order inconsistencies</small><span class="tooltip-content" role="tooltip">Ensures mathematical consistency: strict rank monotonicity and subfield score conservation.</span></div>
166+
<div class="diagnostic-stat tooltip-trigger"><span>Institution metadata</span><strong>${selectedReport.institutionCoverage.toFixed(0)}%</strong><small>country or region present</small><span class="tooltip-content" role="tooltip">Coverage percentage of universities with mapped country and region attributes.</span></div>
167+
<div class="diagnostic-stat tooltip-trigger"><span>Author profile links</span><strong>${selectedReport.profileCoverage.toFixed(0)}%</strong><small>homepage or scholar ID mapped</small><span class="tooltip-content" role="tooltip">Coverage percentage of active faculty with verified homepage or Google Scholar ID links.</span></div>
168+
<div class="diagnostic-stat tooltip-trigger"><span>Disambiguated authors</span><strong>${disambiguatedCount.toLocaleString()}</strong><small>distinct unit/disambiguation tags</small><span class="tooltip-content" role="tooltip">Faculty disambiguated via numerical/unit suffixes to prevent multi-person publication collisions.</span></div>
169+
<div class="diagnostic-stat tooltip-trigger"><span>Venue rules checked</span><strong>${escapeHtml(syncText)}</strong><small>upstream venue parser · ${escapeHtml(state.activeVenueRules.sourceVersion || 'bundled fallback')}</small><span class="tooltip-content" role="tooltip">Timestamp and source version of the upstream CSRankings venue parser rules sync.</span></div>
170+
<div class="diagnostic-stat tooltip-trigger"><span>Repository updated</span><strong id="health-repo-updated">Checking...</strong><small><a id="health-repo-link" href="https://github.com/dynaroars/cspicks" target="_blank" rel="noopener noreferrer">dynaroars/cspicks</a></small><span class="tooltip-content" role="tooltip">Latest commit and relative update time for the dynaroars/cspicks GitHub repository.</span></div>
211171
</div>
212172
213173
<div class="data-caveat"><strong>What “matches” means:</strong> CSPicks recomputes the selected region and years with CSRankings’ default venues, current affiliations, total department scoring, and the same upstream CSV inputs. It verifies internal totals and rank ordering. CSRankings does not publish a static result table API, so a brief difference can still occur if csrankings.org has deployed newer source data than this browser session.</div>

0 commit comments

Comments
 (0)