Skip to content

[MCP] Toggle Default via field on MCP Configuration pages#8315

Merged
onbuyuka merged 4 commits into
mainfrom
bugs/612699-mcp-default-config-toggle
May 27, 2026
Merged

[MCP] Toggle Default via field on MCP Configuration pages#8315
onbuyuka merged 4 commits into
mainfrom
bugs/612699-mcp-default-config-toggle

Conversation

@onbuyuka
Copy link
Copy Markdown
Contributor

@onbuyuka onbuyuka commented May 26, 2026

Summary

Replaces the Set as Default / Clear Default actions on the MCP Configuration Card and List pages with an editable Default field. The new field's OnValidate trigger toggles the designation directly via the existing MCPConfigImplementation.SetAsDefaultConfiguration / ClearDefaultConfiguration helpers, so behaviour is unchanged - just exposed through the field instead of two separate actions.

Changes

  • MCP Config Card (page 8351): made Default field editable when the row is not the built-in default; added OnValidate trigger; removed SetAsDefault and ClearDefault actions and their promoted refs.
  • MCP Config List (page 8350): removed SetAsDefault and ClearDefault repeater actions and their promoted refs (the column's Default field already toggles the designation now).

Fixes AB#612699

Replace the Set as Default / Clear Default actions on the MCP Config Card
and MCP Config List pages with an editable Default field that toggles the
designation directly. The new field's OnValidate trigger calls the existing
MCPConfigImplementation.SetAsDefaultConfiguration / ClearDefaultConfiguration
helpers, matching the previous action behaviour.

Fixes AB#612699

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@onbuyuka onbuyuka requested a review from a team as a code owner May 26, 2026 14:31
@github-actions github-actions Bot added this to the Version 29.0 milestone May 26, 2026
onbuyuka and others added 2 commits May 26, 2026 16:35
Fold the explanation from the removed Clear Default action ('the system reverts to built-in default settings') into the Default field's tooltip, so the information surfaced by the old actions is still discoverable on hover.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The OnValidate trigger already runs with Rec.Default set to the user's new value, and the framework persists it after the trigger returns, so the page does not need an explicit refresh to display the toggled state.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@onbuyuka onbuyuka enabled auto-merge (squash) May 26, 2026 14:40
@github-actions
Copy link
Copy Markdown
Contributor

$\textbf{🟡\ Medium\ Severity\ —\ Security} \quad \color{gray}{\texttt{\small Iteration\ 1}}$

Missing AccessByPermission on Default field

The removed SetAsDefault and ClearDefault actions both declared AccessByPermission = tabledata "MCP Configuration" = M, providing an explicit UI-level permission guard. The new Default field's OnValidate trigger has no equivalent AccessByPermission property, so the UI-level guard is silently dropped.

Recommendation:

  • Add AccessByPermission = tabledata "MCP Configuration" = M to the Default field definition to preserve the same access control that the replaced actions enforced.
field(Default; Rec.Default)
{
    Caption = 'Default';
    ToolTip = '...';
    Editable = not IsDefault;
    AccessByPermission = tabledata "MCP Configuration" = M;

    trigger OnValidate()
    begin
        ...
    end;
}

Line mapping was unavailable, so this was posted as an issue comment.

👍 useful · ❤️ especially valuable · 👎 wrong - reply with why

onbuyuka pushed a commit that referenced this pull request May 26, 2026
Manual backport of PR #8315 (4 commits: eb1b76e, fab30ab, 1e061fc,

6fdb460). Couldn't cherry-pick because main was restructured into

Column1/Column2 page groups while releases/28.x keeps the flat structure.

Card page: Replace Set as Default / Clear Default actions with an

editable Default field. OnValidate calls SetAsDefaultConfiguration /

ClearDefaultConfiguration. Tooltip extended to describe both directions.

List page: Remove the same actions and their promoted actionrefs;

extend the Default field tooltip. The list page field stays read-only

(matches main).
@onbuyuka onbuyuka merged commit 33c7f9c into main May 27, 2026
88 of 90 checks passed
@onbuyuka onbuyuka deleted the bugs/612699-mcp-default-config-toggle branch May 27, 2026 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants