updates on the lint errors and more stuffs

This commit is contained in:
2026-09-23 12:28:38 +05:30
parent 7544a07066
commit 5eb4a6466b
24 changed files with 60 additions and 75 deletions

View File

@@ -4,7 +4,7 @@ import { motion } from 'framer-motion';
import { import {
Activity, Bell, Bike, Car, ChevronDown, Coins, FileSpreadsheet, Activity, Bell, Bike, Car, ChevronDown, Coins, FileSpreadsheet,
FileText, ListTodo, LogOut, Menu, Search, Settings, Shield, FileText, ListTodo, LogOut, Menu, Search, Settings, Shield,
ShieldAlert, User, UserCheck, Users, Warehouse, ShieldAlert, User, UserCheck, Warehouse,
} from 'lucide-react'; } from 'lucide-react';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
import { DOORMILE_MARK_URL } from '@/assets/brand'; import { DOORMILE_MARK_URL } from '@/assets/brand';

View File

@@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react';
import { Pencil, Plus, ShieldCheck, Trash2, Users } from 'lucide-react'; import { Pencil, Plus, ShieldCheck, Trash2, Users } from 'lucide-react';
import { import {
Avatar, Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input, Avatar, Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input,
KpiCard, Modal, PageHeader, Select, SelectContent, SelectItem, SelectTrigger, KpiCard, Modal, Select, SelectContent, SelectItem, SelectTrigger,
SelectValue, Stack, StatusBadge, SelectValue, Stack, StatusBadge,
} from '@/components/ds'; } from '@/components/ds';
import { ListToolbar } from '@/components/doormile/ListToolbar'; import { ListToolbar } from '@/components/doormile/ListToolbar';

View File

