Skip to content

[Permissions] Author three-part approval guidance and explicitly apply templates - #4261

Draft
DoodleBears wants to merge 13 commits into
t3/approval-template-selectionfrom
t3/approval-template-management
Draft

DoodleBears wants to merge 13 commits into
t3/approval-template-selectionfrom
t3/approval-template-management

Conversation

@DoodleBears

@DoodleBears DoodleBears commented Nov 15, 2026 •

Copy link
Copy Markdown
Contributor

Issue #4244 · Depends on #4250

Why the change

Let Humans write approval guidance as separate Always ask, Always allow and supplemental sections, create templates from an explicit source, and choose when saving also applies the template to a Bot.

Special things to note

Change outline

Closes #4244

Explicit Blank or selected source
  → independent draft
  → Always ask[] / Always allow[] / supplemental text
  → Save only | Save and apply to this Bot
  → existing bounded template owner
  → Reviewer receives ask → allow → supplemental with saved content/version

The editor reuses the Bot settings grouped card list: only the outer corners are rounded, row seams are straight, and each input keeps a visible keyboard focus outline. CLI create/edit supports explicit blank/copy/parts input and the same optional application path.

Editor Before: e40ae19 After: 43cfc1b
Light Before light editor After light editor
Dark Before dark editor After dark editor
Library light Before light library After light library
Library dark Before dark library After dark library

These paired English captures use the same legacy data, 1281×900 viewport and DPR 1.14; the unchanged base captures are explicitly reused. Current Chinese filled-row evidence shows the requested grouping:

Current Chinese light grouped rules
Current Chinese dark grouped rules
Supplemental guidance after natural scrolling

Validation: root/mobile types and focused behavior/token tests passed; fresh Spec review had no findings and the Standards focus finding was repaired. Frozen-head build/served Client hashes, real CLI/Web blank/copy/save/apply/readback, actual Tab focus, middle-row edit/remove/add isolation, and a real Reviewer Session reaching ask-human passed. Existing Review content/version remains isolated from later edits.

DOM-ready opening, one matched pair Base e40ae19 Head 43cfc1b Budget
Template library 84.8 ms 83.3 ms 1500 ms
Legacy editor with exact full text 17.3 ms 19.9 ms 1500 ms
Added three ask + three allow editor — 20.6 ms 1500 ms

Protocol V2 uses CLI show for complete text and identical corpus hashes, trusted clicks, CSS visibility and exact values; Chrome 153.0.8010.36, fresh isolated headless profiles, English/light, 1281×900/DPR 1.14. Earlier preview timeout and V1 fixture-validator failures are retained separately. This is DOM readiness, with no presented-FPS, native or speedup claim. CI remains pending.

Summary by CodeRabbit

  • New Features

    • Approval templates can now be created from scratch or copied from an existing template, then edited with separate “Always ask,” “Always allow,” and free-text guidance.
    • Save changes without applying them, apply a saved template to a Bot, or do both. Editing a shared template shows which Bots use it; changes affect future Reviews, while in-progress Reviews keep their captured template.
    • The CLI now supports creating blank templates, editing structured guidance, and optionally applying a template to a Bot.
  • Documentation

    • Updated English and Chinese guides with template editing, copying, selection, and compatibility details.

DoodleBears and others added 13 commits November 15, 2026 22:52
Issue: #4205
Agent-Task: codex/local/01a1df40-f4f6-7a32-9cd2-245844776694
Issue: #4205
Agent-Task: codex/local/01a1df40-f4f6-7a32-9cd2-245844776694
Resolve remote history scopes, restored Assignment request delivery,
and case-insensitive HTTP methods at the public effect boundary.

Issue: #4205
Agent-Task: codex/local/01a1df05-43d2-7380-84a0-99084cd0f49c
The prepared full tree equals0c86d1ff. Prior E1 portable fixes are already present in landed main; retain the reviewed E3 stage-based decision, dynamic-global recognition and fail-to-Human lookup.

Issue: #4211
Agent-Task: codex/local/01a1df05-43d2-7380-84a0-99084cd0f49c
Expose the inherited global template in the existing mobile selection list and retain globalDefault at the Host client boundary. Keep legacy Hosts without that field on their supported choices; invalid inherited answers remain failed reads.

Add a Bot save/readback regression proving successful writes are not replayed and the UI remains unknown rather than falsely Off after failed refresh.

Issue: #4211
Agent-Task: codex/local/01a1df05-43d2-7380-84a0-99084cd0f49c
Issue: #4211
AgentTask: bot-approval-implementation
Issue: #4211
AgentTask: bot-approval-implementation
Issue: #4244
Agent-Task: codex/local/t3-4d0dd206-86059e8a3599fc27
Issue: #4244
Agent-Task: codex/local/01a1df05-43d2-7380-84a0-99084cd0f49c
… main

Refs #4244

Agent-Task: codex/local/01a1df05-43d2-7380-84a0-99084cd0f49c
Agent claim: #4244 (comment)
Reuse the External identities/connectors SidebarCardList and SidebarCardRow pattern for independent Always ask/Always allow inputs and remove actions. Keep only outer list corners and use the final row to add guidance.

Refs #4244
Agent claim: #4244 (comment)
Restore a token-based focus-within outline while keeping shared card rows straight at the joins.\n\nRefs #4244\nAgent claim: #4244 (comment)
@DoodleBears DoodleBears added the ci:full Run the complete verification test plan for this pull request label Nov 15, 2026
@coderabbitai

coderabbitai Bot commented Nov 15, 2026 •

Copy link
Copy Markdown

Explain Change →

Note

CodeRabbit ASCII loading animation

Currently processing new changes in this PR. This may take a few minutes, please wait...

Review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0a6b344d-56a8-4f69-bbee-997cc7cd48fb
Commits

Reviewing files that changed from the base of the PR and between e40ae19 and 43cfc1b.

Files selected for processing: 16

  • .agents/skills/verify-deepseekbot/features/approval-templates.md
  • changes/4244-template-guidance-editor.md
  • docs/adr/0342-bot-approval-selects-one-template-and-keeps-deterministic-authorization-separate.md
  • docs/architecture/bot-approval-policy.md
  • docs/architecture/bot-approval-policy.zh.md
  • docs/bot-cli.md
  • docs/bot-cli.zh.md
  • packages/client/src/client/approval-template-library.tsx
  • packages/client/src/client/locale.ts
  • packages/client/test/approval-template-library.test.ts
  • packages/core/src/bots/cli-approval-templates.ts
  • packages/core/src/workspaces/approval-reviewer.ts
  • packages/core/src/workspaces/approval-template-guidance.ts
  • packages/core/src/workspaces/approval-templates.ts
  • packages/core/test/approval-reviewer.test.ts
  • packages/core/test/approval-template-library.test.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@DoodleBears

Copy link
Copy Markdown
Contributor Author

Current-head Chinese review explainer: download standalone HTML.

Bound to PR #4261, head 43cfc1b7d9a176bcb98b1b6e8fe806fc526990b2, base e40ae19c327150851a04e1849b0e2d5d99dc6eec. Public hash, size, media type and attachment readback verified. The page covers authoring, explicit apply, Reviewer guidance, rollback and the protocol-V2 opening pair.

The generated page has zero draft warnings. Inline visual preview is blocked by the generator’s 70vh rule; this is recorded as an incomplete visual check. Web screenshots render in the PR; Android/iOS and final Human acceptance remain pending. The explainer is a review aid, not runtime proof.

@DoodleBears

Copy link
Copy Markdown
Contributor Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 15, 2026

Copy link
Copy Markdown
Action performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:full Run the complete verification test plan for this pull request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant