Skip to content

fix(browser-ui): show collected cases before first result#1062

Merged
fi3ework merged 1 commit intomainfrom
fix/browser-ui-collected-cases
Mar 17, 2026
Merged

fix(browser-ui): show collected cases before first result#1062
fi3ework merged 1 commit intomainfrom
fix/browser-ui-collected-cases

Conversation

@fi3ework
Copy link
Copy Markdown
Member

@fi3ework fi3ework commented Mar 17, 2026

Summary

Background

The browser sidebar only populated test cases after the first case-result or final file result, so running files briefly showed No test cases reported yet even after collection had already completed.

Implementation

  • consume runner file-ready dispatch messages in the browser UI and project the collected TestInfo[] tree into the sidebar immediately
  • extract the collect-to-caseMap projection into a pure helper to keep the runtime path small and make the behavior easy to test
  • add a unit test covering nested suites, leaf-case flattening, and preservation of previously known case status

User Impact

Browser watch runs now show collected test cases in the sidebar before the first test result arrives.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Testing

  • pnpm exec rstest 'packages/browser-ui/src/core/caseMap.test.ts' 'packages/browser-ui/src/core/browserRpc.test.ts' 'packages/browser-ui/src/core/channel.test.ts'
  • pnpm --filter @rstest/browser-ui typecheck

@fi3ework fi3ework enabled auto-merge (squash) March 17, 2026 07:36
@fi3ework fi3ework merged commit cedcf74 into main Mar 17, 2026
18 checks passed
@fi3ework fi3ework deleted the fix/browser-ui-collected-cases branch March 17, 2026 07:53
@9aoy 9aoy mentioned this pull request Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant