@@ -112,7 +112,9 @@ fn distill_vitest(input: &str) -> String {
112112 // Attempt to parse formal summary first
113113 for line in & lines {
114114 let t = line. trim ( ) ;
115- if t. starts_with ( "Tests " ) {
115+ let t_lower = t. to_lowercase ( ) ;
116+ if t_lower. contains ( "tests " ) && ( t_lower. contains ( "failed" ) || t_lower. contains ( "passed" ) )
117+ {
116118 has_summary = true ;
117119 // E.g., "Tests 3 failed | 48 passed (51)"
118120 let parts: Vec < & str > = t. split ( '|' ) . collect ( ) ;
@@ -139,8 +141,8 @@ fn distill_vitest(input: &str) -> String {
139141
140142 // Find failed tests: " ✗ src/services/__tests__/api.test.ts:47:12" or " ✗ should handle rate limiting"
141143 // Look for deeper trace points
142- if t. starts_with ( '❯' ) && t. contains ( ':' ) {
143- let trace = t. trim_start_matches ( '❯' ) . trim ( ) ;
144+ if t. contains ( '❯' ) && t. contains ( ':' ) {
145+ let trace = t[ t . find ( '❯' ) . unwrap ( ) .. ] . trim_start_matches ( '❯' ) . trim ( ) ;
144146 // take basename:line
145147 if let Some ( slash_idx) = trace. rfind ( '/' ) {
146148 let rest = & trace[ slash_idx + 1 ..] ;
@@ -270,7 +272,7 @@ fn distill_tsc(input: &str) -> String {
270272 if !file_display. is_empty ( ) {
271273 by_file. entry ( file_display) . or_default ( ) . push ( issue_display) ;
272274 }
273- } else if t. starts_with ( "Found ") && t. contains ( " error" ) {
275+ } else if t. to_lowercase ( ) . contains ( "found ") && t. to_lowercase ( ) . contains ( " error" ) {
274276 // "Found 5 errors"
275277 if let Some ( num) = t
276278 . split_whitespace ( )
@@ -328,7 +330,7 @@ fn distill_playwright(input: &str) -> String {
328330 for line in & lines {
329331 let t = line. trim ( ) ;
330332 // Look for: ✗ 9 [chromium] › tests/login.spec.ts:20:1 › submits valid credentials (5.0s)
331- if t. starts_with ( '✗' ) && t. contains ( " › " ) {
333+ if t. contains ( '✗' ) && t. contains ( " › " ) {
332334 // Extract file:line and test name
333335 let parts: Vec < & str > = t. split ( " › " ) . collect ( ) ;
334336 if parts. len ( ) >= 3 {
@@ -411,9 +413,10 @@ fn distill_eslint(input: &str) -> String {
411413
412414 for line in input. lines ( ) {
413415 let t = line. trim ( ) ;
416+ let t_lower = t. to_lowercase ( ) ;
414417
415418 // Skip empty or summary lines
416- if t. is_empty ( ) || t. starts_with ( "✖" ) || t . starts_with ( "Checking ") {
419+ if t. is_empty ( ) || t. contains ( '✖' ) || t_lower . contains ( "checking ") {
417420 // But still parse summary counts
418421 if t. contains ( "problems (" ) {
419422 if let Some ( err_idx) = t. find ( " errors" ) {
0 commit comments