File tree Expand file tree Collapse file tree
report-app/src/app/pages/report-viewer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -273,6 +273,12 @@ <h2>Generated applications</h2>
273273 @if (initialAttempt?.buildResult?.status === 'error') {
274274 < span class ="status-badge error "> Initial build failed</ span >
275275 }
276+
277+ @if (hasBuildFailureDuringA11yRepair(result)) {
278+ < span class ="status-badge error "
279+ > Build failed after a11y repair</ span
280+ >
281+ }
276282 </ div >
277283 </ div >
278284 </ expansion-panel-header >
Original file line number Diff line number Diff line change @@ -419,4 +419,8 @@ export class ReportViewer {
419419
420420 return `wcs run --prompt=${ result . promptDef . name } --env=<path to ${ report . details . summary . environmentId } config>` ;
421421 }
422+
423+ protected hasBuildFailureDuringA11yRepair ( result : AssessmentResult ) : boolean {
424+ return result . attemptDetails . some ( attempt => attempt . buildFailedDuringA11yRepair ) ;
425+ }
422426}
Original file line number Diff line number Diff line change @@ -170,15 +170,15 @@ export async function attemptBuild(
170170 progress ,
171171 ) ;
172172
173+ let hasBuildFailure = attempt . buildResult . status !== BuildResultStatus . SUCCESS ;
174+ attempt . buildFailedDuringA11yRepair = hasBuildFailure ;
173175 attemptDetails . push ( attempt ) ;
174176 lastAttempt = attempt ;
175177
176178 // If we somehow introduced build errors via the Axe repair loop, we abort
177179 // further a11y repairs and capture the failed build. This is useful insight
178180 // as LLMs seem to regress when asked to repair a11y violations.
179- if ( attempt . buildResult . status !== BuildResultStatus . SUCCESS ) {
180- break ;
181- }
181+ if ( hasBuildFailure ) break ;
182182
183183 // Re-run serving & tests after Axe repair.
184184 // This allows us to check if we fixed the violations.
Original file line number Diff line number Diff line change @@ -220,6 +220,9 @@ export interface AttemptDetails {
220220 /** LLM reasoning messages for generating these files. */
221221 // Note: May not be set in older reports.
222222 reasoning ?: string ;
223+
224+ /** Whether the build failed during an accessibility repair attempt. */
225+ buildFailedDuringA11yRepair ?: boolean ;
223226}
224227
225228/** Statistics related to the build process of the generated applications. */
You can’t perform that action at this time.
0 commit comments