More UI updates#184
Merged
Merged
Conversation
…ule buttons are clicked. This avoids the need to evaluate something extra in the PaneSelector etc dynamics.
This utility manages the value of PersistentSymbol["WelcomeScreenAIBannerTracking", "FrontEnd"], which will be used by the Welcome Screen to decide what, if any, AI-related banners to display. It is called directly when interacting with the AgentTools preferences content, and will also likely be called indirectly by other code -- possibly by the Welcome Screen itself. The details of this implementation are likely to change over time. What's here now should be considered a first draft, and was primarily authored by LarryA.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new public symbol ManageWelcomeScreenData to the AgentTools paclet and wires it into the preferences UI refresh path. It also reworks some hover-style Dynamic expressions and replaces a few kernel-level state assignments inside button actions with FEEvaluate[FEPrivateSet[...]] calls (so that click feedback updates the UI without a kernel round-trip).
Changes:
- Introduces
ManageWelcomeScreenData[ "Clear"|"Remove"|"Reset"|"Initialize"|"Get"|"Set"|"Update" ]backed byPersistentSymbol["WelcomeScreenAIBannerTracking","FrontEnd"], with helpers to track per-client deployed/installed banner state, expiration dates, and close-button interactions. - Refactors several
Dynamic[If[CurrentValue["MouseOver"], cA, cB]]style options to(Dynamic[If[CurrentValue["MouseOver"], #1, #2]]&)[cA, cB]and replaces in-buttonclicked = TruewithFEEvaluate[FEPrivateSet[clicked, True]], also droppingNow;from progressDynamics. - Exports
ManageWelcomeScreenDatafromPacletInfo.wlandKernel/Main.wl(including$AgentToolsProtectedNames).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| PacletInfo.wl | Adds ManageWelcomeScreenData to the paclet's exported symbol list. |
| Kernel/Main.wl | Declares and protects the new ManageWelcomeScreenData symbol. |
| Kernel/PreferencesContent.wl | Implements ManageWelcomeScreenData and supporting helpers, updates hover Dynamic patterns, and switches button-click state mutation to FEEvaluate`. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+758
to
+767
| Module[{assoc}, | ||
| assoc = PersistentSymbol["WelcomeScreenAIBannerTracking", "FrontEnd"]; | ||
| PersistentSymbol["WelcomeScreenAIBannerTracking", "FrontEnd"] = | ||
| If[ | ||
| (* if the relevant PersistentSymbol doesn't yet exist, create it *) | ||
| !AssociationQ[assoc], | ||
| initializeWelcomeScreenData[], | ||
| (* otherwise, compare the stored data with the current state, and update as appropriate *) | ||
| updateWelcomeScreenData[assoc] | ||
| ] |
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The first downvalue already returns True when ShowAIBanner is True, so by the time the second downvalue's body runs, that condition is guaranteed False. Remove the redundant Or-branch and collapse to the remaining And. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Make statement termination consistent across all definitions in the ManageWelcomeScreenData / helpers block: every top-level definition now ends with ;. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The previous comment said "today's date is later than the date", but the function uses DateOverlapsQ and treats Today == date as expired. Several callers (initializeClientData, updateClientData, updateDeployedAgentsData) rely on that behavior to surface the banner immediately after setting Date -> Today, so update the comment rather than the behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment on lines
+895
to
+901
| installedClients = getInstalledMCPClients[]; | ||
|
|
||
| (* Previous installed state *) | ||
| previousInstalledState = assoc["IsInstalled"]; | ||
|
|
||
| (* Current installed state *) | ||
| currentInstalledState = MemberQ[installedClients, assoc["ClientName"]]; |
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.
No description provided.