GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(pm-stack): unpriced-variant detail buttons under Cost Explorer c… · developing-today/code@af7d99c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • pm-stack/aggregator
    • src
      • assets
        • aa-explorer-computations.d.ts
        • aa-explorer-computations.js
      • render.ts
    • test
      • aa-explorer-computations.test.ts
      • aa.test.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎pm-stack/aggregator/src/assets/aa-explorer-computations.d.ts‎

Copy file name to clipboardExpand all lines: pm-stack/aggregator/src/assets/aa-explorer-computations.d.ts
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export function computeRecommendations<
4949
empty: string | null;
5050
};
5151
export function normName(value: unknown): string;
52+
export function unpricedScoredPoints<T extends { score?: number | null; cost?: number | null; family?: string; effort?: string | null }>(points: T[]): T[];
5253
export function projectTask(
5354
model: any,
5455
settings: Record<string, number | string>,
Collapse file

‎pm-stack/aggregator/src/assets/aa-explorer-computations.js‎

Copy file name to clipboardExpand all lines: pm-stack/aggregator/src/assets/aa-explorer-computations.js
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,20 @@ export function projectTask(e, settings, aaPoints, caiPoints) {
262262
if (timing && timing.tps) time = turns * ((timing.ttft || 0) + answer / timing.tps + (Number(settings.overheadSec) || 0));
263263
return { cost: cost, time: time, band: band };
264264
}
265+
266+
export function unpricedScoredPoints(points) {
267+
// #1400 remainder: configurations that carry a score but no published
268+
// cost. They cannot appear on any cost chart, so the explorer lists
269+
// them as detail-opening buttons instead. Input order is the caller's
270+
// visible set (filters/hidden already applied); this helper only
271+
// selects and orders: score descending, then family/effort for a
272+
// stable, scannable list. No score/cost computation happens here.
273+
return (points || [])
274+
.filter(function (p) { return p && p.score != null && p.cost == null; })
275+
.slice()
276+
.sort(function (a, b) {
277+
return (b.score - a.score)
278+
|| String(a.family || "").localeCompare(String(b.family || ""))
279+
|| String(a.effort || "").localeCompare(String(b.effort || ""));
280+
});
281+
}
Collapse file

‎pm-stack/aggregator/src/render.ts‎

Copy file name to clipboardExpand all lines: pm-stack/aggregator/src/render.ts
+30-2Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4012,7 +4012,7 @@ ${dnsTable(section.entries, renewingSoon, next)}`;
40124012
* Written without template literals on purpose — it lives inside one.
40134013
*/
40144014
const AA_EXPLORER_SCRIPT = `<script type="module">
4015-
import { applyInequalityFilters, bandIndex, computeRecommendations, logEdges, normName, paretoSet, pctRank, projectTask, scoreEdges } from "/assets/aa-explorer-computations.js";
4015+
import { applyInequalityFilters, bandIndex, computeRecommendations, logEdges, normName, paretoSet, pctRank, projectTask, scoreEdges, unpricedScoredPoints } from "/assets/aa-explorer-computations.js";
40164016
(function () {
40174017
var dataEl = document.getElementById("xpl-data");
40184018
if (!dataEl) return;
@@ -4752,6 +4752,33 @@ import { applyInequalityFilters, bandIndex, computeRecommendations, logEdges, no
47524752
});
47534753
}
47544754
// --- hidden tray (reference design's hide-a-configuration flow) ---
4755+
function renderUnpriced() {
4756+
// #1400 remainder: visible scored configurations with no published
4757+
// cost cannot appear on the cost charts; list them under the charts
4758+
// as real buttons that open the existing detail card via
4759+
// selectPoint — the same flow as clicking a dot or a table row.
4760+
// visPoints() already applies every filter and the hidden set.
4761+
var box = document.getElementById("xpl-unpriced");
4762+
if (!box) return;
4763+
var rows = unpricedScoredPoints(visPoints());
4764+
box.innerHTML = "";
4765+
if (!rows.length) {
4766+
var none = document.createElement("p");
4767+
none.className = "muted";
4768+
none.textContent = "No visible scored configurations are missing a published cost.";
4769+
box.appendChild(none);
4770+
return;
4771+
}
4772+
rows.forEach(function (p) {
4773+
var b = document.createElement("button");
4774+
b.type = "button";
4775+
b.className = "xpl-ctl-btn";
4776+
b.setAttribute("data-unpriced", p.key);
4777+
b.textContent = (p.family || p.key) + (p.effort ? " \u2014 " + p.effort : "") + " \u00b7 " + scoreWord() + " " + fmtN(p.score, 1) + " \u00b7 no published cost";
4778+
b.addEventListener("click", function () { selectPoint(p.key); });
4779+
box.appendChild(b);
4780+
});
4781+
}
47554782
function renderTray() {
47564783
var tray = document.getElementById("xpl-tray");
47574784
if (!tray) return;
@@ -5384,7 +5411,7 @@ import { applyInequalityFilters, bandIndex, computeRecommendations, logEdges, no
53845411
: "Intelligence & decode perspective — the AA Intelligence Index rankings: score is the Intelligence Index, cost and time the import's per-task figures (time excludes TTFT).";
53855412
}
53865413
applyTab();
5387-
if (S.tab === "aa") { renderLegend(); renderTray(); drawCharts(); renderAaTable(); renderPareto(); renderRecs(); renderBandComparisons(); }
5414+
if (S.tab === "aa") { renderLegend(); renderTray(); drawCharts(); renderUnpriced(); renderAaTable(); renderPareto(); renderRecs(); renderBandComparisons(); }
53885415
else renderModels();
53895416
enhanceCharts();
53905417
}
@@ -5855,6 +5882,7 @@ ${aaTabAge}
58555882
<div class="chart" data-chart="xpl-c5"><h3>Multiples of the baseline</h3><span class="xpl-ctl"><label>Baseline <select id="xf-baseline"></select></label><button type="button" data-dl="xpl-c5">Download PNG</button></span><span class="chart-tools" data-tools="xpl-c5"><button type="button" data-zact="expand" data-zfor="xpl-c5">⤢ Expand</button><button type="button" data-zact="in" data-zfor="xpl-c5" aria-label="Zoom in">+</button><button type="button" data-zact="out" data-zfor="xpl-c5" aria-label="Zoom out">−</button><button type="button" data-zact="reset" data-zfor="xpl-c5" aria-label="Reset view">⟲</button></span><svg id="xpl-c5" viewBox="0 0 680 400" role="img" aria-label="Cost and duration multiples scatter chart"></svg><p class="muted" data-note></p></div>
58565883
<div class="chart" data-chart="xpl-c6"><h3>Scores — every measured configuration</h3><span class="xpl-ctl"><button type="button" data-dl="xpl-c6">Download PNG</button></span><span class="chart-tools" data-tools="xpl-c6"><button type="button" data-zact="expand" data-zfor="xpl-c6">⤢ Expand</button><button type="button" data-zact="in" data-zfor="xpl-c6" aria-label="Zoom in">+</button><button type="button" data-zact="out" data-zfor="xpl-c6" aria-label="Zoom out">−</button><button type="button" data-zact="reset" data-zfor="xpl-c6" aria-label="Reset view">⟲</button></span><svg id="xpl-c6" viewBox="0 0 680 400" role="img" aria-label="Scores bar chart"></svg><p class="muted" data-note></p></div>
58575884
</div>
5885+
<div class="card" id="xpl-unpriced-wrap"><h3>Scored configurations without a published cost</h3><p class="muted">These visible configurations have a score but no published cost, so they cannot appear on the cost charts. Select one to open its detail card.</p><div id="xpl-unpriced" class="strip"></div></div>
58585886
<p class="muted">Time is seconds to finish one task (log scale), not tokens/sec — a model can stream fast and still finish slowly if it burns many tokens, and per-task time here excludes time to first token (shown separately where timed). Thin lines join each model's effort rungs (DeepSeek ladders dotted); the white dashed line is that chart's Pareto frontier; white-ringed dots sit on it, dimmed dots are beaten on its axes. Bracket splits: cost $0.15 / $0.75 / $2.50, time 1m / 5m / 15m. Only measured configurations are plotted — nothing is estimated, so configurations AA never timed appear in the tables, not the time charts. DeepSeek prices split peak / off-peak: peak is 01:00–04:00 and 06:00–10:00 UTC Monday–Friday at double the off-peak token rates, so the same runs appear at two costs. Click a dot or a row for details.</p>
58595887
<h2>Multiples table</h2>
58605888
<p class="muted">Every visible configuration with all three measures, as multiples of the baseline chosen above, sorted by cost multiple.</p>
Collapse file

‎pm-stack/aggregator/test/aa-explorer-computations.test.ts‎

Copy file name to clipboardExpand all lines: pm-stack/aggregator/test/aa-explorer-computations.test.ts
+27Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import {
99
pctRank,
1010
projectTask,
1111
scoreEdges,
12+
unpricedScoredPoints,
1213
} from "../src/assets/aa-explorer-computations.js";
1314

1415
describe("Cost Explorer browser computations", () => {
@@ -127,3 +128,29 @@ describe("Cost Explorer browser computations", () => {
127128
expect(projectTask(missingCacheRate, settings, [point], []).cost).toBeNull();
128129
});
129130
});
131+
132+
describe("unpricedScoredPoints (#1400 remainder)", () => {
133+
const rows = [
134+
{ key: "priced", family: "Beta", effort: "high", score: 50, cost: 1.2 },
135+
{ key: "unpriced-low", family: "Alpha", effort: "low", score: 30, cost: null },
136+
{ key: "unpriced-high", family: "Alpha", effort: "high", score: 70, cost: null },
137+
{ key: "unscored", family: "Gamma", effort: "low", score: null, cost: null },
138+
{ key: "unpriced-mid", family: "Beta", effort: "med", score: 50, cost: undefined },
139+
];
140+
test("selects scored-but-unpriced only, ordered by score desc", () => {
141+
expect(unpricedScoredPoints(rows).map((r) => r.key)).toEqual([
142+
"unpriced-high",
143+
"unpriced-mid",
144+
"unpriced-low",
145+
]);
146+
});
147+
test("empty state: no unpriced scored rows yields an empty list", () => {
148+
expect(unpricedScoredPoints([rows[0], rows[3]])).toEqual([]);
149+
expect(unpricedScoredPoints([])).toEqual([]);
150+
});
151+
test("does not mutate the input rows or their order", () => {
152+
const before = rows.map((r) => r.key);
153+
unpricedScoredPoints(rows);
154+
expect(rows.map((r) => r.key)).toEqual(before);
155+
});
156+
});
Collapse file

‎pm-stack/aggregator/test/aa.test.ts‎

Copy file name to clipboardExpand all lines: pm-stack/aggregator/test/aa.test.ts
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,9 @@ describe("aa-explorer manifest + render", () => {
627627
expect(html).toContain('id="xpl-c4"'); // tasks completed vs duration
628628
expect(html).toContain('id="xpl-c5"'); // multiples of the baseline
629629
expect(html).toContain('id="xpl-c6"'); // scores-only bars
630+
expect(html).toContain('id="xpl-unpriced"'); // #1400: unpriced-variant detail buttons mount under the charts
631+
expect(html).toContain("Scored configurations without a published cost");
632+
expect(html).toContain("unpricedScoredPoints"); // the explorer script wires the button list from the computations module
630633
expect(html).toContain('data-sizeby="xpl-c1"');
631634
expect(html).toContain('data-dl="xpl-c2"');
632635
expect(html).toContain('data-tmode="tot"');

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.