@@ -276,29 +276,30 @@ def display_results_table(results: list[dict], max_rows: int = 20):
276276 score = r .get ("score" , 0 )
277277 icon = "✅" if score >= 0.8 else "⚠️" if score >= 0.5 else "❌"
278278 bg = "#f0fdf0" if score >= 0.8 else "#fdf6f0" if score >= 0.5 else "#fdf0f0"
279- input_text = str (r .get ("input" , "" ))[:100 ]
280- expected = str (r .get ("expected" , "" ))[:80 ]
281- predicted = str (r .get ("predicted" , "" ))[:80 ]
279+ input_text = str (r .get ("input" , "" ))
280+ expected = str (r .get ("expected" , "" ))
281+ predicted = str (r .get ("predicted" , "" ))
282+ td = 'style="padding:6px; border-bottom:1px solid #edebe9; font-size:0.85em; word-break:break-word"'
282283 rows += f'''
283284 <tr style="background:{ bg } ">
284- <td style="padding:6px; border-bottom:1px solid #edebe9" >{ i + 1 } </td>
285- <td style="padding:6px; border-bottom:1px solid #edebe9" >{ icon } </td>
286- <td style="padding:6px; border-bottom:1px solid #edebe9; font-size:0.85em" >{ _escape_html (input_text )} </td>
287- <td style="padding:6px; border-bottom:1px solid #edebe9; font-size:0.85em" >{ _escape_html (expected )} </td>
288- <td style="padding:6px; border-bottom:1px solid #edebe9; font-size:0.85em" >{ _escape_html (predicted )} </td>
285+ <td { td } >{ i + 1 } </td>
286+ <td { td } >{ icon } </td>
287+ <td { td } >{ _escape_html (input_text )} </td>
288+ <td { td } >{ _escape_html (expected )} </td>
289+ <td { td } >{ _escape_html (predicted )} </td>
289290 <td style="padding:6px; border-bottom:1px solid #edebe9; font-weight:bold">{ score :.0%} </td>
290291 </tr>'''
291292
292293 html = f'''
293- <table style="border-collapse:collapse; width:100%; margin:12px 0">
294+ <table style="border-collapse:collapse; width:100%; margin:12px 0; table-layout:fixed ">
294295 <thead>
295296 <tr style="background:#f3f2f1">
296- <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886">#</th>
297- <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886"></th>
298- <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886">Input</th>
299- <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886">Expected</th>
300- <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886">Predicted</th>
301- <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886">Score</th>
297+ <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886; width:30px ">#</th>
298+ <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886; width:30px "></th>
299+ <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886; width:25% ">Input</th>
300+ <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886; width:25% ">Expected</th>
301+ <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886; width:25% ">Predicted</th>
302+ <th style="padding:8px; text-align:left; border-bottom:2px solid #8a8886; width:50px ">Score</th>
302303 </tr>
303304 </thead>
304305 <tbody>{ rows } </tbody>
0 commit comments