Stage D part 5: AI Models and Agents & Actions - #1314
Merged
Paul Lizer (paullizer) merged 1 commit intoAug 19, 2026
Conversation
The last two catch-all tabs. Both needed modal surgery rather than
plain card moves, which is why they were held back.
AI Models
Model Endpoints multi-endpoint-configuration, and the legacy
model settings modal that holds the Chat Model
card and is opened from it
Embeddings embeddings-configuration
Image Generation image-generation-configuration
Agents & Actions
Agents agents-configuration, agent-template-approvals-section
Actions document-action-capabilities-card, actions-configuration
Inbound MCP inbound-mcp-configuration and its three dialogs
Navigation is now 14 groups / 40 tabs / 88 sections.
Three splitting problems, and how each was solved
gpt-configuration is not a top-level card. It lives inside
legacyModelSettingsModal. The modal was relocated to sit directly
after multi-endpoint-configuration, the card holding its trigger,
and both were then assigned to the same tab so the modal's opening
lines, the nested card and the closing lines landed together and it
reassembled intact.
legacyModelDiscoveryIdentityGuideModal is opened from endpoints,
embeddings and image generation, which now sit in three different
tabs, so it could only ever have opened from one of them. It moved
to the shell, outside every pane. Checked first that it carries no
name= attribute, since moving a field outside the form would change
the save payload. It carries none.
The inbound MCP block is a {% if mcp_ui_enabled %} conditional
spanning a card and three modals. It was lifted out whole into its
own pane rather than split.
Tab-level conditions
The nav map now supports condition on a tab, not just a section, so
a tab whose entire pane is behind a feature flag disappears instead
of rendering empty. Both renderers honour it.
Verified: 40 tabs with mcp_ui_enabled, 39 without.
Also removed seven dangling section comments left at the tail of panes,
each labelling a card that had moved to another tab.
Two location tests asserted document order that only meant something
while everything shared one tab. They now assert the real invariant:
the embeddings and image cards are not inside the legacy modal, and
the document action card leads the tab it actually lives in.
Verified
field contract 462 names / 110 card ids, unchanged
regression set 32 failures, identical to baseline
jinja compile 42/42 admin templates
xss sinks pass
modal placement all modals reachable, all ids unique
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Paul Lizer (paullizer)
merged commit Aug 19, 2026
434f574
into
feature/admin-settings-ia
11 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fifth batch of Stage D. The last two catch-all tabs: AI Models and Agents & Actions. Both needed modal surgery rather than plain card moves, which is why they were held back from #1313.
Base:
feature/admin-settings-ia.AI Models
Agents & Actions
Navigation is now 14 groups / 40 tabs / 88 sections.
Three splitting problems, and how each was solved
1.
gpt-configurationis not a top-level card. It lives insidelegacyModelSettingsModal. Naively splitting would have torn the card out of the dialog.Solved by relocating the modal to sit directly after
multi-endpoint-configuration— the card holding its trigger — then assigning both to the same tab. The modal's opening lines, the nested card and the closing lines all landed inmodel-endpoints.htmlin order, and it reassembled intact. Verified div-balanced with the nested card still inside.2. A dialog shared across three tabs.
legacyModelDiscoveryIdentityGuideModal(the Azure OpenAI Model Setup Guide) is opened from the endpoints, embeddings and image generation cards. Once those became three tabs, the dialog could only have opened from whichever tab it landed in — an inactive pane is hidden.It moved to the shell, outside every pane. Checked first that it carries no
name=attribute, since moving a form field outside the<form>would silently change the save payload. It carries none.3. A Jinja conditional spanning a card and its modals. The inbound MCP block is
{% if mcp_ui_enabled %}…{% endif %}wrapping the card and three dialogs. It was lifted out whole into its own pane rather than split.Tab-level conditions
The nav map now supports
conditionon a tab, not just a section, so a tab whose entire pane sits behind a feature flag disappears instead of rendering an empty tab. Both the sidebar and the tab strip honour it.Verified by rendering: 40 tabs with
mcp_ui_enabled, 39 without.Housekeeping
Removed seven dangling section comments left at the tail of panes, each labelling a card that had moved to another tab (for example
embeddings.htmlended with<!-- Image Generation Configuration Section -->).Two tests corrected
Both asserted document order that only meant something while everything shared one tab:
test_ai_models_tab_embedding_image_locationcompared string indexes against the legacy modal. It now balances the modal's markup and asserts the cards are not inside it — which is what the test was actually for.test_admin_document_action_capabilities_locationasserted the card sits beforeagents-configuration. That card is now in a different tab, so it asserts against the Actions tab it actually leads.No settings changed
Not one
name=attribute was touched.Next
Only Backup & Recovery is left in Stage D, and it is the hardest — complication I4, a ~985-line migration workflow that must split across Backup / Migrate / Restore / Jobs as one unit. Then Stage E splits
system-settings-sectionand mirrors the role toggles.