[GSoC 2026] Add context-aware quick-action buttons to the chat panel (refs #3772)#3773
[GSoC 2026] Add context-aware quick-action buttons to the chat panel (refs #3772)#3773berardifra wants to merge 2 commits into
Conversation
mlodic
left a comment
There was a problem hiding this comment.
cool idea, I added some possible tips
|
|
||
| const JOB_ACTIONS = [ | ||
| { label: "Summarize this job", message: "Summarize job #{id}" }, | ||
| { label: "What analyzers ran?", message: "What analyzers ran on job #{id}?" }, |
There was a problem hiding this comment.
I'd add a more generic "which plugins ran"? In that way it can provide a more comprehensive info about all the plugins executed
There was a problem hiding this comment.
Renamed to "Which plugins ran?" so it covers analyzers/connectors/visualizers, not just analyzers.
| const JOB_ACTIONS = [ | ||
| { label: "Summarize this job", message: "Summarize job #{id}" }, | ||
| { label: "What analyzers ran?", message: "What analyzers ran on job #{id}?" }, | ||
| { label: "Show job details", message: "Show me the details of job #{id}" }, |
There was a problem hiding this comment.
adding something like "evaluate job results" does it make sense here?
There was a problem hiding this comment.
Added the "Evaluate results" chip (Evaluate the results of job #{id}).
| { | ||
| label: "Show investigation tree", | ||
| message: "Show the tree for investigation #{id}", | ||
| }, |
There was a problem hiding this comment.
also here, some query that allows the LLM to try to guess something about the content?
is the summarization more generic right?
There was a problem hiding this comment.
Added the "Analyze this investigation" chip (What can you tell me about investigation #{id}?).
- rename 'What analyzers ran?' -> 'Which plugins ran?' (covers connectors/visualizers) - add 'Evaluate results' job chip - add 'Analyze this investigation' investigation chip Refs #3772
All done, thanks. Tell me if u need something better or something new to add :) |
Add context-aware quick-action buttons to the chat panel
Description
Refs #3772
W9 — quick-action buttons. Completes the context injection story from #3771: the chat drawer now shows clickable chips that suggest queries based on the current page. On a job page, "Summarize this job", "What analyzers ran?", "Show job details"; on an investigation page, "Summarize this investigation", "Show investigation tree"; on other pages, generic chips. Click → populates and sends the message immediately (no second step).
Frontend —
frontend/src/components/chatQuickActions.jsx(new) — pure component: receivesonSendanddisabled, parseswindow.location.pathnamewith regexes that mirror the backendderive_page_context, renders<Button outline-secondary size="sm">chips in adiv#quick-actions. Click →onSend(message)with the id resolved ({id}→ real number). Chips are disabled whileisStreamingor the socket is not connected.ChatPanel.jsx—QuickActionsinserted betweenChatMessageListandChatComposer;inputDisabledextracted as a shared const.QuickActions.test.jsx(new) — 11 tests: job/investigation/generic chip rendering, sub-page paths, non-numeric id → generic fallback, click with resolved id, click on generic page, disabled state. 3 coupling tests that validateJOB_DETAIL_REandINVESTIGATION_DETAIL_REagainst the known Routes.jsx paths (mirror of the backend coupling test).test_context.py— updated coupling test docstring to cross-reference both sides (backend + frontend).No store, hook, ChatComposer, or ChatMessageList changes. No backend changes beyond the docstring update.
Demo
quick-actions-demo.mp4
Type of change
Checklist
develop(GSoC: targets thegsoc-2026/llm-chatbotumbrella)Black,Flake8,Isort) gave 0 errors.Important rules