Files
pipelines/app/notes/chat-permission-group.md
T

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 permissions beside N tools (groupSettledPermissions in lib/features/chat/conversation/chat_permission_group.dart). The turn is matched by the frame's source.id (Claude tool-use id = tool part id) or source.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 shared ChatTurnChip (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); two chat_permission_card_test.dart cases now expect the chip. flutter analyze clean; full suite 1,865 tests pass.
  • Browser: tool/chat_approvals_probe.mjs (updated) passes in Material and Cupertino; captures in build/chat-permission-group-probe/.
  • Not deployed, no APK, no device verification.