Repository navigation
✨ ask: hub panel for optional Ask AI help - #19202
clubanderson wants to merge 7 commits into
Conversation
UI render evidenceRender evidence captured. Built from
These are fixture renders, not live data: the page was built from the PR head and filled with synthetic data from |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. ℹ️ Sentinel: informational, author is trusted (owner), merge is not blocked. Head
No @clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. hive/awaiting-ci: rebased onto v5 on top of the rebased #19200 (panel commit only, no conflicts); CI pending - sweep will merge when green. 🐝 Hive Agent: |
Open PR overlap checkBase branch:
Conflicts are checked with every PR merged onto the current tip of
|
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Adds the ask config block and HIVE_ASK_* env (off by default, inert when unconfigured, key only from a file under the allowed secret dirs), the pkg/askai service (Kapa Chat API client pinned to the published QueryResponse schema, per-person consent store, credential-shape refusal, source allowlist, plain-text answers, per-person/per-hive/hub-wide limits, circuit breaker, content-free audit lines) and the hub routes GET /api/ask/status, PUT/DELETE /api/ask/consent, POST /api/ask and GET /api/ask/stats. Routes are registered only when the feature is on. Fixes #19180 Signed-off-by: Andy Anderson <andy@clubanderson.com>
…sleep The Kapa Chat request is a model request (machine, reasonModelPrompt) in the new outbound-sites inventory from v5. The in-flight test now waits on a channel instead of polling with time.Sleep, keeping the sleep ratchet. Signed-off-by: Andy Anderson <andy@clubanderson.com>
Lifts pkg/askai over the 90% package floor: bad vendor JSON, an invalid thread id dropped, cancellation, the half-open breaker's single trial, handle eviction, idle-counter pruning, corrupt consent records and the service defaults. Signed-off-by: Andy Anderson <andy@clubanderson.com>
Adds the shared panel component (pkg/askai/web: same-origin script and stylesheet, text-only rendering, consent notice, sources and AI label, docs-link fallback in every state, keyboard and screen-reader support, docked layout) and wires it into the hub dashboard only when Ask is on. With Ask off the dashboard document, its ETag and its headers are unchanged and the assets are not served. Scale controls show the effective switch with a help mark. Fixes #19181 Signed-off-by: Andy Anderson <andy@clubanderson.com> (cherry picked from commit 2fe253f)
901b4bd to
6a68728
Compare
Signed-off-by: Andy Anderson <andy@clubanderson.com>
…luded Signed-off-by: Andy Anderson <andy@clubanderson.com>
Mutation testing⏱️ The 900s mutation budget ran out, so 1 package(s) were not fully mutated and the results below do not cover them:
gremlins found 24 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.
30 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
|
PR needs rebase. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
Merge state is dirty (conflicts with v5). This is a human-authored branch, so the scanner will not push to it; please rebase onto v5 (stacked phases may need rebasing in order). 🐝 Hive Agent: |
|
scanner: this PR is CONFLICTING with v5 (stacked Ask AI phases). Human-authored, so deferring: rebase onto v5 once the earlier phase merges. Not pushing to this branch. 🐝 Hive Agent: |
|
hive/scanner: this PR has merge conflicts with v5 (mergeable_state=dirty). It is human-authored, so the hive will not push to it. Please rebase or merge v5 (stacked Ask AI phases usually need rebasing in order). Deferred until the conflict is resolved. 🐝 Hive Agent: |
|
Scanner: this PR is in a conflicting (dirty) state against its base. Not rebasing from here since it is a human-authored branch; please rebase/merge the base and push. Note that #19202, #19204 and #19206 look like a stack, so rebase in order. 🐝 Hive Agent: |
Phase 2 of the Ask AI help design (
src/docs/design/dashboard-ask-ai-help.md): the hub panel. Builds on #19200 (phase 1, the hub backend), because the panel needs its routes. This PR targetsv5so it links to its issue; until #19200 merges its diff also shows phase 1. Merge #19200 first; the panel-only changes are the commit "ask: hub panel for optional Ask AI help".Fixes #19181
What it does
pkg/askai/web/(ask-panel.js,ask-panel.css), embedded once and served from'self', so the hive dashboard (phase 5, ✨ ask: hive panel and live verification for optional Ask AI help (phase 5 of #19177) #19184) reuses the same consent notice, label and fallback. It talks only to the dashboard's own backend (/api/ask/status,/api/ask/consent,/api/ask), never to the vendor.textContentonly, with a Sources list (allowlisted links only, each naming its host) and the "AI generated, may be wrong" label as text; an uncertain flag; Stop sending my questions to withdraw; a docs link in every state (no consent, busy, unavailable, no cited answer).aria-expanded/aria-controls, Escape closes and returns focus to the opener, labelled textarea (Enter sends, Shift+Enter new line), polite live region for answers and errors,aria-busywhile asking, visible focus, token colours with fallbacks, no animation./ask-panel.jsand/ask-panel.cssonly when Ask is on. With it off the dashboard document is the embedded bytes unchanged (same ETag), and the security headers are identical on and off. The panel adds one same-origin stylesheet and one same-origin script: no inline script, no third-party host, no CSP change.ask_enabled) with a help mark tohub-deployment.md#ask-ai-help; the environment stays authoritative.Tests
innerHTML/outerHTML/insertAdjacentHTML/eval/inline handlers, onefetchto its own base, onlyhttps:source links; accessibility markers (region, aria-expanded, Escape, live region, busy, label, Enter) present; the question cap matches the backend's.ask_enabledfalse and true.Docs:
hub-deployment.md#ask-ai-help(panel behaviour), hub API reference rows for the two assets.