@@ -8,7 +8,7 @@ import {
import { import {
Alert, Button, DataTable, Drawer, EmptyState, Grid, KpiCard, Alert, Button, DataTable, Drawer, EmptyState, Grid, KpiCard,
Modal, PageHeader, Stack, StatusBadge, Surface, Tabs, Modal, Stack, StatusBadge, Surface, Tabs,
Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
} from '@/components/ds'; } from '@/components/ds';
import { ListToolbar } from '@/components/doormile/ListToolbar'; import { ListToolbar } from '@/components/doormile/ListToolbar';

View File

@@ -6,7 +6,7 @@ import {
} from 'lucide-react'; } from 'lucide-react';
import { import {
Button, DataTable, Drawer, EmptyState, Field, Grid, IconButton, Input, KpiCard, Button, DataTable, Drawer, EmptyState, Field, Grid, IconButton, Input, KpiCard,
Modal, PageHeader, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Modal, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
Stack, StatusBadge, Surface, Switch, Tabs, Stack, StatusBadge, Surface, Switch, Tabs,
} from '@/components/ds'; } from '@/components/ds';
import { import {

View File

@@ -1,8 +1,7 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { Building2, Pencil, Plus, Radar, Trash2 } from 'lucide-react'; import { Building2, Pencil, Plus, Radar, Trash2 } from 'lucide-react';
import { import {
Button, ConfirmModal, DataTable, EmptyState, Field, IconButton, Input, Modal, Button, ConfirmModal, DataTable, EmptyState, Field, IconButton, Input, Modal, Pagination, Stack, Surface, Tabs,
PageHeader, Pagination, Stack, Surface, Tabs,
} from '@/components/ds'; } from '@/components/ds';
import { import {
useCarrierPricing, useCompetitorBranches, useCreateCarrierPricing, useCarrierPricing, useCompetitorBranches, useCreateCarrierPricing,

View File

@@ -3,7 +3,7 @@ import { useNavigate } from 'react-router-dom';
import { Mail, Package, Pencil, Phone, Plus, Users } from 'lucide-react'; import { Mail, Package, Pencil, Phone, Plus, Users } from 'lucide-react';
import { import {
Avatar, Button, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard, Avatar, Button, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard,
Modal, PageHeader, Stack, Modal, Stack,
} from '@/components/ds'; } from '@/components/ds';
import { ListToolbar } from '@/components/doormile/ListToolbar'; import { ListToolbar } from '@/components/doormile/ListToolbar';
import { useTenantCustomers, useUpdateTenantCustomer } from '@/lib/doormileHooks'; import { useTenantCustomers, useUpdateTenantCustomer } from '@/lib/doormileHooks';

View File

@@ -2,8 +2,7 @@ import React, { useEffect, useMemo, useState } from 'react';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { Ban, Bell, Bike, Clock, FileSpreadsheet, PackageSearch, Truck } from 'lucide-react'; import { Ban, Bell, Bike, Clock, FileSpreadsheet, PackageSearch, Truck } from 'lucide-react';
import { import {
Alert, Button, DataTable, DatePicker, Drawer, EmptyState, Field, IconButton, Alert, Button, DataTable, DatePicker, Drawer, EmptyState, Field, IconButton, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Modal,
PageHeader, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Modal,
Stack, StatusBadge, Surface, Tabs, Textarea, ZoneSelector, Stack, StatusBadge, Surface, Tabs, Textarea, ZoneSelector,
} from '@/components/ds'; } from '@/components/ds';
import { import {

View File

@@ -1,7 +1,7 @@
import React, { useMemo, useState } from 'react'; import React, { useMemo, useState } from 'react';
import { AlertTriangle, CheckCircle2, ClipboardList, Flame, Plus } from 'lucide-react'; import { AlertTriangle, CheckCircle2, ClipboardList, Flame, Plus } from 'lucide-react';
import { import {
Button, DataTable, EmptyState, Field, Grid, Input, KpiCard, Modal, PageHeader, Button, DataTable, EmptyState, Field, Grid, Input, KpiCard, Modal,
Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Stack, StatusBadge, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Stack, StatusBadge,
Textarea, Textarea,
} from '@/components/ds'; } from '@/components/ds';

View File

@@ -2008,42 +2008,23 @@ export default function Home() {
</span> </span>
</Link> </Link>
{/* All Agents. {/* "All Agents" was here, and is gone with the Agent Studio it
pointed at.
This used to ask the assistant to "Summarize status across all Its history in one line: it originally asked the assistant to
9 specialized agents". Nothing in the intent catalogue matches "Summarize status across all 9 specialized agents", which no
the word "agents", so every click landed on the honest intent matches, so every click produced "I could not answer
"I could not answer that from live data" fallback — a control that from live data". It was then repointed at Settings →
that reliably fails, on the page where an operator forms their Skills & Tools, which turned out to be a localStorage-only
impression of whether the AI works at all. drawing and has now been removed too.
It could not have worked. Agent telemetry lives in AI_engine's There is no third target. The console holds no agent state:
command centre (FastAPI, port 8600) and the console has no telemetry lives in AI_engine's command centre on port 8600,
base URL for it, no env var, and nothing deployed to point at; which nothing here is configured to reach. Rather than point a
the console itself holds no agent state to summarise. The one button at a third thing that cannot answer, it is out until
thing NOT done here is synthesising a number from console there is something real behind it — the audit tables in
data — see the note on the fallback branch above, where a docs/agent-platform-plan.md §11, after which agent status is
previous version forged a sourceCalls entry claiming an ordinary query against our own database. */}
"46 milers scanned" for a call that was never made.
So it now opens the page that really is about agents. When the
audit tables in docs/agent-platform-plan.md §11 land, agent
status becomes an ordinary query and this can become a
question again. */}
<Link
to="/doormile/settings?tab=skills"
className="flex flex-col items-center group focus:outline-none w-18 text-center cursor-pointer"
>
<div className="relative w-12 h-12 rounded-2xl bg-indigo-50 border border-indigo-200/90 flex items-center justify-center text-indigo-600 group-hover:scale-105 group-hover:bg-indigo-100 group-hover:shadow-sm transition-all duration-200">
<Sparkles className="w-5 h-5" />
<span className="absolute -top-1.5 -right-1 px-1 py-0.5 bg-indigo-600 text-white font-bold text-[8px] rounded-full leading-none shadow-xs uppercase">
AI
</span>
</div>
<span className="text-[11px] sm:text-xs font-medium text-slate-700 group-hover:text-slate-900 mt-2 text-center truncate w-full transition-colors">
All Agents
</span>
</Link>
</div> </div>
</div> </div>

View File

@@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react';
import { CheckCircle2, MapPin, Pencil, Plus, Trash2, Warehouse } from 'lucide-react'; import { CheckCircle2, MapPin, Pencil, Plus, Trash2, Warehouse } from 'lucide-react';
import { import {
Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard, Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard,
Modal, PageHeader, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Modal, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
Stack, StatusBadge, Stack, StatusBadge,
} from '@/components/ds'; } from '@/components/ds';
import { ListToolbar } from '@/components/doormile/ListToolbar'; import { ListToolbar } from '@/components/doormile/ListToolbar';

View File

@@ -3,7 +3,7 @@ import { useNavigate, useSearchParams } from 'react-router-dom';
import { motion } from 'framer-motion'; import { motion } from 'framer-motion';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { Ban, Bike, FileSpreadsheet, MapPin, Package, Plus, Upload, UserCheck } from 'lucide-react'; import { Ban, Bike, FileSpreadsheet, MapPin, Package, Plus, Upload, UserCheck } from 'lucide-react';
import { Button, ConfirmModal, DataTable, DatePicker, EmptyState, Modal, PageHeader, SearchInput, Stack, StatusBadge, Tabs, ZoneSelector } from '@/components/ds'; import { Button, ConfirmModal, DataTable, DatePicker, EmptyState, Modal, SearchInput, Stack, StatusBadge, Tabs, ZoneSelector } from '@/components/ds';
import { useBulkCancelBookings, useCustomers, useFlowAnchors, useRiderOptions } from '@/lib/doormileHooks'; import { useBulkCancelBookings, useCustomers, useFlowAnchors, useRiderOptions } from '@/lib/doormileHooks';
import { useZone } from '@/lib/ZoneContext'; import { useZone } from '@/lib/ZoneContext';
import { assignMilerToBooking, notifyMiler } from '@/api/doormile/endpoints'; import { assignMilerToBooking, notifyMiler } from '@/api/doormile/endpoints';

View File

@@ -4,7 +4,7 @@ import { useMutation } from '@tanstack/react-query';
import { useQueryClient } from '@tanstack/react-query'; import { useQueryClient } from '@tanstack/react-query';
import { ArrowLeft, Bike, Package, Send } from 'lucide-react'; import { ArrowLeft, Bike, Package, Send } from 'lucide-react';
import { import {
Button, DataTable, EmptyState, Grid, KpiCard, PageHeader, Select, SelectContent, Button, DataTable, EmptyState, Grid, KpiCard, Select, SelectContent,
SelectItem, SelectTrigger, SelectValue, Stack, StatusBadge, SelectItem, SelectTrigger, SelectValue, Stack, StatusBadge,
} from '@/components/ds'; } from '@/components/ds';
import { finalCreatedeliveries, notifyRider } from '@/api/doormile'; import { finalCreatedeliveries, notifyRider } from '@/api/doormile';

View File

@@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react';
import { Building2, Calculator, IndianRupee, MapPin, Pencil, Plus, Tag, Trash2 } from 'lucide-react'; import { Building2, Calculator, IndianRupee, MapPin, Pencil, Plus, Tag, Trash2 } from 'lucide-react';
import { import {
Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard, Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard,
Modal, PageHeader, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Modal, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
Stack, StatusBadge, Surface, Stack, StatusBadge, Surface,
} from '@/components/ds'; } from '@/components/ds';
import { ListToolbar } from '@/components/doormile/ListToolbar'; import { ListToolbar } from '@/components/doormile/ListToolbar';

View File

@@ -9,7 +9,6 @@ import {
FileSpreadsheet, FileSpreadsheet,
Calendar, Calendar,
Loader2, Loader2,
Check,
} from 'lucide-react'; } from 'lucide-react';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
import { import {

View File

@@ -9,7 +9,7 @@ import {
} from 'lucide-react'; } from 'lucide-react';
import { import {
Avatar, Button, ConfirmModal, DataTable, Drawer, EmptyState, Field, Grid, IconButton, Avatar, Button, ConfirmModal, DataTable, Drawer, EmptyState, Field, Grid, IconButton,
Input, KpiCard, Modal, PageHeader, SearchInput, Select, SelectContent, SelectItem, SelectTrigger, Input, KpiCard, Modal, SearchInput, Select, SelectContent, SelectItem, SelectTrigger,
SelectValue, Stack, StatusBadge, Surface, Tabs, Textarea, ZoneSelector, SelectValue, Stack, StatusBadge, Surface, Tabs, Textarea, ZoneSelector,
} from '@/components/ds'; } from '@/components/ds';
import { import {

View File

@@ -1,28 +1,44 @@
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { useSearchParams, useNavigate } from 'react-router-dom'; import { useSearchParams } from 'react-router-dom';
import { motion, AnimatePresence } from 'framer-motion'; import { motion, AnimatePresence } from 'framer-motion';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { TrendingUp, Users, Plus, Sparkles } from 'lucide-react'; import { TrendingUp, Users, Sparkles } from 'lucide-react';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
import { Button, Input } from '@/components/ds'; import { Input } from '@/components/ds';
import Customers from '@/pages/doormile/customers/Customers'; import Customers from '@/pages/doormile/customers/Customers';
import Profitability from '@/pages/doormile/reports/Profitability'; import Profitability from '@/pages/doormile/reports/Profitability';
import AgentStudio from './agentStudio/AgentStudio'; import AgentStudio from './agentStudio/AgentStudio';
// ⚠️ Skills & Tools (Agent Studio) is a PREVIEW. It does not configure
// anything yet.
//
// It reads and writes browser localStorage and nothing else: no endpoint, no
// table, and no importer outside its own folder. A skill added here exists on
// one machine, in one browser, and is invisible to colleagues and to the
// assistant. The Home assistant runs on the regex catalogue in
// lib/assistant/intents.js and has never heard of a "skill".
//
// It is kept deliberately — the shape is right and it is what Phase 6 of
// docs/agent-platform-plan.md wires to the real tool registry in
// doormile_backend/internal/ai/tools. Until then, do not read a change made
// here as a change to the agent's behaviour.
//
// It is NOT the default tab. Landing on a section that does nothing is how an
// operator concludes the AI is broken; Profitability leads instead.
const TABS = [ const TABS = [
{ id: 'skills', label: 'Skills & Tools', icon: Sparkles },
{ id: 'profitability', label: 'Profitability', icon: TrendingUp }, { id: 'profitability', label: 'Profitability', icon: TrendingUp },
{ id: 'customers', label: 'Customers', icon: Users }, { id: 'customers', label: 'Customers', icon: Users },
{ id: 'skills', label: 'Skills & Tools', icon: Sparkles },
]; ];
export default function Settings() { export default function Settings() {
const [searchParams, setSearchParams] = useSearchParams(); const [searchParams, setSearchParams] = useSearchParams();
const navigate = useNavigate();
const tabParam = searchParams.get('tab'); const tabParam = searchParams.get('tab');
// Default to 'skills' or respect ?tab= // Default to the first tab, or respect ?tab=. A stale ?tab=skills link now
// falls through to this default rather than rendering nothing.
const [activeTab, setActiveTab] = useState( const [activeTab, setActiveTab] = useState(
tabParam && TABS.some((t) => t.id === tabParam) ? tabParam : 'skills' tabParam && TABS.some((t) => t.id === tabParam) ? tabParam : TABS[0].id
); );
// Maintain shared date for Profitability // Maintain shared date for Profitability
@@ -89,6 +105,11 @@ export default function Settings() {
<Input <Input
type="date" type="date"
value={reportDate} value={reportDate}
// Profitability reports on a day that has happened. Profitability.jsx
// has its own bounded input for the standalone page; this is the
// embedded copy, and it was missed — a future date here returns an
// empty report that reads as "no profit" rather than "no data".
max={dayjs().format('YYYY-MM-DD')}
onChange={(e) => e.target.value && setReportDate(e.target.value)} onChange={(e) => e.target.value && setReportDate(e.target.value)}
aria-label="Report date" aria-label="Report date"
className="w-44 bg-white shadow-xs" className="w-44 bg-white shadow-xs"

View File

@@ -3,9 +3,6 @@ import {
Sliders, Sliders,
BarChart3, BarChart3,
ShieldCheck, ShieldCheck,
CheckCircle2,
Clock,
Zap,
TrendingUp, TrendingUp,
Cpu, Cpu,
Save, Save,

View File

@@ -1,16 +1,13 @@
import React, { useState, useEffect } from 'react'; import React, { useState, useEffect } from 'react';
import { import {
Sparkles, Sparkles,
Play,
Wrench, Wrench,
Bot, Bot,
Send, Send,
CheckCircle2, CheckCircle2,
Terminal, Terminal,
RotateCcw, RotateCcw,
Layers,
} from 'lucide-react'; } from 'lucide-react';
import { cn } from '@/lib/utils';
export default function AgentPlayground({ export default function AgentPlayground({
activeAgent, activeAgent,

View File

@@ -1,12 +1,10 @@
import React, { useState, useEffect } from 'react'; import React, { useState } from 'react';
import { import {
Sliders, Sliders,
Zap, Zap,
Wrench, Wrench,
Bot, Bot,
BarChart3, BarChart3,
ExternalLink,
Sparkles,
} from 'lucide-react'; } from 'lucide-react';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
import { import {

View File

@@ -1,5 +1,5 @@
import React, { useState } from 'react'; import React, { useState } from 'react';
import { X, Plus, Sparkles, Layers, Wrench, Check } from 'lucide-react'; import { X, Plus, Sparkles, Wrench, Check } from 'lucide-react';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';
const CATEGORIES = ['Authoring', 'Workforce', 'Logistics', 'Dispatch', 'Custom']; const CATEGORIES = ['Authoring', 'Workforce', 'Logistics', 'Dispatch', 'Custom'];

View File

@@ -5,10 +5,7 @@ import {
Play, Play,
Layers, Layers,
Wrench, Wrench,
Check,
CheckCircle2,
Code, Code,
ShieldCheck,
ChevronDown, ChevronDown,
ChevronRight, ChevronRight,
} from 'lucide-react'; } from 'lucide-react';

View File

@@ -7,8 +7,6 @@ import {
ShieldCheck, ShieldCheck,
ChevronDown, ChevronDown,
ChevronRight, ChevronRight,
Layers,
Plus,
} from 'lucide-react'; } from 'lucide-react';
import { cn } from '@/lib/utils'; import { cn } from '@/lib/utils';

View File

@@ -1,8 +1,7 @@
import React, { useMemo, useState } from 'react'; import React, { useMemo, useState } from 'react';
import { ArrowRight, ListPlus, PackageCheck, PlaneLanding, PlaneTakeoff, Plus, Truck } from 'lucide-react'; import { ArrowRight, ListPlus, PackageCheck, PlaneLanding, PlaneTakeoff, Plus, Truck } from 'lucide-react';
import { import {
Button, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard, Modal, Button, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard, Modal, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Stack,
PageHeader, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Stack,
StatusBadge, StatusBadge,
} from '@/components/ds'; } from '@/components/ds';
import { ListToolbar } from '@/components/doormile/ListToolbar'; import { ListToolbar } from '@/components/doormile/ListToolbar';

View File

@@ -2,7 +2,7 @@ import React, { useMemo, useState } from 'react';
import { BatteryLow, BatteryFull, Car, CheckCircle2, Pencil, Plus, Trash2 } from 'lucide-react'; import { BatteryLow, BatteryFull, Car, CheckCircle2, Pencil, Plus, Trash2 } from 'lucide-react';
import { import {
Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard, Button, ConfirmModal, DataTable, EmptyState, Field, Grid, IconButton, Input, KpiCard,
Modal, PageHeader, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, Modal, Select, SelectContent, SelectItem, SelectTrigger, SelectValue,
Stack, StatusBadge, Stack, StatusBadge,
} from '@/components/ds'; } from '@/components/ds';
import { ListToolbar } from '@/components/doormile/ListToolbar'; import { ListToolbar } from '@/components/doormile/ListToolbar';