🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

feat(site): move template allowlist to ai settings - #26615

Merged
DanielleMaywood merged 3 commits into
mainfrom
feat/ai-settings-template-allowlist
Jun 24, 2026
Merged

feat(site): move template allowlist to ai settings#26615
DanielleMaywood merged 3 commits into
mainfrom
feat/ai-settings-template-allowlist

Conversation

@DanielleMaywood

Copy link
Copy Markdown
Contributor

Move the Coder Agents template allowlist from Agents settings into AI Settings and redirect the old /agents/settings/templates route to /ai/settings/templates.

Redesign the page as an allowlist table with an add-template picker, empty unrestricted state, and per-row remove action. The Agents settings sidebar now links out to AI Settings for Templates, matching the existing Providers and Models links.

Note

🤖 This PR was written by Coder Agent on behalf of Danielle Maywood

@DanielleMaywood
DanielleMaywood force-pushed the feat/ai-settings-template-allowlist branch 2 times, most recently from 6692bdf to 4a0d153 Compare June 23, 2026 13:32
@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review

coder-agents-review Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Chat: Review posted | View chat
Requested: 2026-06-24 08:13 UTC by @DanielleMaywood
Spend: $70.99 / $100.00

Review history
  • R1 (2026-06-23): 14 reviewers, 5 Nit, 2 Note, 5 P3, 1 P4, COMMENT. Review
  • R2 (2026-06-23): 9 reviewers, 6 Nit, 3 Note, 1 P2, 5 P3, 2 P4, REQUEST_CHANGES. Review
  • R3 (2026-06-24): 7 reviewers, 6 Nit, 3 Note, 1 P2, 5 P3, 2 P4, APPROVE. Review

deep-review v0.9.0 | Round 3 | ecfff8a..bc28ae4

Last posted: Round 3, 17 findings (1 P2, 5 P3, 2 P4, 6 Nit, 3 Note), APPROVE. Review

Finding inventory

Finding inventory

Findings

# Sev Status Location Summary Round Reviewer Posted
CRF-1 P3 Author fixed (87f12f9) TemplatesPageView.tsx:389-395 Save error discards API error cause; static message hides 403/500 details R1 Leorio P3, Zoro P3 Yes
CRF-2 P3 Author fixed (87f12f9) TemplatesPage.tsx:33 Load error merges two independent query failures into one misleading message R1 Leorio P3, Zoro P3 Yes
CRF-3 P3 Author fixed (87f12f9) TemplatesPageView.tsx:87-165 AddTemplateDropdown hand-rolls searchable popover; Command primitives provide keyboard nav and ARIA roles R1 Robin Yes
CRF-4 P3 Author fixed (87f12f9) TemplatesPageView.tsx:273-289 Empty state manually reconstructs TableEmpty component used by sibling pages R1 Zoro Yes
CRF-5 P3 Author fixed (87f12f9) TemplatesPageView.stories.tsx:154 LoadError story asserts Retry button exists but never clicks it or asserts onRetry called R1 Bisky Yes
CRF-6 P4 Author accepted R2 (follows sibling convention; isSaving guards double-fires) TemplatesPageView.tsx:149-151 No visual feedback between action and refetch completion; table stays stale R1 Nami P3 Yes
CRF-7 Nit Author fixed (87f12f9) TemplatesPageView.tsx:43-46 Dead MutationCallbacks interface; view never passes options arg R1 Hisoka, Pariston, Nami, Robin, Zoro, Chopper, Meruem Yes
CRF-8 Nit Author fixed (87f12f9) TemplatesPageView.tsx:392 cn() wraps single static string; no-op R1 Leorio, Nami, Meruem Yes
CRF-9 Nit Author fixed (87f12f9) TemplatesPageView.tsx:65 developerCount is a noun; convention is formatDeveloperCount R1 Gon Yes
CRF-10 Nit Author fixed (87f12f9) TemplatesPageView.tsx:87 AddTemplateDropdown name says DropdownMenu but component uses Popover R1 Gon Yes
CRF-11 Nit Author fixed (87f12f9) TemplatesPageView.stories.tsx:123 hidden: true on button query bypasses accessibility check R1 Bisky Yes
CRF-12 Note Author fixed (87f12f9) TemplatesPageView.tsx:65-68 developerCount duplicates inline expression at TemplatesPage/TemplatesPageView.tsx:135 R1 Robin Yes
CRF-13 Note Author fixed (87f12f9) TemplatesPageView.stories.tsx:79 NoRestrictions story does not interact with empty-state CTA R1 Bisky P4, Chopper Note Yes
CRF-14 P2 Author fixed (bc28ae4) TemplatesPageView.tsx:299 Save operations propagate phantom template IDs from deleted templates R2 Mafuuu Yes
CRF-15 P4 Author fixed (bc28ae4) TemplatesPageView.stories.tsx:210 SaveError story does not assert table still renders alongside error R2 Bisky Yes
CRF-16 Nit Author fixed (bc28ae4) TemplatesPageView.tsx:103 shouldFilter={false} makes keywords prop on CommandItem dead R2 Pariston Yes
CRF-17 Note Author fixed (bc28ae4) TemplatesPageView.stories.tsx No story renders with isSaving: true R2 Pariston Yes
CRF-18 P4 Dropped by orchestrator (visual-only loading story; standard Storybook practice) TemplatesPageView.stories.tsx:171 Loading story has no play function R2 Bisky No

