Permissions
An inline card that asks the user to approve or deny a proposed agent action from inside the Composer.
Installation
import { Permissions } from "@o/pipeline/experimental/components/composer/permissions";
Usage
Permission needed for creating a next step on DEAL-142
Re-engage Steve Jobs — follow up on radio silence
4 DecPermission needed for commenting on DEAL-142
It went well.
Permissions resolves nothing itself. There is no entity-to-icon lookup and no date formatting. Permissions.ItemIcon takes whichever icon names the proposed action (IconNextSteps, IconComment, …), and Permissions.ItemMetaContent takes an already-formatted date string; the caller decides both. Permissions.ItemMeta is optional per item: omit it entirely for actions with no due date, such as a proposed comment.
Permissions.ItemIcon and Permissions.ItemMetaIcon both render a Glyph, so an icon in either slot gets the same size and colour.
Composition
Permissions.Root
├── Permissions.Header
│ ├── Permissions.Title
│ ├── Permissions.Dismiss
│ └── Permissions.Pagination
│ ├── Permissions.PaginationPrevious
│ └── Permissions.PaginationNext
├── Permissions.Item
│ ├── Permissions.ItemIcon
│ ├── Permissions.ItemContent
│ └── Permissions.ItemMeta
│ ├── Permissions.ItemMetaContent
│ └── Permissions.ItemMetaIcon
└── Permissions.Footer
├── Permissions.Progress
└── Permissions.Actions
├── Permissions.Action
├── Permissions.Deny
├── Permissions.AllowAlways
└── Permissions.Allow
Inside Composer
Pagination
When more than one request is waiting, show Permissions.Pagination in place of Permissions.Dismiss and Permissions.Progress at the start of the footer, the same way Questionnaire pages through questions. Permissions holds no paging state: the caller owns the active index, disables Permissions.PaginationPrevious and Permissions.PaginationNext at the ends, and passes current and total to Permissions.Progress. Permissions.Progress takes only the space the actions leave and hides the count when it would not fit.
Permission needed for creating a next step on DEAL-142
Re-engage Steve Jobs — follow up on radio silence
4 Dec