imbajin commented on code in PR #505:
URL: https://github.com/apache/hugegraph-doc/pull/505#discussion_r4150243449
##########
i18n/en.yaml:
##########
@@ -20,7 +20,8 @@ download_component_computer: Computer
download_component_commons: Common
download_asf_note: Source archives are the official Apache Software Foundation
releases; binary packages are convenience builds made from them. All files are
served from ASF mirrors, with signatures and checksums hosted on
downloads.apache.org. Source archives generated automatically by GitHub are not
ASF releases.
-ui_ai_consent_description: "Continuing loads Kapa, a third-party service. Your
question will be sent to Kapa to generate an answer."
-ui_ai_consent_continue: "Continue to Ask AI"
-ui_ai_consent_cancel: "Cancel"
+ui_ai_consent_description: "Agree to load Kapa and use AI to answer your
questions based on the documentation."
Review Comment:
⚠️ Blocking: yes. Summary: This copy no longer tells users that their
question is sent to third-party Kapa; restore that disclosure in both locales
before the agreement action. Evidence: The adapter forwards the pending query
to Kapa after the user agrees.
##########
assets/js/kapa-adapter.js:
##########
@@ -319,18 +366,20 @@
}
});
consent.querySelector('[data-hg-ai-continue]').addEventListener('click',
function () {
- if (!pending) return;
- var request = pending;
+ if (consented || state === 'loading') return;
+ var request = pending || { query: '', submit: false };
+ if (!pending) lastTrigger = launcher;
pending = null;
consented = true;
- consent.close();
+ try {
+ windowObject.localStorage.setItem(consentKey, 'granted');
Review Comment:
⚠️ Blocking: no. Summary: The persisted "granted" choice has no in-product
withdrawal path; add an accessible control that clears the grant and shows the
disclosure again. Evidence: This handler writes the grant to localStorage, and
the exact-head E2E test asserts that [data-hg-ai-revoke] is absent.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]