AB#32452 refine prompt tools layout and access#2381
Merged
Conversation
Contributor
There was a problem hiding this comment.
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/AIPromptToolAccessProviderto 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_liststill callsloadDevAiOutputs(), but that function was renamed/removed. This will throw a ReferenceError when the event fires. Update this handler to callloadPromptToolsOutputs()(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
CanViewPromptToolsis marked[BindProperty(SupportsGet = true)]even though it's an authorization-derived flag. BecauseOnPostAsyncdoesn'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; }
|
JamesPasta
approved these changes
May 6, 2026
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.



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:
AIPromptToolAccessProvider