File tree Expand file tree Collapse file tree 4 files changed +16
-3
lines changed
report-app/src/app/pages/report-viewer Expand file tree Collapse file tree 4 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -270,6 +270,12 @@ <h2>Generated applications</h2>
270
270
@if (initialAttempt?.buildResult?.status === 'error') {
271
271
< span class ="status-badge error "> Initial build failed</ span >
272
272
}
273
+
274
+ @if (hasBuildFailureDuringA11yRepair(result)) {
275
+ < span class ="status-badge error "
276
+ > Build failed after a11y repair</ span
277
+ >
278
+ }
273
279
</ div >
274
280
</ div >
275
281
</ expansion-panel-header >
Original file line number Diff line number Diff line change @@ -426,4 +426,8 @@ export class ReportViewer {
426
426
427
427
return `wcs run --prompt=${ result . promptDef . name } --env=<path to ${ report . details . summary . environmentId } config>` ;
428
428
}
429
+
430
+ protected hasBuildFailureDuringA11yRepair ( result : AssessmentResult ) : boolean {
431
+ return result . attemptDetails . some ( attempt => attempt . buildFailedDuringA11yRepair ) ;
432
+ }
429
433
}
Original file line number Diff line number Diff line change @@ -170,15 +170,15 @@ export async function attemptBuild(
170
170
progress ,
171
171
) ;
172
172
173
+ let hasBuildFailure = attempt . buildResult . status !== BuildResultStatus . SUCCESS ;
174
+ attempt . buildFailedDuringA11yRepair = hasBuildFailure ;
173
175
attemptDetails . push ( attempt ) ;
174
176
lastAttempt = attempt ;
175
177
176
178
// If we somehow introduced build errors via the Axe repair loop, we abort
177
179
// further a11y repairs and capture the failed build. This is useful insight
178
180
// 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 ;
182
182
183
183
// Re-run serving & tests after Axe repair.
184
184
// 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 {
220
220
/** LLM reasoning messages for generating these files. */
221
221
// Note: May not be set in older reports.
222
222
reasoning ?: string ;
223
+
224
+ /** Whether the build failed during an accessibility repair attempt. */
225
+ buildFailedDuringA11yRepair ?: boolean ;
223
226
}
224
227
225
228
/** Statistics related to the build process of the generated applications. */
You can’t perform that action at this time.
0 commit comments