You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by as...@apache.org on 2026/09/13 14:12:20 UTC

(maka) 02/02: test(perf): cover continuous history publication and blank frames

This is an automated email from the ASF dual-hosted git repository.

Astro-Han pushed a commit to branch fix/transcript-viewport-mounting
in repository https://gitbox.apache.org/repos/asf/maka.git

commit 85a2daadf5db7c62010b182acabebecd1fb8a903
Author: AstroHan <le...@outlook.com>
AuthorDate: Sun Sep 13 22:12:12 2026 +0800

    test(perf): cover continuous history publication and blank frames
---
 .github/workflows/performance-frontend.yml | 10 +++++++---
 scripts/perf/scroll-input.spec.ts          |  6 +++---
 scripts/perf/scroll-paired.mjs             | 15 ++++++++++++---
 3 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/.github/workflows/performance-frontend.yml b/.github/workflows/performance-frontend.yml
index 32689d7568..1d6f064888 100644
--- a/.github/workflows/performance-frontend.yml
+++ b/.github/workflows/performance-frontend.yml
@@ -39,7 +39,7 @@ jobs:
       - id: browsers
         run: npx playwright install --with-deps chromium
       - name: Fetch exact experiment sources
-        run: git fetch --depth=1 origin 839d14535a541ef0da29ea4d6626a2e3d0e32a8e 0039a230754a4bd832653f481194fb40516464db b65a8c16476c61336c87b9838f161886df26c5e1
+        run: git fetch --depth=1 origin 839d14535a541ef0da29ea4d6626a2e3d0e32a8e 0039a230754a4bd832653f481194fb40516464db b65a8c16476c61336c87b9838f161886df26c5e1 d79e310d592402b2859227bb1ff3cbcd828ea543
       - name: Virtual history continuity and selection
         run: |
           node --input-type=module <<'JS'
@@ -63,11 +63,15 @@ jobs:
             await browser.close(); await server.close();
           }
           JS
-      - name: Paired viewport mounting on real Host
+      - name: Native history traversal never exposes an empty transcript
+        env:
+          MAKA_PERF_OUTPUT: ${{ github.workspace }}/perf-results/native-history
+        run: node scripts/perf/scroll-window.mjs
+      - name: Paired publication during native input on real Host
         if: ${{ !cancelled() && steps.browsers.outcome == 'success' }}
         env:
           MAKA_PERF_OUTPUT: ${{ github.workspace }}/perf-results
-          MAKA_PERF_VARIANTS: A,V,V,A,A,V
+          MAKA_PERF_VARIANTS: V,W
           MAKA_PERF_TARGET_TURN: '60'
         run: xvfb-run -a node scripts/perf/scroll-paired.mjs
       - name: Upload raw measurements and diagnostics
diff --git a/scripts/perf/scroll-input.spec.ts b/scripts/perf/scroll-input.spec.ts
index 42c7e5e205..68130a829c 100644
--- a/scripts/perf/scroll-input.spec.ts
+++ b/scripts/perf/scroll-input.spec.ts
@@ -17,8 +17,8 @@
  * under the License.
  */
 
-// Measures real Host page delivery through preload while the Renderer holds
-// publication. A callback-only Storybook fixture cannot exercise that path.
+// Measures real Host page delivery and publication during native input.
+// A callback-only Storybook fixture cannot exercise that path.
 import { test, expect } from '@playwright/test';
 import { mkdir, writeFile } from 'node:fs/promises';
 import path from 'node:path';
@@ -244,7 +244,7 @@ test('dense upward input with real Host history', async () => {
           publicationsAfterInput: changes.filter((frame: any) => frame.ms >= releasedAt).length,
           firstPublicationAfterReleaseMs: firstReleased ? firstReleased.ms - releasedAt : -1,
         };
-        if (process.env.MAKA_PERF_VARIANT === 'V') {
+        if (['V', 'W'].includes(process.env.MAKA_PERF_VARIANT ?? '')) {
           expect(
             row.maxMounted,
             'a fetched page must not mount all of its Turn bodies',
diff --git a/scripts/perf/scroll-paired.mjs b/scripts/perf/scroll-paired.mjs
index 373aa080ff..5ee0ec99a4 100644
--- a/scripts/perf/scroll-paired.mjs
+++ b/scripts/perf/scroll-paired.mjs
@@ -29,6 +29,7 @@ const refs = {
   E: '839d14535a541ef0da29ea4d6626a2e3d0e32a8e',
   F: '839d14535a541ef0da29ea4d6626a2e3d0e32a8e',
   V: 'b65a8c16476c61336c87b9838f161886df26c5e1',
+  W: 'd79e310d592402b2859227bb1ff3cbcd828ea543',
 };
 const files = [
   'packages/ui/src/chat-view.tsx',
@@ -36,6 +37,12 @@ const files = [
   'packages/ui/src/transcript-scroll-authority.tsx',
   'apps/desktop/src/renderer/platform/desktop/desktop-transcript-range-store.ts',
   'packages/ui/src/use-transcript-known-space.ts',
+  // Publication's interface and its consumers must come from the same ref.
+  'packages/ui/src/transcript-viewport-navigation.ts',
+  'packages/ui/src/__tests__/transcript-scroll-authority.test.ts',
+  'packages/ui/src/__tests__/use-chat-scroll.test.tsx',
+  'apps/desktop/src/main/__tests__/session-workspace-action-identity.test.ts',
+  'apps/desktop/src/main/__tests__/workhub-send-visibility.test.ts',
 ];
 const original = files.map((file) => readFileSync(file));
 const output = path.resolve(process.env.MAKA_PERF_OUTPUT ?? 'perf-results');
@@ -50,7 +57,9 @@ try {
   for (const [index, variant] of order.entries()) {
     for (const file of files) {
       const ref =
-        file.endsWith('use-transcript-known-space.ts') && variant !== 'V' ? refs.B : refs[variant];
+        file.endsWith('use-transcript-known-space.ts') && !['V', 'W'].includes(variant)
+          ? refs.B
+          : refs[variant];
       writeFileSync(file, execFileSync('git', ['show', ref + ':' + file]));
     }
     {
@@ -89,8 +98,8 @@ try {
     }
     run('npm', ['--workspace', '@maka/ui', 'run', 'build']);
     run('npm', ['--workspace', '@maka/desktop', 'run', 'build:renderer']);
-    // The only source delta between the two refs is the measured-space experiment.
-    // Its unused helper remains present for A, with no import/call in A's bundle.
+    // Unused virtual mounting helpers remain present on older refs, with no
+    // import or call in those bundles.
     const env = {
       ...process.env,
       MAKA_PERF_PAIRED: '1',


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org