Round log

Round 1

Panel: Bisky, Hisoka, Mafu-san, Mafuuu, Pariston, Gon, Leorio, Nami, Ging-react, Robin, Zoro, Komugi, Chopper, Meruem. 5 P3, 1 P4, 5 Nit, 2 Note. Reviewed against ecfff8a..4a0d153aa762.

Round 2

CRF-1 through CRF-5, CRF-7 through CRF-13 addressed. CRF-6 acknowledged. Panel: Bisky, Hisoka, Mafu-san, Mafuuu, Pariston, Nami, Chopper, Komugi, Kite. 1 P2, 1 P4, 1 Nit, 1 Note new. 1 dropped. Reviewed against ecfff8a..87f12f9.

Round 3

CRF-14 through CRF-17 addressed. Panel: Bisky, Hisoka, Mafu-san, Mafuuu, Pariston, Komugi, Meruem. 0 new findings. All prior findings closed. Reviewed against ecfff8a..bc28ae4.

About deep-review

CRF = Coder Review Finding (P0-P4, Nit, Note)

Reviewer Focus
Bisky tests
Chopper ops/errors
Churn-guard change verification
Ging language modernization
Gon naming
Hisoka edge cases
Killua perf
Kite change integrity
Knov contracts
Knuckle SQL
Komugi flake/determinism
Kurapika security
Law decomposition
Leorio docs
Luffy product
Mafu-san process
Mafuuu contracts
Melody dispatch/pairing
Meruem structural
Nami frontend
Netero mechanical checks
Pariston premise testing
Pen-botter product gaps
Razor verification
Robin duplication
Ryosuke Go arch
Takumi concurrency
Zoro shape

🤖 Managed by Coder Agents.

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clean move with a solid UI redesign. The page relocation, route redirect, and sidebar consistency are all well executed. Story coverage improved from 1 story to 5, and the mutation lifecycle is correctly gated by isPending through the refetch cycle. The fixture data in stories is thoughtful, with realistic template names and developer counts.

Severity summary: 5 P3, 1 P4, 5 Nit, 2 Note.

The P3 findings cluster around two themes: (1) error handling diverges from the AI Settings sibling convention by discarding error details and merging failure modes, and (2) hand-rolling UI patterns that existing primitives (Command, TableEmpty) already provide. The story coverage gap on the Retry button wiring is also worth closing.

"The button becomes costume jewelry: looks right, does nothing." (Bisky, on the LoadError story)


site/src/pages/AISettingsPage/TemplatesPage/TemplatesPage.tsx:33

P3 [CRF-2] Load error merges two independent failure modes. Boolean(templatesQuery.error || allowlistQuery.error) collapses two distinct API failures into one hasError boolean, and the view shows "Failed to load template data." If the allowlist endpoint returns a 500 but templates succeeds, the admin investigates the wrong thing.

