Why a suggester cannot accept
Accepting a tracked change is an edit. If a suggester could accept their own suggestions, every change could skip review by someone else. A suggester can still navigate review, preview accept and reject without changing the document, and comment.Enforcement
The role applies to every surface:- Typing and the toolbar. The document stays in a mode the role permits.
setDocumentMode()clamps the requested mode: asking for"editing"as a suggester sets"suggesting". TheonDocumentModeChangecallback reports the resulting mode. - The built-in chrome. The mode toggle is hidden when the role has one mode. The ribbon shows review navigation without accept and reject. The inline accept and reject tooltip on each suggestion is hidden.
- The handle.
review.acceptCurrent(),acceptAll(),acceptSuggestions(), and the reject counterparts returnfalseor a decision with every IDunresolved. Comment mutations do nothing for a viewer. - Agent tools.
tools.execute()returns{ ok: false, error: { code: "role_not_permitted" } }for a mutation a viewer cannot make, and for anydirectModecall from a suggester. A delegatedagent.run()is checked the same way.
directMode applies a change without a tracked change, so a suggester cannot
use it. Without directMode, the same tool call adds the edit as a
suggestion.