feat: include select options in unknown field reports and Telegram messages
When a required select has no answer, the unknown field now includes the available options. Telegram notification shows them so the user knows exactly what to reply with. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -306,8 +306,14 @@ export class FormFiller {
|
||||
}
|
||||
}
|
||||
} else if (await this.isRequired(sel)) {
|
||||
// Non-EEO required select with no answer — report as unknown
|
||||
unknown.push(lbl);
|
||||
// Non-EEO required select with no answer — report as unknown with options
|
||||
const opts = await sel.$$('option');
|
||||
const options = [];
|
||||
for (const opt of opts) {
|
||||
const text = (await opt.textContent().catch(() => '') || '').trim();
|
||||
if (text && !/^select/i.test(text)) options.push(text);
|
||||
}
|
||||
unknown.push({ label: lbl, type: 'select', options });
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user