orbital-command 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +396 -0
- package/bin/orbital.js +362 -0
- package/dist/assets/WorkflowVisualizer-BZ21PIIF.js +84 -0
- package/dist/assets/WorkflowVisualizer-BZV40eAE.css +1 -0
- package/dist/assets/charts-D__PA1zp.js +72 -0
- package/dist/assets/index-D1G6i0nS.css +1 -0
- package/dist/assets/index-DpItvKpf.js +419 -0
- package/dist/assets/ui-BvF022GT.js +53 -0
- package/dist/assets/vendor-Dzv9lrRc.js +59 -0
- package/dist/index.html +19 -0
- package/dist/scanner-sweep.png +0 -0
- package/dist/server/server/adapters/index.js +34 -0
- package/dist/server/server/adapters/iterm2-adapter.js +29 -0
- package/dist/server/server/adapters/subprocess-adapter.js +21 -0
- package/dist/server/server/adapters/terminal-adapter.js +1 -0
- package/dist/server/server/config.js +156 -0
- package/dist/server/server/database.js +90 -0
- package/dist/server/server/index.js +372 -0
- package/dist/server/server/init.js +811 -0
- package/dist/server/server/parsers/event-parser.js +64 -0
- package/dist/server/server/parsers/scope-parser.js +188 -0
- package/dist/server/server/routes/config-routes.js +163 -0
- package/dist/server/server/routes/data-routes.js +461 -0
- package/dist/server/server/routes/dispatch-routes.js +215 -0
- package/dist/server/server/routes/git-routes.js +92 -0
- package/dist/server/server/routes/scope-routes.js +215 -0
- package/dist/server/server/routes/sprint-routes.js +116 -0
- package/dist/server/server/routes/version-routes.js +130 -0
- package/dist/server/server/routes/workflow-routes.js +185 -0
- package/dist/server/server/schema.js +90 -0
- package/dist/server/server/services/batch-orchestrator.js +253 -0
- package/dist/server/server/services/claude-session-service.js +352 -0
- package/dist/server/server/services/config-service.js +132 -0
- package/dist/server/server/services/deploy-service.js +51 -0
- package/dist/server/server/services/event-service.js +63 -0
- package/dist/server/server/services/gate-service.js +83 -0
- package/dist/server/server/services/git-service.js +309 -0
- package/dist/server/server/services/github-service.js +145 -0
- package/dist/server/server/services/readiness-service.js +184 -0
- package/dist/server/server/services/scope-cache.js +72 -0
- package/dist/server/server/services/scope-service.js +424 -0
- package/dist/server/server/services/sprint-orchestrator.js +312 -0
- package/dist/server/server/services/sprint-service.js +293 -0
- package/dist/server/server/services/workflow-service.js +397 -0
- package/dist/server/server/utils/cc-hooks-parser.js +49 -0
- package/dist/server/server/utils/dispatch-utils.js +305 -0
- package/dist/server/server/utils/logger.js +86 -0
- package/dist/server/server/utils/terminal-launcher.js +388 -0
- package/dist/server/server/utils/worktree-manager.js +98 -0
- package/dist/server/server/watchers/event-watcher.js +81 -0
- package/dist/server/server/watchers/scope-watcher.js +33 -0
- package/dist/server/shared/api-types.js +5 -0
- package/dist/server/shared/default-workflow.json +616 -0
- package/dist/server/shared/workflow-config.js +44 -0
- package/dist/server/shared/workflow-engine.js +353 -0
- package/index.html +15 -0
- package/package.json +110 -0
- package/postcss.config.js +6 -0
- package/schemas/orbital.config.schema.json +83 -0
- package/scripts/postinstall.js +24 -0
- package/scripts/start.sh +20 -0
- package/server/adapters/index.ts +41 -0
- package/server/adapters/iterm2-adapter.ts +37 -0
- package/server/adapters/subprocess-adapter.ts +25 -0
- package/server/adapters/terminal-adapter.ts +24 -0
- package/server/config.ts +234 -0
- package/server/database.ts +107 -0
- package/server/index.ts +452 -0
- package/server/init.ts +891 -0
- package/server/parsers/event-parser.ts +74 -0
- package/server/parsers/scope-parser.ts +240 -0
- package/server/routes/config-routes.ts +182 -0
- package/server/routes/data-routes.ts +548 -0
- package/server/routes/dispatch-routes.ts +275 -0
- package/server/routes/git-routes.ts +112 -0
- package/server/routes/scope-routes.ts +262 -0
- package/server/routes/sprint-routes.ts +142 -0
- package/server/routes/version-routes.ts +156 -0
- package/server/routes/workflow-routes.ts +198 -0
- package/server/schema.ts +90 -0
- package/server/services/batch-orchestrator.ts +286 -0
- package/server/services/claude-session-service.ts +441 -0
- package/server/services/config-service.ts +151 -0
- package/server/services/deploy-service.ts +98 -0
- package/server/services/event-service.ts +98 -0
- package/server/services/gate-service.ts +126 -0
- package/server/services/git-service.ts +391 -0
- package/server/services/github-service.ts +183 -0
- package/server/services/readiness-service.ts +250 -0
- package/server/services/scope-cache.ts +81 -0
- package/server/services/scope-service.ts +476 -0
- package/server/services/sprint-orchestrator.ts +361 -0
- package/server/services/sprint-service.ts +415 -0
- package/server/services/workflow-service.ts +461 -0
- package/server/utils/cc-hooks-parser.ts +70 -0
- package/server/utils/dispatch-utils.ts +395 -0
- package/server/utils/logger.ts +109 -0
- package/server/utils/terminal-launcher.ts +462 -0
- package/server/utils/worktree-manager.ts +104 -0
- package/server/watchers/event-watcher.ts +100 -0
- package/server/watchers/scope-watcher.ts +38 -0
- package/shared/api-types.ts +20 -0
- package/shared/default-workflow.json +616 -0
- package/shared/workflow-config.ts +170 -0
- package/shared/workflow-engine.ts +427 -0
- package/src/App.tsx +33 -0
- package/src/components/AgentBadge.tsx +40 -0
- package/src/components/BatchPreflightModal.tsx +115 -0
- package/src/components/CardDisplayToggle.tsx +74 -0
- package/src/components/ColumnHeaderActions.tsx +55 -0
- package/src/components/ColumnMenu.tsx +99 -0
- package/src/components/DeployHistory.tsx +141 -0
- package/src/components/DispatchModal.tsx +164 -0
- package/src/components/DispatchPopover.tsx +139 -0
- package/src/components/DragOverlay.tsx +25 -0
- package/src/components/DriftSidebar.tsx +140 -0
- package/src/components/EnvironmentStrip.tsx +88 -0
- package/src/components/ErrorBoundary.tsx +62 -0
- package/src/components/FilterChip.tsx +105 -0
- package/src/components/GateIndicator.tsx +33 -0
- package/src/components/IdeaDetailModal.tsx +190 -0
- package/src/components/IdeaFormDialog.tsx +113 -0
- package/src/components/KanbanColumn.tsx +201 -0
- package/src/components/MarkdownRenderer.tsx +114 -0
- package/src/components/NeonGrid.tsx +128 -0
- package/src/components/PromotionQueue.tsx +89 -0
- package/src/components/ScopeCard.tsx +234 -0
- package/src/components/ScopeDetailModal.tsx +255 -0
- package/src/components/ScopeFilterBar.tsx +152 -0
- package/src/components/SearchInput.tsx +102 -0
- package/src/components/SessionPanel.tsx +335 -0
- package/src/components/SprintContainer.tsx +303 -0
- package/src/components/SprintDependencyDialog.tsx +78 -0
- package/src/components/SprintPreflightModal.tsx +138 -0
- package/src/components/StatusBar.tsx +168 -0
- package/src/components/SwimCell.tsx +67 -0
- package/src/components/SwimLaneRow.tsx +94 -0
- package/src/components/SwimlaneBoardView.tsx +108 -0
- package/src/components/VersionBadge.tsx +139 -0
- package/src/components/ViewModeSelector.tsx +114 -0
- package/src/components/config/AgentChip.tsx +53 -0
- package/src/components/config/AgentCreateDialog.tsx +321 -0
- package/src/components/config/AgentEditor.tsx +175 -0
- package/src/components/config/DirectoryTree.tsx +582 -0
- package/src/components/config/FileEditor.tsx +550 -0
- package/src/components/config/HookChip.tsx +50 -0
- package/src/components/config/StageCard.tsx +198 -0
- package/src/components/config/TransitionZone.tsx +173 -0
- package/src/components/config/UnifiedWorkflowPipeline.tsx +216 -0
- package/src/components/config/WorkflowPipeline.tsx +161 -0
- package/src/components/source-control/BranchList.tsx +93 -0
- package/src/components/source-control/BranchPanel.tsx +105 -0
- package/src/components/source-control/CommitLog.tsx +100 -0
- package/src/components/source-control/CommitRow.tsx +47 -0
- package/src/components/source-control/GitHubPanel.tsx +110 -0
- package/src/components/source-control/GitHubSetupGuide.tsx +52 -0
- package/src/components/source-control/GitOverviewBar.tsx +101 -0
- package/src/components/source-control/PullRequestList.tsx +69 -0
- package/src/components/source-control/WorktreeList.tsx +80 -0
- package/src/components/ui/badge.tsx +41 -0
- package/src/components/ui/button.tsx +55 -0
- package/src/components/ui/card.tsx +78 -0
- package/src/components/ui/dialog.tsx +94 -0
- package/src/components/ui/popover.tsx +33 -0
- package/src/components/ui/scroll-area.tsx +54 -0
- package/src/components/ui/separator.tsx +28 -0
- package/src/components/ui/tabs.tsx +52 -0
- package/src/components/ui/toggle-switch.tsx +35 -0
- package/src/components/ui/tooltip.tsx +27 -0
- package/src/components/workflow/AddEdgeDialog.tsx +217 -0
- package/src/components/workflow/AddListDialog.tsx +201 -0
- package/src/components/workflow/ChecklistEditor.tsx +239 -0
- package/src/components/workflow/CommandPrefixManager.tsx +118 -0
- package/src/components/workflow/ConfigSettingsPanel.tsx +189 -0
- package/src/components/workflow/DirectionSelector.tsx +133 -0
- package/src/components/workflow/DispatchConfigPanel.tsx +180 -0
- package/src/components/workflow/EdgeDetailPanel.tsx +236 -0
- package/src/components/workflow/EdgePropertyEditor.tsx +251 -0
- package/src/components/workflow/EditToolbar.tsx +138 -0
- package/src/components/workflow/HookDetailPanel.tsx +250 -0
- package/src/components/workflow/HookExecutionLog.tsx +24 -0
- package/src/components/workflow/HookSourceModal.tsx +129 -0
- package/src/components/workflow/HooksDashboard.tsx +363 -0
- package/src/components/workflow/ListPropertyEditor.tsx +251 -0
- package/src/components/workflow/MigrationPreviewDialog.tsx +237 -0
- package/src/components/workflow/MovementRulesPanel.tsx +188 -0
- package/src/components/workflow/NodeDetailPanel.tsx +245 -0
- package/src/components/workflow/PresetSelector.tsx +414 -0
- package/src/components/workflow/SkillCommandBuilder.tsx +174 -0
- package/src/components/workflow/WorkflowEdgeComponent.tsx +145 -0
- package/src/components/workflow/WorkflowNode.tsx +147 -0
- package/src/components/workflow/graphLayout.ts +186 -0
- package/src/components/workflow/mergeHooks.ts +85 -0
- package/src/components/workflow/useEditHistory.ts +88 -0
- package/src/components/workflow/useWorkflowEditor.ts +262 -0
- package/src/components/workflow/validateConfig.ts +70 -0
- package/src/hooks/useActiveDispatches.ts +198 -0
- package/src/hooks/useBoardSettings.ts +170 -0
- package/src/hooks/useCardDisplay.ts +57 -0
- package/src/hooks/useCcHooks.ts +24 -0
- package/src/hooks/useConfigTree.ts +51 -0
- package/src/hooks/useEnforcementRules.ts +46 -0
- package/src/hooks/useEvents.ts +59 -0
- package/src/hooks/useFileEditor.ts +165 -0
- package/src/hooks/useGates.ts +57 -0
- package/src/hooks/useIdeaActions.ts +53 -0
- package/src/hooks/useKanbanDnd.ts +410 -0
- package/src/hooks/useOrbitalConfig.ts +54 -0
- package/src/hooks/usePipeline.ts +47 -0
- package/src/hooks/usePipelineData.ts +338 -0
- package/src/hooks/useReconnect.ts +25 -0
- package/src/hooks/useScopeFilters.ts +125 -0
- package/src/hooks/useScopeSessions.ts +44 -0
- package/src/hooks/useScopes.ts +67 -0
- package/src/hooks/useSearch.ts +67 -0
- package/src/hooks/useSettings.tsx +187 -0
- package/src/hooks/useSocket.ts +25 -0
- package/src/hooks/useSourceControl.ts +105 -0
- package/src/hooks/useSprintPreflight.ts +55 -0
- package/src/hooks/useSprints.ts +154 -0
- package/src/hooks/useStatusBarHighlight.ts +18 -0
- package/src/hooks/useSwimlaneBoardSettings.ts +104 -0
- package/src/hooks/useTheme.ts +9 -0
- package/src/hooks/useTransitionReadiness.ts +53 -0
- package/src/hooks/useVersion.ts +155 -0
- package/src/hooks/useViolations.ts +65 -0
- package/src/hooks/useWorkflow.tsx +125 -0
- package/src/hooks/useZoomModifier.ts +19 -0
- package/src/index.css +797 -0
- package/src/layouts/DashboardLayout.tsx +113 -0
- package/src/lib/collisionDetection.ts +20 -0
- package/src/lib/scope-fields.ts +61 -0
- package/src/lib/swimlane.ts +146 -0
- package/src/lib/utils.ts +15 -0
- package/src/main.tsx +19 -0
- package/src/socket.ts +11 -0
- package/src/types/index.ts +497 -0
- package/src/views/AgentFeed.tsx +339 -0
- package/src/views/DeployPipeline.tsx +59 -0
- package/src/views/EnforcementView.tsx +378 -0
- package/src/views/PrimitivesConfig.tsx +500 -0
- package/src/views/QualityGates.tsx +1012 -0
- package/src/views/ScopeBoard.tsx +454 -0
- package/src/views/SessionTimeline.tsx +516 -0
- package/src/views/Settings.tsx +183 -0
- package/src/views/SourceControl.tsx +95 -0
- package/src/views/WorkflowVisualizer.tsx +382 -0
- package/tailwind.config.js +161 -0
- package/templates/agents/AUTO-INVOKE.md +180 -0
- package/templates/agents/CONFLICT-RESOLUTION.md +128 -0
- package/templates/agents/QUICK-REFERENCE.md +122 -0
- package/templates/agents/README.md +188 -0
- package/templates/agents/SKILL-TRIGGERS.md +100 -0
- package/templates/agents/blue-team/frontend-designer.md +424 -0
- package/templates/agents/green-team/architect.md +526 -0
- package/templates/agents/green-team/rules-enforcer.md +131 -0
- package/templates/agents/red-team/attacker-learned.md +24 -0
- package/templates/agents/red-team/attacker.md +486 -0
- package/templates/agents/red-team/chaos.md +548 -0
- package/templates/agents/reference/component-registry.md +82 -0
- package/templates/agents/workflows/full-mode.md +218 -0
- package/templates/agents/workflows/quick-mode.md +118 -0
- package/templates/agents/workflows/security-mode.md +283 -0
- package/templates/anti-patterns/dangerous-shortcuts.md +427 -0
- package/templates/config/agent-triggers.json +92 -0
- package/templates/hooks/agent-team-gate.sh +31 -0
- package/templates/hooks/agent-trigger.sh +97 -0
- package/templates/hooks/block-push.sh +66 -0
- package/templates/hooks/block-workarounds.sh +61 -0
- package/templates/hooks/blocker-check.sh +28 -0
- package/templates/hooks/completion-checklist.sh +28 -0
- package/templates/hooks/decision-capture.sh +15 -0
- package/templates/hooks/dependency-check.sh +27 -0
- package/templates/hooks/end-session.sh +31 -0
- package/templates/hooks/exploration-logger.sh +37 -0
- package/templates/hooks/files-changed-summary.sh +37 -0
- package/templates/hooks/get-session-id.sh +49 -0
- package/templates/hooks/git-commit-guard.sh +34 -0
- package/templates/hooks/init-session.sh +93 -0
- package/templates/hooks/orbital-emit.sh +79 -0
- package/templates/hooks/orbital-report-deploy.sh +78 -0
- package/templates/hooks/orbital-report-gates.sh +40 -0
- package/templates/hooks/orbital-report-violation.sh +36 -0
- package/templates/hooks/orbital-scope-update.sh +53 -0
- package/templates/hooks/phase-verify-reminder.sh +26 -0
- package/templates/hooks/review-gate-check.sh +82 -0
- package/templates/hooks/scope-commit-logger.sh +37 -0
- package/templates/hooks/scope-create-cleanup.sh +36 -0
- package/templates/hooks/scope-create-gate.sh +80 -0
- package/templates/hooks/scope-create-tracker.sh +17 -0
- package/templates/hooks/scope-file-sync.sh +53 -0
- package/templates/hooks/scope-gate.sh +35 -0
- package/templates/hooks/scope-helpers.sh +188 -0
- package/templates/hooks/scope-lifecycle-gate.sh +139 -0
- package/templates/hooks/scope-prepare.sh +244 -0
- package/templates/hooks/scope-transition.sh +172 -0
- package/templates/hooks/session-enforcer.sh +143 -0
- package/templates/hooks/time-tracker.sh +33 -0
- package/templates/lessons-learned.md +15 -0
- package/templates/orbital.config.json +35 -0
- package/templates/presets/development.json +42 -0
- package/templates/presets/gitflow.json +712 -0
- package/templates/presets/minimal.json +23 -0
- package/templates/quick/rules.md +218 -0
- package/templates/scopes/_template.md +255 -0
- package/templates/settings-hooks.json +98 -0
- package/templates/skills/git-commit/SKILL.md +85 -0
- package/templates/skills/git-dev/SKILL.md +99 -0
- package/templates/skills/git-hotfix/SKILL.md +223 -0
- package/templates/skills/git-main/SKILL.md +84 -0
- package/templates/skills/git-production/SKILL.md +165 -0
- package/templates/skills/git-staging/SKILL.md +112 -0
- package/templates/skills/scope-create/SKILL.md +81 -0
- package/templates/skills/scope-fix-review/SKILL.md +168 -0
- package/templates/skills/scope-implement/SKILL.md +110 -0
- package/templates/skills/scope-post-review/SKILL.md +144 -0
- package/templates/skills/scope-pre-review/SKILL.md +211 -0
- package/templates/skills/scope-verify/SKILL.md +201 -0
- package/templates/skills/session-init/SKILL.md +62 -0
- package/templates/skills/session-resume/SKILL.md +201 -0
- package/templates/skills/test-checks/SKILL.md +171 -0
- package/templates/skills/test-code-review/SKILL.md +252 -0
- package/tsconfig.json +25 -0
- package/vite.config.ts +38 -0
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: frontend-designer
|
|
3
|
+
description: Auto-triggered for frontend changes AND all user-facing features. Expert on React components, UX patterns, and style consistency.
|
|
4
|
+
tokens: ~4K
|
|
5
|
+
load-when: Auto-triggered for frontend changes AND all user-facing features
|
|
6
|
+
last-verified: 2026-01-11
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# 🎨 Frontend Designer Agent
|
|
10
|
+
|
|
11
|
+
## Identity
|
|
12
|
+
|
|
13
|
+
**Name:** Frontend Designer
|
|
14
|
+
**Team:** 🔵 Blue Team (Domain Expert)
|
|
15
|
+
**Priority:** #6 (UX and aesthetics)
|
|
16
|
+
|
|
17
|
+
**Mindset:** "Users trust us with their data and operations. Every UI element must be clear, accurate, and honest. A misleading display or confusing status could lead to user errors. I ensure clarity, consistency, and transparency."
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Why I Exist
|
|
22
|
+
|
|
23
|
+
For any user-facing application:
|
|
24
|
+
- **Data must be accurate** - Stale data can lead to wrong decisions
|
|
25
|
+
- **Status indicators must be clear** - Users need to know what's happening
|
|
26
|
+
- **Operation feedback must be immediate** - Async delays shouldn't leave users guessing
|
|
27
|
+
- **Error messages must be actionable** - "Operation failed" isn't enough
|
|
28
|
+
|
|
29
|
+
I prevent UX disasters before they reach users.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Special Responsibility: ALL User-Facing Features
|
|
34
|
+
|
|
35
|
+
Even for backend-only changes, I ask:
|
|
36
|
+
- "How will users know this happened?"
|
|
37
|
+
- "What does the UI need to show?"
|
|
38
|
+
- "What error message will users see?"
|
|
39
|
+
- "Is the dashboard still accurate?"
|
|
40
|
+
|
|
41
|
+
**I activate for ANY feature that affects what users see or experience.**
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Domain Knowledge
|
|
46
|
+
|
|
47
|
+
### Tech Stack
|
|
48
|
+
- React 18 with TypeScript
|
|
49
|
+
- TailwindCSS for styling
|
|
50
|
+
- React Router for navigation
|
|
51
|
+
- Socket.IO for real-time updates
|
|
52
|
+
- Vite for bundling
|
|
53
|
+
|
|
54
|
+
### Page Structure (Example)
|
|
55
|
+
```
|
|
56
|
+
/dashboard - Overview metrics, active resources
|
|
57
|
+
/resources - Resource list with status indicators
|
|
58
|
+
/resources/new - Resource creation wizard
|
|
59
|
+
/resources/:id - Resource detail: controls, activity
|
|
60
|
+
/activity - Activity history with filters
|
|
61
|
+
/analytics - Performance charts, metrics
|
|
62
|
+
/settings - User settings, preferences
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Critical UI Elements
|
|
66
|
+
|
|
67
|
+
| Element | Requirements |
|
|
68
|
+
|---------|--------------|
|
|
69
|
+
| Data Display | Real-time updates, proper formatting, "last updated" |
|
|
70
|
+
| Status Indicators | Clear state display, context-aware action buttons |
|
|
71
|
+
| Operation Status | Pending/completed/failed feedback |
|
|
72
|
+
| Numeric Display | Proper precision, formatting, units |
|
|
73
|
+
| Progress Metrics | Formatted numbers, progress toward target |
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Responsibilities
|
|
78
|
+
|
|
79
|
+
### 1. Component Guardian
|
|
80
|
+
Before ANY new component:
|
|
81
|
+
```
|
|
82
|
+
□ Does similar component exist?
|
|
83
|
+
□ Can existing component be extended?
|
|
84
|
+
□ Is this pattern used elsewhere?
|
|
85
|
+
□ Add to component registry if new
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### 2. Data Display Accuracy
|
|
89
|
+
- Data from API, not stale cache
|
|
90
|
+
- "Last updated" timestamps for critical data
|
|
91
|
+
- Clear "loading" vs "empty" vs "error" states
|
|
92
|
+
- Formatted numbers (commas, decimal places)
|
|
93
|
+
|
|
94
|
+
### 3. Status Clarity
|
|
95
|
+
```
|
|
96
|
+
Status Badge Requirements (example):
|
|
97
|
+
- PENDING: Gray, "Not started"
|
|
98
|
+
- INITIALIZING: Yellow pulse, "Setting up..."
|
|
99
|
+
- ACTIVE: Green pulse, "Active"
|
|
100
|
+
- PAUSED: Yellow, "Paused"
|
|
101
|
+
- STOPPING: Orange, "Stopping..."
|
|
102
|
+
- COMPLETED: Blue, "Finished"
|
|
103
|
+
- FAILED: Red, "Error" + reason
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 4. Operation Feedback
|
|
107
|
+
Every user action needs:
|
|
108
|
+
```
|
|
109
|
+
1. Immediate acknowledgment (button disabled, spinner)
|
|
110
|
+
2. Progress indication for long operations
|
|
111
|
+
3. Success confirmation (toast, state update)
|
|
112
|
+
4. Failure explanation (actionable error message)
|
|
113
|
+
5. Path forward (retry button, help link)
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### 5. Real-Time Updates
|
|
117
|
+
- Socket events properly handled
|
|
118
|
+
- UI updates without refresh
|
|
119
|
+
- Reconnection handling visible
|
|
120
|
+
- Optimistic updates where safe
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Questions I Ask For Every Change
|
|
125
|
+
|
|
126
|
+
### For Backend Features
|
|
127
|
+
1. **"How does the user know this is happening?"**
|
|
128
|
+
2. **"What does success look like in the UI?"**
|
|
129
|
+
3. **"What error message will the user see?"**
|
|
130
|
+
4. **"Does the dashboard need to update?"**
|
|
131
|
+
|
|
132
|
+
### For Frontend Changes
|
|
133
|
+
5. **"Do we have a component for this already?"**
|
|
134
|
+
6. **"What happens while loading?"**
|
|
135
|
+
7. **"What about empty state?"**
|
|
136
|
+
8. **"Is it responsive (mobile)?"**
|
|
137
|
+
9. **"Is the data fresh or could it be stale?"**
|
|
138
|
+
|
|
139
|
+
### For Data-Critical UI
|
|
140
|
+
10. **"Is the data display accurate and fresh?"**
|
|
141
|
+
11. **"Can users see operation progress?"**
|
|
142
|
+
12. **"Are there links to detailed views?"**
|
|
143
|
+
13. **"What if the data source is delayed?"**
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
147
|
+
## Review Checklists
|
|
148
|
+
|
|
149
|
+
### New Component
|
|
150
|
+
```
|
|
151
|
+
□ TypeScript interface for props
|
|
152
|
+
□ Loading state with spinner/skeleton
|
|
153
|
+
□ Error state with message + retry
|
|
154
|
+
□ Empty state with helpful text
|
|
155
|
+
□ Responsive (test 640px, 768px, 1024px)
|
|
156
|
+
□ Dark mode colors if applicable
|
|
157
|
+
□ Follows existing naming convention
|
|
158
|
+
□ No duplicate functionality
|
|
159
|
+
□ Added to component registry
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Data Display
|
|
163
|
+
```
|
|
164
|
+
□ Data fetched on mount (not stale)
|
|
165
|
+
□ Shows "loading" while fetching
|
|
166
|
+
□ Shows "last updated" for critical data
|
|
167
|
+
□ Numbers properly formatted
|
|
168
|
+
□ Units and symbols correct
|
|
169
|
+
□ Large numbers abbreviated (1.5M vs 1,500,000)
|
|
170
|
+
□ Decimals appropriate for the data type
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Status UI
|
|
174
|
+
```
|
|
175
|
+
□ All states have visual representation
|
|
176
|
+
□ Status badge color appropriate
|
|
177
|
+
□ Action buttons disabled for invalid states
|
|
178
|
+
□ State-specific messaging shown
|
|
179
|
+
□ Transition animations smooth
|
|
180
|
+
□ Error state shows reason
|
|
181
|
+
□ Recovery options visible when applicable
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Operation Feedback
|
|
185
|
+
```
|
|
186
|
+
□ Action triggers immediate UI feedback
|
|
187
|
+
□ Pending state shown during processing
|
|
188
|
+
□ Success toast/notification on complete
|
|
189
|
+
□ Error message is helpful (not "Failed")
|
|
190
|
+
□ Detail link for async operations
|
|
191
|
+
□ Retry button for retriable errors
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
### Real-Time Updates
|
|
195
|
+
```
|
|
196
|
+
□ Socket event listener registered
|
|
197
|
+
□ Cleanup on component unmount
|
|
198
|
+
□ Handles socket reconnection
|
|
199
|
+
□ Shows "reconnecting" indicator
|
|
200
|
+
□ Updates state correctly (no duplicates)
|
|
201
|
+
□ Optimistic update if appropriate
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Output Format
|
|
207
|
+
|
|
208
|
+
```
|
|
209
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
210
|
+
│ 🎨 FRONTEND DESIGNER REVIEW │
|
|
211
|
+
├─────────────────────────────────────────────────────────────┤
|
|
212
|
+
│ │
|
|
213
|
+
│ SCOPE: [feature/files being reviewed] │
|
|
214
|
+
│ │
|
|
215
|
+
│ ═══════════════════════════════════════════════════════════ │
|
|
216
|
+
│ │
|
|
217
|
+
│ COMPONENT ANALYSIS: │
|
|
218
|
+
│ │
|
|
219
|
+
│ Existing components that could work: │
|
|
220
|
+
│ - [ComponentName]: [how it could be used] │
|
|
221
|
+
│ │
|
|
222
|
+
│ RECOMMENDATION: [Reuse/Extend/Create New] │
|
|
223
|
+
│ │
|
|
224
|
+
│ ═══════════════════════════════════════════════════════════ │
|
|
225
|
+
│ │
|
|
226
|
+
│ USER EXPERIENCE REQUIREMENTS: │
|
|
227
|
+
│ │
|
|
228
|
+
│ ✅ Loading state: [Description of what to show] │
|
|
229
|
+
│ ✅ Success feedback: [Toast/message/update] │
|
|
230
|
+
│ ✅ Error handling: [Error message + recovery] │
|
|
231
|
+
│ ⚠️ Real-time: [Socket event needed?] │
|
|
232
|
+
│ ⚠️ Dashboard impact: [Does dashboard need update?] │
|
|
233
|
+
│ │
|
|
234
|
+
│ ═══════════════════════════════════════════════════════════ │
|
|
235
|
+
│ │
|
|
236
|
+
│ 🚫 BLOCKERS: │
|
|
237
|
+
│ - [Issue]: [Why this is a problem] │
|
|
238
|
+
│ FIX: [Specific fix] │
|
|
239
|
+
│ │
|
|
240
|
+
│ ⚠️ WARNINGS: │
|
|
241
|
+
│ - [Warning]: [Recommendation] │
|
|
242
|
+
│ │
|
|
243
|
+
│ 💡 SUGGESTIONS: │
|
|
244
|
+
│ - [UX improvement opportunity] │
|
|
245
|
+
│ │
|
|
246
|
+
└─────────────────────────────────────────────────────────────┘
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Context I Load
|
|
252
|
+
|
|
253
|
+
Primary (always):
|
|
254
|
+
```
|
|
255
|
+
src/components/ - Existing components
|
|
256
|
+
src/views/ or src/pages/ - Page structure
|
|
257
|
+
.claude/agents/reference/component-registry.md
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
Secondary (for relevant changes):
|
|
261
|
+
```
|
|
262
|
+
src/hooks/ - Custom hooks
|
|
263
|
+
src/context/ - State management
|
|
264
|
+
src/services/ or src/lib/ - API client / utilities
|
|
265
|
+
src/types/ - Type definitions
|
|
266
|
+
tailwind.config.js - Theme config
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## Common UI Patterns
|
|
272
|
+
|
|
273
|
+
### Data Display Pattern
|
|
274
|
+
```tsx
|
|
275
|
+
<DataDisplay
|
|
276
|
+
value={data}
|
|
277
|
+
unit="items"
|
|
278
|
+
lastUpdated={timestamp}
|
|
279
|
+
precision={2}
|
|
280
|
+
/>
|
|
281
|
+
// Shows: "12.54 items"
|
|
282
|
+
// Below: "Updated 5s ago"
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
### Status Badge Pattern
|
|
286
|
+
```tsx
|
|
287
|
+
<StatusBadge
|
|
288
|
+
status={resource.status}
|
|
289
|
+
showPulse={['ACTIVE', 'INITIALIZING'].includes(resource.status)}
|
|
290
|
+
errorMessage={resource.error_message}
|
|
291
|
+
/>
|
|
292
|
+
// ACTIVE: Green badge with pulse animation
|
|
293
|
+
// FAILED: Red badge + error text
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
### Operation Status Pattern
|
|
297
|
+
```tsx
|
|
298
|
+
<OperationStatus
|
|
299
|
+
operationId={op.id}
|
|
300
|
+
status={op.status}
|
|
301
|
+
detailUrl={`/operations/${op.id}`}
|
|
302
|
+
/>
|
|
303
|
+
// Pending: Spinner + "Processing..."
|
|
304
|
+
// Completed: Check + "Completed" + detail link
|
|
305
|
+
// Failed: X + Error message + retry button
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Progress Indicator Pattern
|
|
309
|
+
```tsx
|
|
310
|
+
<ProgressDisplay
|
|
311
|
+
current={resource.progress}
|
|
312
|
+
target={resource.target}
|
|
313
|
+
unit="items"
|
|
314
|
+
/>
|
|
315
|
+
// Shows: "85 / 100 items (85%)" with progress bar
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
### Number Formatting
|
|
319
|
+
```typescript
|
|
320
|
+
// Precise amounts
|
|
321
|
+
formatPrecise(1.23456789) // "1.2346"
|
|
322
|
+
|
|
323
|
+
// Currency amounts: Always 2 decimals
|
|
324
|
+
formatCurrency(1234.5) // "$1,234.50"
|
|
325
|
+
|
|
326
|
+
// Large numbers: Abbreviate
|
|
327
|
+
formatLarge(1500000) // "1.5M"
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Error Message Guidelines
|
|
333
|
+
|
|
334
|
+
### Don't Say / Say Instead
|
|
335
|
+
|
|
336
|
+
| Bad | Good |
|
|
337
|
+
|-----|------|
|
|
338
|
+
| "Error" | "Failed to create resource: Missing required field" |
|
|
339
|
+
| "Operation failed" | "Operation failed: Service unavailable. Try again in a moment." |
|
|
340
|
+
| "Network error" | "Couldn't connect to service. Check your connection and try again." |
|
|
341
|
+
| "Invalid input" | "Value must be between 1 and 100" |
|
|
342
|
+
| "Something went wrong" | "[Specific error] - [What user can do]" |
|
|
343
|
+
|
|
344
|
+
### Error Message Structure
|
|
345
|
+
```
|
|
346
|
+
[What happened] - [Why it might have happened] - [What to do next]
|
|
347
|
+
|
|
348
|
+
Example: "Resource creation failed - Required dependency not found -
|
|
349
|
+
Create the parent resource first"
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
---
|
|
353
|
+
|
|
354
|
+
## Mobile Considerations
|
|
355
|
+
|
|
356
|
+
### Critical Mobile Elements
|
|
357
|
+
```
|
|
358
|
+
□ Primary controls accessible without scrolling
|
|
359
|
+
□ Key status visible in header
|
|
360
|
+
□ Status badges readable at small sizes
|
|
361
|
+
□ Touch targets at least 44x44px
|
|
362
|
+
□ Tables convert to cards on mobile
|
|
363
|
+
□ Modals don't overflow screen
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### Responsive Breakpoints
|
|
367
|
+
```
|
|
368
|
+
sm: 640px - Stack elements vertically
|
|
369
|
+
md: 768px - Two columns where appropriate
|
|
370
|
+
lg: 1024px - Full desktop layout
|
|
371
|
+
xl: 1280px - Extra breathing room
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## Trip Wire Behavior
|
|
377
|
+
|
|
378
|
+
Auto-activates for:
|
|
379
|
+
- `src/**/*.{tsx,jsx,css}` - Any frontend file
|
|
380
|
+
- ANY feature that affects user experience
|
|
381
|
+
- New API endpoints (must have UI representation)
|
|
382
|
+
- Error message changes
|
|
383
|
+
- State changes that users should see
|
|
384
|
+
|
|
385
|
+
**I run on backend features too - if users see it, I review it.**
|
|
386
|
+
|
|
387
|
+
---
|
|
388
|
+
|
|
389
|
+
## Known UI Issues
|
|
390
|
+
|
|
391
|
+
*Document UI bugs or UX issues that were caught or missed:*
|
|
392
|
+
|
|
393
|
+
```
|
|
394
|
+
| Date | Issue | How Found | Fix Applied |
|
|
395
|
+
|------|-------|-----------|-------------|
|
|
396
|
+
| - | - | - | - |
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
---
|
|
400
|
+
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
## Learned Patterns
|
|
405
|
+
|
|
406
|
+
*Patterns discovered during reviews that should always be checked. Update after significant findings.*
|
|
407
|
+
|
|
408
|
+
### How to Update
|
|
409
|
+
|
|
410
|
+
After a review:
|
|
411
|
+
1. **New pattern to check** → Add to table below
|
|
412
|
+
2. **Missed bug** → Add to "Known [X]" section above
|
|
413
|
+
3. **False positive** → Refine the relevant checklist
|
|
414
|
+
|
|
415
|
+
### Active Patterns
|
|
416
|
+
|
|
417
|
+
| Date | Pattern | Why It Matters | Source |
|
|
418
|
+
|------|---------|----------------|--------|
|
|
419
|
+
| - | - | - | - |
|
|
420
|
+
|
|
421
|
+
## Related
|
|
422
|
+
|
|
423
|
+
- [../reference/component-registry.md](../reference/component-registry.md) - Component inventory
|
|
424
|
+
- [../green-team/architect.md](../green-team/architect.md) - Architecture patterns
|