Skip to content

AP-25527: Use ai-settings for persisting K-AI disclaimer dismissal#112

Merged
iusethemouse merged 10 commits intomasterfrom
enh/AP-25527-use-ai-settings-for-kai-disclaimer
Feb 13, 2026
Merged

AP-25527: Use ai-settings for persisting K-AI disclaimer dismissal#112
iusethemouse merged 10 commits intomasterfrom
enh/AP-25527-use-ai-settings-for-kai-disclaimer

Conversation

@iusethemouse
Copy link
Member

@iusethemouse iusethemouse commented Feb 9, 2026

Currently, when you click "Accept and continue" under K-AI's disclaimer in K-AI's sidepanel or in Quick Build mode with "Do not ask again" checked, the choice was persisted to localStorage. This has always been problematic and brittle, often breaking, and currently not working in AP-in-browser.

We recently introduced "AI settings" to knime-ui, which are persisted the same way as "UI settings" (i.e. knime-ui-settings.yaml) - either in .knime/profile on Desktop AP, or in localStorage in browser. It makes sense to utilise this new persistence mechanism for K-AI's disclaimer as well.

Core requirements for the disclaimer:

  1. ✅ Should be shown once in K-AI sidepanel/Quick Build panel after user logs into Hub.
  2. ✅ Should be shown again after AP restart.
  3. ✅ Should not be shown to the user after AP restart if "Do not ask again" was checked upon dismissal.
  4. Should be shown again if persistently dismissed but the disclaimer text has changed (the text comes from the AI service in Hub).
  5. Should be shown again if user sets a different Hub as K-AI's backend Hub

With these changes, I am expecting persistent K-AI disclaimer dismissal to finally work properly both in Dekstop AP and in browser.


Example of what .knime/profile/ai-settings.yaml looks like after dismissing the disclaimer with "Do not ask again":

"3949c956":
  disclaimer:
    disclaimerTextHash: "02e08486"
    lastUpdated: "2026-02-12T13:03:20.999Z"

, where "3949c956" is the hash of username and Hub ID.


Quick visual as a refresher of what "K-AI disclaimer" is:
Screenshot 2026-02-09 at 21 04 39

Copilot AI review requested due to automatic review settings February 9, 2026 20:00
@iusethemouse iusethemouse changed the title AP-25527: Use ai-settings (.knime/profile/localStorage) for persisting K-AI disclaimer dismissal AP-25527: Use ai-settings for persisting K-AI disclaimer dismissal Feb 9, 2026

This comment was marked as resolved.

@iusethemouse iusethemouse force-pushed the enh/AP-25527-use-ai-settings-for-kai-disclaimer branch from 158da5e to 9217096 Compare February 9, 2026 20:17
Copilot AI review requested due to automatic review settings February 9, 2026 20:30
@iusethemouse iusethemouse force-pushed the enh/AP-25527-use-ai-settings-for-kai-disclaimer branch from 9217096 to c2ef54c Compare February 9, 2026 20:30

This comment was marked as resolved.

@iusethemouse iusethemouse marked this pull request as ready for review February 9, 2026 20:46
@iusethemouse iusethemouse requested a review from a team as a code owner February 9, 2026 20:46
@iusethemouse iusethemouse requested review from hriverahdez and knime-ghub-bot and removed request for a team February 9, 2026 20:46
@iusethemouse
Copy link
Member Author

A small quality-of-life bit of work here, danke @hriverahdez 🙏

@iusethemouse iusethemouse force-pushed the enh/AP-25527-use-ai-settings-for-kai-disclaimer branch from c2ef54c to ac219b6 Compare February 11, 2026 13:24
Copy link
Contributor

@hriverahdez hriverahdez left a comment

Choose a reason for hiding this comment

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

@iusethemouse just marking this as request for changes in the meantime, to avoid an accidental merge.
ping me if/when you want me to re-review it

Copilot AI review requested due to automatic review settings February 12, 2026 13:22
@iusethemouse iusethemouse force-pushed the enh/AP-25527-use-ai-settings-for-kai-disclaimer branch from ac219b6 to 97f4bf2 Compare February 12, 2026 13:22
Copy link
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iusethemouse
Copy link
Member Author

@iusethemouse just marking this as request for changes in the meantime, to avoid an accidental merge. ping me if/when you want me to re-review it

Ready for another look @hriverahdez

This comment was marked as resolved.

Copilot AI review requested due to automatic review settings February 13, 2026 13:15
@iusethemouse iusethemouse force-pushed the enh/AP-25527-use-ai-settings-for-kai-disclaimer branch from a141e48 to 98ceb3f Compare February 13, 2026 13:15
Copy link
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +14 to 20
const closeDisclaimer = async (persistently: boolean = true) => {
hasBeenDismissed.value = true;

if (localStorageKey.value && persistently) {
localStorage.setItem(localStorageKey.value, "true");
if (persistently && disclaimerText.value) {
await aiSettingsStore.dismissDisclaimer(disclaimerText.value);
}
};
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

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

The closeDisclaimer function is async but may be called without awaiting by the consumer. While this won't cause an error, it means the UI could proceed before the dismissal is persisted to settings. If the user closes the app or tab immediately after calling this function, the dismissal might not be saved. Consider documenting this behavior or having callers await the promise to ensure persistence completes before allowing the user to proceed.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

jesus christ, this guy always has something to say...

@iusethemouse
Copy link
Member Author

Sorry for the continuous pings, ready again @hriverahdez

Thanks for all the tips, things are in a much better place thanks to them

Copilot AI review requested due to automatic review settings February 13, 2026 15:25
@iusethemouse iusethemouse force-pushed the enh/AP-25527-use-ai-settings-for-kai-disclaimer branch from af2143e to 6163e97 Compare February 13, 2026 15:25
Copy link
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

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


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sonarqubecloud
Copy link

@iusethemouse iusethemouse merged commit a04728b into master Feb 13, 2026
12 checks passed
@iusethemouse iusethemouse deleted the enh/AP-25527-use-ai-settings-for-kai-disclaimer branch February 13, 2026 15:40
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.

2 participants