Pass separate error props or the actual error objects so the view can say "Failed to load allowlist configuration" vs "Failed to load templates" depending on which query errored. The sibling pages use ErrorAlert with the real error object. (Leorio P3, Zoro P3)

🤖

🤖 This review was automatically generated with Coder Agents.

Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.tsx Outdated
Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.tsx Outdated
Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.tsx Outdated
Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.stories.tsx Outdated
Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.tsx Outdated
Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.tsx Outdated
Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.tsx Outdated
Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.stories.tsx Outdated
Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.tsx Outdated
@DanielleMaywood
DanielleMaywood force-pushed the feat/ai-settings-template-allowlist branch from 4a0d153 to 4e4e82c Compare June 23, 2026 22:41

Copy link
Copy Markdown
Contributor Author

🤖 This comment was written by Coder Agent on behalf of Danielle Maywood 🤖

Fixed by preserving the specific query errors in the page view. The templates page now passes separate template and allowlist errors through to ErrorAlert instead of collapsing them into a single boolean, so the UI can show the failing source while keeping the retry behavior.

@DanielleMaywood
DanielleMaywood force-pushed the feat/ai-settings-template-allowlist branch from 4e4e82c to c909e2f Compare June 23, 2026 22:47
@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

R1 fixes are solid. All 12 code fixes verified by the panel: Command primitives, ErrorAlert with separate query errors, TableEmpty, story interactions, and cleanups all landed correctly. CRF-6 (no optimistic updates) accepted as following sibling convention.

R2 severity summary: 1 P2, 1 P4, 1 Nit, 1 Note.

The P2 is a correctness regression: the old code resolved template IDs against live templates before saving, naturally dropping IDs for deleted templates. The new code saves raw IDs from the server, which means phantom IDs for deleted templates silently persist in the allowlist. The UI shows "No restrictions set" while the server enforces a non-empty allowlist.

"The old AgentSettingsTemplatesPageView resolved IDs against optionsByID into serverSelection, then saved from currentSelection, which naturally excluded IDs with no matching template. The new code skips this resolution step for saves." (Mafuuu, tracing the regression)

🤖 This review was automatically generated with Coder Agents.

Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.tsx
Comment thread site/src/pages/AISettingsPage/TemplatesPage/TemplatesPageView.tsx
@DanielleMaywood

Copy link
Copy Markdown
Contributor Author

/coder-agents-review

@coder-agents-review coder-agents-review Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All findings resolved. 3 rounds, 18 findings (1 P2, 5 P3, 2 P4, 5 Nit, 2 Note, 1 accepted, 1 dropped, 1 not posted). Every code fix verified by the panel.

The P2 (phantom template IDs) was the critical catch: the redesign from batch-save to immediate-save dropped the ID resolution step that filtered out deleted templates. The fix derives save payloads from the resolved template list, and a dedicated PhantomTemplateIDs story covers both add and remove paths.

The overall arc is solid: feature moved to AI Settings, UI redesigned with project primitives (Command, TableEmpty, ErrorAlert), error handling split per query, story coverage at 8 stories with 7 play functions, and no stale references left behind.

"I tried to build a case against this change and couldn't." (Pariston, R3)

🤖 This review was automatically generated with Coder Agents.

@DanielleMaywood
DanielleMaywood marked this pull request as ready for review June 24, 2026 08:51
@coder-tasks

coder-tasks Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Documentation Check

Updates Needed

  • docs/ai-coder/agents/platform-controls/index.md (line 86) - Navigation path references Agents > Settings > Manage Agents > Templates; should be updated to reflect the new location under AI Settings > Templates
  • docs/ai-coder/agents/platform-controls/template-optimization.md (line 23) - Step-by-step instructions say "Navigate to Agents > Settings > Manage Agents > Templates"; should be updated to the new AI Settings path

Automated review via Coder Agents

@DanielleMaywood
DanielleMaywood merged commit e569e16 into main Jun 24, 2026
34 of 36 checks passed
@DanielleMaywood
DanielleMaywood deleted the feat/ai-settings-template-allowlist branch June 24, 2026 09:00
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants