# Address review: persist view-only chip role and document badge fallback · dara/icarus

[View on GitCafe](https://git.cafe/dara/icarus/commit/ffdc081206912b6cdb4a7118148a8b24edc1a8b4)

Repository: [dara/icarus](https://git.cafe/dara/icarus)

Visibility: public

Requested revision: ffdc081206912b6cdb4a7118148a8b24edc1a8b4

Requested commit: ffdc081206912b6cdb4a7118148a8b24edc1a8b4

Commit: ffdc081206912b6cdb4a7118148a8b24edc1a8b4

Tree: 0a5ed87b9a39c12d3da46f20815fb96ee8568409

Author: Dara Adedeji

Committer: Dara Adedeji

## Message

```
Address review: persist view-only chip role and document badge fallback

- Add lastKnownCloudRoleProvider, which caches the last non-null header
  role for the open strategy and resets only when a different strategy
  is opened. The editor's "View only" chip now reads this instead of
  remoteStrategySnapshotProvider.valueOrNull, so it no longer flickers
  off during transient snapshot reloads, refresh errors, or auth
  incidents; it is absent only before the role has ever been known.
- Document that cloudBadgeKindForRole's unknown-role fallback to the
  viewer badge deliberately mirrors StrategyCapabilities.fromCloudRole,
  which grants viewer capabilities to any role that is not exactly
  'owner' or 'editor'.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

```

## Parents

- [6ac1ad4a8d2a5093db2c536f41090d0da97c35d0](https://git.cafe/dara/icarus/commit/6ac1ad4a8d2a5093db2c536f41090d0da97c35d0?format=markdown)

[Source at this commit](https://git.cafe/dara/icarus/tree/ffdc081206912b6cdb4a7118148a8b24edc1a8b4?format=markdown)
