diff --git a/app/notes/material-tooling-final-sweep.md b/app/notes/material-tooling-final-sweep.md new file mode 100644 index 00000000..6751dfcb --- /dev/null +++ b/app/notes/material-tooling-final-sweep.md @@ -0,0 +1,28 @@ +# Material tooling final sweep + +This sweep changed 68 tracked files in this worktree (including this note), +with 374 insertions and 744 deletions in the source/driver diff (the note is +not included in those counts). The final inventory under `app/tool` contains no Cupertino +imports/widgets, iOS target branches, `PROBE_HOST`/`PROBE_PLATFORM`/ +`PROBE_VARIANT` selectors, `material|material` selectors, or `platform=`/ +`host=` query arguments. + +The only remaining Cupertino-named arguments are these three required legacy +parameters, retained because the current library APIs still require them and +ignore them: + +- `app/tool/app_host_probe_entry.dart:21` — `cupertino: false` +- `app/tool/template_create_probe.dart:123` — `cupertino: false` +- `app/tool/templates_wiring_probe_entry.dart:16` — `cupertino: false` + +Checks: + +- `node --check`: all 48 changed `.mjs` drivers, clean. +- `tool/analyze.sh`: clean, exit 0. +- `flutter analyze` on all 19 changed Dart tool entrypoints: clean, exit 0. +- `flutter build web --target tool/search_selection_probe_entry.dart --output + build/probe-app`: passed. +- `flutter build web --target tool/artifact_gallery_probe.dart --output + build/probe-artifacts`: passed. +- No focused Flutter tests were run; this tooling-only sweep has no requested + behavioral test path. diff --git a/app/tool/app_host_probe_entry.dart b/app/tool/app_host_probe_entry.dart index 306bbb6a..dd0a47e5 100644 --- a/app/tool/app_host_probe_entry.dart +++ b/app/tool/app_host_probe_entry.dart @@ -1,13 +1,11 @@ -// The normal application composition with an explicit host, for browser -// captures of the Cupertino app (the web build is Material by design, see -// `prefersCupertino`). +// The normal application composition for browser captures. // // Build and capture (from app/): // flutter build web --target tool/app_host_probe_entry.dart \ // -o build/probe-app-host // serve it with the runs or pipelines fixture server // (`tool/runs_probe_server.mjs`, `tool/pipelines_wiring_probe_server.mjs`) -// and open `/runs?host=cupertino`; without `host=cupertino` it is Material. +// and open `/runs`. // // It connects only to the page's own origin, like the web app. import 'package:flutter/widgets.dart'; @@ -20,7 +18,7 @@ void main() { runApp( PipelinesApp( server: ServerEndpoint.resolve(base: Uri.base, web: true), - cupertino: Uri.base.queryParameters['host'] == 'cupertino', + cupertino: false, ), ); } diff --git a/app/tool/artifact_gallery_probe.dart b/app/tool/artifact_gallery_probe.dart index 66c703b7..4562a37c 100644 --- a/app/tool/artifact_gallery_probe.dart +++ b/app/tool/artifact_gallery_probe.dart @@ -8,7 +8,6 @@ // the app consumes. The recorded urls point at the probe's own loopback origin, // so the external Open action has a real target. No server or operator run is // touched. -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/core/api_gateway.dart'; import 'package:pipelines_app/features/artifacts/ui/artifact_gallery_page.dart'; @@ -272,7 +271,6 @@ JsonMap _run(String origin, String state) => { void main() { final params = Uri.base.queryParameters; - final cupertino = params['platform'] == 'cupertino'; final theme = params['theme'] == 'dark' ? Brightness.dark : Brightness.light; final origin = params['origin'] ?? 'https://artifacts.invalid'; final state = params['state'] ?? 'default'; @@ -300,28 +298,14 @@ void main() { ).copyWith(textScaler: TextScaler.linear(textScale)), child: app!, ); - if (cupertino) { - runApp( - CupertinoApp( - title: 'Artifacts probe', - theme: CupertinoThemeData(brightness: theme), - builder: (context, app) => Theme( - data: ThemeData(platform: TargetPlatform.iOS), - child: scaled(context, app), - ), - home: body, - ), - ); - } else { - runApp( - MaterialApp( - title: 'Artifacts probe', - theme: ThemeData(brightness: theme, platform: TargetPlatform.android), - builder: scaled, - home: body, - ), - ); - } + runApp( + MaterialApp( + title: 'Artifacts probe', + theme: ThemeData(brightness: theme, platform: TargetPlatform.android), + builder: scaled, + home: body, + ), + ); } class _ProbeBody extends StatefulWidget { @@ -371,12 +355,6 @@ class _ProbeBodyState extends State<_ProbeBody> { gateway: _gateway, onBack: () {}, ); - if (Theme.of(context).platform == TargetPlatform.iOS) { - return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar(middle: Text('Runs')), - child: SafeArea(child: detail), - ); - } return Scaffold( appBar: AppBar(title: const Text('Runs')), body: detail, diff --git a/app/tool/artifact_gallery_probe.mjs b/app/tool/artifact_gallery_probe.mjs index 81d95651..77236efd 100644 --- a/app/tool/artifact_gallery_probe.mjs +++ b/app/tool/artifact_gallery_probe.mjs @@ -7,7 +7,7 @@ // Serves the built fixture on an OS-assigned loopback port, drives headless // Chrome, and records the actual recorded rows, the selection dialog, the safe // external Open, the empty/unavailable states, both native hosts, dark -// Cupertino and the 320/2x states. No server or operator run is touched. +// Material and the 320/2x states. No server or operator run is touched. import { createServer } from 'node:http'; import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'; import { spawn } from 'node:child_process'; @@ -552,8 +552,8 @@ try { // In-app artifact viewer: image, text, unsupported, paging, back and HTTP // failure. The fixture serves same-origin artifact urls on this loopback // origin, so the viewer is allowed to fetch them; no browser tab may open. - const galleryView = (extra = '', platform = 'material') => - `${origin}/?view=gallery&platform=${platform}&origin=${encodeURIComponent(origin)}${extra}`; + const galleryView = (extra = '') => + `${origin}/?view=gallery&origin=${encodeURIComponent(origin)}${extra}`; const beforeViewerTargets = await targetCount(); await navigate(galleryView(), 'Artifacts'); await clickLowestPrefix('shot.png'); @@ -648,10 +648,10 @@ try { evidence.checks.push({ check: 'an external artifact opens marked, unfetched, with facts and actions', value: true }); await capture('a1w-viewer-external'); - // 320 px at 2x text on both hosts: the viewer keeps its facts, paging and + // 320 px at 2x text: the viewer keeps its facts, paging and // controls whole. - const scaledViewer = async (platform, prefix) => { - await navigate(galleryView('', platform), 'Artifacts'); + const scaledViewer = async (prefix) => { + await navigate(galleryView(), 'Artifacts'); await clickLowestPrefix('shot.png'); await delay(700); const scaledBody = await bodyText(); @@ -665,57 +665,55 @@ try { } await capture(`${prefix}-viewer`, 320, 720, 1); }; - await scaledViewer('material', 'a1w-material-2x-320'); + await scaledViewer('a1w-material-2x-320'); evidence.checks.push({ check: 'Material 2x/320 viewer keeps facts and paging', value: true }); - await scaledViewer('cupertino', 'a1w-cupertino-2x-320'); - evidence.checks.push({ check: 'Cupertino 2x/320 viewer keeps facts and paging', value: true }); - // Cupertino light: the tinted action, the native dialog and its actions. - await openGallery(`platform=cupertino&theme=light&origin=${encodeURIComponent(origin)}`); - const cupertinoBody = await bodyText(); - if (!cupertinoBody.includes('shot.png') || !cupertinoBody.includes('reviewer · visit 2')) { - throw new Error(`Cupertino gallery missing recorded rows: ${JSON.stringify(cupertinoBody)}`); + // Material light: the tinted action, the native dialog and its actions. + await openGallery(`theme=light&origin=${encodeURIComponent(origin)}`); + const materialBody = await bodyText(); + if (!materialBody.includes('shot.png') || !materialBody.includes('reviewer · visit 2')) { + throw new Error(`Material gallery missing recorded rows: ${JSON.stringify(materialBody)}`); } - evidence.checks.push({ check: 'Cupertino lists the same recorded rows', value: true }); - await capture('a1w-cupertino-gallery'); + evidence.checks.push({ check: 'Material lists the same recorded rows', value: true }); + await capture('a1w-material-gallery'); await clickLowestPrefix('result.zip'); if (!(await hasLabel('Open')) || !(await hasLabel('Copy link'))) { - throw new Error(`Cupertino selection offers no actions: ${JSON.stringify(await labels())}`); + throw new Error(`Material selection offers no actions: ${JSON.stringify(await labels())}`); } - const cupertinoSelected = await bodyText(); - if (!cupertinoSelected.includes('Artifacts · 1 recorded · partial capture')) { - throw new Error(`Cupertino selection lost its capture facts: ${JSON.stringify(cupertinoSelected)}`); + const materialSelected = await bodyText(); + if (!materialSelected.includes('Artifacts · 1 recorded · partial capture')) { + throw new Error(`Material selection lost its capture facts: ${JSON.stringify(materialSelected)}`); } - evidence.checks.push({ check: 'Cupertino selection shows the recorded facts and native actions', value: true }); - await capture('a1w-cupertino-selected'); + evidence.checks.push({ check: 'Material selection shows the recorded facts and native actions', value: true }); + await capture('a1w-material-selected'); - // Cupertino dark: the gallery and its dialog on the dark host. - await openGallery(`platform=cupertino&theme=dark&origin=${encodeURIComponent(origin)}`); - await capture('a1w-cupertino-dark-gallery'); + // Material dark: the gallery and its dialog on the dark host. + await openGallery(`theme=dark&origin=${encodeURIComponent(origin)}`); + await capture('a1w-material-dark-gallery'); await clickLowestPrefix('result.zip'); const darkLabels = await labels(); const darkTitle = darkLabels.find((label) => label.startsWith('result.zip')); const titleRect = await rectOfPrefix('result.zip'); const darkText = [await bodyText(), ...darkLabels].join('\n'); if (!darkText.includes('Artifacts · 1 recorded · partial capture')) { - throw new Error(`Dark Cupertino dialog did not render: ${JSON.stringify(darkText)}`); + throw new Error(`Dark Material dialog did not render: ${JSON.stringify(darkText)}`); } - if (!titleRect) throw new Error(`Dark Cupertino dialog title missing: ${JSON.stringify(darkLabels)}`); + if (!titleRect) throw new Error(`Dark Material dialog title missing: ${JSON.stringify(darkLabels)}`); const luminance = await brightestPixel(titleRect); if (luminance.max < 0.5) { - throw new Error(`Dark Cupertino dialog text is not light: ${JSON.stringify(luminance)}`); + throw new Error(`Dark Material dialog text is not light: ${JSON.stringify(luminance)}`); } evidence.checks.push({ - check: 'dark Cupertino dialog text is light on the popup surface', + check: 'dark Material dialog text is light on the popup surface', value: true, luminance: luminance.max, title: darkTitle, }); - await capture('a1w-cupertino-dark-selected'); + await capture('a1w-material-dark-selected'); - // 320 px at 2x text on both hosts: the recorded rows and facts stay whole. - const openScaled = async (platform, prefix) => { - await openGallery(`platform=${platform}&theme=light&scale=2&origin=${encodeURIComponent(origin)}`); + // 320 px at 2x text: the recorded rows and facts stay whole. + const openScaled = async (prefix) => { + await openGallery(`theme=light&scale=2&origin=${encodeURIComponent(origin)}`); const scaled = await bodyText(); for (const recorded of ['build.log', 'shot.png', 'reviewer · visit 1']) { if (!scaled.includes(recorded)) { @@ -734,18 +732,17 @@ try { } await capture(`${prefix}-selected`, 320, 720, 1); }; - await openScaled('material', 'a1w-material-2x-320'); + await openScaled('a1w-material-2x-320'); evidence.checks.push({ check: 'Material 2x/320 keeps the recorded rows, facts and actions', value: true }); - await openScaled('cupertino', 'a1w-cupertino-2x-320'); - evidence.checks.push({ check: 'Cupertino 2x/320 keeps the recorded rows, facts and actions', value: true }); // Turn documents: recorded input/memory/output/session.html are their own // rows per visit, absent ones carry the exact wording, markdown opens in the // renderer and the session export stays external-only even when sniffed as // text/plain. - for (const platform of ['material', 'cupertino']) { - const prefix = `a4-${platform}`; - await navigate(galleryView('&state=documents', platform), 'Artifacts'); + { + const platform = 'material'; + const prefix = 'a4-material'; + await navigate(galleryView('&state=documents'), 'Artifacts'); const documentsBody = await bodyText(); for (const fact of [ 'Turn documents', @@ -782,7 +779,7 @@ try { await clickExact('Close'); await delay(300); - await navigate(galleryView('&state=documents', platform), 'Artifacts'); + await navigate(galleryView('&state=documents'), 'Artifacts'); await clickExact('input.md'); await delay(700); const inputBody = await visibleText(); @@ -857,12 +854,12 @@ try { Array.isArray(actual) && actual.length === expected.length && actual.every((value, index) => value === expected[index]); - const fileProbe = async (platform, prefix, extra = '') => { + const fileProbe = async (prefix, extra = '') => { await send('Emulation.setDeviceMetricsOverride', { width: 390, height: 844, deviceScaleFactor: 1, mobile: true, }, session); const before = await targetCount(); - await navigate(galleryView(`&state=files${extra}`, platform), 'Artifacts'); + await navigate(galleryView(`&state=files${extra}`), 'Artifacts'); await clickExact('report.zip'); await delay(500); if (!(await hasLabel('Download')) || !(await hasLabel('Share'))) { @@ -949,9 +946,8 @@ try { }); await capture(`${prefix}-files-shared`); }; - await fileProbe('material', 'a3-material'); - await fileProbe('cupertino', 'a3-cupertino'); - await fileProbe('cupertino', 'a3-cupertino-dark', '&theme=dark'); + await fileProbe('a3-material'); + await fileProbe('a3-material-dark', '&theme=dark'); console.log(JSON.stringify(evidence, null, 2)); } finally { diff --git a/app/tool/attention_probe.dart b/app/tool/attention_probe.dart index 877ca652..0eb73e1f 100644 --- a/app/tool/attention_probe.dart +++ b/app/tool/attention_probe.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/features/attention/domain/attention_models.dart'; @@ -36,7 +35,6 @@ List _entries() => [ void main() { final params = Uri.base.queryParameters; - final cupertino = params['host'] == 'cupertino'; final scale = double.tryParse(params['scale'] ?? '') ?? 1; final empty = params['mode'] == 'empty'; final brightness = params['theme'] == 'light' @@ -46,20 +44,7 @@ void main() { data: MediaQuery.of(context).copyWith(textScaler: TextScaler.linear(scale)), child: app!, ); - final home = _ProbeHome( - cupertino: cupertino, - entries: empty ? const [] : _entries(), - ); - if (cupertino) { - runApp( - CupertinoApp( - theme: CupertinoThemeData(brightness: brightness), - builder: scaled, - home: home, - ), - ); - return; - } + final home = _ProbeHome(entries: empty ? const [] : _entries()); runApp( MaterialApp( theme: ThemeData( @@ -73,9 +58,8 @@ void main() { } class _ProbeHome extends StatefulWidget { - const _ProbeHome({required this.cupertino, required this.entries}); + const _ProbeHome({required this.entries}); - final bool cupertino; final List entries; @override @@ -121,15 +105,6 @@ class _ProbeHomeState extends State<_ProbeHome> { Text('${_entries.length} needing attention now'), ], ); - if (widget.cupertino) { - return CupertinoPageScaffold( - navigationBar: CupertinoNavigationBar( - middle: const Text('Runs'), - trailing: bell, - ), - child: SafeArea(child: body), - ); - } return Scaffold( appBar: AppBar(title: const Text('Runs'), actions: [bell]), body: SafeArea(child: body), diff --git a/app/tool/attention_probe.mjs b/app/tool/attention_probe.mjs index b2595b91..47b96d26 100644 --- a/app/tool/attention_probe.mjs +++ b/app/tool/attention_probe.mjs @@ -115,10 +115,10 @@ try { await send('Input.dispatchKeyEvent', { type: 'keyUp', ...key }, session); }; let viewport = { width: 320, height: 640 }; - const navigate = async (host, { mode = '', theme = 'dark', scale = 2, width = 320, height = 640 } = {}) => { + const navigate = async ({ mode = '', theme = 'dark', scale = 2, width = 320, height = 640 } = {}) => { viewport = { width, height }; await send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-color-scheme', value: theme }] }, session); - const query = new URLSearchParams({ host, theme, scale: String(scale) }); + const query = new URLSearchParams({ theme, scale: String(scale) }); if (mode) query.set('mode', mode); await send('Page.navigate', { url: `http://127.0.0.1:${port}/?${query}` }, session); await delay(3000); @@ -138,9 +138,10 @@ try { captures.push(name); }; - for (const host of ['material', 'cupertino']) { + { + const host = 'material'; // The hardest case: narrow, scaled text in dark. - await navigate(host); + await navigate(); requireLabels(await labels(), ['Notifications, 2 needing attention'], `${host} bell`); await record(`attention-${host}-dark-320-2x-bell.png`); @@ -191,7 +192,7 @@ try { ], `${host} closed sheet`); // Light and the default text scale on a normal phone width. - await navigate(host, { theme: 'light', scale: 1, width: 390, height: 844 }); + await navigate({ theme: 'light', scale: 1, width: 390, height: 844 }); requireLabels(await labels(), ['Notifications, 2 needing attention'], `${host} light bell`); await record(`attention-${host}-light-390-1x-bell.png`); if (!(await clickLabel('Notifications, 2 needing attention', true))) throw new Error(`${host}: light bell not clickable`); @@ -202,7 +203,7 @@ try { ], `${host} light sheet`); await record(`attention-${host}-light-390-1x-sheet.png`); - await navigate(host, { mode: 'empty' }); + await navigate({ mode: 'empty' }); const emptyBell = await labels(); requireLabels(emptyBell, ['Notifications'], `${host} empty bell`); if (emptyBell.some((label) => label.startsWith('Notifications,'))) throw new Error(`${host}: empty bell announced a count`); @@ -217,7 +218,7 @@ try { // Clear all leaves the sheet open and honest: the empty copy, no Clear all // and no row dismiss. Closing then shows a plain bell and no remaining work. - await navigate(host); + await navigate(); if (!(await clickLabel('Notifications, 2 needing attention', true))) throw new Error(`${host}: bell not clickable for Clear all`); await delay(1000); if (!(await clickScrolled('Clear all', { exact: true }))) throw new Error(`${host}: Clear all not clickable`); @@ -236,7 +237,7 @@ try { // Opening a Decision row closes the sheet and leaves the identity in place: // only answering the decision clears it. - await navigate(host); + await navigate(); if (!(await clickLabel('Notifications, 2 needing attention', true))) throw new Error(`${host}: bell not clickable for Decision row`); await delay(1000); if (!(await clickScrolled('Approve the release candidate'))) throw new Error(`${host}: Decision row not clickable`); @@ -251,7 +252,7 @@ try { // Opening a Failed row dismisses its identity before opening it, so the // bell no longer asks for a run the operator has already looked at. - await navigate(host); + await navigate(); if (!(await clickLabel('Notifications, 2 needing attention', true))) throw new Error(`${host}: bell not clickable for Failed row`); await delay(1000); if (!(await clickScrolled('Nightly audit with a label long enough'))) throw new Error(`${host}: Failed row not clickable`); diff --git a/app/tool/attention_wiring_probe.mjs b/app/tool/attention_wiring_probe.mjs index 47b22d4f..0f997af6 100644 --- a/app/tool/attention_wiring_probe.mjs +++ b/app/tool/attention_wiring_probe.mjs @@ -205,13 +205,12 @@ try { return { host, bell, sheet }; }; - const cupertino = await drive('cupertino'); const material = await drive('material', { userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', platform: 'Linux x86_64', }); const state = await (await fetch(`${fixture.url}/fixture/state`)).json(); - console.log(JSON.stringify({ captures, cupertino, material, fixture: state }, null, 2)); + console.log(JSON.stringify({ captures, material, fixture: state }, null, 2)); } finally { try { ws?.close(); } catch {} chrome.kill('SIGTERM'); diff --git a/app/tool/changes_probe.mjs b/app/tool/changes_probe.mjs index 36a44d42..6662c35e 100644 --- a/app/tool/changes_probe.mjs +++ b/app/tool/changes_probe.mjs @@ -526,7 +526,7 @@ try { await capture('d1-changes-desktop-diff', 1280, 800); await clickExact('Close diff'); - // Presentation revision: the light theme and a narrow Cupertino surface, at + // Presentation revision: the light theme and a narrow Material surface, at // 2x so glyph advance, line tints and the popup inset are inspectable. await navigate(`${origin}/?theme=light`); await capture('d1-changes-phone-light-list', 390, 844); @@ -548,34 +548,34 @@ try { await capture('d1-changes-desktop-light-diff', 1280, 800); await clickExact('Close diff'); - await navigate(`${origin}/?platform=cupertino&theme=light`); - await capture('d1-changes-cupertino-light-list', 390, 844); - // The Cupertino pager uses native buttons; paging keeps the visit heading. + await navigate(`${origin}/?theme=light`); + await capture('d1-changes-material-light-list', 390, 844); + // The Material pager uses native buttons; paging keeps the visit heading. await clickExact('Next visit'); - const cupertinoSecond = await bodyText(); + const materialSecond = await bodyText(); evidence.checks.push({ - check: 'Cupertino pages to the second visit', - page: visitPage(cupertinoSecond), - stage: visitStage(cupertinoSecond, 'reviewer'), + check: 'Material pages to the second visit', + page: visitPage(materialSecond), + stage: visitStage(materialSecond, 'reviewer'), }); - if (visitPage(cupertinoSecond) !== '2 of 5 recorded visits') { - throw new Error(`Cupertino pager did not advance: ${JSON.stringify(cupertinoSecond)}`); + if (visitPage(materialSecond) !== '2 of 5 recorded visits') { + throw new Error(`Material pager did not advance: ${JSON.stringify(materialSecond)}`); } - await capture('d1-changes-cupertino-light-page2', 390, 844); + await capture('d1-changes-material-light-page2', 390, 844); await clickExact('Previous visit'); await clickPrefix('Open diff for lib/features/changes/domain/unified_patch.dart'); - await capture('d1-changes-cupertino-light-diff', 390, 844); - await capture('d1-changes-cupertino-light-diff-2x', 390, 844, 2); + await capture('d1-changes-material-light-diff', 390, 844); + await capture('d1-changes-material-light-diff-2x', 390, 844, 2); - await navigate(`${origin}/?platform=cupertino`); - const cupertinoLabels = await labels(); - if (!cupertinoLabels.some((label) => label.includes('Changes probe'))) { - throw new Error('Cupertino fixture did not load'); + await navigate(`${origin}/`); + const materialLabels = await labels(); + if (!materialLabels.some((label) => label.includes('Changes probe'))) { + throw new Error('Material fixture did not load'); } await clickPrefix('Open diff for lib/features/changes/domain/unified_patch.dart'); - await capture('d1-changes-cupertino-diff', 1280, 800); + await capture('d1-changes-material-diff', 1280, 800); - evidence.checks.push({ check: 'Cupertino viewer opened', value: true }); + evidence.checks.push({ check: 'Material viewer opened', value: true }); evidence.checks.push({ check: 'visit capture written', value: visitFile }); console.log(JSON.stringify(evidence, null, 2)); } finally { diff --git a/app/tool/changes_probe_entry.dart b/app/tool/changes_probe_entry.dart index 1e10890c..d69c6303 100644 --- a/app/tool/changes_probe_entry.dart +++ b/app/tool/changes_probe_entry.dart @@ -6,7 +6,6 @@ // // These are server-shaped fixtures for rendering only. They are not a live run // and never mutate a server. -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/core/api_gateway.dart'; import 'package:pipelines_app/features/changes/changes.dart'; @@ -210,52 +209,26 @@ List probeVisitSteps() => [ void main() { final params = Uri.base.queryParameters; - final cupertino = params['platform'] == 'cupertino'; final brightness = params['theme'] == 'light' ? Brightness.light : Brightness.dark; final steps = params['visits'] == '1' ? probeVisitSteps() : probeSteps(); - if (cupertino) { - runApp( - CupertinoApp( - title: 'Changes probe', - theme: CupertinoThemeData(brightness: brightness), - home: _ProbeHome(cupertino: true, steps: steps), - ), - ); - } else { - runApp( - MaterialApp( - title: 'Changes probe', - theme: ThemeData( - brightness: brightness, - // Chrome on macOS reports a macOS default platform; the fixture - // states Material explicitly so both control sets are capturable. - platform: TargetPlatform.android, - ), - home: _ProbeHome(cupertino: false, steps: steps), - ), - ); - } + runApp( + MaterialApp( + title: 'Changes probe', + theme: ThemeData(brightness: brightness, platform: TargetPlatform.android), + home: _ProbeHome(steps: steps), + ), + ); } class _ProbeHome extends StatelessWidget { - const _ProbeHome({required this.cupertino, required this.steps}); - - final bool cupertino; + const _ProbeHome({required this.steps}); final List steps; @override Widget build(BuildContext context) { final viewer = ChangesViewer(steps: steps); - if (cupertino) { - return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Changes probe'), - ), - child: SafeArea(child: viewer), - ); - } return Scaffold( appBar: AppBar(title: const Text('Changes probe')), body: viewer, diff --git a/app/tool/chat_approvals_probe.mjs b/app/tool/chat_approvals_probe.mjs index 2ac80255..271ba8f9 100644 --- a/app/tool/chat_approvals_probe.mjs +++ b/app/tool/chat_approvals_probe.mjs @@ -7,7 +7,7 @@ // node tool/chat_approvals_probe.mjs \ // --root build/probe-chat-approvals-material --out DIR --style material // -// The same fixture is built with CHAT_APPROVALS_PROBE_STYLE=cupertino. The +// The same fixture is built with CHAT_APPROVALS_PROBE_STYLE=material. The // script drives the real widget/controller through Chrome DevTools semantics, // approves one permission and answers one question, and asserts the recorded // answered states plus saved captures. diff --git a/app/tool/chat_back_latency_probe.mjs b/app/tool/chat_back_latency_probe.mjs index 7ad5df57..8b9360c3 100644 --- a/app/tool/chat_back_latency_probe.mjs +++ b/app/tool/chat_back_latency_probe.mjs @@ -1,5 +1,5 @@ // Measures normal-app Back against a populated loopback chat, never operator data. -// PROBE_PLATFORM=android CPU_RATE=4 CHAT_PAIRS=100 node tool/chat_back_latency_probe.mjs +// CPU_RATE=4 CHAT_PAIRS=100 node tool/chat_back_latency_probe.mjs import assert from 'node:assert/strict'; import { mkdir, mkdtemp, writeFile } from 'node:fs/promises'; import { once } from 'node:events'; @@ -26,19 +26,13 @@ await mkdir(output, { recursive: true }); const fixture = await startFixture({ root: resolve(process.argv[2]), chatMessages: messages }); const profile = await mkdtemp(join(tmpdir(), 'chat-back-latency-')); const chrome = launchChrome('/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', profile, 'about:blank'); -const log = { pairs, width, folded, roundTrip: process.env.SCROLL_ROUNDTRIP === '1', fromList: process.env.OPEN_FROM_LIST === '1', streaming: process.env.CHAT_STREAM === '1', cpuRate: Number(process.env.CPU_RATE ?? 1), host: process.env.PROBE_PLATFORM ?? 'cupertino', checks: [], captures: [] }; + const log = { pairs, width, folded, roundTrip: process.env.SCROLL_ROUNDTRIP === '1', fromList: process.env.OPEN_FROM_LIST === '1', streaming: process.env.CHAT_STREAM === '1', cpuRate: Number(process.env.CPU_RATE ?? 1), checks: [], captures: [] }; let c; let streamTimer; const requests = new Set(); try { c = await connect((await waitForPage(await waitForPort(join(profile, 'DevToolsActivePort')))).webSocketDebuggerUrl); await c.send('Page.enable'); - if (log.host === 'android') await c.send('Emulation.setUserAgentOverride', { - userAgent: 'Mozilla/5.0 (Linux; Android 16; BrowserFixture) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Mobile Safari/537.36', platform: 'Linux armv8l', - }); - if (log.host === 'material') await c.send('Emulation.setUserAgentOverride', { - userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36', platform: 'Win32', - }); await c.send('Emulation.setDeviceMetricsOverride', { width, height: 844, deviceScaleFactor: 1, mobile: true }); await c.send('Emulation.setCPUThrottlingRate', { rate: log.cpuRate }); const opened = performance.now(); diff --git a/app/tool/chat_background_tasks_modal_probe.mjs b/app/tool/chat_background_tasks_modal_probe.mjs index a29c6e9d..2949fe53 100644 --- a/app/tool/chat_background_tasks_modal_probe.mjs +++ b/app/tool/chat_background_tasks_modal_probe.mjs @@ -8,9 +8,8 @@ import { startFixture } from './runs_probe_server.mjs'; import { launchChrome, waitForPort, waitForPage, connect, sleep } from './pipelines_probe_cdp_lib.mjs'; import { axNodes, enableSemantics, waitFor, capture, click } from './pipelines_probe_cdp_input.mjs'; -const platform = process.env.PROBE_PLATFORM ?? 'material'; const width = Number(process.env.PROBE_WIDTH ?? 1280); -const output = resolve(process.argv[3] ?? `build/background-task-modal-${platform}`); +const output = resolve(process.argv[3] ?? 'build/background-task-modal-material'); await mkdir(output, { recursive: true }); const fixture = await startFixture({ root:resolve(process.argv[2]), chatMessages: [], chatShells: [ { id:'a', status:'running', command:'tail -f fixture.log' }, @@ -19,7 +18,7 @@ const fixture = await startFixture({ root:resolve(process.argv[2]), chatMessages ], chatShellOutput: Array.from({length:200},(_,i)=>`Recorded output line ${i}`).join('\n') }); const profile = await mkdtemp(join(tmpdir(),'background-task-modal-')); const chrome = launchChrome('/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',profile,'about:blank'); -const log = {platform,width,checks:[],captures:[]}; +const log = {width,checks:[],captures:[]}; let c; const names = async () => (await axNodes(c)).flatMap(n=>[n.name?.value??'',n.value?.value??'']); const node = async name => (await axNodes(c)).find(n=>n.name?.value===name&&n.backendDOMNodeId); @@ -27,8 +26,8 @@ const emit = body => fetch(fixture.url+'/fixture/chat-event',{method:'POST',body try { c = await connect((await waitForPage(await waitForPort(join(profile,'DevToolsActivePort')))).webSocketDebuggerUrl); await c.send('Page.enable'); - if(platform==='material') await c.send('Emulation.setUserAgentOverride',{ - userAgent:'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36',platform:'Win32', + await c.send('Emulation.setUserAgentOverride',{ + userAgent:'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36', platform:'Win32', }); await c.send('Emulation.setDeviceMetricsOverride',{width,height:844,deviceScaleFactor:1,mobile:false}); await c.send('Page.navigate',{url:fixture.url+'/chat/ses_probechat'}); diff --git a/app/tool/chat_composer_probe.mjs b/app/tool/chat_composer_probe.mjs index c5988ac4..6d5a9542 100644 --- a/app/tool/chat_composer_probe.mjs +++ b/app/tool/chat_composer_probe.mjs @@ -13,17 +13,17 @@ import { tmpdir } from 'node:os'; // flutter build web -t tool/chat_composer_probe_entry.dart \ // --dart-define=CHAT_COMPOSER_PROBE_STYLE=material -o build/composer_probe_material // flutter build web -t tool/chat_composer_probe_entry.dart \ -// --dart-define=CHAT_COMPOSER_PROBE_STYLE=cupertino -o build/composer_probe_cupertino -// OPENCODE_ARTIFACT_DIR= PROBE_VARIANT=material \ +// --dart-define=CHAT_COMPOSER_PROBE_STYLE=material -o build/composer_probe_material +// OPENCODE_ARTIFACT_DIR= \ +// node tool/chat_composer_probe.mjs build/composer_probe_material +// OPENCODE_ARTIFACT_DIR= \ // node tool/chat_composer_probe.mjs build/composer_probe_material -// OPENCODE_ARTIFACT_DIR= PROBE_VARIANT=cupertino \ -// node tool/chat_composer_probe.mjs build/composer_probe_cupertino // // The fixture is served over loopback only. Flutter paints text on a canvas, so // assertions read the semantics tree (aria-label/innerText) and the focused // editing element; captures are PNGs for visual inspection. -const variant = process.env.PROBE_VARIANT ?? 'material'; +const variant = 'material'; const artifactDir = process.env.OPENCODE_ARTIFACT_DIR; if (!artifactDir) throw new Error('Set OPENCODE_ARTIFACT_DIR for the captures'); await mkdir(artifactDir, { recursive: true }); @@ -241,7 +241,7 @@ try { checks.push({ check: 'Enter inserted a newline without sending', value: multiline.value }); const usersBefore = (await labels()).filter(label => label === 'User message').length; - await pressEnter(variant === 'cupertino' ? 4 : 2); + await pressEnter(variant === 'material' ? 4 : 2); await waitFor(async () => (await semanticText()).includes('Stop'), 'Stop after send'); const usersAfter = (await labels()).filter(label => label === 'User message').length; if (usersAfter <= usersBefore) { @@ -259,7 +259,7 @@ try { await type('Queued follow-up'); const queuedDraft = await editingValue(); if (process.env.PROBE_DEBUG) console.log('queued draft', JSON.stringify(queuedDraft)); - await pressEnter(variant === 'cupertino' ? 4 : 2); + await pressEnter(variant === 'material' ? 4 : 2); await delay(900); const queuedCapture = await capture('composer-queued'); const queuedRead = await ocr(queuedCapture); @@ -276,7 +276,7 @@ try { await focusField(); await type('refuse me'); - await pressEnter(variant === 'cupertino' ? 4 : 2); + await pressEnter(variant === 'material' ? 4 : 2); await waitFor( async () => (await semanticText()).includes('The fixture refused this prompt.'), 'the refusal line', diff --git a/app/tool/chat_list_detail_probe.mjs b/app/tool/chat_list_detail_probe.mjs index 1db20a18..05694079 100644 --- a/app/tool/chat_list_detail_probe.mjs +++ b/app/tool/chat_list_detail_probe.mjs @@ -11,7 +11,7 @@ import { axNodes, enableSemantics, waitFor, capture } from './pipelines_probe_cd const width = Number(process.env.PROBE_WIDTH ?? 1280); const height = Number(process.env.PROBE_HEIGHT ?? 800); -const platform = process.env.PROBE_PLATFORM ?? 'cupertino'; +const platform = 'material'; const dark = process.env.PROBE_DARK === '1'; const messages = Array.from({ length: 6 }, (_, i) => ({ id: `m${i}`, diff --git a/app/tool/chat_markdown_probe.mjs b/app/tool/chat_markdown_probe.mjs index d3e294cc..db2e30aa 100644 --- a/app/tool/chat_markdown_probe.mjs +++ b/app/tool/chat_markdown_probe.mjs @@ -7,7 +7,7 @@ // node tool/chat_markdown_probe.mjs --root build/probe-chat-markdown-material \ // --out DIR --style material // -// The Cupertino host is the same build with CHAT_MARKDOWN_PROBE_STYLE=cupertino. +// The Material host is the same build with CHAT_MARKDOWN_PROBE_STYLE=material. // Flutter web paints SelectableText on the canvas, so OCR checks the rendered // prose while the semantics tree checks headings and the dark host. import { createServer } from 'node:http'; diff --git a/app/tool/chat_markdown_wire_probe.mjs b/app/tool/chat_markdown_wire_probe.mjs index 79f7c282..5c6612a5 100644 --- a/app/tool/chat_markdown_wire_probe.mjs +++ b/app/tool/chat_markdown_wire_probe.mjs @@ -8,7 +8,7 @@ // --root build/probe-chat-markdown-wire-material \ // --out DIR --style material // -// The Cupertino host is the same fixture built with the cupertino define. +// The Material host is the same fixture built with the material define. // Requires Google Chrome and Tesseract: Flutter web paints text on the canvas, // so OCR confirms the rendered answer while the semantics tree confirms the // heading and the row structure. diff --git a/app/tool/chat_message_probe.mjs b/app/tool/chat_message_probe.mjs index cd3be616..e08fd652 100644 --- a/app/tool/chat_message_probe.mjs +++ b/app/tool/chat_message_probe.mjs @@ -7,7 +7,7 @@ // node tool/chat_message_probe.mjs --root build/probe-chat-message-material \ // --out DIR --style material // -// The Cupertino host is the same build with CHAT_MESSAGE_PROBE_STYLE=cupertino. +// The Material host is the same build with CHAT_MESSAGE_PROBE_STYLE=material. // Requires Google Chrome and Tesseract: Flutter web paints selectable text on // the canvas, so OCR checks the rendered body and its leading edge while the // semantics tree checks the controls and the expanded state. @@ -334,7 +334,7 @@ try { for (const text of [ 'Please keep every word of this prompt', 'plan.md', - // `report.csv` covers both hosts; Cupertino's small paperclip glyph makes + // `report.csv` covers both hosts; Material's small paperclip glyph makes // OCR drop the leading `r`, so the suffix is the stable part. 'eport.csv', 'checked the transcript and kept the original order.', diff --git a/app/tool/chat_mode_probe.mjs b/app/tool/chat_mode_probe.mjs index c8ba6028..20c7fe04 100644 --- a/app/tool/chat_mode_probe.mjs +++ b/app/tool/chat_mode_probe.mjs @@ -1,6 +1,6 @@ // Switches an open chat's permission mode in a real browser against a loopback // fixture, never operator data. -// PROBE_WIDTH=1280 PROBE_HOST=material|cupertino node tool/chat_mode_probe.mjs +// PROBE_WIDTH=1280 node tool/chat_mode_probe.mjs import assert from 'node:assert/strict'; import { mkdir, mkdtemp, writeFile } from 'node:fs/promises'; import { once } from 'node:events'; @@ -11,7 +11,7 @@ import { launchChrome, waitForPort, waitForPage, connect, sleep } from './pipeli import { axNodes, enableSemantics, waitFor, capture } from './pipelines_probe_cdp_input.mjs'; const width = Number(process.env.PROBE_WIDTH ?? 1280); -const host = process.env.PROBE_HOST ?? 'material'; +const host = 'material'; const output = resolve(process.argv[3] ?? 'build/chat-mode-probe'); await mkdir(output, { recursive: true }); const messages = [ @@ -39,7 +39,7 @@ const first = async (pattern, what) => { try { c = await connect((await waitForPage(await waitForPort(join(profile, 'DevToolsActivePort')))).webSocketDebuggerUrl); await c.send('Page.enable'); - if (host === 'cupertino') { + if (host === 'material') { await c.send('Emulation.setUserAgentOverride', { userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.0 Safari/605.1.15', platform: 'MacIntel', }); diff --git a/app/tool/chat_reopen_probe.mjs b/app/tool/chat_reopen_probe.mjs index 37abe1b1..3c001a93 100644 --- a/app/tool/chat_reopen_probe.mjs +++ b/app/tool/chat_reopen_probe.mjs @@ -34,7 +34,7 @@ const fixture = await startFixture({ }); const profile = await mkdtemp(join(tmpdir(), 'chat-reopen-')); const chrome = launchChrome('/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', profile, 'about:blank'); -const log = { pairs, width, historyDelayMs, cpuRate: Number(process.env.CPU_RATE ?? 1), host: process.env.PROBE_PLATFORM ?? 'cupertino', visits: [], checks: [], captures: [] }; +const log = { pairs, width, historyDelayMs, cpuRate: Number(process.env.CPU_RATE ?? 1), visits: [], checks: [], captures: [] }; let c; // Transcript text is in the semantics DOM once the view has painted it; the @@ -56,9 +56,6 @@ async function tapNode(node) { try { c = await connect((await waitForPage(await waitForPort(join(profile, 'DevToolsActivePort')))).webSocketDebuggerUrl); await c.send('Page.enable'); - if (log.host === 'android') await c.send('Emulation.setUserAgentOverride', { - userAgent: 'Mozilla/5.0 (Linux; Android 16; BrowserFixture) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Mobile Safari/537.36', platform: 'Linux armv8l', - }); await c.send('Emulation.setDeviceMetricsOverride', { width, height: 844, deviceScaleFactor: 1, mobile: true }); await c.send('Emulation.setCPUThrottlingRate', { rate: log.cpuRate }); await c.send('Page.navigate', { url: fixture.url + '/chat' }); diff --git a/app/tool/chat_response_pending_probe.mjs b/app/tool/chat_response_pending_probe.mjs index cf18c725..ed800eac 100644 --- a/app/tool/chat_response_pending_probe.mjs +++ b/app/tool/chat_response_pending_probe.mjs @@ -8,7 +8,7 @@ import { startFixture } from './runs_probe_server.mjs'; import { launchChrome, waitForPort, waitForPage, connect, sleep } from './pipelines_probe_cdp_lib.mjs'; import { axNodes, enableSemantics, waitFor, capture, click, clickAt } from './pipelines_probe_cdp_input.mjs'; -const platform = process.env.PROBE_PLATFORM ?? 'material'; +const platform = 'material'; const enterSends = process.env.PROBE_ENTER === '1'; const output = resolve(process.argv[3] ?? `build/chat-response-pending-${platform}`); await mkdir(output, { recursive: true }); diff --git a/app/tool/chat_sessions_probe.mjs b/app/tool/chat_sessions_probe.mjs index 6d23dd69..9455ade8 100644 --- a/app/tool/chat_sessions_probe.mjs +++ b/app/tool/chat_sessions_probe.mjs @@ -12,14 +12,14 @@ import { mkdir, mkdtemp, rm } from 'node:fs/promises'; // Usage (from app/): // flutter build web -t tool/chat_sessions_probe_entry.dart \ // --dart-define=CHAT_PROBE_STYLE=material -o build/chat-list-material -// PROBE_WEB_ROOT=$PWD/build/chat-list-material PROBE_VARIANT=material \ +// PROBE_WEB_ROOT=$PWD/build/chat-list-material \ // OPENCODE_ARTIFACT_DIR= node tool/chat_sessions_probe.mjs // // The fixture answers the app's real protocol in-process: accepted create, // rename, star and close calls change the list the next chat_sessions read // returns, and the title `Refused title` is refused with the server's words. const root = resolve(process.env.PROBE_WEB_ROOT ?? join(process.cwd(), 'build/web')); -const variant = process.env.PROBE_VARIANT ?? 'material'; +const variant = 'material'; const artifactDir = process.env.OPENCODE_ARTIFACT_DIR ?? join(tmpdir(), 'chat-sessions-capture'); await mkdir(artifactDir, { recursive: true }); const mime = { '.html': 'text/html', '.js': 'text/javascript', '.json': 'application/json', '.wasm': 'application/wasm', '.png': 'image/png', '.ico': 'image/x-icon' }; @@ -181,7 +181,7 @@ try { await delay(600); if (!(await visibleText()).includes('Open fixture')) { // Flutter web's semantics DOM swallows the coordinate hit for this - // Cupertino button; activate the same rendered node through its semantics + // Material button; activate the same rendered node through its semantics // action instead of pretending the Undo happened. const activated = await evaluate(`(() => { const e = [...document.querySelectorAll('flt-semantics')].find(x => (x.getAttribute('aria-label') || x.innerText || '') === 'Undo'); e?.click(); return !!e; })()`); if (!activated) throw new Error('Could not activate Undo'); @@ -307,7 +307,7 @@ try { await click('Cancel', 'Cancel after the refusal'); // A refused row action keeps the server's whole reason under its own row on - // both hosts — never one ellipsised line inside a Cupertino subtitle. + // both hosts — never one ellipsised line inside a Material subtitle. await clickFirst('Chat actions for Closed fixture'); await click('Reopen', 'Reopen on the closed fixture'); await waitText('the chat is locked by another operator', 'the row refusal'); diff --git a/app/tool/chat_stable_activity_probe.mjs b/app/tool/chat_stable_activity_probe.mjs index 0bb0a961..3612559d 100644 --- a/app/tool/chat_stable_activity_probe.mjs +++ b/app/tool/chat_stable_activity_probe.mjs @@ -8,7 +8,7 @@ import { startFixture } from './runs_probe_server.mjs'; import { launchChrome, waitForPort, waitForPage, connect, sleep } from './pipelines_probe_cdp_lib.mjs'; import { axNodes, enableSemantics, waitFor, capture, click, clickAt } from './pipelines_probe_cdp_input.mjs'; -const platform = process.env.PROBE_PLATFORM ?? 'material'; +const platform = 'material'; const width = Number(process.env.PROBE_WIDTH ?? 1280); const output = resolve(process.argv[3] ?? `build/stable-activity-${platform}`); await mkdir(output, { recursive: true }); diff --git a/app/tool/chat_stage_debug_probe.mjs b/app/tool/chat_stage_debug_probe.mjs index 77432ccb..c3efabb0 100644 --- a/app/tool/chat_stage_debug_probe.mjs +++ b/app/tool/chat_stage_debug_probe.mjs @@ -49,7 +49,7 @@ try { if (process.env.CHECK_STOP_ROTATION === '1') { await connection.send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-reduced-motion', value: 'no-preference' }] }); } - if (process.env.PROBE_PLATFORM === 'material') { + { await connection.send('Emulation.setUserAgentOverride', { userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/155.0.0.0 Safari/537.36', platform: 'Win32', @@ -144,7 +144,7 @@ try { const [x1, y1, , , x3, y3] = model.content; await clickAt(connection, (x1 + x3) / 2, (y1 + y3) / 2); await connection.send('Input.insertText', { text: 'A follow-up while you work' }); - // The empty Cupertino hint is two lines; typing shrinks the field to one. + // The empty Material hint is two lines; typing shrinks the field to one. // Wait for that layout before taking the Send control's bounds. await sleep(300); await click('Send'); diff --git a/app/tool/chat_wire_probe.mjs b/app/tool/chat_wire_probe.mjs index 6d3b6013..e2d41e06 100644 --- a/app/tool/chat_wire_probe.mjs +++ b/app/tool/chat_wire_probe.mjs @@ -7,7 +7,7 @@ // node tool/chat_wire_probe.mjs --root build/probe-chat-wire-material \ // --out DIR --style material // -// The Cupertino host is the same fixture built with CHAT_WIRE_PROBE_STYLE=cupertino. +// The Material host is the same fixture built with CHAT_WIRE_PROBE_STYLE=material. // Requires Google Chrome and Tesseract: Flutter web paints selectable text on // the canvas, so OCR confirms the actual message body, not just nav labels. import { createServer } from 'node:http'; @@ -396,7 +396,7 @@ try { // Repro A: the same action while the server still reports `has_more`, so the // paging control remains in the indexed list. - await click(style === 'cupertino' ? 'Back' : 'Back to chats'); + await click(style === 'material' ? 'Back' : 'Back to chats'); await waitFor( async () => hasText('Probe paging session'), 'list after Back', @@ -456,7 +456,7 @@ try { keepsControl: false, }, ]) { - await click(style === 'cupertino' ? 'Back' : 'Back to chats'); + await click(style === 'material' ? 'Back' : 'Back to chats'); await waitFor( async () => hasText(fold.title), `list before ${fold.tag}`, diff --git a/app/tool/diff_wiring_probe.dart b/app/tool/diff_wiring_probe.dart index 9045866b..994dcd6d 100644 --- a/app/tool/diff_wiring_probe.dart +++ b/app/tool/diff_wiring_probe.dart @@ -6,7 +6,6 @@ // // Server-shaped fixtures only: a fake gateway answers the same get_run envelope // the app consumes. No server or operator run is touched. -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/core/api_gateway.dart'; import 'package:pipelines_app/features/runs/data/runs_repository.dart'; @@ -84,7 +83,6 @@ JsonMap _run({ void main() { final params = Uri.base.queryParameters; - final cupertino = params['platform'] == 'cupertino'; final stepsUnavailable = params['capture'] == 'unavailable'; final status = params['run'] == 'failed' ? 'failed' @@ -107,28 +105,14 @@ void main() { ).copyWith(textScaler: TextScaler.linear(textScale)), child: app!, ); - if (cupertino) { - runApp( - CupertinoApp( - title: 'Run changes probe', - theme: CupertinoThemeData(brightness: theme), - builder: (context, app) => Theme( - data: ThemeData(platform: TargetPlatform.iOS), - child: scaled(context, app), - ), - home: body, - ), - ); - } else { - runApp( - MaterialApp( - title: 'Run changes probe', - theme: ThemeData(brightness: theme, platform: TargetPlatform.android), - builder: scaled, - home: body, - ), - ); - } + runApp( + MaterialApp( + title: 'Run changes probe', + theme: ThemeData(brightness: theme, platform: TargetPlatform.android), + builder: scaled, + home: body, + ), + ); } class _ProbeBody extends StatefulWidget { @@ -177,12 +161,6 @@ class _ProbeBodyState extends State<_ProbeBody> { gateway: _gateway, onBack: () {}, ); - if (Theme.of(context).platform == TargetPlatform.iOS) { - return CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar(middle: Text('Runs')), - child: SafeArea(child: detail), - ); - } return Scaffold( appBar: AppBar(title: const Text('Runs')), body: detail, diff --git a/app/tool/diff_wiring_probe.mjs b/app/tool/diff_wiring_probe.mjs index d7764d0b..7722ef96 100644 --- a/app/tool/diff_wiring_probe.mjs +++ b/app/tool/diff_wiring_probe.mjs @@ -7,7 +7,7 @@ // The fixture serves the actual RunDetailView over a fake gateway, then drives // headless Chrome over loopback: the native Changes button, the recorded file, // its diff, Close diff, Back, the failed-run evidence without a run-wide -// summary, the absent action while executing, and the Cupertino raw/dark +// summary, the absent action while executing, and the Material raw/dark // surfaces. No server or operator run is touched. import { createServer } from 'node:http'; import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'; @@ -322,57 +322,57 @@ try { evidence.checks.push({ check: 'an executing run offers no snapshot Changes page', value: true }); await capture('d1-wire-material-running'); - await navigate(`${origin}/?platform=cupertino&theme=light`); + await navigate(`${origin}/?theme=light`); if (!(await hasLabel('Changes'))) { - throw new Error(`Cupertino run detail has no Changes action: ${JSON.stringify(await labels())}`); + throw new Error(`Material run detail has no Changes action: ${JSON.stringify(await labels())}`); } - await capture('d1-wire-cupertino-detail'); + await capture('d1-wire-material-detail'); await clickExact('Changes'); - const cupertinoChanges = await bodyText(); - if (!cupertinoChanges.includes(file)) { - throw new Error(`Cupertino Changes did not open the recorded file: ${JSON.stringify(cupertinoChanges)}`); + const materialChanges = await bodyText(); + if (!materialChanges.includes(file)) { + throw new Error(`Material Changes did not open the recorded file: ${JSON.stringify(materialChanges)}`); } - evidence.checks.push({ check: 'Cupertino Changes opened the recorded file', value: true }); - await capture('d1-wire-cupertino-changes'); + evidence.checks.push({ check: 'Material Changes opened the recorded file', value: true }); + await capture('d1-wire-material-changes'); await clickPrefix(rowPrefix); if (!(await bodyText()).includes('const recorded = true;')) { - throw new Error('Cupertino recorded diff missing'); + throw new Error('Material recorded diff missing'); } - await capture('d1-wire-cupertino-diff'); + await capture('d1-wire-material-diff'); await clickExact('Raw patch'); const rawLabels = await labels(); const rawBody = await bodyText(); if (!rawLabels.some((label) => label.includes('Raw patch for')) && !rawBody.includes('const recorded = true;')) { - throw new Error(`Cupertino raw patch did not render: ${JSON.stringify(rawLabels)}`); + throw new Error(`Material raw patch did not render: ${JSON.stringify(rawLabels)}`); } if (!(await hasLabel('Copy patch'))) { - throw new Error(`Cupertino raw view lost its actions: ${JSON.stringify(await labels())}`); + throw new Error(`Material raw view lost its actions: ${JSON.stringify(await labels())}`); } - evidence.checks.push({ check: 'Cupertino Raw patch uses a native selectable body', value: true }); - await capture('d1-wire-cupertino-raw'); + evidence.checks.push({ check: 'Material Raw patch uses a native selectable body', value: true }); + await capture('d1-wire-material-raw'); await clickExact('Close diff'); await delay(600); await clickExact('Back'); await delay(800); if (!(await bodyText()).includes('Changes wiring probe')) { - throw new Error('Cupertino Back did not return to the run detail'); + throw new Error('Material Back did not return to the run detail'); } - evidence.checks.push({ check: 'Cupertino diff and Back returned', value: true }); - await capture('d1-wire-cupertino-back'); + evidence.checks.push({ check: 'Material diff and Back returned', value: true }); + await capture('d1-wire-material-back'); - await navigate(`${origin}/?platform=cupertino&theme=dark`); + await navigate(`${origin}/?theme=dark`); await clickExact('Changes'); const darkText = [await bodyText(), ...(await labels())].join('\n'); if (!darkText.includes(file) || !darkText.includes('file changed')) { - throw new Error(`Cupertino dark Changes did not render: ${JSON.stringify(darkText)}`); + throw new Error(`Material dark Changes did not render: ${JSON.stringify(darkText)}`); } - evidence.checks.push({ check: 'Cupertino dark Changes renders the recorded summary', value: true }); - await capture('d1-wire-cupertino-dark-changes'); + evidence.checks.push({ check: 'Material dark Changes renders the recorded summary', value: true }); + await capture('d1-wire-material-dark-changes'); await clickPrefix(rowPrefix); if (!(await bodyText()).includes('const recorded = true;')) { - throw new Error('Cupertino dark recorded diff missing'); + throw new Error('Material dark recorded diff missing'); } // The header is a merged semantics label, so anchor the pixel crop on the // controls below it: the form control and the title share the 16 px inset, @@ -389,15 +389,15 @@ try { height: 22, }); if (titleLuminance.max < 0.5) { - throw new Error(`Dark Cupertino diff header is not light: ${JSON.stringify(titleLuminance)}`); + throw new Error(`Dark Material diff header is not light: ${JSON.stringify(titleLuminance)}`); } evidence.checks.push({ - check: 'Cupertino dark diff header text is light on the popup surface', + check: 'Material dark diff header text is light on the popup surface', value: true, luminance: titleLuminance.max, }); - evidence.checks.push({ check: 'Cupertino dark diff renders its recorded lines', value: true }); - await capture('d1-wire-cupertino-dark-diff'); + evidence.checks.push({ check: 'Material dark diff renders its recorded lines', value: true }); + await capture('d1-wire-material-dark-diff'); // A 320-px host at 2x text is the narrowest documented state. The native // controls must keep the whole browser words; the strip scrolls and reveals @@ -408,14 +408,11 @@ try { }, session); await delay(400); }; - const openScaledDiff = async ({ platform, prefix }) => { + const openScaledDiff = async ({ prefix }) => { await send('Emulation.setDeviceMetricsOverride', { width: 320, height: 720, deviceScaleFactor: 1, mobile: true, }, session); - const query = platform === 'cupertino' - ? '?platform=cupertino&theme=light&scale=2' - : '?theme=light&scale=2'; - await navigate(`${origin}/${query}`); + await navigate(`${origin}/?theme=light&scale=2`); await clickExact('Changes'); // The 2x summary pushes the recorded file below the fold: scroll the // Changes list until its row is built and offered. @@ -440,7 +437,7 @@ try { // The native menu carries both fixed words on a host too narrow for the // segmented control; the sheet/list must show each of them whole. A real - // pointer tap is used because the Cupertino label sits on a semantic + // pointer tap is used because the Material label sits on a semantic // wrapper above the actual button. const menuRect = await rectOfLabel('Diff form'); if (!menuRect) { @@ -477,16 +474,11 @@ try { await delay(600); }; - await openScaledDiff({ platform: 'material', prefix: 'd1-wire-material-2x-320' }); + await openScaledDiff({ prefix: 'd1-wire-material-2x-320' }); evidence.checks.push({ check: 'Material 2x/320 diff keeps its controls and opens Raw patch', value: true, }); - await openScaledDiff({ platform: 'cupertino', prefix: 'd1-wire-cupertino-2x-320' }); - evidence.checks.push({ - check: 'Cupertino 2x/320 diff keeps its controls and opens Raw patch', - value: true, - }); console.log(JSON.stringify(evidence, null, 2)); } finally { diff --git a/app/tool/floating_tabs_probe_entry.dart b/app/tool/floating_tabs_probe_entry.dart index d47b57be..422ab975 100644 --- a/app/tool/floating_tabs_probe_entry.dart +++ b/app/tool/floating_tabs_probe_entry.dart @@ -6,12 +6,11 @@ // python3 -I -m http.server 0 --bind 127.0.0.1 \ // --directory build/probe-floating-tabs // Chrome --headless=new --window-size=W,H --screenshot=OUT \ -// 'http://127.0.0.1:PORT/?platform=cupertino&theme=dark' +// 'http://127.0.0.1:PORT/?theme=dark' // -// Query: platform=cupertino (else Material), theme=dark, tab=runs|chat|... +// Query: theme=dark, tab=runs|chat|... // The destinations are long local lists, so the capture shows content passing // behind the bar and the last row clearing it. No server is involved. -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/shell/adaptive_shell.dart'; import 'package:pipelines_app/shell/destination.dart'; @@ -19,25 +18,22 @@ import 'package:pipelines_app/shell/shell_bar.dart'; void main() { final params = Uri.base.queryParameters; - final cupertino = params['platform'] == 'cupertino'; final dark = params['theme'] == 'dark'; final tab = AppDestination.values.firstWhere( (value) => value.name == params['tab'], orElse: () => AppDestination.pipelines, ); final end = params['end'] == '1'; - runApp(_Probe(cupertino: cupertino, dark: dark, tab: tab, end: end)); + runApp(_Probe(dark: dark, tab: tab, end: end)); } class _Probe extends StatelessWidget { const _Probe({ - required this.cupertino, required this.dark, required this.tab, required this.end, }); - final bool cupertino; final bool dark; final AppDestination tab; @@ -45,12 +41,11 @@ class _Probe extends StatelessWidget { final bool end; Widget _list(String noun, {required int count}) => - _ProbeList(noun: noun, count: count, cupertino: cupertino, end: end); + _ProbeList(noun: noun, count: count, end: end); @override Widget build(BuildContext context) { final shell = AdaptiveShell( - cupertino: cupertino, destination: tab, attentionCount: 3, destinationBodies: { @@ -67,15 +62,6 @@ class _Probe extends StatelessWidget { ), }, ); - if (cupertino) { - return CupertinoApp( - debugShowCheckedModeBanner: false, - theme: CupertinoThemeData( - brightness: dark ? Brightness.dark : Brightness.light, - ), - home: shell, - ); - } return MaterialApp( debugShowCheckedModeBanner: false, theme: ThemeData( @@ -91,13 +77,11 @@ class _ProbeList extends StatefulWidget { const _ProbeList({ required this.noun, required this.count, - required this.cupertino, required this.end, }); final String noun; final int count; - final bool cupertino; final bool end; @override @@ -137,13 +121,6 @@ class _ProbeListState extends State<_ProbeList> { final subtitle = index.isEven ? 'Succeeded · 2m 05s' : 'Running · started 1m ago'; - if (widget.cupertino) { - return CupertinoListTile( - leading: const Icon(CupertinoIcons.circle_fill, size: 12), - title: Text(title), - subtitle: Text(subtitle), - ); - } return ListTile( leading: Icon( index.isEven ? Icons.check_circle_outline : Icons.timelapse, diff --git a/app/tool/graph_canvas_probe.mjs b/app/tool/graph_canvas_probe.mjs index e23137ed..4977d6a3 100644 --- a/app/tool/graph_canvas_probe.mjs +++ b/app/tool/graph_canvas_probe.mjs @@ -5,7 +5,7 @@ // native node/label semantics, selection identity, measured node rectangles and // that a real drag pans the stock InteractiveViewer, then writes captures. // -// PROBE_VARIANT=material|cupertino PROBE_SCHEME=dark|light PROBE_SCALE=1|2 \ +// PROBE_SCHEME=dark|light PROBE_SCALE=1|2 \ // PROBE_WEB_ROOT= OPENCODE_ARTIFACT_DIR= \ // node tool/graph_canvas_probe.mjs import { createServer } from 'node:http'; @@ -17,7 +17,7 @@ import { tmpdir } from 'node:os'; import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'; const root = resolve(process.env.PROBE_WEB_ROOT ?? join(process.cwd(), 'build/graph_canvas_probe')); -const variant = process.env.PROBE_VARIANT ?? 'material'; +const variant = 'material'; const scheme = process.env.PROBE_SCHEME ?? 'dark'; const scale = process.env.PROBE_SCALE ?? '1'; const artifactDir = process.env.OPENCODE_ARTIFACT_DIR ?? join(tmpdir(), 'graph-canvas-capture'); diff --git a/app/tool/graph_node_probe.mjs b/app/tool/graph_node_probe.mjs index f5145df8..913c5730 100644 --- a/app/tool/graph_node_probe.mjs +++ b/app/tool/graph_node_probe.mjs @@ -4,7 +4,7 @@ // an OS-assigned loopback port, drives a real headless Chrome, asserts labels, // selection identity and the selected ARIA state, and writes captures. // -// PROBE_VARIANT=material|cupertino PROBE_SCHEME=dark|light \ +// PROBE_SCHEME=dark|light \ // OPENCODE_ARTIFACT_DIR= node tool/graph_node_probe.mjs import { createServer } from 'node:http'; import { spawn } from 'node:child_process'; @@ -15,7 +15,7 @@ import { tmpdir } from 'node:os'; import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'; const root = resolve(process.env.PROBE_WEB_ROOT ?? join(process.cwd(), 'build/web')); -const variant = process.env.PROBE_VARIANT ?? 'material'; +const variant = 'material'; const scheme = process.env.PROBE_SCHEME ?? 'dark'; const artifactDir = process.env.OPENCODE_ARTIFACT_DIR ?? join(tmpdir(), 'graph-node-capture'); const prefix = scheme === 'light' ? 'light-' : ''; diff --git a/app/tool/graph_zoom_probe.dart b/app/tool/graph_zoom_probe.dart index 231c2004..19cc8c0b 100644 --- a/app/tool/graph_zoom_probe.dart +++ b/app/tool/graph_zoom_probe.dart @@ -3,7 +3,7 @@ // Build and probe (from app/): // flutter build web -t tool/graph_zoom_probe.dart \ // --output build/probe-graph-zoom -// PROBE_VARIANT=material OPENCODE_ARTIFACT_DIR=DIR node tool/graph_zoom_probe.mjs +// OPENCODE_ARTIFACT_DIR=DIR node tool/graph_zoom_probe.mjs // // Server-shaped fixtures only; no server, run or operator session is touched. import 'package:flutter/material.dart'; diff --git a/app/tool/graph_zoom_probe.mjs b/app/tool/graph_zoom_probe.mjs index 07eebb62..71488f65 100644 --- a/app/tool/graph_zoom_probe.mjs +++ b/app/tool/graph_zoom_probe.mjs @@ -6,7 +6,7 @@ // wheel zooms, Fit restores the fitted scale, Expand opens the same canvas with // the selected node, and Close returns to the previous place and selection. // -// PROBE_VARIANT=material|cupertino PROBE_VIEW=pipeline|run \ +// PROBE_VIEW=pipeline|run \ // PROBE_SCHEME=dark|light PROBE_SCALE=1|2 PROBE_WIDTH=1280 PROBE_HEIGHT=800 \ // PROBE_WEB_ROOT= OPENCODE_ARTIFACT_DIR= \ // node tool/graph_zoom_probe.mjs @@ -21,7 +21,7 @@ import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'; const root = resolve( process.env.PROBE_WEB_ROOT ?? join(process.cwd(), 'build/probe-graph-zoom'), ); -const variant = process.env.PROBE_VARIANT ?? 'material'; +const variant = 'material'; const view = process.env.PROBE_VIEW ?? 'pipeline'; const scheme = process.env.PROBE_SCHEME ?? 'dark'; const scale = process.env.PROBE_SCALE ?? '1'; @@ -303,7 +303,7 @@ try { // Fit restores the fitted scale. This activation goes through the control's // semantics element, so a labelled button with no tap action fails here (the - // Cupertino regression). + // Material regression). await semanticsClick('Fit graph to view'); const fitted = await rectOf('build'); if (!fitted || Math.abs(fitted.width - initial.width) > initial.width * 0.03) { diff --git a/app/tool/list_detail_consistency_probe.mjs b/app/tool/list_detail_consistency_probe.mjs index 35f79777..f57e8fae 100644 --- a/app/tool/list_detail_consistency_probe.mjs +++ b/app/tool/list_detail_consistency_probe.mjs @@ -9,7 +9,7 @@ import { startWiringFixture } from './pipelines_wiring_probe_server.mjs'; import { launchChrome, waitForPort, waitForPage, connect, sleep } from './pipelines_probe_cdp_lib.mjs'; import { axNodes, enableSemantics, waitFor, capture, clickAt } from './pipelines_probe_cdp_input.mjs'; -const platform = process.env.PROBE_PLATFORM ?? 'material'; +const platform = 'material'; const width = Number(process.env.PROBE_WIDTH ?? 1280); const dark = process.env.PROBE_DARK === '1'; const output = resolve(process.argv[3] ?? `build/list-detail-${platform}`); diff --git a/app/tool/notification_probe.dart b/app/tool/notification_probe.dart index ff88ccb2..f229ce1b 100644 --- a/app/tool/notification_probe.dart +++ b/app/tool/notification_probe.dart @@ -1,7 +1,6 @@ import 'dart:js_interop'; import 'dart:js_interop_unsafe'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/features/attention/domain/attention_models.dart'; @@ -26,7 +25,6 @@ import 'package:pipelines_app/features/attention/ui/notification_permission_tile void main() { final params = Uri.base.queryParameters; final mode = params['mode'] ?? 'transition'; - final cupertino = params['host'] == 'cupertino'; final scale = double.tryParse(params['scale'] ?? '') ?? 1; final brightness = params['theme'] == 'light' ? Brightness.light @@ -40,16 +38,6 @@ void main() { 'tile' => _SingleTile(state: _stateOf(params['state'])), _ => _NotificationProbe(mode: mode), }; - if (cupertino) { - runApp( - CupertinoApp( - theme: CupertinoThemeData(brightness: brightness), - builder: scaled, - home: home, - ), - ); - return; - } runApp( MaterialApp( theme: ThemeData( diff --git a/app/tool/notification_probe.mjs b/app/tool/notification_probe.mjs index 1487c7ac..43ae553b 100644 --- a/app/tool/notification_probe.mjs +++ b/app/tool/notification_probe.mjs @@ -154,10 +154,10 @@ try { } }; let viewport = { width: 320, height: 640 }; - const navigate = async ({ mode, host = 'material', scale = 1, theme = 'dark', width = 320, height = 640, semantics: enableSemantics = false, state } = {}) => { + const navigate = async ({ mode, scale = 1, theme = 'dark', width = 320, height = 640, semantics: enableSemantics = false, state } = {}) => { viewport = { width, height }; await send('Emulation.setEmulatedMedia', { features: [{ name: 'prefers-color-scheme', value: theme }] }, session); - const query = new URLSearchParams({ mode, host, scale: String(scale), theme }); + const query = new URLSearchParams({ mode, scale: String(scale), theme }); if (state) query.set('state', state); await send('Page.navigate', { url: `${origin}/?${query}` }, session); await delay(2500); @@ -286,9 +286,10 @@ try { granted: 'Notifications are on. Failed and waiting runs will raise a browser notification.', denied: 'Notifications are blocked for this site.', }; - for (const host of ['material', 'cupertino']) { + { + const host = 'material'; for (const [state, copy] of Object.entries(states)) { - await navigate({ mode: 'tile', host, scale: 2, semantics: true, state }); + await navigate({ mode: 'tile', scale: 2, semantics: true, state }); const labels = (await semantics()).map((row) => row.label); requireLabels(labels, [ 'Pipelines can notify you when a run is waiting', diff --git a/app/tool/perf/glass_scroll_bench.mjs b/app/tool/perf/glass_scroll_bench.mjs index 5cd17a8f..9cdc8e9d 100644 --- a/app/tool/perf/glass_scroll_bench.mjs +++ b/app/tool/perf/glass_scroll_bench.mjs @@ -5,7 +5,7 @@ // // node tool/perf/glass_scroll_bench.mjs --build build/probe-app \ // --out /tmp/perf-glass/before [--gpu] [--size 560x900] [--seconds 6] \ -// [--repeat 3] [--platform material|cupertino] [--theme light|dark] \ +// [--repeat 3] [--theme light|dark] \ // [--shots] [--only runs-list|run-timeline] [--flags=""] // // Per scenario (the Runs list: 3 glass pieces; a run's Timeline tab: 5) it @@ -34,7 +34,7 @@ const { values: opts } = parseArgs({ options: { build: { type: 'string' }, out: { type: 'string' }, gpu: { type: 'boolean' }, size: { type: 'string', default: '560x900' }, seconds: { type: 'string', default: '6' }, - repeat: { type: 'string', default: '3' }, platform: { type: 'string', default: 'material' }, + repeat: { type: 'string', default: '3' }, theme: { type: 'string', default: 'light' }, only: { type: 'string' }, flags: { type: 'string', default: '' }, shots: { type: 'boolean' }, }, @@ -127,7 +127,7 @@ const chrome = await launchChrome(); const browser = await openBrowser({ cdp: chrome.cdp }); const { send } = browser; const evaluate = async (expression) => (await send('Runtime.evaluate', { expression, returnByValue: true, awaitPromise: true })).result.value; -const results = { build: opts.build, gpu: Boolean(opts.gpu), size: opts.size, platform: opts.platform, theme: opts.theme, scenarios: {} }; +const results = { build: opts.build, gpu: Boolean(opts.gpu), size: opts.size, theme: opts.theme, scenarios: {} }; try { await send('Page.enable'); await send('Runtime.enable'); @@ -143,7 +143,6 @@ try { for (let rep = 0; rep < Number(opts.repeat); rep++) { const url = new URL('/', server.origin); url.searchParams.set('route', s.route); - url.searchParams.set('platform', opts.platform); url.searchParams.set('theme', opts.theme); for (const [k, v] of Object.entries(s.extra)) url.searchParams.set(k, v); await send('Page.navigate', { url: url.href }); @@ -167,19 +166,19 @@ try { await send('Input.dispatchMouseEvent', { type: 'mouseMoved', x: 1, y: height / 2 }); await delay(1500); const still = (await send('Page.captureScreenshot', { format: 'png' })).data; - await writeFile(join(opts.out, `${s.name}-${opts.platform}-${opts.theme}-still.png`), Buffer.from(still, 'base64')); + await writeFile(join(opts.out, `${s.name}-${opts.theme}-still.png`), Buffer.from(still, 'base64')); break; } const frames = await evaluate(`window.__bench.drive(${Number(opts.seconds) * 1000}, ${x}, ${y}, 6)`); runs.push({ ...summarise(frames), census }); await delay(500); const shot = rep === 0 ? (await send('Page.captureScreenshot', { format: 'png' })).data : null; - if (shot) await writeFile(join(opts.out, `${s.name}-${opts.platform}-${opts.theme}.png`), Buffer.from(shot, 'base64')); + if (shot) await writeFile(join(opts.out, `${s.name}-${opts.theme}.png`), Buffer.from(shot, 'base64')); } results.scenarios[s.name] = runs; console.log(s.name, JSON.stringify(runs)); } - if (!opts.shots) await writeFile(join(opts.out, `bench-${opts.gpu ? 'gpu' : 'sw'}-${opts.platform}-${opts.theme}.json`), JSON.stringify(results, null, 2)); + if (!opts.shots) await writeFile(join(opts.out, `bench-${opts.gpu ? 'gpu' : 'sw'}-${opts.theme}.json`), JSON.stringify(results, null, 2)); } finally { await browser.close().catch(() => {}); await chrome.close(); diff --git a/app/tool/pipeline_graph_tab_probe.mjs b/app/tool/pipeline_graph_tab_probe.mjs index 9fda1a80..d4d52265 100644 --- a/app/tool/pipeline_graph_tab_probe.mjs +++ b/app/tool/pipeline_graph_tab_probe.mjs @@ -7,7 +7,7 @@ // Captures are written for both hosts, dark at 2x; the file prefix carries the // viewport so short-window and large-text runs cannot overwrite each other. // -// PROBE_VARIANT=material|cupertino PROBE_SCHEME=dark|light PROBE_SCALE=1|2 \ +// PROBE_SCHEME=dark|light PROBE_SCALE=1|2 \ // PROBE_WIDTH=1280 PROBE_HEIGHT=900 PROBE_WEB_ROOT= \ // OPENCODE_ARTIFACT_DIR= node tool/pipeline_graph_tab_probe.mjs import { createServer } from 'node:http'; @@ -22,7 +22,7 @@ const root = resolve( process.env.PROBE_WEB_ROOT ?? join(process.cwd(), 'build/pipeline_graph_tab_probe_web'), ); -const variant = process.env.PROBE_VARIANT ?? 'material'; +const variant = 'material'; const scheme = process.env.PROBE_SCHEME ?? 'dark'; const scale = process.env.PROBE_SCALE ?? '2'; const width = Number(process.env.PROBE_WIDTH ?? 1280); diff --git a/app/tool/pipelines_wiring_probe.mjs b/app/tool/pipelines_wiring_probe.mjs index a87ee614..4b8d8156 100644 --- a/app/tool/pipelines_wiring_probe.mjs +++ b/app/tool/pipelines_wiring_probe.mjs @@ -187,7 +187,7 @@ try { await noBody('Pipelines server unavailable'); await capture(connection, captureDir, log, '06-reconnect-detail-refreshed-material'); - // Cupertino host: macOS platform, dark appearance. + // Material host: macOS platform, dark appearance. await connection.send('Emulation.setUserAgentOverride', { userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 ' + @@ -198,20 +198,20 @@ try { features: [{ name: 'prefers-color-scheme', value: 'dark' }], }); await navigate(`${fixture.url}/pipelines`); - await assertName(connection, 'Release verification', 'cupertino dark row', log); + await assertName(connection, 'Release verification', 'material dark row', log); await noBody('Pipelines — Not implemented'); - await capture(connection, captureDir, log, '07-list-cupertino-dark'); - await assertOcr('07-list-cupertino-dark', 'Release verification'); + await capture(connection, captureDir, log, '07-list-material-dark'); + await assertOcr('07-list-material-dark', 'Release verification'); await click(connection, 'Release verification'); - await assertName(connection, 'Content hash', 'cupertino dark detail', log); - await capture(connection, captureDir, log, '08-detail-cupertino-dark'); - await assertOcr('08-detail-cupertino-dark', 'Content hash'); + await assertName(connection, 'Content hash', 'material dark detail', log); + await capture(connection, captureDir, log, '08-detail-material-dark'); + await assertOcr('08-detail-material-dark', 'Content hash'); await click(connection, 'Source'); - await capture(connection, captureDir, log, '09-source-cupertino-dark'); - await assertOcr('09-source-cupertino-dark', 'name: Release verification'); - await assertOcr('09-source-cupertino-dark', 'type: model'); + await capture(connection, captureDir, log, '09-source-material-dark'); + await assertOcr('09-source-material-dark', 'name: Release verification'); + await assertOcr('09-source-material-dark', 'type: model'); const final = await state(); if (final.connections < 1) throw new Error('No shared socket'); diff --git a/app/tool/retry_wiring_probe.mjs b/app/tool/retry_wiring_probe.mjs index a29a76cb..4a224336 100644 --- a/app/tool/retry_wiring_probe.mjs +++ b/app/tool/retry_wiring_probe.mjs @@ -638,19 +638,19 @@ try { await assertBody('Original prompt'); }; - // Cupertino host (macOS browser), 320 CSS px at DPR 2 in dark mode. + // Material host (macOS browser), 320 CSS px at DPR 2 in dark mode. await open(SOURCE_ID, 'Fixture failed run'); await assertBody('Rename'); await assertBody('Retry'); - captures.push(await capture(`r2c-retry-cupertino-${theme}-failed`)); + captures.push(await capture(`r2c-retry-material-${theme}-failed`)); await assertOcr(captures.at(-1), 'Fixture failed run'); - checks.push(await actionGap('Cupertino')); - checks.push({ check: `Cupertino ${theme} 320px detail offers Retry`, path: await evaluate('location.pathname') }); + checks.push(await actionGap('Material')); + checks.push({ check: `Material ${theme} 320px detail offers Retry`, path: await evaluate('location.pathname') }); await clickText('Retry'); await waitFor(retryPromptOpen, 'the retry prompt'); await assertBody('Only failed runs can be retried'); - captures.push(await capture(`r2c-retry-cupertino-${theme}-prompt`)); + captures.push(await capture(`r2c-retry-material-${theme}-prompt`)); await assertOcr(captures.at(-1), 'Retry run 7?'); await clickText('Keep'); @@ -658,8 +658,8 @@ try { if ((await state()).retries.length !== 0) { throw new Error('Keep sent retry_run'); } - checks.push({ check: 'Cupertino Keep sent nothing', sent: 0 }); - captures.push(await capture(`r2c-retry-cupertino-${theme}-kept`)); + checks.push({ check: 'Material Keep sent nothing', sent: 0 }); + captures.push(await capture(`r2c-retry-material-${theme}-kept`)); // Restart: the browser-only second confirmation, then the server-named run. await clickText('Retry'); @@ -667,7 +667,7 @@ try { await clickText('Restart from start'); await waitFor(restartPromptOpen, 'the restart prompt'); await assertBody('replays the whole pipeline'); - captures.push(await capture(`r2c-retry-cupertino-${theme}-restart-prompt`)); + captures.push(await capture(`r2c-retry-material-${theme}-restart-prompt`)); await clickText('Restart from start', { last: true }); try { await waitFor(async () => (await state()).retries.length === 1, 'the first retry request'); @@ -679,17 +679,17 @@ try { } const restart = assertPayload((await state()).retries[0], { restart: true, - check: 'Cupertino restart', + check: 'Material restart', }); await waitNewRun(SOURCE_ID + 1, 'Restart of 7'); - captures.push(await capture(`r2c-retry-cupertino-${theme}-restart-run`)); + captures.push(await capture(`r2c-retry-material-${theme}-restart-run`)); await assertOcr(captures.at(-1), 'Restart of 7'); - checks.push({ check: 'Cupertino restart opened only the server-named run', restart, path: await evaluate('location.pathname') }); + checks.push({ check: 'Material restart opened only the server-named run', restart, path: await evaluate('location.pathname') }); await clickText('Back'); await assertBody('Fixture failed run'); await assertBody('Restart of 7'); - captures.push(await capture(`r2c-retry-cupertino-${theme}-list`)); + captures.push(await capture(`r2c-retry-material-${theme}-list`)); await assertOcr(captures.at(-1), 'Restart of 7'); // Resume after returning to the still-failed source run. @@ -705,12 +705,12 @@ try { await waitFor(async () => (await state()).retries.length === 2, 'the resume request'); const resume = assertPayload((await state()).retries[1], { restart: false, - check: 'Cupertino resume', + check: 'Material resume', }); await waitNewRun(SOURCE_ID + 2, 'Resume of 7'); - captures.push(await capture(`r2c-retry-cupertino-${theme}-resume-run`)); + captures.push(await capture(`r2c-retry-material-${theme}-resume-run`)); await assertOcr(captures.at(-1), 'Resume of 7'); - checks.push({ check: 'Cupertino resume omitted retry_mode and opened the reply run', resume, path: await evaluate('location.pathname') }); + checks.push({ check: 'Material resume omitted retry_mode and opened the reply run', resume, path: await evaluate('location.pathname') }); // Material host: the same deep link, shared gateway and normal app build. await send( diff --git a/app/tool/run_detail_graph_probe.dart b/app/tool/run_detail_graph_probe.dart index 9e3d88d5..f9924c66 100644 --- a/app/tool/run_detail_graph_probe.dart +++ b/app/tool/run_detail_graph_probe.dart @@ -3,7 +3,7 @@ // Build and probe (from app/): // flutter build web --target tool/run_detail_graph_probe.dart \ // --output build/probe-run-detail-graph -// PROBE_VARIANT=material OPENCODE_ARTIFACT_DIR=DIR \ +// OPENCODE_ARTIFACT_DIR=DIR \ // node tool/run_detail_graph_probe.mjs // // Server-shaped fixtures only: a fake gateway answers the same get_run envelope diff --git a/app/tool/run_detail_graph_probe.mjs b/app/tool/run_detail_graph_probe.mjs index cb6bfe20..6da0eadc 100644 --- a/app/tool/run_detail_graph_probe.mjs +++ b/app/tool/run_detail_graph_probe.mjs @@ -5,9 +5,9 @@ // server-shaped fixture. It checks the Graph tab's recorded evidence and legend, // that an unvisited node does nothing, that a visited stage click selects the // recorded visit in Timeline, and the exact missing-graph wording. Captures are -// written for both hosts. +// written for the Material host. // -// PROBE_VARIANT=material|cupertino PROBE_SCHEME=dark|light PROBE_SCALE=1|2 \ +// PROBE_SCHEME=dark|light PROBE_SCALE=1|2 \ // PROBE_WIDTH=1280 PROBE_HEIGHT=900 PROBE_WEB_ROOT= \ // OPENCODE_ARTIFACT_DIR= node tool/run_detail_graph_probe.mjs import { createServer } from 'node:http'; @@ -22,7 +22,7 @@ const root = resolve( process.env.PROBE_WEB_ROOT ?? join(process.cwd(), 'build/probe-run-detail-graph'), ); -const variant = process.env.PROBE_VARIANT ?? 'material'; +const variant = 'material'; const scheme = process.env.PROBE_SCHEME ?? 'dark'; const scale = process.env.PROBE_SCALE ?? '1'; const width = Number(process.env.PROBE_WIDTH ?? 1280); @@ -196,7 +196,7 @@ try { }; await navigate( - `?platform=${variant}&theme=${scheme === 'dark' ? 1 : 0}&scale=${scale}&case=default`, + `?theme=${scheme === 'dark' ? 1 : 0}&scale=${scale}&case=default`, 'Release verification', ); check('the real run detail opened over the recorded fixture', true); @@ -269,7 +269,7 @@ try { evidence.captures.push(await capture('selected-visit')); await navigate( - `?platform=${variant}&theme=${scheme === 'dark' ? 1 : 0}&scale=${scale}&case=missing`, + `?theme=${scheme === 'dark' ? 1 : 0}&scale=${scale}&case=missing`, 'Release verification', ); await clickLabel('Graph'); diff --git a/app/tool/run_detail_visit_probe.dart b/app/tool/run_detail_visit_probe.dart index 9eb0c91d..9bab857a 100644 --- a/app/tool/run_detail_visit_probe.dart +++ b/app/tool/run_detail_visit_probe.dart @@ -3,12 +3,11 @@ // Build and probe (from app/): // flutter build web --target tool/run_detail_visit_probe.dart \ // --output build/probe-run-detail-visit -// PROBE_VARIANT=material OPENCODE_ARTIFACT_DIR=DIR \ +// OPENCODE_ARTIFACT_DIR=DIR \ // node tool/run_detail_visit_probe.mjs // // Server-shaped fixtures only: a fake gateway answers the same get_run envelope // the app consumes. No server or operator run is touched. -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/core/api_gateway.dart'; import 'package:pipelines_app/features/runs/data/runs_repository.dart'; @@ -176,23 +175,20 @@ JsonMap _run() => { void main() { final params = Uri.base.queryParameters; - final cupertino = params['platform'] == 'cupertino'; final dark = params['theme'] == 'dark'; final scale = double.tryParse(params['scale'] ?? '') ?? 1; runApp( - _ProbeBody(cupertino: cupertino, dark: dark, scale: scale, run: _run()), + _ProbeBody(dark: dark, scale: scale, run: _run()), ); } class _ProbeBody extends StatefulWidget { const _ProbeBody({ - required this.cupertino, required this.dark, required this.scale, required this.run, }); - final bool cupertino; final bool dark; final double scale; final JsonMap run; @@ -233,14 +229,6 @@ class _ProbeBodyState extends State<_ProbeBody> { ).copyWith(textScaler: TextScaler.linear(widget.scale)), child: app!, ); - if (widget.cupertino) { - return CupertinoApp( - title: 'Visit pane fixture', - theme: CupertinoThemeData(brightness: theme), - builder: scaled, - home: CupertinoPageScaffold(child: SafeArea(child: detail)), - ); - } return MaterialApp( title: 'Visit pane fixture', theme: ThemeData(brightness: theme, platform: TargetPlatform.android), diff --git a/app/tool/run_detail_visit_probe.mjs b/app/tool/run_detail_visit_probe.mjs index 35cbf32a..2821de8b 100644 --- a/app/tool/run_detail_visit_probe.mjs +++ b/app/tool/run_detail_visit_probe.mjs @@ -14,7 +14,7 @@ // reason. It also samples the rendered page so PROBE_SCHEME=dark cannot pass // while the fixture silently renders light. // -// PROBE_VARIANT=material|cupertino PROBE_SCHEME=dark|light PROBE_SCALE=1|2 \ +// PROBE_SCHEME=dark|light PROBE_SCALE=1|2 \ // PROBE_WIDTH=1280 PROBE_HEIGHT=900 PROBE_WEB_ROOT= \ // OPENCODE_ARTIFACT_DIR= node tool/run_detail_visit_probe.mjs import { createServer } from 'node:http'; @@ -29,7 +29,7 @@ const root = resolve( process.env.PROBE_WEB_ROOT ?? join(process.cwd(), 'build/probe-run-detail-visit'), ); -const variant = process.env.PROBE_VARIANT ?? 'material'; +const variant = 'material'; const scheme = process.env.PROBE_SCHEME ?? 'dark'; const scale = process.env.PROBE_SCALE ?? '1'; const width = Number(process.env.PROBE_WIDTH ?? 1280); @@ -238,7 +238,7 @@ try { const check = (text, value) => evidence.checks.push({ check: text, value }); const navigation = await send('Page.navigate', { - url: `http://127.0.0.1:${port}/?platform=${variant}&theme=${scheme}&scale=${scale}`, + url: `http://127.0.0.1:${port}/?theme=${scheme}&scale=${scale}`, }, session); if (navigation.error || navigation.result?.errorText) throw new Error(JSON.stringify(navigation)); await delay(3200); diff --git a/app/tool/run_graph_probe.mjs b/app/tool/run_graph_probe.mjs index 326c43d3..24026ed7 100644 --- a/app/tool/run_graph_probe.mjs +++ b/app/tool/run_graph_probe.mjs @@ -6,7 +6,7 @@ // line, a visited-stage click, an unvisited node doing nothing, and (for the // finished fixture) no live line plus the resolved terminal's recorded outcome. // -// PROBE_VARIANT=material|cupertino PROBE_SCHEME=dark|light PROBE_SCALE=1|2 \ +// PROBE_SCHEME=dark|light PROBE_SCALE=1|2 \ // PROBE_CASE=running|finished PROBE_WIDTH=1280 PROBE_HEIGHT=800 \ // PROBE_WEB_ROOT= OPENCODE_ARTIFACT_DIR= \ // node tool/run_graph_probe.mjs @@ -21,7 +21,7 @@ import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'; const root = resolve( process.env.PROBE_WEB_ROOT ?? join(process.cwd(), 'build/run_graph_probe'), ); -const variant = process.env.PROBE_VARIANT ?? 'material'; +const variant = 'material'; const scheme = process.env.PROBE_SCHEME ?? 'light'; const scale = process.env.PROBE_SCALE ?? '1'; const fixture = process.env.PROBE_CASE ?? 'running'; diff --git a/app/tool/run_pipeline_probe.mjs b/app/tool/run_pipeline_probe.mjs index c65def65..f1d743c2 100644 --- a/app/tool/run_pipeline_probe.mjs +++ b/app/tool/run_pipeline_probe.mjs @@ -644,9 +644,9 @@ try { await setView({ width: 420, height: 900 }); await openPipelines(); - captures.push(await capture('p3-run-cupertino-list')); + captures.push(await capture('p3-run-material-list')); await openPipelineDetail(); - captures.push(await capture('p3-run-cupertino-detail')); + captures.push(await capture('p3-run-material-detail')); // Opening and Cancel send nothing. await clickText('Run'); @@ -655,18 +655,18 @@ try { await assertBody('Working directory (on the server)'); await assertBody('Notifications for this run'); await assertBody('Cancel'); - captures.push(await capture('p3-run-cupertino-dialog')); + captures.push(await capture('p3-run-material-dialog')); await clickText('Cancel'); await waitFor(dialogClosed, 'the cancelled dialog'); if ((await state()).launches.length !== 0) throw new Error('Cancel sent run_pipeline'); - checks.push({ check: 'Cupertino Cancel sent nothing', sent: 0 }); + checks.push({ check: 'Material Cancel sent nothing', sent: 0 }); // Both local validations, exactly as the web. await clickText('Run'); await waitFor(dialogOpen, 'the launch dialog again'); await clickText('Run', { last: true }); await assertBody('Enter a prompt for this run.'); - captures.push(await capture('p3-run-cupertino-prompt-validation')); + captures.push(await capture('p3-run-material-prompt-validation')); if ((await state()).launches.length !== 0) throw new Error('Validation sent run_pipeline'); await focusField('What should this run do?'); @@ -674,78 +674,32 @@ try { await clearAndType('/absolute/path/on/the/server', 'relative/path'); await clickText('Run', { last: true }); await assertBody('Choose an absolute working directory on the server.'); - captures.push(await capture('p3-run-cupertino-workspace-validation')); + captures.push(await capture('p3-run-material-workspace-validation')); if ((await state()).launches.length !== 0) throw new Error('Workspace validation sent run_pipeline'); await clearAndType('/absolute/path/on/the/server', '/work/release'); const beforeRunsList = (await state()).listRuns; await clickText('Run', { last: true }); - await waitFor(async () => (await state()).launches.length === 1, 'the Cupertino launch request'); - const cupertinoLaunch = assertPayload((await state()).launches[0], 'Cupertino launch'); + await waitFor(async () => (await state()).launches.length === 1, 'the Material launch request'); + const materialLaunch = assertPayload((await state()).launches[0], 'Material launch'); await waitRun(100); const afterRunsList = (await state()).listRuns; if (afterRunsList <= beforeRunsList) { throw new Error('The accepted launch did not trigger a fresh runs list read'); } - captures.push(await capture('p3-run-cupertino-run-detail')); - checks.push({ - check: 'Cupertino dialog → validation → accepted run detail', - launch: cupertinoLaunch, - listReads: afterRunsList - beforeRunsList, - path: await evaluate('location.pathname'), - }); - - // Material host: the same normal bundle after a Linux browser identity. - await send( - 'Emulation.setUserAgentOverride', - { - userAgent: - 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 ' + - '(KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36', - platform: 'Linux x86_64', - }, - session, - ); - await openPipelines(); - await openPipelineDetail(); - captures.push(await capture('p3-run-material-detail')); - await clickText('Run'); - await waitFor(dialogOpen, 'the material launch dialog'); - await assertBody('Prompt'); - captures.push(await capture('p3-run-material-dialog')); - await clickText('Run', { last: true }); - await assertBody('Enter a prompt for this run.'); - captures.push(await capture('p3-run-material-validation')); - if ((await state()).launches.length !== 1) throw new Error('Material validation sent run_pipeline'); - - await focusField('What should this run do?'); - await typeText('Review the release.'); - await clearAndType('/absolute/path/on/the/server', 'relative/path'); - await clickText('Run', { last: true }); - await assertBody('Choose an absolute working directory on the server.'); - await clearAndType('/absolute/path/on/the/server', '/work/release'); - const beforeMaterialList = (await state()).listRuns; - await clickText('Run', { last: true }); - await waitFor(async () => (await state()).launches.length === 2, 'the Material launch request'); - const materialLaunch = assertPayload((await state()).launches[1], 'Material launch'); - await waitRun(101); - const afterMaterialList = (await state()).listRuns; - if (afterMaterialList <= beforeMaterialList) { - throw new Error('The Material acceptance did not trigger a fresh runs list read'); - } captures.push(await capture('p3-run-material-run-detail')); checks.push({ check: 'Material dialog → validation → accepted run detail', launch: materialLaunch, - listReads: afterMaterialList - beforeMaterialList, + listReads: afterRunsList - beforeRunsList, path: await evaluate('location.pathname'), }); const finalState = await state(); - if (finalState.launches.length !== 2) { + if (finalState.launches.length !== 1) { throw new Error(`Expected two launches, saw ${JSON.stringify(finalState.launches)}`); } - if (finalState.runs.length !== 2) { + if (finalState.runs.length !== 1) { throw new Error(`Expected two server-created runs, saw ${JSON.stringify(finalState.runs)}`); } console.log(JSON.stringify({ ok: true, fixture: fixtureUrl, checks, captures }, null, 2)); diff --git a/app/tool/runs_probe.mjs b/app/tool/runs_probe.mjs index f4e4a99a..a1376c16 100644 --- a/app/tool/runs_probe.mjs +++ b/app/tool/runs_probe.mjs @@ -404,29 +404,29 @@ try { await assertBody('Server URL'); await assertBody('Fixture settings build'); if ((await path()) !== '/settings') throw new Error('Settings did not update route'); - captures.push(await capture('settings-cupertino-registered-phone')); + captures.push(await capture('settings-material-registered-phone')); await clickText('Runs'); await clickText('Fixture cancel run', { contains: true }); await assertBody('Original prompt'); await clickText('Cancel run'); await assertBody('Cancel run 4?'); - captures.push(await capture('cancel-cupertino-confirm')); + captures.push(await capture('cancel-material-confirm')); await clickText('Keep'); await assertBody('Original prompt'); const kept = await (await fetch(`${fixture.url}/fixture/state`)).json(); if (kept.cancelRequests.length) throw new Error('Keep sent a cancellation'); await clickText('Back', { contains: true }); await clickText('Fixture human run', { contains: true }); - captures.push(await capture('decision-cupertino-card')); + captures.push(await capture('decision-material-card')); await assertBody('Waiting for your decision'); await clickText('Decide'); await assertBody('Please review this recorded checkpoint.'); - captures.push(await capture('decision-cupertino-confirm')); + captures.push(await capture('decision-material-confirm')); await clickText('Cancel'); // Material host: the same deep link and route must render standard Material - // controls (the Cupertino host was selected by the macOS browser above). + // controls (the Material host was selected by the macOS browser above). await send( 'Emulation.setUserAgentOverride', { diff --git a/app/tool/schedule_editor_probe.mjs b/app/tool/schedule_editor_probe.mjs index 941d253a..eedb585d 100644 --- a/app/tool/schedule_editor_probe.mjs +++ b/app/tool/schedule_editor_probe.mjs @@ -239,7 +239,7 @@ try { const captures = []; // Material phone: invalid -> valid -> refusal -> exact record. - await load('host=material&scale=1', 390, 844); + await load('scale=1', 390, 844); await assertText('Future runs only; does not publish or change the workflow.'); await assertText('Weekdays (none means every day)'); await assertText('Enabled schedules start future runs automatically'); @@ -330,7 +330,7 @@ try { }); // Narrow phone at 2x text: labels and helpers wrap, nothing overflows. - await load('host=material&scale=2', 320, 844); + await load('scale=2', 320, 844); await click('Save schedule'); await delay(600); await capture('s1-form-material-320-2x-top'); @@ -340,14 +340,14 @@ try { await assertText('Save schedule'); checks.push({ check: '320px at 2x text kept every label and the actions', width: 320, scale: 2 }); - // Actual Cupertino dark host, not a Material fallback. - await load('host=cupertino&brightness=dark&scale=1', 390, 844); + // Actual Material dark host, not a Material fallback. + await load('brightness=dark&scale=1', 390, 844); await assertText('Add schedule'); - await capture('s1-form-cupertino-dark-390-top'); + await capture('s1-form-material-dark-390-top'); for (let i = 0; i < 3; i++) await wheel(600); - await capture('s1-form-cupertino-dark-390-bottom'); + await capture('s1-form-material-dark-390-bottom'); await assertText('Notifications'); - checks.push({ check: 'Cupertino dark rendered the native form', host: 'cupertino', brightness: 'dark' }); + checks.push({ check: 'Material dark rendered the native form', host: 'material', brightness: 'dark' }); if (pageErrors.length) throw new Error(`Page exceptions: ${JSON.stringify(pageErrors)}`); const manifest = { diff --git a/app/tool/schedule_editor_probe_app.dart b/app/tool/schedule_editor_probe_app.dart index d65c1db8..16044457 100644 --- a/app/tool/schedule_editor_probe_app.dart +++ b/app/tool/schedule_editor_probe_app.dart @@ -2,7 +2,6 @@ import 'dart:convert'; import 'dart:js_interop'; import 'dart:js_interop_unsafe'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/core/api_gateway.dart'; import 'package:pipelines_app/features/schedules/domain/editor/schedule_draft.dart'; @@ -12,7 +11,7 @@ import 'package:pipelines_app/features/schedules/ui/editor/schedule_editor_form. /// /// flutter build web -t tool/schedule_editor_probe_app.dart /// -/// Query: `host=cupertino`, `brightness=dark`, `scale=2`. The injected callback +/// Query: `brightness=dark`, `scale=2`. The injected callback /// refuses the first valid submit and accepts the retry; it never opens a /// socket or touches a real schedule. Its counters/record are published at /// `globalThis.scheduleEditorProbe` for the Chrome probe. @@ -24,7 +23,6 @@ class _ProbeApp extends StatelessWidget { @override Widget build(BuildContext context) { final parameters = Uri.base.queryParameters; - final cupertino = parameters['host'] == 'cupertino'; final dark = parameters['brightness'] == 'dark'; final scale = double.tryParse(parameters['scale'] ?? '') ?? 1.0; Widget media(BuildContext context, Widget? app) => MediaQuery( @@ -33,21 +31,7 @@ class _ProbeApp extends StatelessWidget { ).copyWith(textScaler: TextScaler.linear(scale)), child: app!, ); - final home = _ProbeHome(cupertino: cupertino); - if (cupertino) { - return CupertinoApp( - theme: CupertinoThemeData( - brightness: dark ? Brightness.dark : Brightness.light, - ), - builder: media, - home: CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Schedule editor probe'), - ), - child: SafeArea(child: home), - ), - ); - } + const home = _ProbeHome(); return MaterialApp( theme: ThemeData( brightness: dark ? Brightness.dark : Brightness.light, @@ -70,9 +54,7 @@ class _Refusal implements Exception { } class _ProbeHome extends StatefulWidget { - const _ProbeHome({required this.cupertino}); - - final bool cupertino; + const _ProbeHome(); @override State<_ProbeHome> createState() => _ProbeHomeState(); @@ -152,9 +134,7 @@ class _ProbeHomeState extends State<_ProbeHome> { const SizedBox(height: 24), Text( 'Submitted record', - style: widget.cupertino - ? CupertinoTheme.of(context).textTheme.navTitleTextStyle - : Theme.of(context).textTheme.titleMedium, + style: Theme.of(context).textTheme.titleMedium, ), const SizedBox(height: 8), SelectableText( diff --git a/app/tool/schedule_pipeline_probe.mjs b/app/tool/schedule_pipeline_probe.mjs index c8119be3..8ed69376 100644 --- a/app/tool/schedule_pipeline_probe.mjs +++ b/app/tool/schedule_pipeline_probe.mjs @@ -255,9 +255,9 @@ try { // One host runs list -> new -> invalid -> valid save -> conflict -> retry, // then pause and delete against the same fixture. - const runFlow = async (name, { host, brightness = 'platform', scale = 1, width: w, height: h }) => { + const runFlow = async (name, { brightness = 'platform', scale = 1, width: w, height: h }) => { await load( - `host=${host}&scale=${scale}${brightness === 'dark' ? '&brightness=dark' : ''}`, + `scale=${scale}${brightness === 'dark' ? '&brightness=dark' : ''}`, w, h, ); @@ -267,7 +267,7 @@ try { await assertText('Pinned v3 · Every 24h · mon, wed · Europe/London'); await assertText('Pinned v3 · 10:00, 18:30 · Server timezone'); await capture(`${name}-list`); - checks.push({ check: `${host} listed the pipeline schedules`, lists: (await state()).lists }); + checks.push({ check: 'Material listed the pipeline schedules', lists: (await state()).lists }); await click('Add schedule'); await assertText('Future runs only; does not publish or change the workflow.'); @@ -284,7 +284,7 @@ try { if ((await state()).saves !== 0) throw new Error('Invalid form sent a save'); await wheel(-2200); await capture(`${name}-invalid`); - checks.push({ check: `${host} invalid fields sent nothing`, saves: (await state()).saves }); + checks.push({ check: 'Material invalid fields sent nothing', saves: (await state()).saves }); await typeField('Name', 'Probe schedule'); await typeField('Prompt', 'Summarise the release notes.'); @@ -305,7 +305,7 @@ try { } await capture(`${name}-created`); checks.push({ - check: `${host} create sent the pinned, workspace-seeded record with one key and refreshed`, + check: 'Material create sent the pinned, workspace-seeded record with one key and refreshed', saves: created.saves, requestKey: created.lastRequestKey, record: created.lastSaved, @@ -326,7 +326,7 @@ try { if ((await state()).saves !== 2) throw new Error('Conflict retried without the operator'); await capture(`${name}-conflict`); checks.push({ - check: `${host} conflict kept the draft and showed the server words`, + check: 'Material conflict kept the draft and showed the server words', saves: (await state()).saves, lastSaved: (await state()).lastSaved, }); @@ -335,7 +335,7 @@ try { await waitFor(async () => (await state()).saves === 3, 'the accepted edit'); await assertText('Edited schedule'); await assertText('Schedules (3)'); - checks.push({ check: `${host} accepted edit refreshed the list`, saves: (await state()).saves }); + checks.push({ check: 'Material accepted edit refreshed the list', saves: (await state()).saves }); // Pause sends only the enabled flip and the loaded revision. const beforePause = (await state()).rows.find((row) => row.name === 'Edited schedule'); @@ -346,7 +346,7 @@ try { throw new Error(`Pause payload drifted: ${JSON.stringify(pause)} vs ${JSON.stringify(beforePause)}`); } await assertText('Enable'); - checks.push({ check: `${host} pause sent only enabled with the loaded revision`, pause }); + checks.push({ check: 'Material pause sent only enabled with the loaded revision', pause }); // Delete confirms once, then sends the exact id + expected revision. await click('Delete'); @@ -365,19 +365,18 @@ try { } await assertText('Schedules (2)'); await assertNoText('Edited schedule'); - checks.push({ check: `${host} delete confirmed and sent id + revision`, deleted }); + checks.push({ check: 'Material delete confirmed and sent id + revision', deleted }); }; - await runFlow('s1w-material-390', { host: 'material', width: 390, height: 844 }); - await runFlow('s1w-cupertino-dark-390', { - host: 'cupertino', + await runFlow('s1w-material-390', { width: 390, height: 844 }); + await runFlow('s1w-material-dark-390', { brightness: 'dark', width: 390, height: 844, }); // Narrow phone at 2x text on the material host. - await load('host=material&scale=2', 320, 844); + await load('scale=2', 320, 844); await assertText('Schedules (2)'); await capture('s1w-material-320-2x-list'); await click('Add schedule'); diff --git a/app/tool/schedule_pipeline_probe_app.dart b/app/tool/schedule_pipeline_probe_app.dart index d9007dce..93e6e81b 100644 --- a/app/tool/schedule_pipeline_probe_app.dart +++ b/app/tool/schedule_pipeline_probe_app.dart @@ -1,7 +1,6 @@ import 'dart:js_interop'; import 'dart:js_interop_unsafe'; -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/core/api_gateway.dart'; import 'package:pipelines_app/features/schedules/ui/pipeline/schedule_pipeline_section.dart'; @@ -11,7 +10,7 @@ import 'package:pipelines_app/features/settings/settings_store.dart'; /// /// flutter build web -t tool/schedule_pipeline_probe_app.dart /// -/// Query: `host=cupertino`, `brightness=dark`, `scale=2`. The fake gateway keeps +/// Query: `brightness=dark`, `scale=2`. The fake gateway keeps /// its schedules in memory, accepts one create, refuses the first edit with a /// stale revision, then accepts the retry. It never opens a socket or contacts a /// real server. State is published at `globalThis.schedulePipelineProbe`. @@ -30,7 +29,6 @@ class _ProbeApp extends StatelessWidget { @override Widget build(BuildContext context) { final parameters = Uri.base.queryParameters; - final cupertino = parameters['host'] == 'cupertino'; final dark = parameters['brightness'] == 'dark'; final scale = double.tryParse(parameters['scale'] ?? '') ?? 1.0; Widget media(BuildContext context, Widget? app) => MediaQuery( @@ -49,21 +47,6 @@ class _ProbeApp extends StatelessWidget { final body = SafeArea( child: ListView(children: [section, const SizedBox(height: 24)]), ); - if (cupertino) { - return CupertinoApp( - debugShowCheckedModeBanner: false, - theme: CupertinoThemeData( - brightness: dark ? Brightness.dark : Brightness.light, - ), - builder: media, - home: CupertinoPageScaffold( - navigationBar: const CupertinoNavigationBar( - middle: Text('Alpha review'), - ), - child: body, - ), - ); - } return MaterialApp( debugShowCheckedModeBanner: false, theme: ThemeData( diff --git a/app/tool/schedules_list_probe.mjs b/app/tool/schedules_list_probe.mjs index 19ab6481..be1233b9 100644 --- a/app/tool/schedules_list_probe.mjs +++ b/app/tool/schedules_list_probe.mjs @@ -156,8 +156,8 @@ try { expect: ['4 schedules', 'Research batteries', 'Pipeline 4 · v2', 'Timezone: Europe/London', 'Next due:'], }, { - name: 's1b-schedules-cupertino-390', - theme: 'cupertino', + name: 's1b-schedules-material-390', + theme: 'material', scale: 1, width: 390, height: 844, diff --git a/app/tool/schedules_list_probe_app.dart b/app/tool/schedules_list_probe_app.dart index e272bb3b..27c96b3e 100644 --- a/app/tool/schedules_list_probe_app.dart +++ b/app/tool/schedules_list_probe_app.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:pipelines_app/core/api_gateway.dart'; import 'package:pipelines_app/features/schedules/screen.dart'; @@ -7,10 +6,9 @@ import 'package:pipelines_app/features/schedules/screen.dart'; /// /// Run with: /// flutter build web -t tool/schedules_list_probe_app.dart -/// and open `/?theme=cupertino&scale=2`. +/// and open `/?brightness=dark&scale=2`. void main() { final parameters = Uri.base.queryParameters; - final cupertino = parameters['theme'] == 'cupertino'; final dark = parameters['brightness'] == 'dark'; final scale = double.tryParse(parameters['scale'] ?? '') ?? 1.0; final screen = SchedulesScreen(gateway: _FixtureGateway(), onOpen: (_) {}); @@ -18,16 +16,6 @@ void main() { data: MediaQuery.of(context).copyWith(textScaler: TextScaler.linear(scale)), child: app!, ); - if (cupertino) { - runApp( - CupertinoApp( - debugShowCheckedModeBanner: false, - builder: media, - home: CupertinoPageScaffold(child: SafeArea(child: screen)), - ), - ); - return; - } runApp( MaterialApp( debugShowCheckedModeBanner: false, diff --git a/app/tool/search_probe.mjs b/app/tool/search_probe.mjs index 172efb1f..3cf8312b 100644 --- a/app/tool/search_probe.mjs +++ b/app/tool/search_probe.mjs @@ -223,18 +223,18 @@ try { result.evidence.materialDesktop = await typeQuery('plan'); await capture('x1-search-material-desktop', 1280, 800); - await load(`${base}?cupertino=1`, 390, 844); - result.evidence.cupertinoPhone = await typeQuery('plan'); - await capture('x1-search-cupertino-phone', 390, 844); + await load(`${base}?material=1`, 390, 844); + result.evidence.materialPhone = await typeQuery('plan'); + await capture('x1-search-material-phone', 390, 844); await load(base, 390, 844); result.evidence.materialTruncatedEmpty = await typeTruncatedEmpty('needle'); await capture('x1-search-truncated-empty', 390, 844); - await load(`${base}?cupertino=1`, 390, 844); - result.evidence.cupertinoTruncatedEmpty = + await load(`${base}?material=1`, 390, 844); + result.evidence.materialTruncatedEmpty = await typeTruncatedEmpty('needle'); - await capture('x1-search-truncated-empty-cupertino', 390, 844); + await capture('x1-search-truncated-empty-material', 390, 844); console.log(JSON.stringify(result, null, 2)); } finally { diff --git a/app/tool/search_selection_probe.mjs b/app/tool/search_selection_probe.mjs index 81a3a9c6..4d281277 100644 --- a/app/tool/search_selection_probe.mjs +++ b/app/tool/search_selection_probe.mjs @@ -187,8 +187,8 @@ try { "[...document.querySelectorAll('flt-semantics')].map(x => x.getAttribute('aria-label') || (x.innerText || '').trim()).filter(Boolean)", ); // Everything the semantics tree announces: labels, leaf text, and the value - // of read-only text controls (the Cupertino Summary sections render their - // JSON in a read-only CupertinoTextField, which is an /