+ {/* Header */}
+
+
+
+
+ 🏘️ {districtName || districtId} Governance
+
+
+ District-level управління
+
+
+
+ {lead && (
+
+
+ 👤
+
+
+
{lead.agentName}
+
District Lead
+
+
+
+ )}
+
+
+
+ {/* Tabs */}
+
+ {[
+ { id: 'overview', label: '📊 Overview', icon: '📊' },
+ { id: 'daos', label: '🏢 Sub-DAOs', icon: '🏢' },
+ { id: 'incidents', label: '⚠️ Incidents', icon: '⚠️' },
+ { id: 'audit', label: '📋 Audit', icon: '📋' },
+ ].map((tab) => (
+
+ ))}
+
+
+ {/* Content */}
+
+ {activeTab === 'overview' && (
+
+ {/* Stats Cards */}
+
+
+
i.status === 'open').length || 0}
+ color="red"
+ />
+
+ {/* Lead Agent Info */}
+ {lead && (
+
+
District Lead Agent
+
+
+ 👤
+
+
+
{lead.agentName}
+
{lead.districtName}
+
+
+
+
+
+
+ )}
+
+ )}
+
+ {activeTab === 'daos' && (
+
+
🏢
+
Sub-DAOs для цього дистрикту будуть показані тут
+
Потрібна інтеграція з MicroDAO API
+
+ )}
+
+ {activeTab === 'incidents' && (
+
+ {incidentsData?.incidents.length === 0 ? (
+
+
✅
+
Немає відкритих інцидентів на рівні дистрикту
+
+ ) : (
+ incidentsData?.incidents.map((incident: Incident) => (
+
+ ))
+ )}
+
+ )}
+
+ {activeTab === 'audit' && (
+
+ {auditData?.length === 0 ? (
+
+
Немає подій для цього дистрикту
+
+ ) : (
+ auditData?.map((event: GovernanceEvent) => (
+
+ ))
+ )}
+
+ )}
+
+
+ );
+};
+
+// Helper Components
+const StatCard: React.FC<{
+ icon: string;
+ label: string;
+ value: number;
+ color: 'blue' | 'green' | 'red' | 'yellow';
+}> = ({ icon, label, value, color }) => {
+ const colorClasses = {
+ blue: 'bg-blue-500/20 border-blue-500/30',
+ green: 'bg-green-500/20 border-green-500/30',
+ red: 'bg-red-500/20 border-red-500/30',
+ yellow: 'bg-yellow-500/20 border-yellow-500/30',
+ };
+
+ return (
+
+
+ {event.eventType}
+
+ {new Date(event.createdAt).toLocaleString('uk-UA')}
+
+
+
+ {event.actorId} → {event.targetId}
+
+
+);
+
+export default DistrictGovernancePanel;
+
diff --git a/src/features/governance/components/MicroDAOGovernancePanel.tsx b/src/features/governance/components/MicroDAOGovernancePanel.tsx
new file mode 100644
index 00000000..d834a58c
--- /dev/null
+++ b/src/features/governance/components/MicroDAOGovernancePanel.tsx
@@ -0,0 +1,418 @@
+/**
+ * MicroDAO Governance Panel
+ * Based on: docs/foundation/Agent_Governance_Protocol_v1.md
+ *
+ * Shows DAO-level governance: Orchestrator, Core-team, Members, Incidents
+ */
+
+import React, { useState } from 'react';
+import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';
+import { governanceApi } from '../../../api/governance';
+import { incidentsApi } from '../../../api/incidents';
+import { auditApi } from '../../../api/audit';
+import { GovernanceLevelBadge } from './GovernanceLevelBadge';
+import type { Incident, GovernanceEvent, AgentGovLevel } from '../../../types/governance';
+import { GOV_LEVEL_LABELS } from '../../../types/governance';
+
+interface MicroDAOGovernancePanelProps {
+ microdaoId: string;
+ microdaoName?: string;
+ actorId?: string;
+}
+
+export const MicroDAOGovernancePanel: React.FC