ArafatKhan2198 opened a new pull request, #10441:
URL: https://github.com/apache/ozone/pull/10441

   ## What changes were proposed in this pull request?
   
   This PR adds a new **AI Assistant** page to the Recon web UI. It lets an 
operator ask questions about the cluster in plain English (for example, "How 
many unhealthy containers are there?" or "List keys in /vol1/bucket1") and get 
back a readable answer, instead of clicking through screens or calling APIs by 
hand.
   
   The backend for this (added separately) takes a question, calls the right 
Recon APIs, and returns a single Markdown answer. This PR is the **frontend** 
that talks to that backend and presents it as a modern chat experience.
   
   What it does:
   
   - Adds a new `/Assistant` page and a nav entry, shown only when the feature 
is enabled.
   - Checks `/api/v1/chatbot/health` first and shows the right state:
       - feature disabled → "not enabled" screen
       - enabled but no API key / provider down → "not configured" screen
       - healthy → full chat
   - Sends questions to `/api/v1/chatbot/chat` and renders the Markdown reply 
(including tables, lists, code).
   - Loads available models from `/api/v1/chatbot/models` and offers a 
**provider + model** picker.
   - Handles the slow, no-streaming backend with a loading state, an elapsed 
timer, and a Stop button to cancel.
   - Handles errors clearly (busy / timeout / server error) with a retry option.
   - Keeps chat history in the browser session until the user clicks "New chat".
   - Shows an "Alpha" label and a short disclaimer (chats are independent, AI 
may be wrong — verify important data).
   
   Why: Recon already exposes a lot of cluster data, but finding it takes 
effort. This gives operators a faster, friendlier way to get answers, while 
staying inside Recon's existing look and feel (teal/green theme, rounded 
panels, custom Recon AI mark).
   
   Notes / current limits:
   
   - The backend is stateless, so there is no memory across questions (each one 
stands alone).
   - Responses arrive all at once (no token streaming); typical answers take a 
few seconds.
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-14818
   
   ## How was this patch tested?
   - **Unit/component tests** (Vitest + MSW) covering the chat flow and all 
backend states: success, disabled, not-configured, busy (503), timeout (504), 
server error (500), and model-list failures.
   - **End-to-end tests** (Playwright) that mock each API response and capture 
screenshots of every state.
   - **Manual testing** against a running Recon with the chatbot backend 
enabled.
   


-- 
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]

Reply via email to