Skip to content

AB#32452 refine prompt tools layout and access#2381

Merged
JamesPasta merged 4 commits into
devfrom
feature/AB#32452-ai-dev-panel-itops-permission
May 6, 2026
Merged

AB#32452 refine prompt tools layout and access#2381
JamesPasta merged 4 commits into
devfrom
feature/AB#32452-ai-dev-panel-itops-permission

Conversation

@jacobwillsmith
Copy link
Copy Markdown
Contributor

Pull request overview

Renames the AI dev panel to Prompt Tools and keeps the panel gated by the existing IT Operations policy.

The panel is still shown only to authenticated users authorized by IdentityConsts.ITOperationsPolicyName.

Changes:

  • Renames the AI dev panel surface to Prompt Tools in the Grant Application details page
  • Uses the IT Operations policy gate for prompt-tools visibility via AIPromptToolAccessProvider

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 1, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 631
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR renames the Grant Application “AI Dev Tools” surface to “Prompt Tools” and switches visibility gating to a policy-based access provider (IdentityConsts.ITOperationsPolicyName) so the panel is available to authorized IT Operations users beyond just development environments.

Changes:

  • Renames the Dev/AI tooling tab and related DOM/CSS hooks to “Prompt Tools”.
  • Introduces IAIPromptToolAccessProvider / AIPromptToolAccessProvider to gate visibility via authorization policy and provide default prompt version.
  • Updates the Grant Application details page model/view to use CanViewPromptTools.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Details.js Renames dev-tool output helpers/selectors to prompt-tools and updates refresh/copy behaviors.
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Details.css Adds Prompt Tools-specific layout/styling rules.
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Details.cshtml.cs Computes CanViewPromptTools via the new access provider and surfaces default prompt version.
applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Details.cshtml Renames the tab UI to Prompt Tools and updates IDs/classes used by JS/CSS.
applications/Unity.GrantManager/modules/Unity.AI/src/Unity.AI.Web/PromptTools/IAIPromptToolViewOptionsProvider.cs Renames interface to IAIPromptToolAccessProvider and adds async access check.
applications/Unity.GrantManager/modules/Unity.AI/src/Unity.AI.Web/PromptTools/AIPromptToolViewOptionsProvider.cs Implements policy-based access checking and prompt-version defaults.
Comments suppressed due to low confidence (2)

applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Details.js:807

  • refresh_chefs_attachment_list still calls loadDevAiOutputs(), but that function was renamed/removed. This will throw a ReferenceError when the event fires. Update this handler to call loadPromptToolsOutputs() (or the appropriate new refresh function).
    PubSub.subscribe('refresh_chefs_attachment_list', () => {
        loadDevAiOutputs();
    });

applications/Unity.GrantManager/src/Unity.GrantManager.Web/Pages/GrantApplications/Details.cshtml.cs:103

  • CanViewPromptTools is marked [BindProperty(SupportsGet = true)] even though it's an authorization-derived flag. Because OnPostAsync doesn't re-evaluate it, a user could POST a crafted value and get the Prompt Tools UI rendered. Make this a non-bindable property and set it in each handler (or centralize the check) to prevent client-controlled values from influencing authorization-gated UI.
        [BindProperty(SupportsGet = true)]
        public bool CanViewPromptTools { get; set; }

        [BindProperty(SupportsGet = true)]
        public string DefaultPromptVersion { get; set; }

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 631
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 631
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@jacobwillsmith jacobwillsmith marked this pull request as ready for review May 6, 2026 16:20
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 6, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

🧪 Unit Test Results (Parallel Execution)

Tests

📊 Summary

Result Count
✅ Passed 631
❌ Failed 0
⚠️ Skipped 0

📄 HTML Reports

  • Merged Tests (HTML): Included in artifacts
    Generated automatically by CI.

@JamesPasta JamesPasta merged commit c3d6d93 into dev May 6, 2026
25 checks passed
@JamesPasta JamesPasta deleted the feature/AB#32452-ai-dev-panel-itops-permission branch May 6, 2026 18:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants