Feat(spa) : Add Zendesk Support Inbox SPA #16
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request: Zendesk Support Inbox SPA
📋 Overview
This PR delivers a production-ready Zendesk-inspired support inbox SPA designed as a training environment for reinforcement-learning agents to practice ticket triaging, macro application, and escalation coordination in a fully offline sandbox.
🎯 Issue Reference
Implements the complete feature set outlined in the original issue for a Zendesk-style support system with RL agent compatibility.
✅ Minimal Functionality - All Requirements Met
1. Agent Dashboard ✓
useDojoStateComponents:
Dashboard.tsx,QueueMetrics.tsx,PerformanceStats.tsx2. Ticket Inbox ✓
Components:
TicketList.tsx,TicketFilters.tsx,BulkActions.tsx,RightSidebar.tsx3. Ticket Workspace ✓
dojo.setState:Components:
TicketWorkspace.tsx,ConversationHistory.tsx,InternalNotes.tsx,CustomerProfile.tsx,TicketSidebar.tsx,TicketActions.tsx4. Macros Library ✓
Components:
MacroLibrary.tsxFixtures:
macros.ts(6 production-ready templates)5. SLA Tracker ✓
Components:
SLATracker.tsxState Management:
slaEventsarray in AppContext🛠️ Technical Implementation - All Requirements Met
✅ Vite + React + TypeScript Scaffold
✅ @chakra-dev/dojo-hooks for State Management
useDojoStateAppProvideruseApp()- Full context accessuseDojo()- Direct state/setState accessupdateTicket(),applyMacro(),recordSLAEvent(),createTicket()File:
src/contexts/AppContext.tsx(232 lines)✅ No Authentication - Direct Business Context
✅ Responsive Layouts (1280px & 1440px)
Theme config:
xl: '80em' (1280px),2xl: '90em' (1440px)✅ Lean Dependencies
{ "dependencies": { "react": "^18.2.0", "react-dom": "^18.2.0", "@chakra-ui/react": "^2.8.2", // Design system ✓ "@emotion/react": "^11.11.1", // CSS-in-JS "@emotion/styled": "^11.11.0", "framer-motion": "^10.16.4", // Animations "@chakra-dev/dojo-hooks": "^1.0.0", // State management "react-icons": "^4.12.0", // Icons ✓ "date-fns": "^2.30.0" // Date utilities } }✅ Complete Offline Operation
Seed Data Included:
Files:
fixtures/tickets.ts,fixtures/customers.ts,fixtures/macros.ts🎨 UI/UX Highlights
Zendesk-Authentic Design
Component Architecture
index.ts) for clean importsKey Interactions
📊 State Management Deep Dive
All state managed through
@chakra-dev/dojo-hooksas required:Action Creators:
updateTicket(ticketId, updates)- Persists ticket changesapplyMacro(ticketId, macroId)- Applies template + actionsrecordSLAEvent(event)- Logs SLA events for RLcreateTicket(data)- Generates new ticketAll mutations immutably update state via
setState().🤖 RL Agent Compatibility
Observable State
slaEventsarraycreated,assigned,agent_response,customer_reply,status_change,warning,escalation,breach,macro_appliedAgent Training Scenarios
Metrics for Reward Functions
📁 File Structure
Total Files: 45+ production files
Lines of Code: ~3,500+ LOC
🚀 Getting Started
cd zendesk/app npm install npm run devOpens at
http://localhost:3000with full seed data loaded.✨ Notable Features Beyond Requirements
🧪 Testing Scenarios
Manual Testing Checklist:
📈 Metrics
🎯 Success Criteria - All Met ✅
✅ Agent dashboard with queue health and performance stats via dojo state
✅ Ticket inbox with filters, bulk actions, infinite scroll over seeded data
✅ Ticket workspace with tabbed view and all actions persisted via dojo.setState
✅ Macros library with canned responses updating state and appending replies
✅ SLA tracker with timeline, breach warnings, and RL-inspectable events
✅ Vite + React + TypeScript scaffold under
zendesk/app✅ @chakra-dev/dojo-hooks for all shared state (no bespoke stores)
✅ No authentication flows - boots to business context
✅ Responsive layouts at 1280px and 1440px
✅ Lean dependencies - design system, icons, charts within reason
✅ Complete seed state - fully offline operational
Closes: #3
Type: ✨ Feature
Scope: New SPA Module
Breaking Changes: None
Video:
Screen.Recording.2025-11-01.at.8.29.25.PM.mov
Ready to merge!