feat(chat): fold answered permissions into a turn chip like tool calls
This commit is contained in:
@@ -305,15 +305,11 @@ try {
|
||||
});
|
||||
|
||||
await click('Allow once');
|
||||
const approvedRead = await waitForOCR('Allowed once');
|
||||
for (const text of ['Recorded by the probe fixture']) {
|
||||
if (!approvedRead.toLowerCase().includes(text.toLowerCase())) {
|
||||
throw new Error(`Answered approval lacks ${JSON.stringify(text)}`);
|
||||
}
|
||||
}
|
||||
// The answered request folds into its turn chips, like tool calls.
|
||||
await waitForOCR('1 permission');
|
||||
await capture('approval-answered');
|
||||
evidence.checks.push({
|
||||
check: 'the approval reply was sent and the recorded resolution cleared controls',
|
||||
check: 'the approval reply was sent and the request folded into a permissions chip',
|
||||
style,
|
||||
allowOnceStillVisible: await hasText('Allow once'),
|
||||
});
|
||||
@@ -331,10 +327,22 @@ try {
|
||||
sendAnswerStillVisible: await hasText('Send answer'),
|
||||
});
|
||||
|
||||
if (evidence.checks.at(-1).sendAnswerStillVisible) {
|
||||
await click('1 permission request');
|
||||
await click('bash · Allowed once');
|
||||
const sheetRead = await waitForOCR('Recorded by the probe fixture');
|
||||
if (!flat(sheetRead).includes(flat('rm -rf build'))) {
|
||||
throw new Error('The permissions sheet lost the recorded request');
|
||||
}
|
||||
await capture('permissions-sheet');
|
||||
evidence.checks.push({
|
||||
check: 'the permissions chip opens the recorded request and its outcome',
|
||||
style,
|
||||
});
|
||||
|
||||
if (evidence.checks.at(-2).sendAnswerStillVisible) {
|
||||
throw new Error('Send answer stayed visible after the question resolved');
|
||||
}
|
||||
if (evidence.checks.at(-2).allowOnceStillVisible) {
|
||||
if (evidence.checks.at(-3).allowOnceStillVisible) {
|
||||
throw new Error('Allow once stayed visible after the approval resolved');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user