The ultimate harness for coding agents and beyond. All your agents. All your machines. One command center. Start with code, then follow your curiosity and build across disciplines: CAD, circuits, robots, games and music.
TypeScript 3d-modelingagent-frameworkagent-harnessai-agentscadclaude-codecodexcoding-agentsdeveloper-toolsesp32game-developmentmcp-servermulti-agentopen-hardwareopencodeopenharnesspcbroboticsterminaltmux
Leaderboard Models: each model's share of the week's tasks, with engine icons (#2203)
0xken15b1aa3a5c729b
diff --git a/backend/src/superTabs/leaderboard/contract.ts b/backend/src/superTabs/leaderboard/contract.tsindex f02daebb2..a428619fa 100644--- a/backend/src/superTabs/leaderboard/contract.ts+++ b/backend/src/superTabs/leaderboard/contract.ts@@ -69,6 +69,8 @@ export interface ModelScore {/** SHIPPED_POINTS per request it shipped this week, REVIEW_POINTS per review verdict it gave. */points: numberrank: number+ /** This week's attempts on it at requests, never reviews: its share of the week's tasks (Dee, 2026-10-29). */+ attempts: number/** Requests its attempt shipped this week; median times to ship from that attempt's assignment, and from the request's first. */shipped: { count: number; medianAttemptMs: number | null; medianRequestMs: number | null }/** This week's attempts on it with a first review on record, and how many passed it. */diff --git a/backend/src/superTabs/leaderboard/stats.test.ts b/backend/src/superTabs/leaderboard/stats.test.tsindex 50504d398..087bda338 100644--- a/backend/src/superTabs/leaderboard/stats.test.ts+++ b/backend/src/superTabs/leaderboard/stats.test.ts@@ -313,6 +313,18 @@ describe('Models: temporary workers by engine, model and effort, never by agentexpect(model(view, 'opus').firstReview).toEqual({ reviewed: 3, passed: 2 })})+ it('counts each model\'s attempts of the week, reviewed or not, never a review group\'s or another week\'s', () => {+ const view = board(swarm(), [+ group({ status: 'working', ledger: { runs: [run('a1', WEEK, 'opus', 'high', { firstReview: true }), run('a2', WEEK + HOUR),+ run('a3', LAST), run('a4', WEEK + 2 * HOUR, 'gpt-6.1', 'medium')] } }),+ group({ status: 'done', ledger: { runs: [run('b1', WEEK + 3 * HOUR)] } }),+ // A review group's attempts are reviews, not tasks.+ group({ status: 'done', reviewOf: 'g0', ledger: { runs: [run('c1', WEEK + HOUR, 'gpt-6.1', 'medium')] } }),+ ])+ expect(model(view, 'opus').attempts).toBe(3)+ expect(model(view, 'gpt-6.1', 'medium').attempts).toBe(1)+ })+it('gives a reviewer model 1 point per finished review verdict of the week', () => {const counted = (week: number, count: number) => ({ week, engine: 'codex', model: 'gpt-5.5', effort: 'medium', count })const view = board(swarm(), [group({ status: 'review', ledger: { reviews: [counted(LAST, 1), counted(WEEK, 2)] } }),diff --git a/backend/src/superTabs/leaderboard/stats.ts b/backend/src/superTabs/leaderboard/stats.tsindex d7c6326f3..54adebb4f 100644--- a/backend/src/superTabs/leaderboard/stats.ts+++ b/backend/src/superTabs/leaderboard/stats.ts@@ -134,7 +134,7 @@ function agentScores(state: SuperTabState, projectId: string, shippedThisWeek: Creturn scored.map(entry => ({ ...entry, rank: 1 + scored.filter(other => other.points > entry.points).length }))}-/** Every model that worked this week: the requests its attempts shipped, the first reviews of its attempts, and the review+/** Every model that worked this week: its attempts, the requests they shipped, their first reviews, and the review* verdicts it gave. A request ships on its last attempt before it shipped. */function modelScores(requests: Conversation[], shippedThisWeek: Conversation[], inWeek: (at: number) => boolean): ModelScore[] {const rows = new Map<string, ModelScore & { attemptMs: number[]; requestMs: number[] }>()@@ -142,7 +142,7 @@ function modelScores(requests: Conversation[], shippedThisWeek: Conversation[],const key = JSON.stringify([on.engine, on.model, on.effort ?? null])let entry = rows.get(key)if (!entry) rows.set(key, entry = { engine: on.engine, model: on.model, effort: on.effort ?? null, grid: !!on.grid, points: 0, rank: 0,- shipped: { count: 0, medianAttemptMs: null, medianRequestMs: null }, firstReview: { reviewed: 0, passed: 0 }, reviews: 0,+ attempts: 0, shipped: { count: 0, medianAttemptMs: null, medianRequestMs: null }, firstReview: { reviewed: 0, passed: 0 }, reviews: 0,attemptMs: [], requestMs: [] })return entry}@@ -162,6 +162,7 @@ function modelScores(requests: Conversation[], shippedThisWeek: Conversation[],for (const run of group.ledger?.runs ?? []) {if (!inWeek(run.at)) continueconst entry = row(run)+ entry.attempts++if (run.firstReview === undefined) continueentry.firstReview.reviewed++if (run.firstReview) entry.firstReview.passed++diff --git a/desktop/lib/super_tabs/leaderboard/model.dart b/desktop/lib/super_tabs/leaderboard/model.dartindex cdd6dea97..84211e84a 100644--- a/desktop/lib/super_tabs/leaderboard/model.dart+++ b/desktop/lib/super_tabs/leaderboard/model.dart@@ -79,6 +79,7 @@ class SuperTabModelScore {grid = json['grid'] == true,points = _int(json['points']),rank = _int(json['rank']),+ attempts = _int(json['attempts']),shipped = _int(_map(json['shipped'])['count']),medianAttemptMs = _optional(_map(json['shipped'])['medianAttemptMs']),medianRequestMs = _optional(_map(json['shipped'])['medianRequestMs']),@@ -96,6 +97,9 @@ class SuperTabModelScore {final bool grid;final int points, rank, shipped;+ /// This week's tasks it ran, never reviews; 0 from a server before them.+ final int attempts;+/// Median time to ship from the shipping attempt's assignment, and from the/// request's first assignment.final int? medianAttemptMs, medianRequestMs;diff --git a/desktop/lib/super_tabs/leaderboard/models_section.dart b/desktop/lib/super_tabs/leaderboard/models_section.dartindex 69e70532d..9ea40c930 100644--- a/desktop/lib/super_tabs/leaderboard/models_section.dart+++ b/desktop/lib/super_tabs/leaderboard/models_section.dart@@ -1,6 +1,7 @@import 'package:flutter/material.dart';import '../../core/runtime_model_name.dart';+import '../../shared/theme/app_icons.dart';import '../../shared/theme/app_theme.dart' as grid;import '../../widgets/desktop_chrome.dart';import '../../widgets/engine_identity.dart';@@ -14,33 +15,60 @@ import 'reader.dart';const _gap = DesktopChrome.controlGap;const _rowHeight = 36.0;-/// Fewer first reviews than this say nothing about a model.-const leaderboardModelMinReviewed = 3;-/// How many models the sidebar lists until its heading shows them all.const leaderboardModelsShown = 3;/// A model as the sidebar's Models lists it: every engine and effort it ran-/// at as one, and how many of its attempts reviewers approved on first review.+/// at as one, its share of the week's tasks, and how many of its tasks+/// reviewers approved on first review.class LeaderboardModelShare {const LeaderboardModelShare({required this.name,+ required this.engine,+ required this.attempts,+ required this.total,+ required this.percent,required this.reviewed,required this.passed,});/// "Opus 5.5", "GPT-6.1 Sol"; the engine's name when it reported no model.final String name;++ /// The engine that ran most of its tasks: its icon leads the row. Null for+ /// [LeaderboardModelShare.other], which no one engine ran.+ final String? engine;++ /// Its tasks, of the [total] every model ran.+ final int attempts, total;++ /// Its share of [total], rounded so the week's rows add up to 100.+ final int percent;final int reviewed, passed;- int get percent => (passed * 100 / reviewed).round();+ /// The models behind the heading as one row, so the rows shown add up to+ /// 100 too: its percent is the sum of theirs, never a rounding of its own.+ factory LeaderboardModelShare.other(List<LeaderboardModelShare> rest) =>+ LeaderboardModelShare(+ name: 'Other',+ engine: null,+ attempts: rest.fold(0, (sum, share) => sum + share.attempts),+ total: rest.first.total,+ percent: rest.fold(0, (sum, share) => sum + share.percent),+ reviewed: rest.fold(0, (sum, share) => sum + share.reviewed),+ passed: rest.fold(0, (sum, share) => sum + share.passed),+ );}-/// The week's models with at least [leaderboardModelMinReviewed] first-/// reviews, the most often approved first; of two alike, the one reviewed-/// more, then by name.+/// The week's models that ran tasks, the largest share first, then by name.+/// Shares round by largest remainder: the floors, then one more point each+/// to the largest remainders until they add up to 100.List<LeaderboardModelShare> leaderboardModelShares(SuperTabLeaderboard board) {- final merged = <String, ({String name, int reviewed, int passed})>{};+ final merged =+ <+ String,+ ({Map<String, int> engines, int attempts, int reviewed, int passed})+ >{};for (final score in board.byModel) {final name = switch (score.model) {final String model => modelDisplayName(model),@@ -49,35 +77,60 @@ List<LeaderboardModelShare> leaderboardModelShares(SuperTabLeaderboard board) {// One row per model, whichever engine ran it at whichever effort:// rows are keyed by name.final before = merged[name];+ final engines = before?.engines ?? <String, int>{};+ engines[score.engine] = (engines[score.engine] ?? 0) + score.attempts;merged[name] = (- name: name,+ engines: engines,+ attempts: (before?.attempts ?? 0) + score.attempts,reviewed: (before?.reviewed ?? 0) + score.reviewed,passed: (before?.passed ?? 0) + score.passed,);}- final shares = [- for (final model in merged.values)- if (model.reviewed >= leaderboardModelMinReviewed)- LeaderboardModelShare(- name: model.name,- reviewed: model.reviewed,- passed: model.passed,- ),+ final ran =+ [+ for (final MapEntry(key: name, :value) in merged.entries)+ if (value.attempts > 0) (name: name, model: value),+ ]..sort((a, b) {+ final share = b.model.attempts - a.model.attempts;+ return share != 0 ? share : a.name.compareTo(b.name);+ });+ final total = ran.fold<int>(0, (sum, row) => sum + row.model.attempts);+ final percents = [for (final row in ran) row.model.attempts * 100 ~/ total];+ final short = 100 - percents.fold<int>(0, (sum, p) => sum + p);+ // Of equal remainders, the one listed first.+ int remainder(int i) => ran[i].model.attempts * 100 % total;+ final byRemainder = [for (var i = 0; i < ran.length; i++) i]+ ..sort((a, b) {+ final larger = remainder(b) - remainder(a);+ return larger != 0 ? larger : a - b;+ });+ for (final i in byRemainder.take(short)) {+ percents[i]++;+ }+ return [+ for (var i = 0; i < ran.length; i++)+ LeaderboardModelShare(+ name: ran[i].name,+ // Of two engines alike, the one listed first.+ engine: ran[i].model.engines.entries+ .reduce((a, b) => b.value > a.value ? b : a)+ .key,+ attempts: ran[i].model.attempts,+ total: total,+ percent: percents[i],+ reviewed: ran[i].model.reviewed,+ passed: ran[i].model.passed,+ ),];- shares.sort((a, b) {- final share = b.passed * a.reviewed - a.passed * b.reviewed;- if (share != 0) return share;- final reviewed = b.reviewed - a.reviewed;- return reviewed != 0 ? reviewed : a.name.compareTo(b.name);- });- return shares;}-/// The left sidebar's Models, after Machines (Dee, 2026-10-29): the models-/// whose work reviewers approved most often on first review in the week the-/// right pane shows, each as a bare percentage, the counts in words on hover-/// and to a screen reader. The heading shows them all. Nothing shows without-/// a board of [projectId], or when no model has enough first reviews.+/// The left sidebar's Models, after Machines (Dee, 2026-10-29): each model's+/// share of the tasks of the week the right pane shows, behind its engine's+/// icon, the counts and its first-review pass rate in words on hover and to a+/// screen reader. Behind the first [leaderboardModelsShown] the rest are one+/// Other row, so the rows shown add up to 100%; the heading names them all.+/// Nothing shows without a board of [projectId], or when no model ran a task+/// that week.class LeaderboardModelsSection extends StatefulWidget {const LeaderboardModelsSection({super.key,@@ -117,7 +170,7 @@ class _LeaderboardModelsSectionState extends State<LeaderboardModelsSection> {crossAxisAlignment: CrossAxisAlignment.stretch,children: [SuperTabSectionHeading(- 'Models',+ 'Models · $week',key: const ValueKey('super-models-heading'),endInset: 0,startInset: SuperTabSectionHeading.indentFor(0),@@ -127,6 +180,16 @@ class _LeaderboardModelsSectionState extends State<LeaderboardModelsSection> {for (final sharein _all ? shares : shares.take(leaderboardModelsShown))_row(share, week, style, column),+ if (more && !_all)+ _row(+ LeaderboardModelShare.other(+ shares.sublist(leaderboardModelsShown),+ ),+ week,+ style,+ column,+ key: const ValueKey('super-models-other'),+ ),],);},@@ -136,34 +199,49 @@ class _LeaderboardModelsSectionState extends State<LeaderboardModelsSection> {LeaderboardModelShare share,String week,TextStyle style,- double column,- ) {+ double column, {+ Key? key,+ }) {+ final reviews = share.reviewed == 0+ ? 'no first review yet'+ : '${(share.passed * 100 / share.reviewed).round()}% passed first review';final words =- '${share.passed} of ${share.reviewed} approved on first review $week';+ '${share.name}: ${share.attempts} of ${share.total} tasks $week · $reviews';return Tooltip(- key: ValueKey('super-model-${share.name}'),+ key: key ?? ValueKey('super-model-${share.name}'),message: words,excludeFromSemantics: true,child: Semantics(container: true,- label: '${share.name}: $words',+ label: words,excludeSemantics: true,child: Padding(padding: const EdgeInsets.only(bottom: grid.AppDesktop.listRowGap),child: ConstrainedBox(constraints: const BoxConstraints(minHeight: _rowHeight),child: Padding(- // The sidebar's rows: names after the icon column, the number+ // The sidebar's rows: the engine in the icon column, the number// where their badges end.padding: EdgeInsets.fromLTRB(- SuperTabSectionHeading.indentFor(0) +- SuperTabSectionHeading.actionWidth,+ SuperTabSectionHeading.indentFor(0),_gap,_gap + _gap / 2,_gap,),child: Row(children: [+ SizedBox(+ width: SuperTabSectionHeading.actionWidth,+ // Other has no engine: its icon column stays empty.+ child: share.engine == null+ ? null+ : Center(+ child: EngineMark(+ engine: share.engine,+ size: AppIcons.inlineSize,+ ),+ ),+ ),Expanded(child: Text(share.name,diff --git a/desktop/test/super_tab_leaderboard_shots_test.dart b/desktop/test/super_tab_leaderboard_shots_test.dartindex 3147846b2..817f5e025 100644--- a/desktop/test/super_tab_leaderboard_shots_test.dart+++ b/desktop/test/super_tab_leaderboard_shots_test.dart@@ -1,5 +1,6 @@import 'dart:io';+import 'package:flutter/gestures.dart';import 'package:flutter/material.dart';import 'package:flutter_test/flutter_test.dart';import 'package:harness/shared/theme/app_theme.dart' as grid;@@ -76,7 +77,24 @@ void main() {swarm: () => modelsSwarm(membersSwarm()),size: const Size(1300, 1000),);+ // Codex's mark is a picture, which a test decodes only when asked.+ await tester.runAsync(+ () => precacheImage(+ const AssetImage('assets/engine-icons/codex.png'),+ tester.element(find.byKey(const ValueKey('super-models-heading'))),+ ),+ );+ await tester.pumpAndSettle();await captureWindow(tester, shots, 'members-$name');+ // A Models row's hover line.+ final mouse = await tester.createGesture(kind: PointerDeviceKind.mouse);+ await mouse.addPointer(location: Offset.zero);+ await mouse.moveTo(+ tester.getCenter(find.byKey(const ValueKey('super-model-Opus 5.5'))),+ );+ await tester.pumpAndSettle(const Duration(seconds: 2));+ await captureWindow(tester, shots, 'models-hover-$name');+ await mouse.removePointer();await tester.pumpWidget(const SizedBox());}}, skip: shots == null);diff --git a/desktop/test/super_tab_members_list_test.dart b/desktop/test/super_tab_members_list_test.dartindex a6d437e37..48614e354 100644--- a/desktop/test/super_tab_members_list_test.dart+++ b/desktop/test/super_tab_members_list_test.dart@@ -244,7 +244,7 @@ void main() {);await tester.pumpAndSettle();expect(tester.takeException(), isNull);- for (final number in ['21', '92%']) {+ for (final number in ['21', '44%']) {expect(find.text(number), findsOneWidget, reason: number);final paragraph = tester.renderObject<RenderParagraph>(find.text(number));expect(paragraph.didExceedMaxLines, isFalse, reason: number);diff --git a/desktop/test/super_tab_sidebar_models_test.dart b/desktop/test/super_tab_sidebar_models_test.dartindex a4a3d90e8..53b65434d 100644--- a/desktop/test/super_tab_sidebar_models_test.dart+++ b/desktop/test/super_tab_sidebar_models_test.dart@@ -3,14 +3,15 @@ import 'package:flutter_test/flutter_test.dart';import 'package:harness/shared/theme/app_theme.dart' as grid;import 'package:harness/super_tabs/controller.dart';import 'package:harness/super_tabs/view.dart';+import 'package:harness/widgets/engine_identity.dart';import 'support/humans_fixture.dart';import 'support/super_tab_fixture.dart';-/// Models in the left sidebar, after Machines (Dee, 2026-10-29): the models-/// whose work reviewers approved most often on first review in the week the-/// right pane shows, as a bare percentage, the counts in words on hover and-/// for a screen reader. A model needs 3 first reviews to be listed.+/// Models in the left sidebar, after Machines (Dee, 2026-10-29): each model's+/// share of the tasks of the week the right pane shows, rounded so the rows+/// add up to 100%, behind its engine's icon; the counts and its first-review+/// pass rate in words on hover and for a screen reader.void main() {Future<SuperTabController> show(WidgetTester tester,@@ -48,23 +49,32 @@ void main() {}final heading = find.byKey(const ValueKey('super-models-heading'));+ final headingText = find.descendant(+ of: heading,+ matching: find.text('Models · this week'),+ );Finder row(String name) => find.byKey(ValueKey('super-model-$name'));Finder inRow(String name, Finder finder) =>find.descendant(of: row(name), matching: finder);+ Finder mark(String name, String engine) => inRow(+ name,+ find.byWidgetPredicate((w) => w is EngineMark && w.engine == engine),+ );testWidgets(- 'lists the top three by first-review approval after Machines, as a bare percentage',+ 'lists the top three by share of the week\'s tasks after Machines',(tester) async {final controller = await show(tester, modelsSwarm());- expect(heading, findsOneWidget);+ expect(headingText, findsOneWidget);expect(tester.getTopLeft(heading).dy,greaterThan(tester.getTopLeft(find.text('Machines')).dy),);- expect(inRow('Opus 5.5', find.text('92%')), findsOneWidget);- expect(inRow('GPT-6.1 Sol', find.text('81%')), findsOneWidget);- expect(inRow('Sonnet 5.5', find.text('70%')), findsOneWidget);- // Fourth, so not shown until asked for; too few reviews, never.+ // 32 tasks: 14, 9, 6 and 3 of them, 43.75, 28.1, 18.75 and 9.4%.+ expect(inRow('Opus 5.5', find.text('44%')), findsOneWidget);+ expect(inRow('GPT-6.1 Sol', find.text('28%')), findsOneWidget);+ expect(inRow('Sonnet 5.5', find.text('19%')), findsOneWidget);+ // Fourth, so not shown until asked for; no task of its own, never.expect(row('Haiku 5.5'), findsNothing);expect(row('GPT-6.1 Luna'), findsNothing);final top = tester.getTopLeft(row('Opus 5.5')).dy;@@ -75,98 +85,244 @@ void main() {expect(find.textContaining('Opus 5.5 ·'), findsNothing);// The percentages line up at their trailing edge.expect(- tester.getTopRight(find.text('92%')).dx,- tester.getTopRight(find.text('70%')).dx,+ tester.getTopRight(find.text('44%')).dx,+ tester.getTopRight(find.text('19%')).dx,);await close(tester, controller);},);- testWidgets('says the counts in words on hover and to a screen reader', (+ testWidgets('puts its engine\'s icon before each model\'s name', (tester,) async {- final semantics = tester.ensureSemantics();final controller = await show(tester, modelsSwarm());+ for (final (name, engine) in [+ ('Opus 5.5', 'claude'),+ ('GPT-6.1 Sol', 'codex'),+ ('Sonnet 5.5', 'claude'),+ ]) {+ expect(mark(name, engine), findsOneWidget, reason: name);+ expect(+ tester.getTopRight(mark(name, engine)).dx,+ lessThan(tester.getTopLeft(inRow(name, find.text(name))).dx),+ reason: name,+ );+ }+ // In the sidebar's icon column: under the channel marks' column.expect(- find.byTooltip('11 of 12 approved on first review this week'),- findsOneWidget,- );- expect(- find.bySemanticsLabel(- 'Opus 5.5: 11 of 12 approved on first review this week',- ),- findsOneWidget,+ tester.getCenter(mark('Opus 5.5', 'claude')).dx,+ closeTo(tester.getCenter(find.text('#').first).dx, 1),);- semantics.dispose();await close(tester, controller);});+ testWidgets(+ 'says the tasks and first-review pass rate on hover and to a screen reader',+ (tester) async {+ final semantics = tester.ensureSemantics();+ final controller = await show(tester, modelsSwarm());+ const opus =+ 'Opus 5.5: 14 of 32 tasks this week · 92% passed first review';+ expect(find.byTooltip(opus), findsOneWidget);+ expect(find.bySemanticsLabel(opus), findsOneWidget);+ expect(+ find.byTooltip(+ 'GPT-6.1 Sol: 9 of 32 tasks this week · 75% passed first review',+ ),+ findsOneWidget,+ );+ semantics.dispose();+ await close(tester, controller);+ },+ );+testWidgets('shows the whole list from its heading, and back', (tester,) async {final controller = await show(tester, modelsSwarm());- await tester.tap(- find.descendant(of: heading, matching: find.text('Models')),- );+ await tester.tap(headingText);await tester.pumpAndSettle();- expect(inRow('Haiku 5.5', find.text('50%')), findsOneWidget);- expect(row('GPT-6.1 Luna'), findsNothing);- await tester.tap(- find.descendant(of: heading, matching: find.text('Models')),+ expect(inRow('Haiku 5.5', find.text('9%')), findsOneWidget);+ expect(mark('Haiku 5.5', 'claude'), findsOneWidget);+ // Not reviewed yet: says so rather than a pass rate.+ expect(+ find.byTooltip(+ 'Haiku 5.5: 3 of 32 tasks this week · no first review yet',+ ),+ findsOneWidget,);+ expect(row('GPT-6.1 Luna'), findsNothing);+ await tester.tap(headingText);await tester.pumpAndSettle();expect(row('Haiku 5.5'), findsNothing);await close(tester, controller);});+ testWidgets(+ 'adds the models behind the heading as one Other row, so the shown rows add up to 100%',+ (tester) async {+ final semantics = tester.ensureSemantics();+ final controller = await show(tester, modelsSwarm());+ final other = find.byKey(const ValueKey('super-models-other'));+ expect(other, findsOneWidget);+ // Haiku's 3 of 32 tasks, 9%: 44 + 28 + 19 + 9 = 100.+ expect(+ find.descendant(of: other, matching: find.text('Other')),+ findsOneWidget,+ );+ expect(+ find.descendant(of: other, matching: find.text('9%')),+ findsOneWidget,+ );+ final shown = [+ for (final name in ['Opus 5.5', 'GPT-6.1 Sol', 'Sonnet 5.5'])+ inRow(name, find.textContaining('%')),+ find.descendant(of: other, matching: find.textContaining('%')),+ ];+ expect(+ shown+ .map(+ (f) =>+ int.parse(tester.widget<Text>(f).data!.replaceAll('%', '')),+ )+ .fold<int>(0, (sum, percent) => sum + percent),+ 100,+ );+ const words = 'Other: 3 of 32 tasks this week · no first review yet';+ expect(find.byTooltip(words), findsOneWidget);+ expect(find.bySemanticsLabel(words), findsOneWidget);+ // The whole list names them instead.+ await tester.tap(headingText);+ await tester.pumpAndSettle();+ expect(other, findsNothing);+ expect(inRow('Haiku 5.5', find.text('9%')), findsOneWidget);+ semantics.dispose();+ await close(tester, controller);+ },+ );++ testWidgets('has no Other row when every model is shown', (tester) async {+ final server = modelsSwarm();+ server.leaderboard!['byModel'] = [+ modelScore('claude', 'claude-opus-5-5', 'high', attempts: 3),+ modelScore('codex', 'gpt-6.1-sol', null, attempts: 1),+ ];+ final controller = await show(tester, server);+ expect(find.byKey(const ValueKey('super-models-other')), findsNothing);+ expect(inRow('Opus 5.5', find.text('75%')), findsOneWidget);+ expect(inRow('GPT-6.1 Sol', find.text('25%')), findsOneWidget);+ await close(tester, controller);+ });++ testWidgets('rounds the shares so all rows add up to 100%', (tester) async {+ final server = modelsSwarm();+ // A third each: plain rounding says 33% three times, 99%.+ server.leaderboard!['byModel'] = [+ modelScore('claude', 'claude-opus-5-5', 'high', attempts: 1),+ modelScore('codex', 'gpt-6.1-sol', null, attempts: 1),+ modelScore('claude', 'claude-sonnet-5-5', 'high', attempts: 1),+ ];+ final controller = await show(tester, server);+ // Of three alike, by name.+ expect(inRow('GPT-6.1 Sol', find.text('34%')), findsOneWidget);+ expect(inRow('Opus 5.5', find.text('33%')), findsOneWidget);+ expect(inRow('Sonnet 5.5', find.text('33%')), findsOneWidget);+ expect(+ tester.getTopLeft(row('GPT-6.1 Sol')).dy,+ lessThan(tester.getTopLeft(row('Opus 5.5')).dy),+ );+ await close(tester, controller);+ });+testWidgets('follows the week the right pane shows', (tester) async {final server = modelsSwarm();final controller = await show(tester, server);server.leaderboard!['byModel'] = [- modelScore('claude', 'claude-sonnet-5-5', 'high', reviewed: 4, passed: 4),+ modelScore(+ 'claude',+ 'claude-sonnet-5-5',+ 'high',+ attempts: 4,+ reviewed: 4,+ passed: 4,+ ),];await tester.tap(find.byKey(const ValueKey('leaderboard-week')));await tester.pumpAndSettle();await tester.tap(find.text('Last week').last);await tester.pumpAndSettle();expect(server.leaderboardReads.last, contains('&week='));+ expect(+ find.descendant(of: heading, matching: find.text('Models · last week')),+ findsOneWidget,+ );expect(row('Opus 5.5'), findsNothing);expect(inRow('Sonnet 5.5', find.text('100%')), findsOneWidget);expect(- find.byTooltip('4 of 4 approved on first review last week'),+ find.byTooltip(+ 'Sonnet 5.5: 4 of 4 tasks last week · 100% passed first review',+ ),findsOneWidget,);await close(tester, controller);});testWidgets(- 'lists a model run through two engines once, its reviews together',+ 'lists a model run through two engines once, behind the engine that ran most of it',(tester) async {// Review of e4b70e9: one grid model through Claude Code and Codex drew// two rows with one key ("Duplicate keys found").final server = modelsSwarm();server.leaderboard!['byModel'] = [- modelScore('claude', 'qwen3', 'high', reviewed: 4, passed: 3),- modelScore('codex', 'qwen3', null, reviewed: 4, passed: 4),+ modelScore(+ 'claude',+ 'qwen3',+ 'high',+ attempts: 3,+ reviewed: 4,+ passed: 3,+ ),+ modelScore('codex', 'qwen3', null, attempts: 5, reviewed: 4, passed: 4),];final controller = await show(tester, server);expect(tester.takeException(), isNull);expect(row('qwen3'), findsOneWidget);- expect(inRow('qwen3', find.text('88%')), findsOneWidget);+ expect(inRow('qwen3', find.text('100%')), findsOneWidget);+ expect(mark('qwen3', 'codex'), findsOneWidget);expect(- find.byTooltip('7 of 8 approved on first review this week'),+ find.byTooltip(+ 'qwen3: 8 of 8 tasks this week · 88% passed first review',+ ),findsOneWidget,);await close(tester, controller);},);- testWidgets('hides Models when no model has three first reviews', (+ testWidgets('hides Models when no model ran a task this week', (tester,) async {final server = modelsSwarm();server.leaderboard!['byModel'] = [- modelScore('claude', 'claude-opus-5-5', 'high', reviewed: 2, passed: 2),+ modelScore('codex', 'gpt-6.1-luna', null, attempts: 0, reviews: 3),+ ];+ final controller = await show(tester, server);+ expect(heading, findsNothing);+ await close(tester, controller);+ });++ testWidgets('hides Models from a server before task counts', (tester) async {+ // Its rows carry first reviews but no tasks: no share to show.+ final server = modelsSwarm();+ server.leaderboard!['byModel'] = [+ modelScore(+ 'claude',+ 'claude-opus-5-5',+ 'high',+ attempts: null,+ reviewed: 5,+ passed: 5,+ ),];final controller = await show(tester, server);expect(heading, findsNothing);@@ -183,7 +339,7 @@ void main() {await controller.refresh();await tester.pumpAndSettle();expect(heading, findsNothing);- expect(find.text('92%'), findsNothing);+ expect(find.text('44%'), findsNothing);await close(tester, controller);});diff --git a/desktop/test/support/humans_fixture.dart b/desktop/test/support/humans_fixture.dartindex 07ae0d4a5..fa3fa9d22 100644--- a/desktop/test/support/humans_fixture.dart+++ b/desktop/test/support/humans_fixture.dart@@ -186,13 +186,17 @@ ConversationServer membersSwarm() {return server;}-/// One model's week on the board: its first reviews and how many passed.+/// One model's week on the board: the tasks it ran, its first reviews and+/// how many passed. A board from a server before task counts has no+/// `attempts` ([attempts] null).Map<String, dynamic> modelScore(String engine,String? model,String? effort, {- required int reviewed,- required int passed,+ required int? attempts,+ int reviewed = 0,+ int passed = 0,+ int reviews = 0,}) => {'engine': engine,'model': model,@@ -200,29 +204,54 @@ Map<String, dynamic> modelScore('grid': false,'points': 0,'rank': 1,+ 'attempts': ?attempts,'shipped': {'count': 0, 'medianAttemptMs': null, 'medianRequestMs': null},'firstReview': {'reviewed': reviewed, 'passed': passed},- 'reviews': 0,+ 'reviews': reviews,};-/// The week's models (Dee, 2026-10-29): Opus at two efforts, 11 of 12 together.+/// The week's models (Dee, 2026-10-29): 32 tasks, Opus at two efforts 14 of+/// them together.ConversationServer modelsSwarm([ConversationServer? base]) {final server = base ?? humansSwarm();server.leaderboard!['byModel'] = [- // One model at two efforts is one row: 11 of 12.- modelScore('claude', 'claude-opus-5-5', 'high', reviewed: 10, passed: 9),- modelScore('claude', 'claude-opus-5-5', 'xhigh', reviewed: 2, passed: 2),- modelScore('codex', 'gpt-6.1-sol', null, reviewed: 16, passed: 13),+ // One model at two efforts is one row: 14 tasks, 11 of 12 passed.+ modelScore(+ 'claude',+ 'claude-opus-5-5',+ 'high',+ attempts: 12,+ reviewed: 10,+ passed: 9,+ ),+ modelScore(+ 'claude',+ 'claude-opus-5-5',+ 'xhigh',+ attempts: 2,+ reviewed: 2,+ passed: 2,+ ),+ modelScore(+ 'codex',+ 'gpt-6.1-sol',+ null,+ attempts: 9,+ reviewed: 8,+ passed: 6,+ ),modelScore('claude','claude-sonnet-5-5','medium',- reviewed: 10,- passed: 7,+ attempts: 6,+ reviewed: 5,+ passed: 4,),- modelScore('claude', 'claude-haiku-5-5', 'low', reviewed: 4, passed: 2),- // Too few first reviews to say anything, however good.- modelScore('codex', 'gpt-6.1-luna', null, reviewed: 2, passed: 2),+ // Fourth, and no first review yet.+ modelScore('claude', 'claude-haiku-5-5', 'low', attempts: 3),+ // Only reviewed others' work: no task of its own.+ modelScore('codex', 'gpt-6.1-luna', null, attempts: 0, reviews: 5),];return server;}