1.7 KiB
1.7 KiB
Answered permissions fold into a chip like tool calls
User request: once a permission is allowed or rejected it should be grouped and shown the way tool calls are, not left as a full card.
Behavior
- An open request (or one whose reply was refused) stays the full card with its Allow once / Always allow / Reject controls.
- Once answered locally or resolved by the server, it leaves the card list and
joins its turn's footer as
N permissionsbesideN tools(groupSettledPermissionsinlib/features/chat/conversation/chat_permission_group.dart). The turn is matched by the frame'ssource.id(Claude tool-use id = tool part id) orsource.message_id(OpenCode). Codex frames name no source, so those (and requests whose turn is paged out) share one chip where the first stood. - The chip is tinted when a request was rejected; it opens a native sheet with
one disclosure per request (
action · outcome) holding the summary, full resources and the server's note. The tool chip's frame is now the sharedChatTurnChip(lib/features/chat/ui/transcript/chat_turn_chip.dart). - Permission frames are not part of stored history, so as before they only exist for the current visit (bounded to 20 settled requests).
Evidence
- Tests: new
chat_permission_group_test.dart(turn matching for Claude and OpenCode, loose Codex group, pending/refused stay cards, chip beside tools, sheet contents); twochat_permission_card_test.dartcases now expect the chip.flutter analyzeclean; full suite 1,865 tests pass. - Browser:
tool/chat_approvals_probe.mjs(updated) passes in Material and Cupertino; captures inbuild/chat-permission-group-probe/. - Not deployed, no APK, no device verification.