Doormile AI: replace the bot popover with a right-side slide-over

Renames the operator assistant to "Doormile AI / Operations Copilot" and
moves it from a header Popover to a portalled slide-over panel.

- DoormileAI/ — trigger, panel, welcome, message, composer and shared
  primitives. Assistant turns are deliberately NOT bubbles; that is what
  keeps this reading as part of the dashboard rather than a bolted-on
  chatbot.
- pageContext.js — route-aware suggested questions. Every suggestion is a
  phrasing the matcher actually resolves; a chip that returns "I can't
  answer that" is worse than no chip.
- DoormileAI.css — panel styling, animation, responsive and reduced-motion.
  Selectors that style an Astryx Stack are written `.dai-root .x` because
  `padding={0}` emits a StyleX atomic at the same specificity as a bare
  class, so a single class can lose on stylesheet order.
- Messages are JSON round-tripped through localStorage, so icons are
  referenced by key rather than stored as React elements — an element does
  not survive the trip and the rehydrated value crashes the next render.
- Errors now render a polished state and log the real error to the console,
  instead of surfacing raw API messages in a toast.

The route, sidebar entry and i18n key for the old standalone Assistant page
are removed with it — this is a header surface, not a page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-18 15:53:40 +05:30
parent e420223622
commit 5165e9d697
13 changed files with 1689 additions and 167 deletions

View File

@@ -32,8 +32,7 @@ import {
TruckOutlined,
WarningOutlined,
RadarChartOutlined,
RiseOutlined,
RobotOutlined
RiseOutlined
} from '@ant-design/icons';
// icons
@@ -67,8 +66,7 @@ const icons = {
TruckOutlined,
WarningOutlined,
RadarChartOutlined,
RiseOutlined,
RobotOutlined
RiseOutlined
};
// ==============================|| MENU ITEMS - SUPPORT ||============================== //
@@ -128,13 +126,6 @@ const nearle = {
url: '/doormile/customers',
icon: icons.ContactsOutlined
},
{
id: 'assistant',
title: <FormattedMessage id="assistant" />,
type: 'item',
url: '/doormile/assistant',
icon: icons.RobotOutlined
},
{
id: 'fleetops',
title: <FormattedMessage id="fleetops" />,