claude-code-workflow 7.2.9 → 7.2.11
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/.claude/agents/cli-planning-agent.md +3 -0
- package/.claude/agents/debug-explore-agent.md +1 -0
- package/.claude/agents/tdd-developer.md +1 -0
- package/.claude/agents/team-worker.md +1 -1
- package/.claude/agents/test-action-planning-agent.md +3 -0
- package/.claude/agents/test-context-search-agent.md +1 -0
- package/.claude/agents/test-fix-agent.md +3 -0
- package/.claude/skills/review-code/SKILL.md +2 -0
- package/.claude/skills/review-cycle/SKILL.md +4 -0
- package/.claude/skills/skill-simplify/phases/02-optimize.md +4 -0
- package/.claude/skills/spec-generator/phases/05-epics-stories.md +4 -0
- package/.claude/skills/team-arch-opt/specs/team-config.json +5 -5
- package/.claude/skills/team-frontend-debug/roles/analyzer/role.md +3 -2
- package/.claude/skills/team-perf-opt/roles/coordinator/commands/monitor.md +1 -1
- package/.claude/skills/team-perf-opt/specs/team-config.json +5 -5
- package/.claude/skills/team-quality-assurance/roles/executor/role.md +2 -1
- package/.claude/skills/team-review/roles/reviewer/role.md +2 -1
- package/.claude/skills/team-tech-debt/roles/scanner/role.md +2 -1
- package/.claude/skills/team-testing/roles/executor/role.md +2 -1
- package/.claude/skills/team-testing/roles/generator/role.md +2 -1
- package/.claude/skills/team-ultra-analyze/roles/explorer/role.md +2 -1
- package/.claude/skills/team-ux-improve/specs/team-config.json +6 -6
- package/.claude/skills/workflow-execute/phases/06-review.md +4 -4
- package/.claude/skills/workflow-lite-test-review/SKILL.md +2 -0
- package/.claude/skills/workflow-plan/phases/05-plan-verify.md +4 -0
- package/.claude/skills/workflow-tdd-plan/phases/02-context-gathering.md +1 -0
- package/.claude/skills/workflow-tdd-plan/phases/05-tdd-task-generation.md +2 -1
- package/.claude/skills/workflow-test-fix/phases/02-test-context-gather.md +1 -0
- package/.claude/skills/workflow-test-fix/phases/05-test-cycle-execute.md +2 -1
- package/.claude/skills/workflow-tune/SKILL.md +487 -0
- package/.claude/skills/workflow-tune/phases/01-setup.md +548 -0
- package/.claude/skills/workflow-tune/phases/02-step-execute.md +197 -0
- package/.claude/skills/workflow-tune/phases/03-step-analyze.md +386 -0
- package/.claude/skills/workflow-tune/phases/04-synthesize.md +257 -0
- package/.claude/skills/workflow-tune/phases/05-optimize-report.md +246 -0
- package/.claude/skills/workflow-tune/specs/workflow-eval-criteria.md +57 -0
- package/.claude/skills/workflow-tune/templates/step-analysis-prompt.md +88 -0
- package/.claude/skills/workflow-tune/templates/synthesis-prompt.md +90 -0
- package/.codex/skills/analyze-with-file/SKILL.md +64 -103
- package/.codex/skills/debug-with-file/SKILL.md +4 -0
- package/.codex/skills/issue-discover/SKILL.md +1 -0
- package/.codex/skills/review-cycle/phases/02-parallel-review.md +3 -0
- package/.codex/skills/roadmap-with-file/SKILL.md +11 -17
- package/.codex/skills/team-designer/agents/validation-reporter.md +186 -0
- package/.codex/skills/team-iterdev/agents/gc-controller.md +193 -0
- package/.codex/skills/team-iterdev/agents/task-analyzer.md +206 -0
- package/.codex/skills/team-lifecycle-v4/agents/quality-gate.md +165 -0
- package/.codex/skills/team-lifecycle-v4/agents/requirement-clarifier.md +163 -0
- package/.codex/skills/team-lifecycle-v4/agents/supervisor.md +182 -0
- package/.codex/skills/team-uidesign/agents/completion-handler.md +177 -0
- package/.codex/skills/team-uidesign/agents/gc-loop-handler.md +162 -0
- package/.codex/skills/workflow-test-fix-cycle/phases/01-test-fix-gen.md +4 -0
- package/.codex/skills/workflow-test-fix-cycle/phases/02-test-cycle-execute.md +2 -0
- package/ccw/dist/commands/spec.d.ts.map +1 -1
- package/ccw/dist/commands/spec.js +9 -4
- package/ccw/dist/commands/spec.js.map +1 -1
- package/ccw/dist/core/routes/codexlens-routes.d.ts.map +1 -1
- package/ccw/dist/core/routes/codexlens-routes.js +3 -1
- package/ccw/dist/core/routes/codexlens-routes.js.map +1 -1
- package/ccw/dist/tools/spec-index-builder.d.ts +8 -4
- package/ccw/dist/tools/spec-index-builder.d.ts.map +1 -1
- package/ccw/dist/tools/spec-index-builder.js +8 -4
- package/ccw/dist/tools/spec-index-builder.js.map +1 -1
- package/ccw/dist/tools/spec-init.d.ts +1 -1
- package/ccw/dist/tools/spec-init.d.ts.map +1 -1
- package/ccw/dist/tools/spec-init.js +127 -0
- package/ccw/dist/tools/spec-init.js.map +1 -1
- package/ccw/dist/tools/spec-loader.d.ts.map +1 -1
- package/ccw/dist/tools/spec-loader.js +2 -1
- package/ccw/dist/tools/spec-loader.js.map +1 -1
- package/ccw/frontend/dist/assets/{AlertDialog-gTMl4gSG.js → AlertDialog-BW9jiZ-p.js} +2 -2
- package/ccw/frontend/dist/assets/{AlertDialog-gTMl4gSG.js.map → AlertDialog-BW9jiZ-p.js.map} +1 -1
- package/ccw/frontend/dist/assets/{AnalysisPage-Bc4p4SvJ.js → AnalysisPage-ds-w_nVO.js} +2 -2
- package/ccw/frontend/dist/assets/{AnalysisPage-Bc4p4SvJ.js.map → AnalysisPage-ds-w_nVO.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ApiSettingsPage-CVK108u2.js → ApiSettingsPage-DlCbXxTz.js} +2 -2
- package/ccw/frontend/dist/assets/{ApiSettingsPage-CVK108u2.js.map → ApiSettingsPage-DlCbXxTz.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliModeToggle-34Sjwl05.js → CliModeToggle-Dq3nL4fF.js} +2 -2
- package/ccw/frontend/dist/assets/{CliModeToggle-34Sjwl05.js.map → CliModeToggle-Dq3nL4fF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliSessionSharePage-bJZAYI38.js → CliSessionSharePage-BNDkEE4u.js} +2 -2
- package/ccw/frontend/dist/assets/{CliSessionSharePage-bJZAYI38.js.map → CliSessionSharePage-BNDkEE4u.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CliViewerPage-VYnQGjxU.js → CliViewerPage-ChM-uNx_.js} +2 -2
- package/ccw/frontend/dist/assets/{CliViewerPage-VYnQGjxU.js.map → CliViewerPage-ChM-uNx_.js.map} +1 -1
- package/ccw/frontend/dist/assets/CodexLensPage-DOcsYNQk.js +2 -0
- package/ccw/frontend/dist/assets/CodexLensPage-DOcsYNQk.js.map +1 -0
- package/ccw/frontend/dist/assets/{Collapsible-B_xd1Qbg.js → Collapsible-CRNbykXN.js} +2 -2
- package/ccw/frontend/dist/assets/{Collapsible-B_xd1Qbg.js.map → Collapsible-CRNbykXN.js.map} +1 -1
- package/ccw/frontend/dist/assets/{CommandsManagerPage-Bjx1bPbH.js → CommandsManagerPage-C2JWcemF.js} +2 -2
- package/ccw/frontend/dist/assets/{CommandsManagerPage-Bjx1bPbH.js.map → CommandsManagerPage-C2JWcemF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{DeepWikiPage-EgHsHvAH.js → DeepWikiPage-CvleOtJy.js} +2 -2
- package/ccw/frontend/dist/assets/{DeepWikiPage-EgHsHvAH.js.map → DeepWikiPage-CvleOtJy.js.map} +1 -1
- package/ccw/frontend/dist/assets/{EndpointsPage-CuwpbCzK.js → EndpointsPage-CMOWQG64.js} +2 -2
- package/ccw/frontend/dist/assets/{EndpointsPage-CuwpbCzK.js.map → EndpointsPage-CMOWQG64.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ExplorerPage-cvlx0Zw0.js → ExplorerPage-DaFPRlNo.js} +2 -2
- package/ccw/frontend/dist/assets/{ExplorerPage-cvlx0Zw0.js.map → ExplorerPage-DaFPRlNo.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FixSessionPage-C74-MPza.js → FixSessionPage-CC4p04Az.js} +2 -2
- package/ccw/frontend/dist/assets/{FixSessionPage-C74-MPza.js.map → FixSessionPage-CC4p04Az.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FloatingFileBrowser-x_-6y_n2.js → FloatingFileBrowser-DROn1xZ5.js} +2 -2
- package/ccw/frontend/dist/assets/{FloatingFileBrowser-x_-6y_n2.js.map → FloatingFileBrowser-DROn1xZ5.js.map} +1 -1
- package/ccw/frontend/dist/assets/{FloatingPanel-BGwmbJR1.js → FloatingPanel-CmL_yhDv.js} +2 -2
- package/ccw/frontend/dist/assets/{FloatingPanel-BGwmbJR1.js.map → FloatingPanel-CmL_yhDv.js.map} +1 -1
- package/ccw/frontend/dist/assets/{GraphExplorerPage-Bg5-aQxi.js → GraphExplorerPage-DCV5ybKE.js} +2 -2
- package/ccw/frontend/dist/assets/{GraphExplorerPage-Bg5-aQxi.js.map → GraphExplorerPage-DCV5ybKE.js.map} +1 -1
- package/ccw/frontend/dist/assets/{HistoryPage-C00fh0HE.js → HistoryPage-D0fYQZgc.js} +2 -2
- package/ccw/frontend/dist/assets/{HistoryPage-C00fh0HE.js.map → HistoryPage-D0fYQZgc.js.map} +1 -1
- package/ccw/frontend/dist/assets/{HookManagerPage-CtVTB_ae.js → HookManagerPage-D2FuJfsM.js} +2 -2
- package/ccw/frontend/dist/assets/{HookManagerPage-CtVTB_ae.js.map → HookManagerPage-D2FuJfsM.js.map} +1 -1
- package/ccw/frontend/dist/assets/{InstallationsPage-CYuMQDbC.js → InstallationsPage-tjklillZ.js} +2 -2
- package/ccw/frontend/dist/assets/{InstallationsPage-CYuMQDbC.js.map → InstallationsPage-tjklillZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{IssueHubPage-T_VSvUMh.js → IssueHubPage-E4JVrhO1.js} +2 -2
- package/ccw/frontend/dist/assets/{IssueHubPage-T_VSvUMh.js.map → IssueHubPage-E4JVrhO1.js.map} +1 -1
- package/ccw/frontend/dist/assets/{LiteTasksPage-DmcgvIvi.js → LiteTasksPage-aJuRoyLt.js} +2 -2
- package/ccw/frontend/dist/assets/{LiteTasksPage-DmcgvIvi.js.map → LiteTasksPage-aJuRoyLt.js.map} +1 -1
- package/ccw/frontend/dist/assets/{McpManagerPage-C_a7QSKz.js → McpManagerPage-BJeuWJv1.js} +2 -2
- package/ccw/frontend/dist/assets/{McpManagerPage-C_a7QSKz.js.map → McpManagerPage-BJeuWJv1.js.map} +1 -1
- package/ccw/frontend/dist/assets/{MemoryPage-CWKmXY5k.js → MemoryPage-BI4FAXhs.js} +2 -2
- package/ccw/frontend/dist/assets/{MemoryPage-CWKmXY5k.js.map → MemoryPage-BI4FAXhs.js.map} +1 -1
- package/ccw/frontend/dist/assets/{NotFoundPage-B1duXK6r.js → NotFoundPage-DD2svchp.js} +2 -2
- package/ccw/frontend/dist/assets/{NotFoundPage-B1duXK6r.js.map → NotFoundPage-DD2svchp.js.map} +1 -1
- package/ccw/frontend/dist/assets/{OrchestratorPage-Ib9TM6HE.js → OrchestratorPage-FC__7yYa.js} +2 -2
- package/ccw/frontend/dist/assets/{OrchestratorPage-Ib9TM6HE.js.map → OrchestratorPage-FC__7yYa.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ProjectOverviewPage-sXSWMbF8.js → ProjectOverviewPage-DBB_-FzV.js} +2 -2
- package/ccw/frontend/dist/assets/{ProjectOverviewPage-sXSWMbF8.js.map → ProjectOverviewPage-DBB_-FzV.js.map} +1 -1
- package/ccw/frontend/dist/assets/{PromptHistoryPage-B6jaqG12.js → PromptHistoryPage-BwOAvCH8.js} +2 -2
- package/ccw/frontend/dist/assets/{PromptHistoryPage-B6jaqG12.js.map → PromptHistoryPage-BwOAvCH8.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ReviewSessionPage-D5qJyr3s.js → ReviewSessionPage-Dd1-g_gp.js} +2 -2
- package/ccw/frontend/dist/assets/{ReviewSessionPage-D5qJyr3s.js.map → ReviewSessionPage-Dd1-g_gp.js.map} +1 -1
- package/ccw/frontend/dist/assets/{RulesManagerPage-DyawK8QE.js → RulesManagerPage-B3RGdsKD.js} +2 -2
- package/ccw/frontend/dist/assets/{RulesManagerPage-DyawK8QE.js.map → RulesManagerPage-B3RGdsKD.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SessionDetailPage-Cym_RvC9.js → SessionDetailPage-DM-W5R8K.js} +2 -2
- package/ccw/frontend/dist/assets/{SessionDetailPage-Cym_RvC9.js.map → SessionDetailPage-DM-W5R8K.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SessionsPage-Dkc1Hv8W.js → SessionsPage-BVz1KCc7.js} +2 -2
- package/ccw/frontend/dist/assets/{SessionsPage-Dkc1Hv8W.js.map → SessionsPage-BVz1KCc7.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SettingsPage-Rik9cUIj.js → SettingsPage-ComW7EZS.js} +4 -4
- package/ccw/frontend/dist/assets/{SettingsPage-Rik9cUIj.js.map → SettingsPage-ComW7EZS.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SkillsManagerPage-BGDWYAyI.js → SkillsManagerPage-CKom9XwV.js} +2 -2
- package/ccw/frontend/dist/assets/{SkillsManagerPage-BGDWYAyI.js.map → SkillsManagerPage-CKom9XwV.js.map} +1 -1
- package/ccw/frontend/dist/assets/{SpecsSettingsPage-CTiA1DMP.js → SpecsSettingsPage-DQz7WP2s.js} +2 -2
- package/ccw/frontend/dist/assets/{SpecsSettingsPage-CTiA1DMP.js.map → SpecsSettingsPage-DQz7WP2s.js.map} +1 -1
- package/ccw/frontend/dist/assets/{Switch-BgAFC-Wk.js → Switch-BPMdND9H.js} +2 -2
- package/ccw/frontend/dist/assets/{Switch-BgAFC-Wk.js.map → Switch-BPMdND9H.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TabsNavigation-drSnu5jn.js → TabsNavigation-qqt70VYL.js} +2 -2
- package/ccw/frontend/dist/assets/{TabsNavigation-drSnu5jn.js.map → TabsNavigation-qqt70VYL.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TaskDrawer-ePC__6-P.js → TaskDrawer-BqK_qiHX.js} +2 -2
- package/ccw/frontend/dist/assets/{TaskDrawer-ePC__6-P.js.map → TaskDrawer-BqK_qiHX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TeamPage-C6bdFWn8.js → TeamPage-u5_i0Rgh.js} +2 -2
- package/ccw/frontend/dist/assets/{TeamPage-C6bdFWn8.js.map → TeamPage-u5_i0Rgh.js.map} +1 -1
- package/ccw/frontend/dist/assets/{TerminalDashboardPage-Zofi_DZM.js → TerminalDashboardPage-rUtC9e40.js} +2 -2
- package/ccw/frontend/dist/assets/{TerminalDashboardPage-Zofi_DZM.js.map → TerminalDashboardPage-rUtC9e40.js.map} +1 -1
- package/ccw/frontend/dist/assets/{archive-Bza1KlB9.js → archive-C3u8YNQF.js} +2 -2
- package/ccw/frontend/dist/assets/{archive-Bza1KlB9.js.map → archive-C3u8YNQF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{archive-restore-CpsDm-cG.js → archive-restore-DfQ998g5.js} +2 -2
- package/ccw/frontend/dist/assets/{archive-restore-CpsDm-cG.js.map → archive-restore-DfQ998g5.js.map} +1 -1
- package/ccw/frontend/dist/assets/{arrow-right-CibG_LVO.js → arrow-right-BshJM9Po.js} +2 -2
- package/ccw/frontend/dist/assets/{arrow-right-CibG_LVO.js.map → arrow-right-BshJM9Po.js.map} +1 -1
- package/ccw/frontend/dist/assets/{bookmark-plus-BheO8EgG.js → bookmark-plus-D03qJyOZ.js} +2 -2
- package/ccw/frontend/dist/assets/{bookmark-plus-BheO8EgG.js.map → bookmark-plus-D03qJyOZ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{bot-BlhM0Nl0.js → bot-CyzWuwq0.js} +2 -2
- package/ccw/frontend/dist/assets/{bot-BlhM0Nl0.js.map → bot-CyzWuwq0.js.map} +1 -1
- package/ccw/frontend/dist/assets/{braces-Dqjg_eCO.js → braces-BPgtyjsG.js} +2 -2
- package/ccw/frontend/dist/assets/{braces-Dqjg_eCO.js.map → braces-BPgtyjsG.js.map} +1 -1
- package/ccw/frontend/dist/assets/{circle-stop-DYZSLYU0.js → circle-stop-Dix1AOmw.js} +2 -2
- package/ccw/frontend/dist/assets/{circle-stop-DYZSLYU0.js.map → circle-stop-Dix1AOmw.js.map} +1 -1
- package/ccw/frontend/dist/assets/{cpu-DWCyAOAv.js → cpu-CCQ4Q0Zh.js} +2 -2
- package/ccw/frontend/dist/assets/{cpu-DWCyAOAv.js.map → cpu-CCQ4Q0Zh.js.map} +1 -1
- package/ccw/frontend/dist/assets/{ellipsis-vertical-DIyoSEHx.js → ellipsis-vertical-BpTysg-Y.js} +2 -2
- package/ccw/frontend/dist/assets/{ellipsis-vertical-DIyoSEHx.js.map → ellipsis-vertical-BpTysg-Y.js.map} +1 -1
- package/ccw/frontend/dist/assets/{eye-DUy7aLEx.js → eye-DGY1rAZs.js} +2 -2
- package/ccw/frontend/dist/assets/{eye-DUy7aLEx.js.map → eye-DGY1rAZs.js.map} +1 -1
- package/ccw/frontend/dist/assets/{eye-off-CGRUVRDR.js → eye-off-D8t3JfWG.js} +2 -2
- package/ccw/frontend/dist/assets/{eye-off-CGRUVRDR.js.map → eye-off-D8t3JfWG.js.map} +1 -1
- package/ccw/frontend/dist/assets/{file-json-BxLBtU9d.js → file-json-BAdJb0n8.js} +2 -2
- package/ccw/frontend/dist/assets/{file-json-BxLBtU9d.js.map → file-json-BAdJb0n8.js.map} +1 -1
- package/ccw/frontend/dist/assets/{file-text-BoHsW2es.js → file-text-DrJFiOUB.js} +2 -2
- package/ccw/frontend/dist/assets/{file-text-BoHsW2es.js.map → file-text-DrJFiOUB.js.map} +1 -1
- package/ccw/frontend/dist/assets/{filter-B4vOqP6B.js → filter-CKqzYbz7.js} +2 -2
- package/ccw/frontend/dist/assets/{filter-B4vOqP6B.js.map → filter-CKqzYbz7.js.map} +1 -1
- package/ccw/frontend/dist/assets/{folder-BKhwCNFG.js → folder-CV8511y9.js} +2 -2
- package/ccw/frontend/dist/assets/{folder-BKhwCNFG.js.map → folder-CV8511y9.js.map} +1 -1
- package/ccw/frontend/dist/assets/{gauge-Dgf64gkT.js → gauge-XKvmu_uU.js} +2 -2
- package/ccw/frontend/dist/assets/{gauge-Dgf64gkT.js.map → gauge-XKvmu_uU.js.map} +1 -1
- package/ccw/frontend/dist/assets/{globe-Cus_S6Ux.js → globe-C56cDUzX.js} +2 -2
- package/ccw/frontend/dist/assets/{globe-Cus_S6Ux.js.map → globe-C56cDUzX.js.map} +1 -1
- package/ccw/frontend/dist/assets/{grid-3x3-DM08hpAN.js → grid-3x3-Bya-suFW.js} +2 -2
- package/ccw/frontend/dist/assets/{grid-3x3-DM08hpAN.js.map → grid-3x3-Bya-suFW.js.map} +1 -1
- package/ccw/frontend/dist/assets/{hard-drive-eCtll84F.js → hard-drive-CmuTZpsB.js} +2 -2
- package/ccw/frontend/dist/assets/{hard-drive-eCtll84F.js.map → hard-drive-CmuTZpsB.js.map} +1 -1
- package/ccw/frontend/dist/assets/{hash-Bd1RD285.js → hash-CRPT_tJQ.js} +2 -2
- package/ccw/frontend/dist/assets/{hash-Bd1RD285.js.map → hash-CRPT_tJQ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{history-eyyCQA6b.js → history-C1pJZQCL.js} +2 -2
- package/ccw/frontend/dist/assets/{history-eyyCQA6b.js.map → history-C1pJZQCL.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-ZnmWxcZg.js → index-B6TpijCe.js} +2 -2
- package/ccw/frontend/dist/assets/{index-ZnmWxcZg.js.map → index-B6TpijCe.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-b2C0iFd1.js → index-Bcq-7r6F.js} +2 -2
- package/ccw/frontend/dist/assets/{index-b2C0iFd1.js.map → index-Bcq-7r6F.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-Cs2ShCCy.js → index-CI8-rBff.js} +2 -2
- package/ccw/frontend/dist/assets/{index-Cs2ShCCy.js.map → index-CI8-rBff.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-CY6Lueph.js → index-Dmt9OiEf.js} +2 -2
- package/ccw/frontend/dist/assets/{index-CY6Lueph.js.map → index-Dmt9OiEf.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-DfeBbFXo.js → index-anSMmEF8.js} +2 -2
- package/ccw/frontend/dist/assets/{index-DfeBbFXo.js.map → index-anSMmEF8.js.map} +1 -1
- package/ccw/frontend/dist/assets/{index-B6I7GQC5.js → index-dWT2M6Ef.js} +4 -4
- package/ccw/frontend/dist/assets/{index-B6I7GQC5.js.map → index-dWT2M6Ef.js.map} +1 -1
- package/ccw/frontend/dist/assets/{layout-grid-ChrTrCby.js → layout-grid-TSO0BFQE.js} +2 -2
- package/ccw/frontend/dist/assets/{layout-grid-ChrTrCby.js.map → layout-grid-TSO0BFQE.js.map} +1 -1
- package/ccw/frontend/dist/assets/{lightbulb-CvXiTlzN.js → lightbulb-Caj6fIQD.js} +2 -2
- package/ccw/frontend/dist/assets/{lightbulb-CvXiTlzN.js.map → lightbulb-Caj6fIQD.js.map} +1 -1
- package/ccw/frontend/dist/assets/{link-2-W0Nl17ec.js → link-2-DE9lMxa-.js} +2 -2
- package/ccw/frontend/dist/assets/{link-2-W0Nl17ec.js.map → link-2-DE9lMxa-.js.map} +1 -1
- package/ccw/frontend/dist/assets/{link-CL4JmoHb.js → link-BZtPgLW0.js} +2 -2
- package/ccw/frontend/dist/assets/{link-CL4JmoHb.js.map → link-BZtPgLW0.js.map} +1 -1
- package/ccw/frontend/dist/assets/{list-CDmYFcio.js → list-DubWyY-U.js} +2 -2
- package/ccw/frontend/dist/assets/{list-CDmYFcio.js.map → list-DubWyY-U.js.map} +1 -1
- package/ccw/frontend/dist/assets/{map-pin-0Mfsw_3d.js → map-pin-DwN_48AF.js} +2 -2
- package/ccw/frontend/dist/assets/{map-pin-0Mfsw_3d.js.map → map-pin-DwN_48AF.js.map} +1 -1
- package/ccw/frontend/dist/assets/{messages-square-C6h08ple.js → messages-square-bjxvaiM9.js} +2 -2
- package/ccw/frontend/dist/assets/{messages-square-C6h08ple.js.map → messages-square-bjxvaiM9.js.map} +1 -1
- package/ccw/frontend/dist/assets/{minimize-2-Cbu2yRzi.js → minimize-2-CGfBKD_V.js} +2 -2
- package/ccw/frontend/dist/assets/{minimize-2-Cbu2yRzi.js.map → minimize-2-CGfBKD_V.js.map} +1 -1
- package/ccw/frontend/dist/assets/{package-CoLVUZGJ.js → package-nzWY6ilt.js} +2 -2
- package/ccw/frontend/dist/assets/{package-CoLVUZGJ.js.map → package-nzWY6ilt.js.map} +1 -1
- package/ccw/frontend/dist/assets/{plug-BYTYqsw1.js → plug-CiLce49C.js} +2 -2
- package/ccw/frontend/dist/assets/{plug-BYTYqsw1.js.map → plug-CiLce49C.js.map} +1 -1
- package/ccw/frontend/dist/assets/{power-DmIojFl-.js → power-CFLmB-U9.js} +2 -2
- package/ccw/frontend/dist/assets/{power-DmIojFl-.js.map → power-CFLmB-U9.js.map} +1 -1
- package/ccw/frontend/dist/assets/{save-BFa03OnG.js → save-DuO6OF0C.js} +2 -2
- package/ccw/frontend/dist/assets/{save-BFa03OnG.js.map → save-DuO6OF0C.js.map} +1 -1
- package/ccw/frontend/dist/assets/{send-Vet3sN4J.js → send-CZk9p0mM.js} +2 -2
- package/ccw/frontend/dist/assets/{send-Vet3sN4J.js.map → send-CZk9p0mM.js.map} +1 -1
- package/ccw/frontend/dist/assets/{square-check-big-B9nzZRfE.js → square-check-big-BY_1YQQg.js} +2 -2
- package/ccw/frontend/dist/assets/{square-check-big-B9nzZRfE.js.map → square-check-big-BY_1YQQg.js.map} +1 -1
- package/ccw/frontend/dist/assets/{square-pen-C7K13x4Z.js → square-pen-CnZgm6g-.js} +2 -2
- package/ccw/frontend/dist/assets/{square-pen-C7K13x4Z.js.map → square-pen-CnZgm6g-.js.map} +1 -1
- package/ccw/frontend/dist/assets/{star-BCQHcnSe.js → star-Cn1F0qy7.js} +2 -2
- package/ccw/frontend/dist/assets/{star-BCQHcnSe.js.map → star-Cn1F0qy7.js.map} +1 -1
- package/ccw/frontend/dist/assets/{style-CJsrp48L.js → style-Dxs1iXCV.js} +2 -2
- package/ccw/frontend/dist/assets/{style-CJsrp48L.js.map → style-Dxs1iXCV.js.map} +1 -1
- package/ccw/frontend/dist/assets/{target-CBzCJCB1.js → target-Bz1fLRKH.js} +2 -2
- package/ccw/frontend/dist/assets/{target-CBzCJCB1.js.map → target-Bz1fLRKH.js.map} +1 -1
- package/ccw/frontend/dist/assets/{test-tube-BYTc5mvQ.js → test-tube-C6qCYlDr.js} +2 -2
- package/ccw/frontend/dist/assets/{test-tube-BYTc5mvQ.js.map → test-tube-C6qCYlDr.js.map} +1 -1
- package/ccw/frontend/dist/assets/{upload-DzyQj7ib.js → upload-C71kd4Qs.js} +2 -2
- package/ccw/frontend/dist/assets/{upload-DzyQj7ib.js.map → upload-C71kd4Qs.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useApiSettings-CFPww7gU.js → useApiSettings-CqP2BAJ7.js} +2 -2
- package/ccw/frontend/dist/assets/{useApiSettings-CFPww7gU.js.map → useApiSettings-CqP2BAJ7.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useCli-ByL_a5CD.js → useCli-PCoPoVeM.js} +2 -2
- package/ccw/frontend/dist/assets/{useCli-ByL_a5CD.js.map → useCli-PCoPoVeM.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useCommands-BvKIoOzB.js → useCommands-3OfPQPw4.js} +2 -2
- package/ccw/frontend/dist/assets/{useCommands-BvKIoOzB.js.map → useCommands-3OfPQPw4.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useDebounce-CmKmoP7n.js → useDebounce-bXiFhQx9.js} +2 -2
- package/ccw/frontend/dist/assets/{useDebounce-CmKmoP7n.js.map → useDebounce-bXiFhQx9.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useFileExplorer-G5UoArCU.js → useFileExplorer-DEyUm46_.js} +2 -2
- package/ccw/frontend/dist/assets/{useFileExplorer-G5UoArCU.js.map → useFileExplorer-DEyUm46_.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useLocale-D2iHK44M.js → useLocale-sXTrdxcJ.js} +2 -2
- package/ccw/frontend/dist/assets/{useLocale-D2iHK44M.js.map → useLocale-sXTrdxcJ.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useSkills-CYU4zqhm.js → useSkills-D0W0kXYm.js} +3 -3
- package/ccw/frontend/dist/assets/{useSkills-CYU4zqhm.js.map → useSkills-D0W0kXYm.js.map} +1 -1
- package/ccw/frontend/dist/assets/{useSystemSettings-JznNpij7.js → useSystemSettings-DZ-8lZsG.js} +2 -2
- package/ccw/frontend/dist/assets/{useSystemSettings-JznNpij7.js.map → useSystemSettings-DZ-8lZsG.js.map} +1 -1
- package/ccw/frontend/dist/assets/{wand-sparkles-DqS0VCeN.js → wand-sparkles-83GmAYuw.js} +2 -2
- package/ccw/frontend/dist/assets/{wand-sparkles-DqS0VCeN.js.map → wand-sparkles-83GmAYuw.js.map} +1 -1
- package/ccw/frontend/dist/index.html +1 -1
- package/package.json +1 -1
- package/.claude/skills/team-arch-opt/role-specs/analyzer.md +0 -80
- package/.claude/skills/team-arch-opt/role-specs/designer.md +0 -118
- package/.claude/skills/team-arch-opt/role-specs/refactorer.md +0 -106
- package/.claude/skills/team-arch-opt/role-specs/reviewer.md +0 -116
- package/.claude/skills/team-arch-opt/role-specs/validator.md +0 -117
- package/.claude/skills/team-brainstorm/role-specs/challenger.md +0 -63
- package/.claude/skills/team-brainstorm/role-specs/evaluator.md +0 -58
- package/.claude/skills/team-brainstorm/role-specs/ideator.md +0 -71
- package/.claude/skills/team-brainstorm/role-specs/synthesizer.md +0 -59
- package/.claude/skills/team-frontend/role-specs/analyst.md +0 -91
- package/.claude/skills/team-frontend/role-specs/architect.md +0 -85
- package/.claude/skills/team-frontend/role-specs/developer.md +0 -92
- package/.claude/skills/team-frontend/role-specs/qa.md +0 -78
- package/.claude/skills/team-issue/role-specs/explorer.md +0 -95
- package/.claude/skills/team-issue/role-specs/implementer.md +0 -89
- package/.claude/skills/team-issue/role-specs/integrator.md +0 -86
- package/.claude/skills/team-issue/role-specs/planner.md +0 -83
- package/.claude/skills/team-issue/role-specs/reviewer.md +0 -89
- package/.claude/skills/team-iterdev/role-specs/architect.md +0 -64
- package/.claude/skills/team-iterdev/role-specs/developer.md +0 -73
- package/.claude/skills/team-iterdev/role-specs/reviewer.md +0 -65
- package/.claude/skills/team-iterdev/role-specs/tester.md +0 -87
- package/.claude/skills/team-perf-opt/role-specs/benchmarker.md +0 -110
- package/.claude/skills/team-perf-opt/role-specs/optimizer.md +0 -102
- package/.claude/skills/team-perf-opt/role-specs/profiler.md +0 -73
- package/.claude/skills/team-perf-opt/role-specs/reviewer.md +0 -91
- package/.claude/skills/team-perf-opt/role-specs/strategist.md +0 -114
- package/.claude/skills/team-planex/role-specs/executor.md +0 -90
- package/.claude/skills/team-planex/role-specs/planner.md +0 -110
- package/.claude/skills/team-quality-assurance/role-specs/analyst.md +0 -79
- package/.claude/skills/team-quality-assurance/role-specs/executor.md +0 -64
- package/.claude/skills/team-quality-assurance/role-specs/generator.md +0 -67
- package/.claude/skills/team-quality-assurance/role-specs/scout.md +0 -66
- package/.claude/skills/team-quality-assurance/role-specs/strategist.md +0 -70
- package/.claude/skills/team-review/role-specs/fixer.md +0 -75
- package/.claude/skills/team-review/role-specs/reviewer.md +0 -66
- package/.claude/skills/team-review/role-specs/scanner.md +0 -70
- package/.claude/skills/team-roadmap-dev/role-specs/executor.md +0 -71
- package/.claude/skills/team-roadmap-dev/role-specs/planner.md +0 -77
- package/.claude/skills/team-roadmap-dev/role-specs/verifier.md +0 -73
- package/.claude/skills/team-tech-debt/role-specs/assessor.md +0 -70
- package/.claude/skills/team-tech-debt/role-specs/executor.md +0 -80
- package/.claude/skills/team-tech-debt/role-specs/planner.md +0 -71
- package/.claude/skills/team-tech-debt/role-specs/scanner.md +0 -85
- package/.claude/skills/team-tech-debt/role-specs/validator.md +0 -83
- package/.claude/skills/team-testing/role-specs/analyst.md +0 -94
- package/.claude/skills/team-testing/role-specs/executor.md +0 -97
- package/.claude/skills/team-testing/role-specs/generator.md +0 -96
- package/.claude/skills/team-testing/role-specs/strategist.md +0 -82
- package/.claude/skills/team-uidesign/role-specs/designer.md +0 -72
- package/.claude/skills/team-uidesign/role-specs/implementer.md +0 -74
- package/.claude/skills/team-uidesign/role-specs/researcher.md +0 -84
- package/.claude/skills/team-uidesign/role-specs/reviewer.md +0 -70
- package/.claude/skills/team-ux-improve/role-specs/designer.md +0 -191
- package/.claude/skills/team-ux-improve/role-specs/diagnoser.md +0 -110
- package/.claude/skills/team-ux-improve/role-specs/explorer.md +0 -109
- package/.claude/skills/team-ux-improve/role-specs/implementer.md +0 -164
- package/.claude/skills/team-ux-improve/role-specs/scanner.md +0 -117
- package/.claude/skills/team-ux-improve/role-specs/tester.md +0 -163
- package/.codex/skills/analyze-with-file/EXECUTE.md +0 -716
- package/ccw/frontend/dist/assets/CodexLensPage-My6DnfN6.js +0 -2
- package/ccw/frontend/dist/assets/CodexLensPage-My6DnfN6.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{eg as Ne,eh as be,ei as ye,ab as X,aF as Y,aH as Z,ej as we,ek as Te,el as _e,em as Ce,en as Se,eo as Me,u as T,j as e,e as k,J as ke,B as p,cA as U,aV as ee,a1 as se,bu as Fe,R as de,ep as Ae,eq as Le,ad as Ee,N as H,k as Pe,c as j,C as L,a as E,r as h,cy as me,ap as te,X as xe,aq as W,ar as I,as as J,at as G,au as D,er as De,es as $e,ao as Re,D as qe,d as ze,f as Ve,g as B,h as re,T as Be,l as Oe,b as Ke,I as Qe,x as Ue,y as We,z as Ie,A as Je,E as Ge,G as He,o as ne,s as Xe,aw as Ye}from"./index-B6I7GQC5.js";import{T as ue}from"./TabsNavigation-drSnu5jn.js";import{S as Ze}from"./Switch-BgAFC-Wk.js";import{F as es}from"./filter-B4vOqP6B.js";import{F as ae}from"./file-text-BoHsW2es.js";import{P as Q}from"./package-CoLVUZGJ.js";import{F as ss}from"./folder-BKhwCNFG.js";import{F as ts}from"./file-json-BxLBtU9d.js";import{E as as}from"./ellipsis-vertical-DIyoSEHx.js";import{E as rs}from"./eye-DUy7aLEx.js";import{A as ns}from"./archive-restore-CpsDm-cG.js";import{A as is}from"./archive-Bza1KlB9.js";import{M as ls,a as cs}from"./minimize-2-Cbu2yRzi.js";const z=Ne()(be(ye(s=>({selectedTeam:null,autoRefresh:!0,messageFilter:{},timelineExpanded:!0,viewMode:"list",locationFilter:"active",searchQuery:"",detailTab:"pipeline",setSelectedTeam:t=>s({selectedTeam:t}),toggleAutoRefresh:()=>s(t=>({autoRefresh:!t.autoRefresh})),setMessageFilter:t=>s(a=>({messageFilter:{...a.messageFilter,...t}})),clearMessageFilter:()=>s({messageFilter:{}}),setTimelineExpanded:t=>s({timelineExpanded:t}),setViewMode:t=>s({viewMode:t}),setLocationFilter:t=>s({locationFilter:t}),setSearchQuery:t=>s({searchQuery:t}),setDetailTab:t=>s({detailTab:t}),selectTeamAndShowDetail:t=>s({selectedTeam:t,viewMode:"detail",detailTab:"pipeline"}),backToList:()=>s({viewMode:"list",detailTab:"pipeline"})}),{name:"ccw-team-store"}),{name:"TeamStore"})),S={all:["teams"],lists:()=>[...S.all,"list"],listByLocation:s=>[...S.lists(),s],messages:(s,t)=>[...S.all,"messages",s,t],status:s=>[...S.all,"status",s]};function he(s){var n;const t=z(i=>i.autoRefresh),a=s||"active",r=X({queryKey:S.listByLocation(a),queryFn:async()=>({teams:(await Ce(a)).teams??[]}),staleTime:1e4,refetchInterval:t?1e4:!1});return{teams:((n=r.data)==null?void 0:n.teams)??[],isLoading:r.isLoading,isFetching:r.isFetching,error:r.error,refetch:r.refetch}}function os(s,t,a){var i,l;const r=z(c=>c.autoRefresh),n=X({queryKey:S.messages(s??"",t),queryFn:async()=>{if(!s)return{total:0,showing:0,messages:[]};const c=await Se(s,{...t,last:50});return{total:c.total,showing:c.showing,messages:c.messages}},enabled:!!s,staleTime:5e3,refetchInterval:r?5e3:!1});return{messages:((i=n.data)==null?void 0:i.messages)??[],total:((l=n.data)==null?void 0:l.total)??0,isLoading:n.isLoading,error:n.error,refetch:n.refetch}}function ds(s){var r,n;const t=z(i=>i.autoRefresh),a=X({queryKey:S.status(s??""),queryFn:async()=>{if(!s)return{members:[],total_messages:0};const i=await Me(s);return{members:i.members,total_messages:i.total_messages}},enabled:!!s,staleTime:5e3,refetchInterval:t?5e3:!1});return{members:((r=a.data)==null?void 0:r.members)??[],totalMessages:((n=a.data)==null?void 0:n.total_messages)??0,isLoading:a.isLoading,error:a.error,refetch:a.refetch}}function ms(){const s=Y(),t=Z({mutationFn:we,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{archiveTeam:t.mutateAsync,isArchiving:t.isPending,error:t.error}}function xs(){const s=Y(),t=Z({mutationFn:Te,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{unarchiveTeam:t.mutateAsync,isUnarchiving:t.isPending,error:t.error}}function us(){const s=Y(),t=Z({mutationFn:_e,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{deleteTeam:t.mutateAsync,isDeleting:t.isPending,error:t.error}}function hs({selectedTeam:s,onBack:t,members:a,totalMessages:r,autoRefresh:n,onToggleAutoRefresh:i,skillType:l,pipelineMode:c}){const{formatMessage:x}=T();return e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs(k,{variant:"ghost",size:"sm",onClick:t,className:"gap-1",children:[e.jsx(ke,{className:"h-4 w-4"}),x({id:"team.detail.backToList"})]}),s&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-lg font-semibold",children:s}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(p,{variant:"secondary",className:"gap-1",children:[e.jsx(U,{className:"w-3 h-3"}),x({id:"team.members"}),": ",a.length]}),e.jsxs(p,{variant:"secondary",className:"gap-1",children:[e.jsx(ee,{className:"w-3 h-3"}),x({id:"team.messages"}),": ",r]})]}),(l||c)&&e.jsxs("div",{className:"flex items-center gap-2",children:[l&&e.jsx(p,{variant:"outline",className:"gap-1",children:l}),c&&e.jsxs(p,{variant:"default",className:"gap-1",children:[e.jsx(se,{className:"w-3 h-3"}),c]})]})]})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ze,{id:"auto-refresh",checked:n,onCheckedChange:i}),e.jsx(Fe,{htmlFor:"auto-refresh",className:"text-sm text-muted-foreground cursor-pointer",children:x({id:"team.autoRefresh"})}),n&&e.jsx(de,{className:"w-3.5 h-3.5 text-primary animate-spin",style:{animationDuration:"3s"}})]})})]})}const fe={completed:{icon:Pe,color:"text-green-500",bg:"bg-green-500/10 border-green-500/30"},in_progress:{icon:H,color:"text-blue-500",bg:"bg-blue-500/10 border-blue-500/30",animate:!0},pending:{icon:Ee,color:"text-muted-foreground",bg:"bg-muted border-border"},blocked:{icon:Le,color:"text-red-500",bg:"bg-red-500/10 border-red-500/30"},skipped:{icon:Ae,color:"text-yellow-500",bg:"bg-yellow-500/10 border-yellow-500/30"}},fs=["completed","in_progress","pending","blocked","skipped"];function ie({stage:s}){const{formatMessage:t}=T(),a=fe[s.status],r=a.icon,n=s.status==="in_progress"?"inProgress":s.status;return e.jsxs("div",{className:j("flex flex-col items-center gap-1.5 px-4 py-3 rounded-lg border-2 min-w-[90px] transition-all",a.bg),children:[e.jsx(r,{className:j("w-5 h-5",a.color,a.animate&&"animate-spin"),style:a.animate?{animationDuration:"2s"}:void 0}),e.jsx("span",{className:"text-xs font-medium",children:s.label}),e.jsx("span",{className:j("text-[10px]",a.color),children:t({id:`team.pipeline.${n}`})}),s.role&&e.jsx("span",{className:"text-[10px] text-muted-foreground truncate max-w-[80px]",children:s.role})]})}function ps(){return e.jsxs("div",{className:"flex items-center px-1",children:[e.jsx("div",{className:"w-6 h-0.5 bg-border"}),e.jsx("div",{className:"w-0 h-0 border-t-[4px] border-t-transparent border-b-[4px] border-b-transparent border-l-[6px] border-l-border"})]})}function gs({stages:s,phaseInfo:t}){const{formatMessage:a}=T();return s.length===0?e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:a({id:"team.pipeline.title"})}),e.jsx("p",{className:"text-xs text-muted-foreground text-center py-8",children:a({id:"team.pipeline.noStages"})})]}):e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"space-y-3 flex-1",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:a({id:"team.pipeline.title"})}),t&&e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(p,{variant:"secondary",children:[a({id:"team.coordinates.phase"}),": ",t.currentPhase,t.totalPhases!=null&&`/${t.totalPhases}`]}),t.currentStep&&e.jsxs(p,{variant:"secondary",children:[a({id:"team.coordinates.step"}),": ",t.currentStep]}),t.gapIteration>0&&e.jsxs(p,{variant:"outline",children:[a({id:"team.coordinates.gap"}),": ",t.gapIteration]})]}),e.jsx("div",{className:"hidden sm:flex items-center gap-0",children:s.map((r,n)=>e.jsxs("div",{className:"flex items-center",children:[n>0&&e.jsx(ps,{}),e.jsx(ie,{stage:r})]},r.id))}),e.jsx("div",{className:"flex sm:hidden flex-col items-center gap-2",children:s.map(r=>e.jsx(ie,{stage:r},r.id))})]}),e.jsx("div",{className:"flex flex-wrap gap-3 text-[10px] text-muted-foreground mt-auto pt-3 border-t border-border",children:fs.map(r=>{const n=fe[r],i=n.icon,l=r==="in_progress"?"inProgress":r;return e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(i,{className:j("w-3 h-3",n.color)}),a({id:`team.pipeline.${l}`})]},r)})})]})}function js(s){if(!s)return"";const t=Date.now(),a=new Date(s).getTime(),r=t-a;if(r<0)return"now";const n=Math.floor(r/1e3);if(n<60)return`${n}s`;const i=Math.floor(n/60);if(i<60)return`${i}m`;const l=Math.floor(i/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function vs(s){return s.lastSeen&&Date.now()-new Date(s.lastSeen).getTime()<120*1e3?"active":"idle"}function Ns({members:s}){const{formatMessage:t}=T();return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:t({id:"team.membersPanel.title"})}),e.jsxs("div",{className:"space-y-2",children:[s.map(a=>{const r=vs(a),n=r==="active";return e.jsx(L,{className:"overflow-hidden",children:e.jsx(E,{className:"p-3",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"pt-0.5",children:e.jsx("div",{className:j("w-2.5 h-2.5 rounded-full",n?"bg-green-500 shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-muted-foreground/40")})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:a.member}),e.jsx(p,{variant:n?"success":"secondary",className:"text-[10px] px-1.5 py-0",children:t({id:`team.membersPanel.${r}`})})]}),a.lastAction&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:a.lastAction}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[e.jsxs("span",{children:[a.messageCount," ",t({id:"team.messages"}).toLowerCase()]}),a.lastSeen&&e.jsxs("span",{children:[js(a.lastSeen)," ",t({id:"team.membersPanel.ago"})]})]})]})]})})},a.member)}),s.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:t({id:"team.empty.noMessages"})})]})]})}function bs(s){if(!s)return"";const t=Date.now(),a=new Date(s).getTime(),r=t-a;if(r<0)return"now";const n=Math.floor(r/1e3);if(n<60)return`${n}s`;const i=Math.floor(n/60);if(i<60)return`${i}m`;const l=Math.floor(i/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function ys(s){return s.lastSeen&&Date.now()-new Date(s.lastSeen).getTime()<120*1e3?"active":"idle"}function ws(s,t){const a=s.member.toLowerCase();return t.find(r=>r.role&&r.role.toLowerCase()===a||r.id.toLowerCase()===a)}const Ts={completed:"success",in_progress:"info",pending:"secondary",blocked:"destructive",skipped:"warning"};function le({members:s,stages:t,roleState:a}){const{formatMessage:r}=T();return t.length===0?e.jsx(Ns,{members:s}):e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:r({id:"team.membersPanel.title"})}),e.jsxs("div",{className:"space-y-2",children:[s.map(n=>{const i=ys(n),l=i==="active",c=ws(n,t);return e.jsx(L,{className:"overflow-hidden",children:e.jsx(E,{className:"p-3",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"pt-0.5",children:e.jsx("div",{className:j("w-2.5 h-2.5 rounded-full",l?"bg-green-500 shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-muted-foreground/40")})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:n.member}),e.jsx(p,{variant:l?"success":"secondary",className:"text-[10px] px-1.5 py-0",children:r({id:`team.membersPanel.${i}`})}),c&&e.jsx(p,{variant:Ts[c.status]??"secondary",className:"text-[10px] px-1.5 py-0",children:c.label})]}),n.lastAction&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.lastAction}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[e.jsxs("span",{children:[n.messageCount," ",r({id:"team.messages"}).toLowerCase()]}),n.lastSeen&&e.jsxs("span",{children:[bs(n.lastSeen)," ",r({id:"team.membersPanel.ago"})]})]})]})]})})},n.member)}),s.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:r({id:"team.empty.noMessages"})})]})]})}function _s({phaseInfo:s}){const{formatMessage:t}=T();return e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(p,{variant:"secondary",children:[t({id:"team.coordinates.phase"}),": ",s.currentPhase,s.totalPhases!=null&&`/${s.totalPhases}`]}),s.currentStep&&e.jsxs(p,{variant:"secondary",children:[t({id:"team.coordinates.step"}),": ",s.currentStep]}),s.gapIteration>0&&e.jsxs(p,{variant:"outline",children:[t({id:"team.coordinates.gap"}),": ",s.gapIteration]})]})}const ce={plan_ready:"bg-blue-500/15 text-blue-600 dark:text-blue-400 border-blue-500/30",plan_approved:"bg-blue-500/15 text-blue-600 dark:text-blue-400 border-blue-500/30",plan_revision:"bg-amber-500/15 text-amber-600 dark:text-amber-400 border-amber-500/30",task_unblocked:"bg-cyan-500/15 text-cyan-600 dark:text-cyan-400 border-cyan-500/30",impl_complete:"bg-primary/15 text-primary border-primary/30",impl_progress:"bg-primary/15 text-primary border-primary/30",test_result:"bg-green-500/15 text-green-600 dark:text-green-400 border-green-500/30",review_result:"bg-purple-500/15 text-purple-600 dark:text-purple-400 border-purple-500/30",fix_required:"bg-red-500/15 text-red-600 dark:text-red-400 border-red-500/30",error:"bg-red-500/15 text-red-600 dark:text-red-400 border-red-500/30",shutdown:"bg-muted text-muted-foreground border-border",message:"bg-muted text-muted-foreground border-border"};function Cs({type:s}){const{formatMessage:t}=T(),a=ce[s]||ce.message,r=`team.messageType.${s}`;let n;try{n=t({id:r})}catch{n=s}return e.jsx("span",{className:j("text-[10px] px-1.5 py-0.5 rounded border font-medium",a),children:n})}function Ss({msg:s}){var n,i;const[t,a]=h.useState(!1),r=s.ts?s.ts.substring(11,19):"";return e.jsxs("div",{className:"flex gap-3 py-2.5 border-b border-border last:border-b-0 animate-in fade-in slide-in-from-top-1 duration-300",children:[e.jsx("span",{className:"text-[10px] font-mono text-muted-foreground w-16 shrink-0 pt-0.5",children:r}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-xs font-medium",children:s.from}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"→"}),e.jsx("span",{className:"text-xs font-medium",children:s.to}),e.jsx(Cs,{type:s.type}),s.id&&e.jsx("span",{className:"text-[10px] text-muted-foreground",children:s.id})]}),e.jsx("p",{className:"text-xs text-foreground/80",children:s.summary}),(s.ref||((n=s.data)==null?void 0:n.ref))&&e.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[e.jsx(ae,{className:"w-3 h-3"}),e.jsx("span",{className:"font-mono truncate",children:s.ref||((i=s.data)==null?void 0:i.ref)})]}),s.data&&Object.keys(s.data).length>0&&e.jsxs("div",{children:[e.jsx("button",{onClick:()=>a(!t),className:"text-[10px] text-primary hover:underline flex items-center gap-0.5",children:t?e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-3 h-3"})," collapse"]}):e.jsxs(e.Fragment,{children:[e.jsx(te,{className:"w-3 h-3"})," data"]})}),t&&e.jsx("pre",{className:"text-[10px] bg-muted p-2 rounded mt-1 overflow-x-auto max-h-40",children:JSON.stringify(s.data,null,2)})]})]})]})}function Ms({messages:s,total:t,filter:a,onFilterChange:r,onClearFilter:n,expanded:i,onExpandedChange:l}){const{formatMessage:c}=T(),x=!!(a.from||a.to||a.type),{senders:g,receivers:v,types:C}=h.useMemo(()=>{const d=new Set,m=new Set,_=new Set;for(const y of s)d.add(y.from),m.add(y.to),_.add(y.type);return{senders:Array.from(d).sort(),receivers:Array.from(m).sort(),types:Array.from(_).sort()}},[s]),N=[...s].reverse();return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("button",{onClick:()=>l(!i),className:"flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:[i?e.jsx(me,{className:"w-4 h-4"}):e.jsx(te,{className:"w-4 h-4"}),c({id:"team.timeline.title"}),e.jsxs("span",{className:"text-xs font-normal",children:["(",c({id:"team.timeline.showing"},{showing:s.length,total:t}),")"]})]}),x&&e.jsxs(k,{variant:"ghost",size:"sm",onClick:n,className:"h-6 text-xs gap-1",children:[e.jsx(xe,{className:"w-3 h-3"}),c({id:"team.timeline.clearFilters"})]})]}),i&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(W,{value:a.from??"__all__",onValueChange:d=>r({from:d==="__all__"?void 0:d}),children:[e.jsxs(I,{className:"w-[130px] h-7 text-xs",children:[e.jsx(es,{className:"w-3 h-3 mr-1"}),e.jsx(J,{placeholder:c({id:"team.timeline.filterFrom"})})]}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),g.map(d=>e.jsx(D,{value:d,children:d},d))]})]}),e.jsxs(W,{value:a.to??"__all__",onValueChange:d=>r({to:d==="__all__"?void 0:d}),children:[e.jsx(I,{className:"w-[130px] h-7 text-xs",children:e.jsx(J,{placeholder:c({id:"team.timeline.filterTo"})})}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),v.map(d=>e.jsx(D,{value:d,children:d},d))]})]}),e.jsxs(W,{value:a.type??"__all__",onValueChange:d=>r({type:d==="__all__"?void 0:d}),children:[e.jsx(I,{className:"w-[150px] h-7 text-xs",children:e.jsx(J,{placeholder:c({id:"team.timeline.filterType"})})}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),C.map(d=>e.jsx(D,{value:d,children:d},d))]})]})]}),e.jsx(L,{children:e.jsx(E,{className:"p-3",children:N.length>0?e.jsx("div",{className:"divide-y-0",children:N.map(d=>e.jsx(Ss,{msg:d},d.id))}):e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:c({id:"team.empty.noMessages"})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:c({id:"team.empty.noMessagesHint"})})]})})})]})]})}function pe(s){return s.endsWith(".json")?"json":s.endsWith(".md")?"markdown":s.endsWith(".txt")||s.endsWith(".log")||s.endsWith(".tsv")||s.endsWith(".csv")?"text":"unknown"}function ge(s){return s?s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`:""}function ks(s){if(!s)return"";try{return new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric"})}catch{return""}}function je({contentType:s}){return s==="json"?e.jsx(ts,{className:"w-4 h-4 text-blue-500"}):e.jsx(ae,{className:"w-4 h-4 text-gray-500"})}function ve({node:s,depth:t,expanded:a,selectedPath:r,onToggle:n,onSelect:i}){if(s.type==="directory"){const x=a.has(s.path);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1 py-1.5 px-2 cursor-pointer hover:bg-accent/50 rounded transition-colors",style:{paddingLeft:t*16+8},onClick:()=>n(s.path),children:[x?e.jsx(te,{className:"w-4 h-4 text-muted-foreground"}):e.jsx(Re,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(ss,{className:j("w-4 h-4",x?"text-amber-500":"text-amber-400")}),e.jsx("span",{className:"text-sm truncate",children:s.name})]}),x&&s.children&&e.jsx("div",{children:s.children.map(g=>e.jsx(ve,{node:g,depth:t+1,expanded:a,selectedPath:r,onToggle:n,onSelect:i},g.path))})]},s.path)}const l=r===s.path,c=s.contentType||pe(s.path);return e.jsxs("div",{className:j("flex items-center gap-1 py-1.5 px-2 cursor-pointer hover:bg-accent/50 rounded transition-colors",l&&"bg-accent"),style:{paddingLeft:t*16+28},onClick:()=>i(s),children:[e.jsx(je,{contentType:c}),e.jsx("span",{className:"text-sm truncate flex-1",children:s.name}),s.size!==void 0&&e.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:ge(s.size)})]},s.path)}function Fs({teamName:s}){const{formatMessage:t}=T(),[a,r]=h.useState([]),[n,i]=h.useState(new Set),[l,c]=h.useState(null),[x,g]=h.useState(""),[v,C]=h.useState(!1),[N,d]=h.useState(!0),[m,_]=h.useState(null);h.useEffect(()=>{s&&(d(!0),_(null),De(s).then(f=>{r(f.tree||[]);const b=(f.tree||[]).filter(w=>w.type==="directory").map(w=>w.path);i(new Set(b))}).catch(f=>{console.error("Failed to load artifacts:",f),_(t({id:"team.artifacts.loadError",defaultMessage:"Failed to load artifacts"}))}).finally(()=>{d(!1)}))},[s,t]);const y=h.useCallback(f=>{i(b=>{const w=new Set(b);return w.has(f)?w.delete(f):w.add(f),w})},[]),F=h.useCallback(async f=>{if(f.type!=="directory"){c(f),C(!0),g("");try{const b=await $e(s,f.path);g(b.content)}catch(b){console.error("Failed to load file content:",b),g(t({id:"team.artifacts.contentError",defaultMessage:"Failed to load file content"}))}finally{C(!1)}}},[s,t]),A=l?l.contentType||pe(l.path):"text",M=A==="json"?"json":A==="markdown"?"markdown":"text";return N?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(H,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:t({id:"team.artifacts.loading",defaultMessage:"Loading artifacts..."})})]}):m?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(Q,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:m})]}):a.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(Q,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:t({id:"team.artifacts.noArtifacts",defaultMessage:"No artifacts yet"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t({id:"team.artifacts.emptyHint",defaultMessage:"Artifacts will appear here when the team generates them"})})]}):e.jsxs("div",{className:"flex h-[600px] border rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"w-72 shrink-0 border-r bg-muted/30 flex flex-col",children:[e.jsx("div",{className:"p-3 border-b bg-background shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Q,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium",children:t({id:"team.artifacts.title",defaultMessage:"Artifacts"})})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:a.map(f=>e.jsx(ve,{node:f,depth:0,expanded:n,selectedPath:l==null?void 0:l.path,onToggle:y,onSelect:F},f.path))})]}),e.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:l?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-3 border-b bg-muted/30 shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(je,{contentType:A}),e.jsx("span",{className:"text-sm font-medium truncate",children:l.name}),l.size!==void 0&&e.jsx("span",{className:"text-xs text-muted-foreground",children:ge(l.size)}),l.modifiedAt&&e.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:ks(l.modifiedAt)})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:v?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(H,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):e.jsx(Ls,{content:x,contentType:M})})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-center p-8",children:e.jsxs("div",{children:[e.jsx(ae,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:t({id:"team.artifacts.selectFile",defaultMessage:"Select a file to preview"})})]})})})]})}function q({data:s,depth:t=0}){if(s===null)return e.jsx("span",{className:"text-red-500 font-mono text-sm",children:"null"});if(s===void 0)return e.jsx("span",{className:"text-muted-foreground font-mono text-sm",children:"undefined"});if(typeof s=="boolean")return e.jsx("span",{className:j("font-mono text-sm",s?"text-orange-500":"text-red-500"),children:s?"true":"false"});if(typeof s=="number")return e.jsx("span",{className:"text-blue-500 font-mono text-sm",children:s});if(typeof s=="string")return s.length>200?e.jsxs("span",{className:"text-green-600 dark:text-green-400 font-mono text-sm break-all",children:['"',s.slice(0,200),'..."']}):e.jsxs("span",{className:"text-green-600 dark:text-green-400 font-mono text-sm",children:['"',s,'"']});if(Array.isArray(s))return s.length===0?e.jsx("span",{className:"text-muted-foreground text-sm",children:"[]"}):e.jsx("div",{className:"space-y-2",children:s.map((a,r)=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(p,{variant:"outline",className:"text-xs shrink-0 mt-0.5",children:r}),e.jsx("div",{className:"flex-1 min-w-0",children:typeof a=="object"&&a!==null?e.jsx("div",{className:"bg-muted/30 rounded-lg p-2 border",children:e.jsx(q,{data:a,depth:t+1})}):e.jsx(q,{data:a,depth:t+1})})]},r))});if(typeof s=="object"){const a=Object.entries(s);return a.length===0?e.jsx("span",{className:"text-muted-foreground text-sm",children:"{}"}):e.jsx("div",{className:j("space-y-2",t>0&&"pl-2 border-l-2 border-border"),children:a.map(([r,n])=>{const i=typeof n=="object"&&n!==null,l=Array.isArray(n),c=l?n.length:i?Object.keys(n).length:0;return e.jsxs("div",{className:"group",children:[e.jsxs("div",{className:"flex items-center gap-2 py-1",children:[e.jsx("span",{className:"text-purple-600 dark:text-purple-400 font-medium text-sm shrink-0",children:r}),i&&e.jsx(p,{variant:"secondary",className:"text-[10px] h-4 px-1",children:l?`${c} items`:`${c} fields`})]}),e.jsx("div",{className:"ml-3",children:i?e.jsx("div",{className:"bg-muted/20 rounded-md p-2 border",children:e.jsx(q,{data:n,depth:t+1})}):e.jsx(q,{data:n,depth:t+1})})]},r)})})}return e.jsx("span",{className:"text-sm",children:String(s)})}function As({data:s}){const t=h.useMemo(()=>{const a={type:"",fields:0,items:0,depth:0},r=(n,i)=>{a.depth=Math.max(a.depth,i),Array.isArray(n)?(a.type="Array",a.items=n.length,n.forEach(l=>r(l,i+1))):typeof n=="object"&&n!==null&&(a.type="Object",a.fields=Object.keys(n).length,Object.values(n).forEach(l=>r(l,i+1)))};return r(s,0),a},[s]);return e.jsxs("div",{className:"flex items-center gap-4 p-3 bg-muted/50 rounded-lg mb-4 text-sm",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(p,{variant:"outline",children:t.type})}),t.type==="Object"&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.fields})," fields"]}),t.type==="Array"&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.items})," items"]}),e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.depth})," levels deep"]})]})}function Ls({content:s,contentType:t}){if(!s)return e.jsx("div",{className:"text-muted-foreground text-sm",children:"No content"});if(t==="json")try{const a=JSON.parse(s);return e.jsxs("div",{className:"space-y-2",children:[e.jsx(As,{data:a}),e.jsx("div",{className:"bg-card rounded-lg",children:e.jsx(q,{data:a})})]})}catch{return e.jsx("pre",{className:"text-xs bg-muted/50 p-4 rounded-lg overflow-auto font-mono whitespace-pre-wrap break-words border",children:s})}return t==="markdown"?e.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:e.jsx("pre",{className:"whitespace-pre-wrap break-words font-sans text-sm leading-relaxed bg-transparent p-0",children:s})}):e.jsx("pre",{className:"text-xs bg-muted/50 p-4 rounded-lg overflow-auto font-mono whitespace-pre-wrap break-words border",children:s})}const Es={active:{variant:"info"},completed:{variant:"success"},archived:{variant:"secondary"}},oe={active:"team.status.active",completed:"team.status.completed",archived:"team.status.archived"};function Ps(s){if(!s)return"";try{return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function Ds({team:s,onClick:t,onArchive:a,onUnarchive:r,onDelete:n,showActions:i=!0,actionsDisabled:l=!1,className:c}){const{formatMessage:x}=T(),{variant:g}=Es[s.status]||{variant:"default"},v=oe[s.status]?x({id:oe[s.status]}):s.status,C=s.status==="archived",N=m=>{m.target.closest("[data-radix-popper-content-wrapper]")||t==null||t(s.name)},d=(m,_)=>{switch(m.stopPropagation(),_){case"view":t==null||t(s.name);break;case"archive":a==null||a(s.name);break;case"unarchive":r==null||r(s.name);break;case"delete":n==null||n(s.name);break}};return e.jsx(L,{className:j("group cursor-pointer transition-all duration-200 hover:shadow-md hover:border-primary/30",c),onClick:N,children:e.jsxs(E,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx("h3",{className:"font-bold text-card-foreground text-sm tracking-wide truncate",children:s.name})})}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(p,{variant:g,children:v}),s.pipeline_mode&&e.jsxs(p,{variant:"default",className:"gap-1",children:[e.jsx(se,{className:"h-3 w-3"}),s.pipeline_mode]}),i&&e.jsxs(qe,{children:[e.jsx(ze,{asChild:!0,children:e.jsx(k,{variant:"ghost",size:"icon",className:"h-8 w-8 opacity-0 group-hover:opacity-100 transition-opacity",onClick:m=>m.stopPropagation(),disabled:l,children:e.jsx(as,{className:"h-4 w-4"})})}),e.jsxs(Ve,{align:"end",children:[e.jsxs(B,{onClick:m=>d(m,"view"),children:[e.jsx(rs,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.viewDetails"})]}),e.jsx(re,{}),C?e.jsxs(B,{onClick:m=>d(m,"unarchive"),children:[e.jsx(ns,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.unarchive"})]}):e.jsxs(B,{onClick:m=>d(m,"archive"),children:[e.jsx(is,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.archive"})]}),e.jsx(re,{}),e.jsxs(B,{onClick:m=>d(m,"delete"),className:"text-destructive focus:text-destructive",children:[e.jsx(Be,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.delete"})]})]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),s.messageCount," ",x({id:"team.card.messages"})]}),s.lastActivity&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Oe,{className:"h-3.5 w-3.5"}),Ps(s.lastActivity)]})]}),s.members&&s.members.length>0&&e.jsxs("div",{className:"flex items-center gap-1.5 mt-2 flex-wrap",children:[e.jsx(U,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),s.members.map(m=>e.jsx(p,{variant:"outline",className:"text-[10px] px-1.5 py-0 font-normal",children:m},m))]})]})})}function $s({className:s}){return e.jsx(L,{className:j("animate-pulse",s),children:e.jsxs(E,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:"h-5 w-32 rounded bg-muted"})}),e.jsx("div",{className:"h-5 w-16 rounded-full bg-muted"})]}),e.jsxs("div",{className:"mt-3 flex gap-4",children:[e.jsx("div",{className:"h-4 w-24 rounded bg-muted"}),e.jsx("div",{className:"h-4 w-20 rounded bg-muted"}),e.jsx("div",{className:"h-4 w-20 rounded bg-muted"})]})]})})}function Rs(){const{formatMessage:s}=T(),{locationFilter:t,setLocationFilter:a,searchQuery:r,setSearchQuery:n,selectTeamAndShowDetail:i}=z(),[l,c]=h.useState(!1),[x,g]=h.useState(null),{teams:v,isLoading:C,isFetching:N,refetch:d}=he(t),{archiveTeam:m,isArchiving:_}=ms(),{unarchiveTeam:y,isUnarchiving:F}=xs(),{deleteTeam:A,isDeleting:M}=us(),f=_||F||M,b=h.useMemo(()=>{if(!r)return v;const u=r.toLowerCase();return v.filter(P=>P.name.toLowerCase().includes(u))},[v,r]),w=async u=>{try{await m(u)}catch(P){console.error("Failed to archive team:",P)}},o=async u=>{try{await y(u)}catch(P){console.error("Failed to unarchive team:",P)}},$=u=>{g(u),c(!0)},R=async()=>{if(x)try{await A(x),c(!1),g(null)}catch(u){console.error("Failed to delete team:",u)}},V=()=>n("");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(U,{className:"w-5 h-5"}),e.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:s({id:"team.title"})})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s({id:"team.description"})})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(k,{variant:"outline",size:"sm",onClick:()=>d(),disabled:N,children:[e.jsx(de,{className:j("h-4 w-4 mr-2",N&&"animate-spin")}),s({id:"common.actions.refresh"})]})})]}),e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center",children:[e.jsx(ue,{value:t,onValueChange:u=>a(u),tabs:[{value:"active",label:s({id:"team.filters.active"})},{value:"archived",label:s({id:"team.filters.archived"})},{value:"all",label:s({id:"team.filters.all"})}]}),e.jsxs("div",{className:"flex-1 max-w-sm relative",children:[e.jsx(Ke,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(Qe,{placeholder:s({id:"team.searchPlaceholder"}),value:r,onChange:u=>n(u.target.value),className:"pl-9 pr-9"}),r&&e.jsx("button",{onClick:V,className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:e.jsx(xe,{className:"h-4 w-4"})})]})]}),C?e.jsx("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6}).map((u,P)=>e.jsx($s,{},P))}):b.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4 border border-dashed border-border rounded-lg",children:[e.jsx(U,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:s(r?{id:"team.emptyState.noMatching"}:{id:"team.emptyState.noTeams"})}),e.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-sm mb-4",children:s(r?{id:"team.emptyState.noMatchingDescription"}:{id:"team.emptyState.noTeamsDescription"})}),r&&e.jsx(k,{variant:"outline",onClick:V,children:s({id:"common.actions.clearFilters"})})]}):e.jsx("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:b.map(u=>e.jsx(Ds,{team:u,onClick:i,onArchive:w,onUnarchive:o,onDelete:$,actionsDisabled:f},u.name))}),e.jsx(Ue,{open:l,onOpenChange:c,children:e.jsxs(We,{children:[e.jsxs(Ie,{children:[e.jsx(Je,{children:s({id:"team.dialog.deleteTeam"})}),e.jsx(Ge,{children:s({id:"team.dialog.deleteConfirm"})})]}),e.jsxs(He,{children:[e.jsx(k,{variant:"outline",onClick:()=>{c(!1),g(null)},children:s({id:"team.dialog.cancel"})}),e.jsx(k,{variant:"destructive",onClick:R,disabled:M,children:s(M?{id:"team.dialog.deleting"}:{id:"team.actions.delete"})})]})]})})]})}const qs=["plan","impl","test","review"];function O(s){return s?s.charAt(0).toUpperCase()+s.slice(1).toLowerCase():""}function K(s,t){const a=s.toLowerCase(),r=t.filter(l=>{const c=l.from.toLowerCase();return c===a||c.startsWith(a)});if(r.length===0)return"pending";const n=r[r.length-1];return["shutdown","impl_complete","review_result","test_result"].includes(n.type)?"completed":n.type==="error"?"blocked":"in_progress"}function zs(s,t){if(s.pipeline_stages&&s.pipeline_stages.length>0)return s.pipeline_stages.map(a=>{var l;const r=a.toUpperCase(),n=a.toLowerCase(),i=(l=s.roles)==null?void 0:l.find(c=>c.toLowerCase().startsWith(n));return{id:r,label:O(a),role:i,status:K(a,t)}});if(s.roles&&s.roles.length>0){const a=s.roles.filter(r=>r.toLowerCase()!=="coordinator");if(a.length>0)return a.map(r=>({id:r.toUpperCase(),label:O(r),role:r,status:K(r,t)}))}if(t.length>0){const a=new Map;for(const r of t){const n=r.from;if(n.toLowerCase()==="coordinator")continue;const i=n.toLowerCase();a.has(i)||a.set(i,n)}if(a.size>0)return Array.from(a.entries()).map(([,r])=>({id:r.toUpperCase(),label:O(r),role:r,status:K(r,t)}))}return qs.map(a=>({id:a.toUpperCase(),label:O(a),role:void 0,status:K(a,t)}))}function Vs(s){if(!s||Object.keys(s).length===0)return null;const t=s.coordinator;return!t||typeof t.current_phase!="number"?null:{currentPhase:t.current_phase,totalPhases:typeof t.total_phases=="number"?t.total_phases:null,currentStep:typeof t.current_step=="string"?t.current_step:null,gapIteration:typeof t.gap_iteration=="number"?t.gap_iteration:0}}function et(){const{formatMessage:s}=T(),{selectedTeam:t,viewMode:a,autoRefresh:r,toggleAutoRefresh:n,messageFilter:i,setMessageFilter:l,clearMessageFilter:c,timelineExpanded:x,setTimelineExpanded:g,detailTab:v,setDetailTab:C,backToList:N,locationFilter:d}=z(),m=ne(Xe),_=ne(u=>u.toggleImmersiveMode),{teams:y,error:F,isLoading:A}=he(d),{messages:M,total:f}=os(a==="detail"?t:null,i),{members:b,totalMessages:w}=ds(a==="detail"?t:null),o=h.useMemo(()=>y.find(u=>u.name===t),[y,t]);h.useEffect(()=>{a==="detail"&&t&&!A&&y.length>0&&!o&&N()},[a,t,A,y.length,o,N]);const $=h.useMemo(()=>zs({pipeline_stages:o==null?void 0:o.pipeline_stages,role_state:o==null?void 0:o.role_state,roles:o==null?void 0:o.roles},M),[o==null?void 0:o.pipeline_stages,o==null?void 0:o.role_state,o==null?void 0:o.roles,M]),R=h.useMemo(()=>Vs(o==null?void 0:o.role_state),[o==null?void 0:o.role_state]);if(F&&a==="detail")return e.jsx("div",{className:"flex items-center justify-center min-h-[400px] p-8",children:e.jsxs("div",{className:"text-center max-w-md",children:[e.jsx("div",{className:"mb-4",children:e.jsx(Ye,{className:"w-16 h-16 mx-auto text-destructive"})}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:s({id:"team.error.loadFailed"})}),e.jsx("p",{className:"text-muted-foreground mb-6",children:F instanceof Error?F.message:String(F)}),e.jsxs("div",{className:"flex gap-3 justify-center",children:[e.jsx(k,{onClick:N,variant:"default",children:s({id:"team.detail.backToList"})}),e.jsx(k,{onClick:()=>window.location.reload(),variant:"outline",children:s({id:"common.actions.retry"})})]})]})});if(a==="list"||!t||a==="detail"&&y.length>0&&!o)return e.jsx("div",{className:"space-y-6",children:e.jsx(Rs,{})});const V=[{value:"pipeline",label:s({id:"team.tabs.pipeline"}),icon:e.jsx(se,{className:"h-4 w-4"})},{value:"artifacts",label:s({id:"team.tabs.artifacts"}),icon:e.jsx(Q,{className:"h-4 w-4"})},{value:"messages",label:s({id:"team.tabs.messages"}),icon:e.jsx(ee,{className:"h-4 w-4"})}];return e.jsxs("div",{className:j("space-y-6",m&&"h-screen overflow-hidden"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(hs,{selectedTeam:t,onBack:N,members:b,totalMessages:w,autoRefresh:r,onToggleAutoRefresh:n,skillType:o!=null&&o.team_name?`team-${o.team_name}`:void 0,pipelineMode:o==null?void 0:o.pipeline_mode}),e.jsx("button",{onClick:_,className:j("p-2 rounded-md transition-colors",m?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"),title:m?"Exit Fullscreen":"Fullscreen",children:m?e.jsx(ls,{className:"w-4 h-4"}):e.jsx(cs,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsx(L,{className:"lg:col-span-2 flex flex-col",children:e.jsx(E,{className:"p-4 flex-1",children:e.jsx(gs,{stages:$,phaseInfo:R})})}),e.jsx(L,{children:e.jsx(E,{className:"p-4",children:e.jsx(le,{members:b,stages:$,roleState:o==null?void 0:o.role_state})})})]}),R&&e.jsx(_s,{phaseInfo:R}),e.jsx(ue,{value:v,onValueChange:u=>C(u),tabs:V}),v==="pipeline"&&e.jsx(L,{children:e.jsx(E,{className:"p-6",children:e.jsx(le,{members:b,stages:$,roleState:o==null?void 0:o.role_state})})}),v==="artifacts"&&e.jsx(Fs,{teamName:t}),v==="messages"&&e.jsx(Ms,{messages:M,total:f,filter:i,onFilterChange:l,onClearFilter:c,expanded:x,onExpandedChange:g})]})}export{et as TeamPage,et as default};
|
|
2
|
-
//# sourceMappingURL=TeamPage-
|
|
1
|
+
import{eg as Ne,eh as be,ei as ye,ab as X,aF as Y,aH as Z,ej as we,ek as Te,el as _e,em as Ce,en as Se,eo as Me,u as T,j as e,e as k,J as ke,B as p,cA as U,aV as ee,a1 as se,bu as Fe,R as de,ep as Ae,eq as Le,ad as Ee,N as H,k as Pe,c as j,C as L,a as E,r as h,cy as me,ap as te,X as xe,aq as W,ar as I,as as J,at as G,au as D,er as De,es as $e,ao as Re,D as qe,d as ze,f as Ve,g as B,h as re,T as Be,l as Oe,b as Ke,I as Qe,x as Ue,y as We,z as Ie,A as Je,E as Ge,G as He,o as ne,s as Xe,aw as Ye}from"./index-dWT2M6Ef.js";import{T as ue}from"./TabsNavigation-qqt70VYL.js";import{S as Ze}from"./Switch-BPMdND9H.js";import{F as es}from"./filter-CKqzYbz7.js";import{F as ae}from"./file-text-DrJFiOUB.js";import{P as Q}from"./package-nzWY6ilt.js";import{F as ss}from"./folder-CV8511y9.js";import{F as ts}from"./file-json-BAdJb0n8.js";import{E as as}from"./ellipsis-vertical-BpTysg-Y.js";import{E as rs}from"./eye-DGY1rAZs.js";import{A as ns}from"./archive-restore-DfQ998g5.js";import{A as is}from"./archive-C3u8YNQF.js";import{M as ls,a as cs}from"./minimize-2-CGfBKD_V.js";const z=Ne()(be(ye(s=>({selectedTeam:null,autoRefresh:!0,messageFilter:{},timelineExpanded:!0,viewMode:"list",locationFilter:"active",searchQuery:"",detailTab:"pipeline",setSelectedTeam:t=>s({selectedTeam:t}),toggleAutoRefresh:()=>s(t=>({autoRefresh:!t.autoRefresh})),setMessageFilter:t=>s(a=>({messageFilter:{...a.messageFilter,...t}})),clearMessageFilter:()=>s({messageFilter:{}}),setTimelineExpanded:t=>s({timelineExpanded:t}),setViewMode:t=>s({viewMode:t}),setLocationFilter:t=>s({locationFilter:t}),setSearchQuery:t=>s({searchQuery:t}),setDetailTab:t=>s({detailTab:t}),selectTeamAndShowDetail:t=>s({selectedTeam:t,viewMode:"detail",detailTab:"pipeline"}),backToList:()=>s({viewMode:"list",detailTab:"pipeline"})}),{name:"ccw-team-store"}),{name:"TeamStore"})),S={all:["teams"],lists:()=>[...S.all,"list"],listByLocation:s=>[...S.lists(),s],messages:(s,t)=>[...S.all,"messages",s,t],status:s=>[...S.all,"status",s]};function he(s){var n;const t=z(i=>i.autoRefresh),a=s||"active",r=X({queryKey:S.listByLocation(a),queryFn:async()=>({teams:(await Ce(a)).teams??[]}),staleTime:1e4,refetchInterval:t?1e4:!1});return{teams:((n=r.data)==null?void 0:n.teams)??[],isLoading:r.isLoading,isFetching:r.isFetching,error:r.error,refetch:r.refetch}}function os(s,t,a){var i,l;const r=z(c=>c.autoRefresh),n=X({queryKey:S.messages(s??"",t),queryFn:async()=>{if(!s)return{total:0,showing:0,messages:[]};const c=await Se(s,{...t,last:50});return{total:c.total,showing:c.showing,messages:c.messages}},enabled:!!s,staleTime:5e3,refetchInterval:r?5e3:!1});return{messages:((i=n.data)==null?void 0:i.messages)??[],total:((l=n.data)==null?void 0:l.total)??0,isLoading:n.isLoading,error:n.error,refetch:n.refetch}}function ds(s){var r,n;const t=z(i=>i.autoRefresh),a=X({queryKey:S.status(s??""),queryFn:async()=>{if(!s)return{members:[],total_messages:0};const i=await Me(s);return{members:i.members,total_messages:i.total_messages}},enabled:!!s,staleTime:5e3,refetchInterval:t?5e3:!1});return{members:((r=a.data)==null?void 0:r.members)??[],totalMessages:((n=a.data)==null?void 0:n.total_messages)??0,isLoading:a.isLoading,error:a.error,refetch:a.refetch}}function ms(){const s=Y(),t=Z({mutationFn:we,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{archiveTeam:t.mutateAsync,isArchiving:t.isPending,error:t.error}}function xs(){const s=Y(),t=Z({mutationFn:Te,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{unarchiveTeam:t.mutateAsync,isUnarchiving:t.isPending,error:t.error}}function us(){const s=Y(),t=Z({mutationFn:_e,onSuccess:()=>{s.invalidateQueries({queryKey:S.all})}});return{deleteTeam:t.mutateAsync,isDeleting:t.isPending,error:t.error}}function hs({selectedTeam:s,onBack:t,members:a,totalMessages:r,autoRefresh:n,onToggleAutoRefresh:i,skillType:l,pipelineMode:c}){const{formatMessage:x}=T();return e.jsxs("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[e.jsxs(k,{variant:"ghost",size:"sm",onClick:t,className:"gap-1",children:[e.jsx(ke,{className:"h-4 w-4"}),x({id:"team.detail.backToList"})]}),s&&e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-lg font-semibold",children:s}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(p,{variant:"secondary",className:"gap-1",children:[e.jsx(U,{className:"w-3 h-3"}),x({id:"team.members"}),": ",a.length]}),e.jsxs(p,{variant:"secondary",className:"gap-1",children:[e.jsx(ee,{className:"w-3 h-3"}),x({id:"team.messages"}),": ",r]})]}),(l||c)&&e.jsxs("div",{className:"flex items-center gap-2",children:[l&&e.jsx(p,{variant:"outline",className:"gap-1",children:l}),c&&e.jsxs(p,{variant:"default",className:"gap-1",children:[e.jsx(se,{className:"w-3 h-3"}),c]})]})]})]}),e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ze,{id:"auto-refresh",checked:n,onCheckedChange:i}),e.jsx(Fe,{htmlFor:"auto-refresh",className:"text-sm text-muted-foreground cursor-pointer",children:x({id:"team.autoRefresh"})}),n&&e.jsx(de,{className:"w-3.5 h-3.5 text-primary animate-spin",style:{animationDuration:"3s"}})]})})]})}const fe={completed:{icon:Pe,color:"text-green-500",bg:"bg-green-500/10 border-green-500/30"},in_progress:{icon:H,color:"text-blue-500",bg:"bg-blue-500/10 border-blue-500/30",animate:!0},pending:{icon:Ee,color:"text-muted-foreground",bg:"bg-muted border-border"},blocked:{icon:Le,color:"text-red-500",bg:"bg-red-500/10 border-red-500/30"},skipped:{icon:Ae,color:"text-yellow-500",bg:"bg-yellow-500/10 border-yellow-500/30"}},fs=["completed","in_progress","pending","blocked","skipped"];function ie({stage:s}){const{formatMessage:t}=T(),a=fe[s.status],r=a.icon,n=s.status==="in_progress"?"inProgress":s.status;return e.jsxs("div",{className:j("flex flex-col items-center gap-1.5 px-4 py-3 rounded-lg border-2 min-w-[90px] transition-all",a.bg),children:[e.jsx(r,{className:j("w-5 h-5",a.color,a.animate&&"animate-spin"),style:a.animate?{animationDuration:"2s"}:void 0}),e.jsx("span",{className:"text-xs font-medium",children:s.label}),e.jsx("span",{className:j("text-[10px]",a.color),children:t({id:`team.pipeline.${n}`})}),s.role&&e.jsx("span",{className:"text-[10px] text-muted-foreground truncate max-w-[80px]",children:s.role})]})}function ps(){return e.jsxs("div",{className:"flex items-center px-1",children:[e.jsx("div",{className:"w-6 h-0.5 bg-border"}),e.jsx("div",{className:"w-0 h-0 border-t-[4px] border-t-transparent border-b-[4px] border-b-transparent border-l-[6px] border-l-border"})]})}function gs({stages:s,phaseInfo:t}){const{formatMessage:a}=T();return s.length===0?e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:a({id:"team.pipeline.title"})}),e.jsx("p",{className:"text-xs text-muted-foreground text-center py-8",children:a({id:"team.pipeline.noStages"})})]}):e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"space-y-3 flex-1",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:a({id:"team.pipeline.title"})}),t&&e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(p,{variant:"secondary",children:[a({id:"team.coordinates.phase"}),": ",t.currentPhase,t.totalPhases!=null&&`/${t.totalPhases}`]}),t.currentStep&&e.jsxs(p,{variant:"secondary",children:[a({id:"team.coordinates.step"}),": ",t.currentStep]}),t.gapIteration>0&&e.jsxs(p,{variant:"outline",children:[a({id:"team.coordinates.gap"}),": ",t.gapIteration]})]}),e.jsx("div",{className:"hidden sm:flex items-center gap-0",children:s.map((r,n)=>e.jsxs("div",{className:"flex items-center",children:[n>0&&e.jsx(ps,{}),e.jsx(ie,{stage:r})]},r.id))}),e.jsx("div",{className:"flex sm:hidden flex-col items-center gap-2",children:s.map(r=>e.jsx(ie,{stage:r},r.id))})]}),e.jsx("div",{className:"flex flex-wrap gap-3 text-[10px] text-muted-foreground mt-auto pt-3 border-t border-border",children:fs.map(r=>{const n=fe[r],i=n.icon,l=r==="in_progress"?"inProgress":r;return e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(i,{className:j("w-3 h-3",n.color)}),a({id:`team.pipeline.${l}`})]},r)})})]})}function js(s){if(!s)return"";const t=Date.now(),a=new Date(s).getTime(),r=t-a;if(r<0)return"now";const n=Math.floor(r/1e3);if(n<60)return`${n}s`;const i=Math.floor(n/60);if(i<60)return`${i}m`;const l=Math.floor(i/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function vs(s){return s.lastSeen&&Date.now()-new Date(s.lastSeen).getTime()<120*1e3?"active":"idle"}function Ns({members:s}){const{formatMessage:t}=T();return e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:t({id:"team.membersPanel.title"})}),e.jsxs("div",{className:"space-y-2",children:[s.map(a=>{const r=vs(a),n=r==="active";return e.jsx(L,{className:"overflow-hidden",children:e.jsx(E,{className:"p-3",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"pt-0.5",children:e.jsx("div",{className:j("w-2.5 h-2.5 rounded-full",n?"bg-green-500 shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-muted-foreground/40")})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:a.member}),e.jsx(p,{variant:n?"success":"secondary",className:"text-[10px] px-1.5 py-0",children:t({id:`team.membersPanel.${r}`})})]}),a.lastAction&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:a.lastAction}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[e.jsxs("span",{children:[a.messageCount," ",t({id:"team.messages"}).toLowerCase()]}),a.lastSeen&&e.jsxs("span",{children:[js(a.lastSeen)," ",t({id:"team.membersPanel.ago"})]})]})]})]})})},a.member)}),s.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:t({id:"team.empty.noMessages"})})]})]})}function bs(s){if(!s)return"";const t=Date.now(),a=new Date(s).getTime(),r=t-a;if(r<0)return"now";const n=Math.floor(r/1e3);if(n<60)return`${n}s`;const i=Math.floor(n/60);if(i<60)return`${i}m`;const l=Math.floor(i/60);return l<24?`${l}h`:`${Math.floor(l/24)}d`}function ys(s){return s.lastSeen&&Date.now()-new Date(s.lastSeen).getTime()<120*1e3?"active":"idle"}function ws(s,t){const a=s.member.toLowerCase();return t.find(r=>r.role&&r.role.toLowerCase()===a||r.id.toLowerCase()===a)}const Ts={completed:"success",in_progress:"info",pending:"secondary",blocked:"destructive",skipped:"warning"};function le({members:s,stages:t,roleState:a}){const{formatMessage:r}=T();return t.length===0?e.jsx(Ns,{members:s}):e.jsxs("div",{className:"space-y-3",children:[e.jsx("h3",{className:"text-sm font-medium text-muted-foreground",children:r({id:"team.membersPanel.title"})}),e.jsxs("div",{className:"space-y-2",children:[s.map(n=>{const i=ys(n),l=i==="active",c=ws(n,t);return e.jsx(L,{className:"overflow-hidden",children:e.jsx(E,{className:"p-3",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"pt-0.5",children:e.jsx("div",{className:j("w-2.5 h-2.5 rounded-full",l?"bg-green-500 shadow-[0_0_6px_rgba(34,197,94,0.5)]":"bg-muted-foreground/40")})}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-sm font-medium truncate",children:n.member}),e.jsx(p,{variant:l?"success":"secondary",className:"text-[10px] px-1.5 py-0",children:r({id:`team.membersPanel.${i}`})}),c&&e.jsx(p,{variant:Ts[c.status]??"secondary",className:"text-[10px] px-1.5 py-0",children:c.label})]}),n.lastAction&&e.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n.lastAction}),e.jsxs("div",{className:"flex items-center gap-3 text-[10px] text-muted-foreground",children:[e.jsxs("span",{children:[n.messageCount," ",r({id:"team.messages"}).toLowerCase()]}),n.lastSeen&&e.jsxs("span",{children:[bs(n.lastSeen)," ",r({id:"team.membersPanel.ago"})]})]})]})]})})},n.member)}),s.length===0&&e.jsx("p",{className:"text-xs text-muted-foreground text-center py-4",children:r({id:"team.empty.noMessages"})})]})]})}function _s({phaseInfo:s}){const{formatMessage:t}=T();return e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsxs(p,{variant:"secondary",children:[t({id:"team.coordinates.phase"}),": ",s.currentPhase,s.totalPhases!=null&&`/${s.totalPhases}`]}),s.currentStep&&e.jsxs(p,{variant:"secondary",children:[t({id:"team.coordinates.step"}),": ",s.currentStep]}),s.gapIteration>0&&e.jsxs(p,{variant:"outline",children:[t({id:"team.coordinates.gap"}),": ",s.gapIteration]})]})}const ce={plan_ready:"bg-blue-500/15 text-blue-600 dark:text-blue-400 border-blue-500/30",plan_approved:"bg-blue-500/15 text-blue-600 dark:text-blue-400 border-blue-500/30",plan_revision:"bg-amber-500/15 text-amber-600 dark:text-amber-400 border-amber-500/30",task_unblocked:"bg-cyan-500/15 text-cyan-600 dark:text-cyan-400 border-cyan-500/30",impl_complete:"bg-primary/15 text-primary border-primary/30",impl_progress:"bg-primary/15 text-primary border-primary/30",test_result:"bg-green-500/15 text-green-600 dark:text-green-400 border-green-500/30",review_result:"bg-purple-500/15 text-purple-600 dark:text-purple-400 border-purple-500/30",fix_required:"bg-red-500/15 text-red-600 dark:text-red-400 border-red-500/30",error:"bg-red-500/15 text-red-600 dark:text-red-400 border-red-500/30",shutdown:"bg-muted text-muted-foreground border-border",message:"bg-muted text-muted-foreground border-border"};function Cs({type:s}){const{formatMessage:t}=T(),a=ce[s]||ce.message,r=`team.messageType.${s}`;let n;try{n=t({id:r})}catch{n=s}return e.jsx("span",{className:j("text-[10px] px-1.5 py-0.5 rounded border font-medium",a),children:n})}function Ss({msg:s}){var n,i;const[t,a]=h.useState(!1),r=s.ts?s.ts.substring(11,19):"";return e.jsxs("div",{className:"flex gap-3 py-2.5 border-b border-border last:border-b-0 animate-in fade-in slide-in-from-top-1 duration-300",children:[e.jsx("span",{className:"text-[10px] font-mono text-muted-foreground w-16 shrink-0 pt-0.5",children:r}),e.jsxs("div",{className:"flex-1 min-w-0 space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[e.jsx("span",{className:"text-xs font-medium",children:s.from}),e.jsx("span",{className:"text-[10px] text-muted-foreground",children:"→"}),e.jsx("span",{className:"text-xs font-medium",children:s.to}),e.jsx(Cs,{type:s.type}),s.id&&e.jsx("span",{className:"text-[10px] text-muted-foreground",children:s.id})]}),e.jsx("p",{className:"text-xs text-foreground/80",children:s.summary}),(s.ref||((n=s.data)==null?void 0:n.ref))&&e.jsxs("div",{className:"flex items-center gap-1 text-[10px] text-muted-foreground",children:[e.jsx(ae,{className:"w-3 h-3"}),e.jsx("span",{className:"font-mono truncate",children:s.ref||((i=s.data)==null?void 0:i.ref)})]}),s.data&&Object.keys(s.data).length>0&&e.jsxs("div",{children:[e.jsx("button",{onClick:()=>a(!t),className:"text-[10px] text-primary hover:underline flex items-center gap-0.5",children:t?e.jsxs(e.Fragment,{children:[e.jsx(me,{className:"w-3 h-3"})," collapse"]}):e.jsxs(e.Fragment,{children:[e.jsx(te,{className:"w-3 h-3"})," data"]})}),t&&e.jsx("pre",{className:"text-[10px] bg-muted p-2 rounded mt-1 overflow-x-auto max-h-40",children:JSON.stringify(s.data,null,2)})]})]})]})}function Ms({messages:s,total:t,filter:a,onFilterChange:r,onClearFilter:n,expanded:i,onExpandedChange:l}){const{formatMessage:c}=T(),x=!!(a.from||a.to||a.type),{senders:g,receivers:v,types:C}=h.useMemo(()=>{const d=new Set,m=new Set,_=new Set;for(const y of s)d.add(y.from),m.add(y.to),_.add(y.type);return{senders:Array.from(d).sort(),receivers:Array.from(m).sort(),types:Array.from(_).sort()}},[s]),N=[...s].reverse();return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("button",{onClick:()=>l(!i),className:"flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors",children:[i?e.jsx(me,{className:"w-4 h-4"}):e.jsx(te,{className:"w-4 h-4"}),c({id:"team.timeline.title"}),e.jsxs("span",{className:"text-xs font-normal",children:["(",c({id:"team.timeline.showing"},{showing:s.length,total:t}),")"]})]}),x&&e.jsxs(k,{variant:"ghost",size:"sm",onClick:n,className:"h-6 text-xs gap-1",children:[e.jsx(xe,{className:"w-3 h-3"}),c({id:"team.timeline.clearFilters"})]})]}),i&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(W,{value:a.from??"__all__",onValueChange:d=>r({from:d==="__all__"?void 0:d}),children:[e.jsxs(I,{className:"w-[130px] h-7 text-xs",children:[e.jsx(es,{className:"w-3 h-3 mr-1"}),e.jsx(J,{placeholder:c({id:"team.timeline.filterFrom"})})]}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),g.map(d=>e.jsx(D,{value:d,children:d},d))]})]}),e.jsxs(W,{value:a.to??"__all__",onValueChange:d=>r({to:d==="__all__"?void 0:d}),children:[e.jsx(I,{className:"w-[130px] h-7 text-xs",children:e.jsx(J,{placeholder:c({id:"team.timeline.filterTo"})})}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),v.map(d=>e.jsx(D,{value:d,children:d},d))]})]}),e.jsxs(W,{value:a.type??"__all__",onValueChange:d=>r({type:d==="__all__"?void 0:d}),children:[e.jsx(I,{className:"w-[150px] h-7 text-xs",children:e.jsx(J,{placeholder:c({id:"team.timeline.filterType"})})}),e.jsxs(G,{children:[e.jsx(D,{value:"__all__",children:c({id:"team.filterAll"})}),C.map(d=>e.jsx(D,{value:d,children:d},d))]})]})]}),e.jsx(L,{children:e.jsx(E,{className:"p-3",children:N.length>0?e.jsx("div",{className:"divide-y-0",children:N.map(d=>e.jsx(Ss,{msg:d},d.id))}):e.jsxs("div",{className:"text-center py-8",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:c({id:"team.empty.noMessages"})}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:c({id:"team.empty.noMessagesHint"})})]})})})]})]})}function pe(s){return s.endsWith(".json")?"json":s.endsWith(".md")?"markdown":s.endsWith(".txt")||s.endsWith(".log")||s.endsWith(".tsv")||s.endsWith(".csv")?"text":"unknown"}function ge(s){return s?s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`:""}function ks(s){if(!s)return"";try{return new Date(s).toLocaleDateString(void 0,{month:"short",day:"numeric"})}catch{return""}}function je({contentType:s}){return s==="json"?e.jsx(ts,{className:"w-4 h-4 text-blue-500"}):e.jsx(ae,{className:"w-4 h-4 text-gray-500"})}function ve({node:s,depth:t,expanded:a,selectedPath:r,onToggle:n,onSelect:i}){if(s.type==="directory"){const x=a.has(s.path);return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-1 py-1.5 px-2 cursor-pointer hover:bg-accent/50 rounded transition-colors",style:{paddingLeft:t*16+8},onClick:()=>n(s.path),children:[x?e.jsx(te,{className:"w-4 h-4 text-muted-foreground"}):e.jsx(Re,{className:"w-4 h-4 text-muted-foreground"}),e.jsx(ss,{className:j("w-4 h-4",x?"text-amber-500":"text-amber-400")}),e.jsx("span",{className:"text-sm truncate",children:s.name})]}),x&&s.children&&e.jsx("div",{children:s.children.map(g=>e.jsx(ve,{node:g,depth:t+1,expanded:a,selectedPath:r,onToggle:n,onSelect:i},g.path))})]},s.path)}const l=r===s.path,c=s.contentType||pe(s.path);return e.jsxs("div",{className:j("flex items-center gap-1 py-1.5 px-2 cursor-pointer hover:bg-accent/50 rounded transition-colors",l&&"bg-accent"),style:{paddingLeft:t*16+28},onClick:()=>i(s),children:[e.jsx(je,{contentType:c}),e.jsx("span",{className:"text-sm truncate flex-1",children:s.name}),s.size!==void 0&&e.jsx("span",{className:"text-xs text-muted-foreground ml-2",children:ge(s.size)})]},s.path)}function Fs({teamName:s}){const{formatMessage:t}=T(),[a,r]=h.useState([]),[n,i]=h.useState(new Set),[l,c]=h.useState(null),[x,g]=h.useState(""),[v,C]=h.useState(!1),[N,d]=h.useState(!0),[m,_]=h.useState(null);h.useEffect(()=>{s&&(d(!0),_(null),De(s).then(f=>{r(f.tree||[]);const b=(f.tree||[]).filter(w=>w.type==="directory").map(w=>w.path);i(new Set(b))}).catch(f=>{console.error("Failed to load artifacts:",f),_(t({id:"team.artifacts.loadError",defaultMessage:"Failed to load artifacts"}))}).finally(()=>{d(!1)}))},[s,t]);const y=h.useCallback(f=>{i(b=>{const w=new Set(b);return w.has(f)?w.delete(f):w.add(f),w})},[]),F=h.useCallback(async f=>{if(f.type!=="directory"){c(f),C(!0),g("");try{const b=await $e(s,f.path);g(b.content)}catch(b){console.error("Failed to load file content:",b),g(t({id:"team.artifacts.contentError",defaultMessage:"Failed to load file content"}))}finally{C(!1)}}},[s,t]),A=l?l.contentType||pe(l.path):"text",M=A==="json"?"json":A==="markdown"?"markdown":"text";return N?e.jsxs("div",{className:"flex items-center justify-center py-12",children:[e.jsx(H,{className:"h-8 w-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:t({id:"team.artifacts.loading",defaultMessage:"Loading artifacts..."})})]}):m?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(Q,{className:"h-12 w-12 text-destructive mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:m})]}):a.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[e.jsx(Q,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-2",children:t({id:"team.artifacts.noArtifacts",defaultMessage:"No artifacts yet"})}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t({id:"team.artifacts.emptyHint",defaultMessage:"Artifacts will appear here when the team generates them"})})]}):e.jsxs("div",{className:"flex h-[600px] border rounded-lg overflow-hidden",children:[e.jsxs("div",{className:"w-72 shrink-0 border-r bg-muted/30 flex flex-col",children:[e.jsx("div",{className:"p-3 border-b bg-background shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Q,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium",children:t({id:"team.artifacts.title",defaultMessage:"Artifacts"})})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto py-2",children:a.map(f=>e.jsx(ve,{node:f,depth:0,expanded:n,selectedPath:l==null?void 0:l.path,onToggle:y,onSelect:F},f.path))})]}),e.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:l?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"p-3 border-b bg-muted/30 shrink-0",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(je,{contentType:A}),e.jsx("span",{className:"text-sm font-medium truncate",children:l.name}),l.size!==void 0&&e.jsx("span",{className:"text-xs text-muted-foreground",children:ge(l.size)}),l.modifiedAt&&e.jsx("span",{className:"text-xs text-muted-foreground ml-auto",children:ks(l.modifiedAt)})]})}),e.jsx("div",{className:"flex-1 overflow-y-auto p-4",children:v?e.jsx("div",{className:"flex items-center justify-center py-12",children:e.jsx(H,{className:"h-6 w-6 animate-spin text-muted-foreground"})}):e.jsx(Ls,{content:x,contentType:M})})]}):e.jsx("div",{className:"flex-1 flex items-center justify-center text-center p-8",children:e.jsxs("div",{children:[e.jsx(ae,{className:"h-12 w-12 text-muted-foreground mx-auto mb-4"}),e.jsx("p",{className:"text-muted-foreground",children:t({id:"team.artifacts.selectFile",defaultMessage:"Select a file to preview"})})]})})})]})}function q({data:s,depth:t=0}){if(s===null)return e.jsx("span",{className:"text-red-500 font-mono text-sm",children:"null"});if(s===void 0)return e.jsx("span",{className:"text-muted-foreground font-mono text-sm",children:"undefined"});if(typeof s=="boolean")return e.jsx("span",{className:j("font-mono text-sm",s?"text-orange-500":"text-red-500"),children:s?"true":"false"});if(typeof s=="number")return e.jsx("span",{className:"text-blue-500 font-mono text-sm",children:s});if(typeof s=="string")return s.length>200?e.jsxs("span",{className:"text-green-600 dark:text-green-400 font-mono text-sm break-all",children:['"',s.slice(0,200),'..."']}):e.jsxs("span",{className:"text-green-600 dark:text-green-400 font-mono text-sm",children:['"',s,'"']});if(Array.isArray(s))return s.length===0?e.jsx("span",{className:"text-muted-foreground text-sm",children:"[]"}):e.jsx("div",{className:"space-y-2",children:s.map((a,r)=>e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(p,{variant:"outline",className:"text-xs shrink-0 mt-0.5",children:r}),e.jsx("div",{className:"flex-1 min-w-0",children:typeof a=="object"&&a!==null?e.jsx("div",{className:"bg-muted/30 rounded-lg p-2 border",children:e.jsx(q,{data:a,depth:t+1})}):e.jsx(q,{data:a,depth:t+1})})]},r))});if(typeof s=="object"){const a=Object.entries(s);return a.length===0?e.jsx("span",{className:"text-muted-foreground text-sm",children:"{}"}):e.jsx("div",{className:j("space-y-2",t>0&&"pl-2 border-l-2 border-border"),children:a.map(([r,n])=>{const i=typeof n=="object"&&n!==null,l=Array.isArray(n),c=l?n.length:i?Object.keys(n).length:0;return e.jsxs("div",{className:"group",children:[e.jsxs("div",{className:"flex items-center gap-2 py-1",children:[e.jsx("span",{className:"text-purple-600 dark:text-purple-400 font-medium text-sm shrink-0",children:r}),i&&e.jsx(p,{variant:"secondary",className:"text-[10px] h-4 px-1",children:l?`${c} items`:`${c} fields`})]}),e.jsx("div",{className:"ml-3",children:i?e.jsx("div",{className:"bg-muted/20 rounded-md p-2 border",children:e.jsx(q,{data:n,depth:t+1})}):e.jsx(q,{data:n,depth:t+1})})]},r)})})}return e.jsx("span",{className:"text-sm",children:String(s)})}function As({data:s}){const t=h.useMemo(()=>{const a={type:"",fields:0,items:0,depth:0},r=(n,i)=>{a.depth=Math.max(a.depth,i),Array.isArray(n)?(a.type="Array",a.items=n.length,n.forEach(l=>r(l,i+1))):typeof n=="object"&&n!==null&&(a.type="Object",a.fields=Object.keys(n).length,Object.values(n).forEach(l=>r(l,i+1)))};return r(s,0),a},[s]);return e.jsxs("div",{className:"flex items-center gap-4 p-3 bg-muted/50 rounded-lg mb-4 text-sm",children:[e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(p,{variant:"outline",children:t.type})}),t.type==="Object"&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.fields})," fields"]}),t.type==="Array"&&e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.items})," items"]}),e.jsxs("div",{className:"text-muted-foreground",children:[e.jsx("span",{className:"font-medium text-foreground",children:t.depth})," levels deep"]})]})}function Ls({content:s,contentType:t}){if(!s)return e.jsx("div",{className:"text-muted-foreground text-sm",children:"No content"});if(t==="json")try{const a=JSON.parse(s);return e.jsxs("div",{className:"space-y-2",children:[e.jsx(As,{data:a}),e.jsx("div",{className:"bg-card rounded-lg",children:e.jsx(q,{data:a})})]})}catch{return e.jsx("pre",{className:"text-xs bg-muted/50 p-4 rounded-lg overflow-auto font-mono whitespace-pre-wrap break-words border",children:s})}return t==="markdown"?e.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:e.jsx("pre",{className:"whitespace-pre-wrap break-words font-sans text-sm leading-relaxed bg-transparent p-0",children:s})}):e.jsx("pre",{className:"text-xs bg-muted/50 p-4 rounded-lg overflow-auto font-mono whitespace-pre-wrap break-words border",children:s})}const Es={active:{variant:"info"},completed:{variant:"success"},archived:{variant:"secondary"}},oe={active:"team.status.active",completed:"team.status.completed",archived:"team.status.archived"};function Ps(s){if(!s)return"";try{return new Date(s).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}}function Ds({team:s,onClick:t,onArchive:a,onUnarchive:r,onDelete:n,showActions:i=!0,actionsDisabled:l=!1,className:c}){const{formatMessage:x}=T(),{variant:g}=Es[s.status]||{variant:"default"},v=oe[s.status]?x({id:oe[s.status]}):s.status,C=s.status==="archived",N=m=>{m.target.closest("[data-radix-popper-content-wrapper]")||t==null||t(s.name)},d=(m,_)=>{switch(m.stopPropagation(),_){case"view":t==null||t(s.name);break;case"archive":a==null||a(s.name);break;case"unarchive":r==null||r(s.name);break;case"delete":n==null||n(s.name);break}};return e.jsx(L,{className:j("group cursor-pointer transition-all duration-200 hover:shadow-md hover:border-primary/30",c),onClick:N,children:e.jsxs(E,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2 mb-2",children:[e.jsx("div",{className:"flex-1 min-w-0",children:e.jsx("div",{className:"flex items-center gap-2 mb-1",children:e.jsx("h3",{className:"font-bold text-card-foreground text-sm tracking-wide truncate",children:s.name})})}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx(p,{variant:g,children:v}),s.pipeline_mode&&e.jsxs(p,{variant:"default",className:"gap-1",children:[e.jsx(se,{className:"h-3 w-3"}),s.pipeline_mode]}),i&&e.jsxs(qe,{children:[e.jsx(ze,{asChild:!0,children:e.jsx(k,{variant:"ghost",size:"icon",className:"h-8 w-8 opacity-0 group-hover:opacity-100 transition-opacity",onClick:m=>m.stopPropagation(),disabled:l,children:e.jsx(as,{className:"h-4 w-4"})})}),e.jsxs(Ve,{align:"end",children:[e.jsxs(B,{onClick:m=>d(m,"view"),children:[e.jsx(rs,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.viewDetails"})]}),e.jsx(re,{}),C?e.jsxs(B,{onClick:m=>d(m,"unarchive"),children:[e.jsx(ns,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.unarchive"})]}):e.jsxs(B,{onClick:m=>d(m,"archive"),children:[e.jsx(is,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.archive"})]}),e.jsx(re,{}),e.jsxs(B,{onClick:m=>d(m,"delete"),className:"text-destructive focus:text-destructive",children:[e.jsx(Be,{className:"mr-2 h-4 w-4"}),x({id:"team.actions.delete"})]})]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),s.messageCount," ",x({id:"team.card.messages"})]}),s.lastActivity&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Oe,{className:"h-3.5 w-3.5"}),Ps(s.lastActivity)]})]}),s.members&&s.members.length>0&&e.jsxs("div",{className:"flex items-center gap-1.5 mt-2 flex-wrap",children:[e.jsx(U,{className:"h-3.5 w-3.5 text-muted-foreground shrink-0"}),s.members.map(m=>e.jsx(p,{variant:"outline",className:"text-[10px] px-1.5 py-0 font-normal",children:m},m))]})]})})}function $s({className:s}){return e.jsx(L,{className:j("animate-pulse",s),children:e.jsxs(E,{className:"p-4",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsx("div",{className:"flex-1",children:e.jsx("div",{className:"h-5 w-32 rounded bg-muted"})}),e.jsx("div",{className:"h-5 w-16 rounded-full bg-muted"})]}),e.jsxs("div",{className:"mt-3 flex gap-4",children:[e.jsx("div",{className:"h-4 w-24 rounded bg-muted"}),e.jsx("div",{className:"h-4 w-20 rounded bg-muted"}),e.jsx("div",{className:"h-4 w-20 rounded bg-muted"})]})]})})}function Rs(){const{formatMessage:s}=T(),{locationFilter:t,setLocationFilter:a,searchQuery:r,setSearchQuery:n,selectTeamAndShowDetail:i}=z(),[l,c]=h.useState(!1),[x,g]=h.useState(null),{teams:v,isLoading:C,isFetching:N,refetch:d}=he(t),{archiveTeam:m,isArchiving:_}=ms(),{unarchiveTeam:y,isUnarchiving:F}=xs(),{deleteTeam:A,isDeleting:M}=us(),f=_||F||M,b=h.useMemo(()=>{if(!r)return v;const u=r.toLowerCase();return v.filter(P=>P.name.toLowerCase().includes(u))},[v,r]),w=async u=>{try{await m(u)}catch(P){console.error("Failed to archive team:",P)}},o=async u=>{try{await y(u)}catch(P){console.error("Failed to unarchive team:",P)}},$=u=>{g(u),c(!0)},R=async()=>{if(x)try{await A(x),c(!1),g(null)}catch(u){console.error("Failed to delete team:",u)}},V=()=>n("");return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(U,{className:"w-5 h-5"}),e.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:s({id:"team.title"})})]}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:s({id:"team.description"})})]}),e.jsx("div",{className:"flex items-center gap-2",children:e.jsxs(k,{variant:"outline",size:"sm",onClick:()=>d(),disabled:N,children:[e.jsx(de,{className:j("h-4 w-4 mr-2",N&&"animate-spin")}),s({id:"common.actions.refresh"})]})})]}),e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center",children:[e.jsx(ue,{value:t,onValueChange:u=>a(u),tabs:[{value:"active",label:s({id:"team.filters.active"})},{value:"archived",label:s({id:"team.filters.archived"})},{value:"all",label:s({id:"team.filters.all"})}]}),e.jsxs("div",{className:"flex-1 max-w-sm relative",children:[e.jsx(Ke,{className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground"}),e.jsx(Qe,{placeholder:s({id:"team.searchPlaceholder"}),value:r,onChange:u=>n(u.target.value),className:"pl-9 pr-9"}),r&&e.jsx("button",{onClick:V,className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground",children:e.jsx(xe,{className:"h-4 w-4"})})]})]}),C?e.jsx("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:Array.from({length:6}).map((u,P)=>e.jsx($s,{},P))}):b.length===0?e.jsxs("div",{className:"flex flex-col items-center justify-center py-16 px-4 border border-dashed border-border rounded-lg",children:[e.jsx(U,{className:"h-12 w-12 text-muted-foreground mb-4"}),e.jsx("h3",{className:"text-lg font-medium text-foreground mb-1",children:s(r?{id:"team.emptyState.noMatching"}:{id:"team.emptyState.noTeams"})}),e.jsx("p",{className:"text-sm text-muted-foreground text-center max-w-sm mb-4",children:s(r?{id:"team.emptyState.noMatchingDescription"}:{id:"team.emptyState.noTeamsDescription"})}),r&&e.jsx(k,{variant:"outline",onClick:V,children:s({id:"common.actions.clearFilters"})})]}):e.jsx("div",{className:"grid gap-4 grid-cols-1 md:grid-cols-2 lg:grid-cols-3",children:b.map(u=>e.jsx(Ds,{team:u,onClick:i,onArchive:w,onUnarchive:o,onDelete:$,actionsDisabled:f},u.name))}),e.jsx(Ue,{open:l,onOpenChange:c,children:e.jsxs(We,{children:[e.jsxs(Ie,{children:[e.jsx(Je,{children:s({id:"team.dialog.deleteTeam"})}),e.jsx(Ge,{children:s({id:"team.dialog.deleteConfirm"})})]}),e.jsxs(He,{children:[e.jsx(k,{variant:"outline",onClick:()=>{c(!1),g(null)},children:s({id:"team.dialog.cancel"})}),e.jsx(k,{variant:"destructive",onClick:R,disabled:M,children:s(M?{id:"team.dialog.deleting"}:{id:"team.actions.delete"})})]})]})})]})}const qs=["plan","impl","test","review"];function O(s){return s?s.charAt(0).toUpperCase()+s.slice(1).toLowerCase():""}function K(s,t){const a=s.toLowerCase(),r=t.filter(l=>{const c=l.from.toLowerCase();return c===a||c.startsWith(a)});if(r.length===0)return"pending";const n=r[r.length-1];return["shutdown","impl_complete","review_result","test_result"].includes(n.type)?"completed":n.type==="error"?"blocked":"in_progress"}function zs(s,t){if(s.pipeline_stages&&s.pipeline_stages.length>0)return s.pipeline_stages.map(a=>{var l;const r=a.toUpperCase(),n=a.toLowerCase(),i=(l=s.roles)==null?void 0:l.find(c=>c.toLowerCase().startsWith(n));return{id:r,label:O(a),role:i,status:K(a,t)}});if(s.roles&&s.roles.length>0){const a=s.roles.filter(r=>r.toLowerCase()!=="coordinator");if(a.length>0)return a.map(r=>({id:r.toUpperCase(),label:O(r),role:r,status:K(r,t)}))}if(t.length>0){const a=new Map;for(const r of t){const n=r.from;if(n.toLowerCase()==="coordinator")continue;const i=n.toLowerCase();a.has(i)||a.set(i,n)}if(a.size>0)return Array.from(a.entries()).map(([,r])=>({id:r.toUpperCase(),label:O(r),role:r,status:K(r,t)}))}return qs.map(a=>({id:a.toUpperCase(),label:O(a),role:void 0,status:K(a,t)}))}function Vs(s){if(!s||Object.keys(s).length===0)return null;const t=s.coordinator;return!t||typeof t.current_phase!="number"?null:{currentPhase:t.current_phase,totalPhases:typeof t.total_phases=="number"?t.total_phases:null,currentStep:typeof t.current_step=="string"?t.current_step:null,gapIteration:typeof t.gap_iteration=="number"?t.gap_iteration:0}}function et(){const{formatMessage:s}=T(),{selectedTeam:t,viewMode:a,autoRefresh:r,toggleAutoRefresh:n,messageFilter:i,setMessageFilter:l,clearMessageFilter:c,timelineExpanded:x,setTimelineExpanded:g,detailTab:v,setDetailTab:C,backToList:N,locationFilter:d}=z(),m=ne(Xe),_=ne(u=>u.toggleImmersiveMode),{teams:y,error:F,isLoading:A}=he(d),{messages:M,total:f}=os(a==="detail"?t:null,i),{members:b,totalMessages:w}=ds(a==="detail"?t:null),o=h.useMemo(()=>y.find(u=>u.name===t),[y,t]);h.useEffect(()=>{a==="detail"&&t&&!A&&y.length>0&&!o&&N()},[a,t,A,y.length,o,N]);const $=h.useMemo(()=>zs({pipeline_stages:o==null?void 0:o.pipeline_stages,role_state:o==null?void 0:o.role_state,roles:o==null?void 0:o.roles},M),[o==null?void 0:o.pipeline_stages,o==null?void 0:o.role_state,o==null?void 0:o.roles,M]),R=h.useMemo(()=>Vs(o==null?void 0:o.role_state),[o==null?void 0:o.role_state]);if(F&&a==="detail")return e.jsx("div",{className:"flex items-center justify-center min-h-[400px] p-8",children:e.jsxs("div",{className:"text-center max-w-md",children:[e.jsx("div",{className:"mb-4",children:e.jsx(Ye,{className:"w-16 h-16 mx-auto text-destructive"})}),e.jsx("h2",{className:"text-xl font-semibold mb-2",children:s({id:"team.error.loadFailed"})}),e.jsx("p",{className:"text-muted-foreground mb-6",children:F instanceof Error?F.message:String(F)}),e.jsxs("div",{className:"flex gap-3 justify-center",children:[e.jsx(k,{onClick:N,variant:"default",children:s({id:"team.detail.backToList"})}),e.jsx(k,{onClick:()=>window.location.reload(),variant:"outline",children:s({id:"common.actions.retry"})})]})]})});if(a==="list"||!t||a==="detail"&&y.length>0&&!o)return e.jsx("div",{className:"space-y-6",children:e.jsx(Rs,{})});const V=[{value:"pipeline",label:s({id:"team.tabs.pipeline"}),icon:e.jsx(se,{className:"h-4 w-4"})},{value:"artifacts",label:s({id:"team.tabs.artifacts"}),icon:e.jsx(Q,{className:"h-4 w-4"})},{value:"messages",label:s({id:"team.tabs.messages"}),icon:e.jsx(ee,{className:"h-4 w-4"})}];return e.jsxs("div",{className:j("space-y-6",m&&"h-screen overflow-hidden"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(hs,{selectedTeam:t,onBack:N,members:b,totalMessages:w,autoRefresh:r,onToggleAutoRefresh:n,skillType:o!=null&&o.team_name?`team-${o.team_name}`:void 0,pipelineMode:o==null?void 0:o.pipeline_mode}),e.jsx("button",{onClick:_,className:j("p-2 rounded-md transition-colors",m?"bg-primary/10 text-primary":"text-muted-foreground hover:text-foreground hover:bg-muted"),title:m?"Exit Fullscreen":"Fullscreen",children:m?e.jsx(ls,{className:"w-4 h-4"}):e.jsx(cs,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-6",children:[e.jsx(L,{className:"lg:col-span-2 flex flex-col",children:e.jsx(E,{className:"p-4 flex-1",children:e.jsx(gs,{stages:$,phaseInfo:R})})}),e.jsx(L,{children:e.jsx(E,{className:"p-4",children:e.jsx(le,{members:b,stages:$,roleState:o==null?void 0:o.role_state})})})]}),R&&e.jsx(_s,{phaseInfo:R}),e.jsx(ue,{value:v,onValueChange:u=>C(u),tabs:V}),v==="pipeline"&&e.jsx(L,{children:e.jsx(E,{className:"p-6",children:e.jsx(le,{members:b,stages:$,roleState:o==null?void 0:o.role_state})})}),v==="artifacts"&&e.jsx(Fs,{teamName:t}),v==="messages"&&e.jsx(Ms,{messages:M,total:f,filter:i,onFilterChange:l,onClearFilter:c,expanded:x,onExpandedChange:g})]})}export{et as TeamPage,et as default};
|
|
2
|
+
//# sourceMappingURL=TeamPage-u5_i0Rgh.js.map
|