@mcp-graph-workflow/mcp-graph 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +157 -0
- package/dist/api/middleware/error-handler.d.ts +3 -0
- package/dist/api/middleware/error-handler.d.ts.map +1 -0
- package/dist/api/middleware/error-handler.js +48 -0
- package/dist/api/middleware/error-handler.js.map +1 -0
- package/dist/api/middleware/request-logger.d.ts +6 -0
- package/dist/api/middleware/request-logger.d.ts.map +1 -0
- package/dist/api/middleware/request-logger.js +19 -0
- package/dist/api/middleware/request-logger.js.map +1 -0
- package/dist/api/middleware/validate.d.ts +5 -0
- package/dist/api/middleware/validate.d.ts.map +1 -0
- package/dist/api/middleware/validate.js +23 -0
- package/dist/api/middleware/validate.js.map +1 -0
- package/dist/api/router.d.ts +11 -0
- package/dist/api/router.d.ts.map +1 -0
- package/dist/api/router.js +51 -0
- package/dist/api/router.js.map +1 -0
- package/dist/api/routes/benchmark.d.ts +4 -0
- package/dist/api/routes/benchmark.d.ts.map +1 -0
- package/dist/api/routes/benchmark.js +86 -0
- package/dist/api/routes/benchmark.js.map +1 -0
- package/dist/api/routes/capture.d.ts +3 -0
- package/dist/api/routes/capture.d.ts.map +1 -0
- package/dist/api/routes/capture.js +31 -0
- package/dist/api/routes/capture.js.map +1 -0
- package/dist/api/routes/context.d.ts +4 -0
- package/dist/api/routes/context.d.ts.map +1 -0
- package/dist/api/routes/context.js +25 -0
- package/dist/api/routes/context.js.map +1 -0
- package/dist/api/routes/docs-cache.d.ts +4 -0
- package/dist/api/routes/docs-cache.d.ts.map +1 -0
- package/dist/api/routes/docs-cache.js +79 -0
- package/dist/api/routes/docs-cache.js.map +1 -0
- package/dist/api/routes/edges.d.ts +4 -0
- package/dist/api/routes/edges.d.ts.map +1 -0
- package/dist/api/routes/edges.js +50 -0
- package/dist/api/routes/edges.js.map +1 -0
- package/dist/api/routes/events.d.ts +4 -0
- package/dist/api/routes/events.d.ts.map +1 -0
- package/dist/api/routes/events.js +37 -0
- package/dist/api/routes/events.js.map +1 -0
- package/dist/api/routes/gitnexus.d.ts +12 -0
- package/dist/api/routes/gitnexus.d.ts.map +1 -0
- package/dist/api/routes/gitnexus.js +162 -0
- package/dist/api/routes/gitnexus.js.map +1 -0
- package/dist/api/routes/graph.d.ts +4 -0
- package/dist/api/routes/graph.d.ts.map +1 -0
- package/dist/api/routes/graph.js +39 -0
- package/dist/api/routes/graph.js.map +1 -0
- package/dist/api/routes/import.d.ts +4 -0
- package/dist/api/routes/import.d.ts.map +1 -0
- package/dist/api/routes/import.js +92 -0
- package/dist/api/routes/import.js.map +1 -0
- package/dist/api/routes/insights.d.ts +4 -0
- package/dist/api/routes/insights.d.ts.map +1 -0
- package/dist/api/routes/insights.js +40 -0
- package/dist/api/routes/insights.js.map +1 -0
- package/dist/api/routes/integrations.d.ts +4 -0
- package/dist/api/routes/integrations.d.ts.map +1 -0
- package/dist/api/routes/integrations.js +85 -0
- package/dist/api/routes/integrations.js.map +1 -0
- package/dist/api/routes/knowledge.d.ts +8 -0
- package/dist/api/routes/knowledge.d.ts.map +1 -0
- package/dist/api/routes/knowledge.js +144 -0
- package/dist/api/routes/knowledge.js.map +1 -0
- package/dist/api/routes/nodes.d.ts +4 -0
- package/dist/api/routes/nodes.d.ts.map +1 -0
- package/dist/api/routes/nodes.js +123 -0
- package/dist/api/routes/nodes.js.map +1 -0
- package/dist/api/routes/project.d.ts +4 -0
- package/dist/api/routes/project.d.ts.map +1 -0
- package/dist/api/routes/project.js +70 -0
- package/dist/api/routes/project.js.map +1 -0
- package/dist/api/routes/rag.d.ts +8 -0
- package/dist/api/routes/rag.d.ts.map +1 -0
- package/dist/api/routes/rag.js +70 -0
- package/dist/api/routes/rag.js.map +1 -0
- package/dist/api/routes/search.d.ts +4 -0
- package/dist/api/routes/search.d.ts.map +1 -0
- package/dist/api/routes/search.js +25 -0
- package/dist/api/routes/search.js.map +1 -0
- package/dist/api/routes/skills.d.ts +3 -0
- package/dist/api/routes/skills.d.ts.map +1 -0
- package/dist/api/routes/skills.js +16 -0
- package/dist/api/routes/skills.js.map +1 -0
- package/dist/api/routes/stats.d.ts +4 -0
- package/dist/api/routes/stats.d.ts.map +1 -0
- package/dist/api/routes/stats.js +14 -0
- package/dist/api/routes/stats.js.map +1 -0
- package/dist/cli/commands/import-cmd.d.ts +3 -0
- package/dist/cli/commands/import-cmd.d.ts.map +1 -0
- package/dist/cli/commands/import-cmd.js +38 -0
- package/dist/cli/commands/import-cmd.js.map +1 -0
- package/dist/cli/commands/index-cmd.d.ts +3 -0
- package/dist/cli/commands/index-cmd.d.ts.map +1 -0
- package/dist/cli/commands/index-cmd.js +50 -0
- package/dist/cli/commands/index-cmd.js.map +1 -0
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +24 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/serve.d.ts +3 -0
- package/dist/cli/commands/serve.d.ts.map +1 -0
- package/dist/cli/commands/serve.js +18 -0
- package/dist/cli/commands/serve.js.map +1 -0
- package/dist/cli/commands/stats.d.ts +3 -0
- package/dist/cli/commands/stats.d.ts.map +1 -0
- package/dist/cli/commands/stats.js +39 -0
- package/dist/cli/commands/stats.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +30 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/core/capture/content-extractor.d.ts +21 -0
- package/dist/core/capture/content-extractor.d.ts.map +1 -0
- package/dist/core/capture/content-extractor.js +74 -0
- package/dist/core/capture/content-extractor.js.map +1 -0
- package/dist/core/capture/validate-runner.d.ts +28 -0
- package/dist/core/capture/validate-runner.d.ts.map +1 -0
- package/dist/core/capture/validate-runner.js +42 -0
- package/dist/core/capture/validate-runner.js.map +1 -0
- package/dist/core/capture/web-capture.d.ts +20 -0
- package/dist/core/capture/web-capture.d.ts.map +1 -0
- package/dist/core/capture/web-capture.js +51 -0
- package/dist/core/capture/web-capture.js.map +1 -0
- package/dist/core/config/ai-memory-generator.d.ts +14 -0
- package/dist/core/config/ai-memory-generator.d.ts.map +1 -0
- package/dist/core/config/ai-memory-generator.js +130 -0
- package/dist/core/config/ai-memory-generator.js.map +1 -0
- package/dist/core/config/config-loader.d.ts +3 -0
- package/dist/core/config/config-loader.d.ts.map +1 -0
- package/dist/core/config/config-loader.js +48 -0
- package/dist/core/config/config-loader.js.map +1 -0
- package/dist/core/config/config-schema.d.ts +12 -0
- package/dist/core/config/config-schema.d.ts.map +1 -0
- package/dist/core/config/config-schema.js +13 -0
- package/dist/core/config/config-schema.js.map +1 -0
- package/dist/core/context/bm25-compressor.d.ts +21 -0
- package/dist/core/context/bm25-compressor.d.ts.map +1 -0
- package/dist/core/context/bm25-compressor.js +87 -0
- package/dist/core/context/bm25-compressor.js.map +1 -0
- package/dist/core/context/compact-context.d.ts +56 -0
- package/dist/core/context/compact-context.d.ts.map +1 -0
- package/dist/core/context/compact-context.js +170 -0
- package/dist/core/context/compact-context.js.map +1 -0
- package/dist/core/context/context-assembler.d.ts +43 -0
- package/dist/core/context/context-assembler.d.ts.map +1 -0
- package/dist/core/context/context-assembler.js +113 -0
- package/dist/core/context/context-assembler.js.map +1 -0
- package/dist/core/context/rag-context.d.ts +44 -0
- package/dist/core/context/rag-context.d.ts.map +1 -0
- package/dist/core/context/rag-context.js +93 -0
- package/dist/core/context/rag-context.js.map +1 -0
- package/dist/core/context/tiered-context.d.ts +35 -0
- package/dist/core/context/tiered-context.d.ts.map +1 -0
- package/dist/core/context/tiered-context.js +92 -0
- package/dist/core/context/tiered-context.js.map +1 -0
- package/dist/core/context/token-estimator.d.ts +7 -0
- package/dist/core/context/token-estimator.d.ts.map +1 -0
- package/dist/core/context/token-estimator.js +9 -0
- package/dist/core/context/token-estimator.js.map +1 -0
- package/dist/core/docs/docs-cache-store.d.ts +24 -0
- package/dist/core/docs/docs-cache-store.d.ts.map +1 -0
- package/dist/core/docs/docs-cache-store.js +61 -0
- package/dist/core/docs/docs-cache-store.js.map +1 -0
- package/dist/core/docs/docs-syncer.d.ts +13 -0
- package/dist/core/docs/docs-syncer.d.ts.map +1 -0
- package/dist/core/docs/docs-syncer.js +38 -0
- package/dist/core/docs/docs-syncer.js.map +1 -0
- package/dist/core/docs/mcp-context7-fetcher.d.ts +17 -0
- package/dist/core/docs/mcp-context7-fetcher.d.ts.map +1 -0
- package/dist/core/docs/mcp-context7-fetcher.js +87 -0
- package/dist/core/docs/mcp-context7-fetcher.js.map +1 -0
- package/dist/core/docs/stack-detector.d.ts +21 -0
- package/dist/core/docs/stack-detector.d.ts.map +1 -0
- package/dist/core/docs/stack-detector.js +101 -0
- package/dist/core/docs/stack-detector.js.map +1 -0
- package/dist/core/events/event-bus.d.ts +26 -0
- package/dist/core/events/event-bus.d.ts.map +1 -0
- package/dist/core/events/event-bus.js +47 -0
- package/dist/core/events/event-bus.js.map +1 -0
- package/dist/core/events/event-types.d.ts +71 -0
- package/dist/core/events/event-types.d.ts.map +1 -0
- package/dist/core/events/event-types.js +2 -0
- package/dist/core/events/event-types.js.map +1 -0
- package/dist/core/graph/graph-indexes.d.ts +3 -0
- package/dist/core/graph/graph-indexes.d.ts.map +1 -0
- package/dist/core/graph/graph-indexes.js +28 -0
- package/dist/core/graph/graph-indexes.js.map +1 -0
- package/dist/core/graph/graph-types.d.ts +72 -0
- package/dist/core/graph/graph-types.d.ts.map +1 -0
- package/dist/core/graph/graph-types.js +2 -0
- package/dist/core/graph/graph-types.js.map +1 -0
- package/dist/core/graph/mermaid-export.d.ts +9 -0
- package/dist/core/graph/mermaid-export.d.ts.map +1 -0
- package/dist/core/graph/mermaid-export.js +80 -0
- package/dist/core/graph/mermaid-export.js.map +1 -0
- package/dist/core/importer/import-prd.d.ts +7 -0
- package/dist/core/importer/import-prd.d.ts.map +1 -0
- package/dist/core/importer/import-prd.js +7 -0
- package/dist/core/importer/import-prd.js.map +1 -0
- package/dist/core/importer/prd-to-graph.d.ts +18 -0
- package/dist/core/importer/prd-to-graph.d.ts.map +1 -0
- package/dist/core/importer/prd-to-graph.js +195 -0
- package/dist/core/importer/prd-to-graph.js.map +1 -0
- package/dist/core/insights/bottleneck-detector.d.ts +31 -0
- package/dist/core/insights/bottleneck-detector.d.ts.map +1 -0
- package/dist/core/insights/bottleneck-detector.js +84 -0
- package/dist/core/insights/bottleneck-detector.js.map +1 -0
- package/dist/core/insights/metrics-calculator.d.ts +31 -0
- package/dist/core/insights/metrics-calculator.d.ts.map +1 -0
- package/dist/core/insights/metrics-calculator.js +78 -0
- package/dist/core/insights/metrics-calculator.js.map +1 -0
- package/dist/core/insights/skill-recommender.d.ts +21 -0
- package/dist/core/insights/skill-recommender.d.ts.map +1 -0
- package/dist/core/insights/skill-recommender.js +129 -0
- package/dist/core/insights/skill-recommender.js.map +1 -0
- package/dist/core/integrations/enriched-context.d.ts +24 -0
- package/dist/core/integrations/enriched-context.d.ts.map +1 -0
- package/dist/core/integrations/enriched-context.js +89 -0
- package/dist/core/integrations/enriched-context.js.map +1 -0
- package/dist/core/integrations/gitnexus-launcher.d.ts +62 -0
- package/dist/core/integrations/gitnexus-launcher.d.ts.map +1 -0
- package/dist/core/integrations/gitnexus-launcher.js +241 -0
- package/dist/core/integrations/gitnexus-launcher.js.map +1 -0
- package/dist/core/integrations/gitnexus-queries.d.ts +55 -0
- package/dist/core/integrations/gitnexus-queries.d.ts.map +1 -0
- package/dist/core/integrations/gitnexus-queries.js +168 -0
- package/dist/core/integrations/gitnexus-queries.js.map +1 -0
- package/dist/core/integrations/integration-orchestrator.d.ts +51 -0
- package/dist/core/integrations/integration-orchestrator.d.ts.map +1 -0
- package/dist/core/integrations/integration-orchestrator.js +118 -0
- package/dist/core/integrations/integration-orchestrator.js.map +1 -0
- package/dist/core/integrations/mcp-deps-installer.d.ts +21 -0
- package/dist/core/integrations/mcp-deps-installer.d.ts.map +1 -0
- package/dist/core/integrations/mcp-deps-installer.js +114 -0
- package/dist/core/integrations/mcp-deps-installer.js.map +1 -0
- package/dist/core/integrations/mcp-servers-config.d.ts +21 -0
- package/dist/core/integrations/mcp-servers-config.d.ts.map +1 -0
- package/dist/core/integrations/mcp-servers-config.js +58 -0
- package/dist/core/integrations/mcp-servers-config.js.map +1 -0
- package/dist/core/integrations/serena-reader.d.ts +18 -0
- package/dist/core/integrations/serena-reader.d.ts.map +1 -0
- package/dist/core/integrations/serena-reader.js +68 -0
- package/dist/core/integrations/serena-reader.js.map +1 -0
- package/dist/core/integrations/tool-status.d.ts +18 -0
- package/dist/core/integrations/tool-status.d.ts.map +1 -0
- package/dist/core/integrations/tool-status.js +97 -0
- package/dist/core/integrations/tool-status.js.map +1 -0
- package/dist/core/parser/classify.d.ts +31 -0
- package/dist/core/parser/classify.d.ts.map +1 -0
- package/dist/core/parser/classify.js +128 -0
- package/dist/core/parser/classify.js.map +1 -0
- package/dist/core/parser/extract.d.ts +21 -0
- package/dist/core/parser/extract.d.ts.map +1 -0
- package/dist/core/parser/extract.js +66 -0
- package/dist/core/parser/extract.js.map +1 -0
- package/dist/core/parser/file-reader.d.ts +13 -0
- package/dist/core/parser/file-reader.d.ts.map +1 -0
- package/dist/core/parser/file-reader.js +52 -0
- package/dist/core/parser/file-reader.js.map +1 -0
- package/dist/core/parser/normalize.d.ts +9 -0
- package/dist/core/parser/normalize.d.ts.map +1 -0
- package/dist/core/parser/normalize.js +22 -0
- package/dist/core/parser/normalize.js.map +1 -0
- package/dist/core/parser/read-file.d.ts +7 -0
- package/dist/core/parser/read-file.d.ts.map +1 -0
- package/dist/core/parser/read-file.js +17 -0
- package/dist/core/parser/read-file.js.map +1 -0
- package/dist/core/parser/read-html.d.ts +7 -0
- package/dist/core/parser/read-html.d.ts.map +1 -0
- package/dist/core/parser/read-html.js +51 -0
- package/dist/core/parser/read-html.js.map +1 -0
- package/dist/core/parser/read-pdf.d.ts +10 -0
- package/dist/core/parser/read-pdf.d.ts.map +1 -0
- package/dist/core/parser/read-pdf.js +16 -0
- package/dist/core/parser/read-pdf.js.map +1 -0
- package/dist/core/parser/segment.d.ts +13 -0
- package/dist/core/parser/segment.d.ts.map +1 -0
- package/dist/core/parser/segment.js +53 -0
- package/dist/core/parser/segment.js.map +1 -0
- package/dist/core/planner/decompose.d.ts +25 -0
- package/dist/core/planner/decompose.d.ts.map +1 -0
- package/dist/core/planner/decompose.js +100 -0
- package/dist/core/planner/decompose.js.map +1 -0
- package/dist/core/planner/dependency-chain.d.ts +20 -0
- package/dist/core/planner/dependency-chain.d.ts.map +1 -0
- package/dist/core/planner/dependency-chain.js +163 -0
- package/dist/core/planner/dependency-chain.js.map +1 -0
- package/dist/core/planner/enhanced-next.d.ts +25 -0
- package/dist/core/planner/enhanced-next.d.ts.map +1 -0
- package/dist/core/planner/enhanced-next.js +88 -0
- package/dist/core/planner/enhanced-next.js.map +1 -0
- package/dist/core/planner/lifecycle-phase.d.ts +21 -0
- package/dist/core/planner/lifecycle-phase.d.ts.map +1 -0
- package/dist/core/planner/lifecycle-phase.js +93 -0
- package/dist/core/planner/lifecycle-phase.js.map +1 -0
- package/dist/core/planner/next-task.d.ts +16 -0
- package/dist/core/planner/next-task.d.ts.map +1 -0
- package/dist/core/planner/next-task.js +146 -0
- package/dist/core/planner/next-task.js.map +1 -0
- package/dist/core/planner/planning-report.d.ts +38 -0
- package/dist/core/planner/planning-report.d.ts.map +1 -0
- package/dist/core/planner/planning-report.js +140 -0
- package/dist/core/planner/planning-report.js.map +1 -0
- package/dist/core/planner/velocity.d.ts +38 -0
- package/dist/core/planner/velocity.d.ts.map +1 -0
- package/dist/core/planner/velocity.js +92 -0
- package/dist/core/planner/velocity.js.map +1 -0
- package/dist/core/rag/capture-indexer.d.ts +16 -0
- package/dist/core/rag/capture-indexer.d.ts.map +1 -0
- package/dist/core/rag/capture-indexer.js +37 -0
- package/dist/core/rag/capture-indexer.js.map +1 -0
- package/dist/core/rag/chunk-text.d.ts +27 -0
- package/dist/core/rag/chunk-text.d.ts.map +1 -0
- package/dist/core/rag/chunk-text.js +112 -0
- package/dist/core/rag/chunk-text.js.map +1 -0
- package/dist/core/rag/docs-indexer.d.ts +18 -0
- package/dist/core/rag/docs-indexer.d.ts.map +1 -0
- package/dist/core/rag/docs-indexer.js +57 -0
- package/dist/core/rag/docs-indexer.js.map +1 -0
- package/dist/core/rag/embedding-store.d.ts +51 -0
- package/dist/core/rag/embedding-store.d.ts.map +1 -0
- package/dist/core/rag/embedding-store.js +134 -0
- package/dist/core/rag/embedding-store.js.map +1 -0
- package/dist/core/rag/rag-pipeline.d.ts +48 -0
- package/dist/core/rag/rag-pipeline.d.ts.map +1 -0
- package/dist/core/rag/rag-pipeline.js +276 -0
- package/dist/core/rag/rag-pipeline.js.map +1 -0
- package/dist/core/rag/serena-indexer.d.ts +16 -0
- package/dist/core/rag/serena-indexer.d.ts.map +1 -0
- package/dist/core/rag/serena-indexer.js +50 -0
- package/dist/core/rag/serena-indexer.js.map +1 -0
- package/dist/core/rag/serena-rag-query.d.ts +34 -0
- package/dist/core/rag/serena-rag-query.d.ts.map +1 -0
- package/dist/core/rag/serena-rag-query.js +83 -0
- package/dist/core/rag/serena-rag-query.js.map +1 -0
- package/dist/core/search/fts-search.d.ts +16 -0
- package/dist/core/search/fts-search.d.ts.map +1 -0
- package/dist/core/search/fts-search.js +62 -0
- package/dist/core/search/fts-search.js.map +1 -0
- package/dist/core/search/tfidf.d.ts +32 -0
- package/dist/core/search/tfidf.d.ts.map +1 -0
- package/dist/core/search/tfidf.js +67 -0
- package/dist/core/search/tfidf.js.map +1 -0
- package/dist/core/search/tokenizer.d.ts +9 -0
- package/dist/core/search/tokenizer.d.ts.map +1 -0
- package/dist/core/search/tokenizer.js +37 -0
- package/dist/core/search/tokenizer.js.map +1 -0
- package/dist/core/store/knowledge-store.d.ts +72 -0
- package/dist/core/store/knowledge-store.d.ts.map +1 -0
- package/dist/core/store/knowledge-store.js +166 -0
- package/dist/core/store/knowledge-store.js.map +1 -0
- package/dist/core/store/migrations.d.ts +4 -0
- package/dist/core/store/migrations.d.ts.map +1 -0
- package/dist/core/store/migrations.js +223 -0
- package/dist/core/store/migrations.js.map +1 -0
- package/dist/core/store/sqlite-store.d.ts +86 -0
- package/dist/core/store/sqlite-store.d.ts.map +1 -0
- package/dist/core/store/sqlite-store.js +707 -0
- package/dist/core/store/sqlite-store.js.map +1 -0
- package/dist/core/utils/constants.d.ts +10 -0
- package/dist/core/utils/constants.d.ts.map +1 -0
- package/dist/core/utils/constants.js +10 -0
- package/dist/core/utils/constants.js.map +1 -0
- package/dist/core/utils/errors.d.ts +20 -0
- package/dist/core/utils/errors.d.ts.map +1 -0
- package/dist/core/utils/errors.js +39 -0
- package/dist/core/utils/errors.js.map +1 -0
- package/dist/core/utils/fs.d.ts +2 -0
- package/dist/core/utils/fs.d.ts.map +1 -0
- package/dist/core/utils/fs.js +11 -0
- package/dist/core/utils/fs.js.map +1 -0
- package/dist/core/utils/id.d.ts +2 -0
- package/dist/core/utils/id.d.ts.map +1 -0
- package/dist/core/utils/id.js +6 -0
- package/dist/core/utils/id.js.map +1 -0
- package/dist/core/utils/logger.d.ts +8 -0
- package/dist/core/utils/logger.d.ts.map +1 -0
- package/dist/core/utils/logger.js +28 -0
- package/dist/core/utils/logger.js.map +1 -0
- package/dist/core/utils/platform.d.ts +18 -0
- package/dist/core/utils/platform.d.ts.map +1 -0
- package/dist/core/utils/platform.js +43 -0
- package/dist/core/utils/platform.js.map +1 -0
- package/dist/core/utils/time.d.ts +2 -0
- package/dist/core/utils/time.d.ts.map +1 -0
- package/dist/core/utils/time.js +4 -0
- package/dist/core/utils/time.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/init-project.d.ts +2 -0
- package/dist/mcp/init-project.d.ts.map +1 -0
- package/dist/mcp/init-project.js +144 -0
- package/dist/mcp/init-project.js.map +1 -0
- package/dist/mcp/lifecycle-wrapper.d.ts +26 -0
- package/dist/mcp/lifecycle-wrapper.d.ts.map +1 -0
- package/dist/mcp/lifecycle-wrapper.js +67 -0
- package/dist/mcp/lifecycle-wrapper.js.map +1 -0
- package/dist/mcp/server.d.ts +3 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +73 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/mcp/stdio.d.ts +3 -0
- package/dist/mcp/stdio.d.ts.map +1 -0
- package/dist/mcp/stdio.js +20 -0
- package/dist/mcp/stdio.js.map +1 -0
- package/dist/mcp/tools/add-node.d.ts +4 -0
- package/dist/mcp/tools/add-node.d.ts.map +1 -0
- package/dist/mcp/tools/add-node.js +83 -0
- package/dist/mcp/tools/add-node.js.map +1 -0
- package/dist/mcp/tools/bulk-update-status.d.ts +4 -0
- package/dist/mcp/tools/bulk-update-status.d.ts.map +1 -0
- package/dist/mcp/tools/bulk-update-status.js +22 -0
- package/dist/mcp/tools/bulk-update-status.js.map +1 -0
- package/dist/mcp/tools/clone-node.d.ts +4 -0
- package/dist/mcp/tools/clone-node.d.ts.map +1 -0
- package/dist/mcp/tools/clone-node.js +111 -0
- package/dist/mcp/tools/clone-node.js.map +1 -0
- package/dist/mcp/tools/context.d.ts +4 -0
- package/dist/mcp/tools/context.d.ts.map +1 -0
- package/dist/mcp/tools/context.js +30 -0
- package/dist/mcp/tools/context.js.map +1 -0
- package/dist/mcp/tools/decompose.d.ts +4 -0
- package/dist/mcp/tools/decompose.d.ts.map +1 -0
- package/dist/mcp/tools/decompose.js +25 -0
- package/dist/mcp/tools/decompose.js.map +1 -0
- package/dist/mcp/tools/delete-node.d.ts +4 -0
- package/dist/mcp/tools/delete-node.d.ts.map +1 -0
- package/dist/mcp/tools/delete-node.js +29 -0
- package/dist/mcp/tools/delete-node.js.map +1 -0
- package/dist/mcp/tools/dependencies.d.ts +4 -0
- package/dist/mcp/tools/dependencies.d.ts.map +1 -0
- package/dist/mcp/tools/dependencies.js +47 -0
- package/dist/mcp/tools/dependencies.js.map +1 -0
- package/dist/mcp/tools/edge.d.ts +4 -0
- package/dist/mcp/tools/edge.d.ts.map +1 -0
- package/dist/mcp/tools/edge.js +140 -0
- package/dist/mcp/tools/edge.js.map +1 -0
- package/dist/mcp/tools/export.d.ts +4 -0
- package/dist/mcp/tools/export.d.ts.map +1 -0
- package/dist/mcp/tools/export.js +38 -0
- package/dist/mcp/tools/export.js.map +1 -0
- package/dist/mcp/tools/import-prd.d.ts +4 -0
- package/dist/mcp/tools/import-prd.d.ts.map +1 -0
- package/dist/mcp/tools/import-prd.js +81 -0
- package/dist/mcp/tools/import-prd.js.map +1 -0
- package/dist/mcp/tools/index.d.ts +4 -0
- package/dist/mcp/tools/index.d.ts.map +1 -0
- package/dist/mcp/tools/index.js +58 -0
- package/dist/mcp/tools/index.js.map +1 -0
- package/dist/mcp/tools/init.d.ts +4 -0
- package/dist/mcp/tools/init.d.ts.map +1 -0
- package/dist/mcp/tools/init.js +18 -0
- package/dist/mcp/tools/init.js.map +1 -0
- package/dist/mcp/tools/list.d.ts +4 -0
- package/dist/mcp/tools/list.d.ts.map +1 -0
- package/dist/mcp/tools/list.js +56 -0
- package/dist/mcp/tools/list.js.map +1 -0
- package/dist/mcp/tools/move-node.d.ts +4 -0
- package/dist/mcp/tools/move-node.d.ts.map +1 -0
- package/dist/mcp/tools/move-node.js +110 -0
- package/dist/mcp/tools/move-node.js.map +1 -0
- package/dist/mcp/tools/next.d.ts +4 -0
- package/dist/mcp/tools/next.d.ts.map +1 -0
- package/dist/mcp/tools/next.js +32 -0
- package/dist/mcp/tools/next.js.map +1 -0
- package/dist/mcp/tools/plan-sprint.d.ts +4 -0
- package/dist/mcp/tools/plan-sprint.d.ts.map +1 -0
- package/dist/mcp/tools/plan-sprint.js +54 -0
- package/dist/mcp/tools/plan-sprint.js.map +1 -0
- package/dist/mcp/tools/rag-context.d.ts +4 -0
- package/dist/mcp/tools/rag-context.d.ts.map +1 -0
- package/dist/mcp/tools/rag-context.js +51 -0
- package/dist/mcp/tools/rag-context.js.map +1 -0
- package/dist/mcp/tools/reindex-knowledge.d.ts +4 -0
- package/dist/mcp/tools/reindex-knowledge.d.ts.map +1 -0
- package/dist/mcp/tools/reindex-knowledge.js +49 -0
- package/dist/mcp/tools/reindex-knowledge.js.map +1 -0
- package/dist/mcp/tools/search.d.ts +4 -0
- package/dist/mcp/tools/search.d.ts.map +1 -0
- package/dist/mcp/tools/search.js +41 -0
- package/dist/mcp/tools/search.js.map +1 -0
- package/dist/mcp/tools/show.d.ts +4 -0
- package/dist/mcp/tools/show.d.ts.map +1 -0
- package/dist/mcp/tools/show.js +42 -0
- package/dist/mcp/tools/show.js.map +1 -0
- package/dist/mcp/tools/snapshot.d.ts +4 -0
- package/dist/mcp/tools/snapshot.d.ts.map +1 -0
- package/dist/mcp/tools/snapshot.js +45 -0
- package/dist/mcp/tools/snapshot.js.map +1 -0
- package/dist/mcp/tools/stats.d.ts +4 -0
- package/dist/mcp/tools/stats.d.ts.map +1 -0
- package/dist/mcp/tools/stats.js +46 -0
- package/dist/mcp/tools/stats.js.map +1 -0
- package/dist/mcp/tools/sync-stack-docs.d.ts +4 -0
- package/dist/mcp/tools/sync-stack-docs.d.ts.map +1 -0
- package/dist/mcp/tools/sync-stack-docs.js +77 -0
- package/dist/mcp/tools/sync-stack-docs.js.map +1 -0
- package/dist/mcp/tools/update-node.d.ts +4 -0
- package/dist/mcp/tools/update-node.d.ts.map +1 -0
- package/dist/mcp/tools/update-node.js +45 -0
- package/dist/mcp/tools/update-node.js.map +1 -0
- package/dist/mcp/tools/update-status.d.ts +4 -0
- package/dist/mcp/tools/update-status.d.ts.map +1 -0
- package/dist/mcp/tools/update-status.js +33 -0
- package/dist/mcp/tools/update-status.js.map +1 -0
- package/dist/mcp/tools/validate-task.d.ts +4 -0
- package/dist/mcp/tools/validate-task.d.ts.map +1 -0
- package/dist/mcp/tools/validate-task.js +57 -0
- package/dist/mcp/tools/validate-task.js.map +1 -0
- package/dist/mcp/tools/velocity.d.ts +4 -0
- package/dist/mcp/tools/velocity.d.ts.map +1 -0
- package/dist/mcp/tools/velocity.js +25 -0
- package/dist/mcp/tools/velocity.js.map +1 -0
- package/dist/schemas/edge.schema.d.ts +31 -0
- package/dist/schemas/edge.schema.d.ts.map +1 -0
- package/dist/schemas/edge.schema.js +16 -0
- package/dist/schemas/edge.schema.js.map +1 -0
- package/dist/schemas/graph.schema.d.ts +102 -0
- package/dist/schemas/graph.schema.d.ts.map +1 -0
- package/dist/schemas/graph.schema.js +28 -0
- package/dist/schemas/graph.schema.js.map +1 -0
- package/dist/schemas/knowledge.schema.d.ts +29 -0
- package/dist/schemas/knowledge.schema.d.ts.map +1 -0
- package/dist/schemas/knowledge.schema.js +17 -0
- package/dist/schemas/knowledge.schema.js.map +1 -0
- package/dist/schemas/node.schema.d.ts +80 -0
- package/dist/schemas/node.schema.d.ts.map +1 -0
- package/dist/schemas/node.schema.js +38 -0
- package/dist/schemas/node.schema.js.map +1 -0
- package/dist/web/dashboard/dist/assets/benchmark-tab-BTKW3REK.js +1 -0
- package/dist/web/dashboard/dist/assets/benchmark-tab-BhbUvjLM.js +1 -0
- package/dist/web/dashboard/dist/assets/benchmark-tab-CESZcCtO.js +1 -0
- package/dist/web/dashboard/dist/assets/benchmark-tab-D64Ala80.js +1 -0
- package/dist/web/dashboard/dist/assets/benchmark-tab-DJ7HyF-u.js +1 -0
- package/dist/web/dashboard/dist/assets/benchmark-tab-DVyzQZ2d.js +1 -0
- package/dist/web/dashboard/dist/assets/benchmark-tab-XUH7yQNv.js +1 -0
- package/dist/web/dashboard/dist/assets/benchmark-tab-ZfJu1pxc.js +1 -0
- package/dist/web/dashboard/dist/assets/constants-BIEJOBya.js +1 -0
- package/dist/web/dashboard/dist/assets/gitnexus-tab-BFHEXsJm.js +312 -0
- package/dist/web/dashboard/dist/assets/gitnexus-tab-Bbp91fom.js +312 -0
- package/dist/web/dashboard/dist/assets/gitnexus-tab-C3fPSzYi.js +312 -0
- package/dist/web/dashboard/dist/assets/gitnexus-tab-Cd0k8qk3.js +312 -0
- package/dist/web/dashboard/dist/assets/gitnexus-tab-ClNGphK5.js +312 -0
- package/dist/web/dashboard/dist/assets/gitnexus-tab-Cuc-KSII.js +312 -0
- package/dist/web/dashboard/dist/assets/gitnexus-tab-DEqMBSbC.css +1 -0
- package/dist/web/dashboard/dist/assets/gitnexus-tab-DEwJXSnD.js +312 -0
- package/dist/web/dashboard/dist/assets/gitnexus-tab-DOD7xwmm.js +312 -0
- package/dist/web/dashboard/dist/assets/graph-tab-AD7csRcc.js +1 -0
- package/dist/web/dashboard/dist/assets/graph-tab-BKyDCyHH.js +1 -0
- package/dist/web/dashboard/dist/assets/graph-tab-BUAkTto0.js +1 -0
- package/dist/web/dashboard/dist/assets/graph-tab-D0F0WJES.js +1 -0
- package/dist/web/dashboard/dist/assets/graph-tab-DA16nThT.js +1 -0
- package/dist/web/dashboard/dist/assets/graph-tab-DJknUhrl.js +1 -0
- package/dist/web/dashboard/dist/assets/graph-tab-DRPfelKw.js +1 -0
- package/dist/web/dashboard/dist/assets/graph-tab-lJ2rPS4Z.js +1 -0
- package/dist/web/dashboard/dist/assets/graph-utils-BN7tt0ZS.js +23 -0
- package/dist/web/dashboard/dist/assets/graph-utils-BTV1KGUM.js +23 -0
- package/dist/web/dashboard/dist/assets/graph-utils-BZV40eAE.css +1 -0
- package/dist/web/dashboard/dist/assets/graph-utils-BkfAOVJ9.js +23 -0
- package/dist/web/dashboard/dist/assets/graph-utils-Bo7cD1sx.js +23 -0
- package/dist/web/dashboard/dist/assets/graph-utils-CI4znRl5.js +23 -0
- package/dist/web/dashboard/dist/assets/graph-utils-DrCx5m7q.js +23 -0
- package/dist/web/dashboard/dist/assets/graph-utils-KQmzMFXM.js +23 -0
- package/dist/web/dashboard/dist/assets/graph-utils-M7iOhRI-.js +23 -0
- package/dist/web/dashboard/dist/assets/index-BGMP3W6f.css +1 -0
- package/dist/web/dashboard/dist/assets/index-BVXu3x9W.js +53 -0
- package/dist/web/dashboard/dist/assets/index-B_T9j86O.js +53 -0
- package/dist/web/dashboard/dist/assets/index-Bga9WW2A.css +1 -0
- package/dist/web/dashboard/dist/assets/index-BnLPCC8R.css +1 -0
- package/dist/web/dashboard/dist/assets/index-BonF71I0.js +53 -0
- package/dist/web/dashboard/dist/assets/index-CSyjxREL.js +53 -0
- package/dist/web/dashboard/dist/assets/index-CbUKe2Fv.js +53 -0
- package/dist/web/dashboard/dist/assets/index-D9i2aVjo.js +53 -0
- package/dist/web/dashboard/dist/assets/index-DzM6oBA3.js +53 -0
- package/dist/web/dashboard/dist/assets/index-IK005MzD.js +53 -0
- package/dist/web/dashboard/dist/assets/insights-tab-B9R3HsMU.js +1 -0
- package/dist/web/dashboard/dist/assets/insights-tab-BO_cxLyV.js +1 -0
- package/dist/web/dashboard/dist/assets/insights-tab-Brn6IMfQ.js +1 -0
- package/dist/web/dashboard/dist/assets/insights-tab-C6x-aJ8p.js +1 -0
- package/dist/web/dashboard/dist/assets/insights-tab-CWUU6eDi.js +1 -0
- package/dist/web/dashboard/dist/assets/insights-tab-CapL1jP-.js +1 -0
- package/dist/web/dashboard/dist/assets/insights-tab-CeWM6zgV.js +1 -0
- package/dist/web/dashboard/dist/assets/insights-tab-xQj5e61M.js +1 -0
- package/dist/web/dashboard/dist/assets/prd-backlog-tab-0oOO63rA.js +1 -0
- package/dist/web/dashboard/dist/assets/prd-backlog-tab-BcWoplsM.js +1 -0
- package/dist/web/dashboard/dist/assets/prd-backlog-tab-Bjj5KccG.js +1 -0
- package/dist/web/dashboard/dist/assets/prd-backlog-tab-C7cKQyup.js +1 -0
- package/dist/web/dashboard/dist/assets/prd-backlog-tab-CT4ja7Ay.js +1 -0
- package/dist/web/dashboard/dist/assets/prd-backlog-tab-CmPHHBDQ.js +1 -0
- package/dist/web/dashboard/dist/assets/prd-backlog-tab-DAHBiRO-.js +1 -0
- package/dist/web/dashboard/dist/assets/prd-backlog-tab-_jmBe3MU.js +1 -0
- package/dist/web/dashboard/dist/assets/serena-tab-BVyBTaHC.js +1 -0
- package/dist/web/dashboard/dist/assets/serena-tab-CVI1GGRk.js +1 -0
- package/dist/web/dashboard/dist/assets/serena-tab-D1ki2NjT.js +1 -0
- package/dist/web/dashboard/dist/assets/serena-tab-DRrRfjpO.js +1 -0
- package/dist/web/dashboard/dist/assets/serena-tab-DvYbwR4Z.js +1 -0
- package/dist/web/dashboard/dist/assets/serena-tab-DwiZ6Jm3.js +1 -0
- package/dist/web/dashboard/dist/assets/serena-tab-L6isY0iT.js +1 -0
- package/dist/web/dashboard/dist/assets/serena-tab-ba2n0AOh.js +1 -0
- package/dist/web/dashboard/dist/index.html +13 -0
- package/package.json +86 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e,a as o}from"./index-DzM6oBA3.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e,a as o}from"./index-IK005MzD.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e,a as o}from"./index-CSyjxREL.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e,a as o}from"./index-BonF71I0.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e,a as o}from"./index-D9i2aVjo.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e,a as o}from"./index-CbUKe2Fv.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e,a as o}from"./index-BVXu3x9W.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as c,j as e,a as o}from"./index-B_T9j86O.js";import{S as r}from"./constants-BIEJOBya.js";function b(){const[a,n]=c.useState(null),[t,m]=c.useState(null),[d,h]=c.useState([]),[x,u]=c.useState(null);return c.useEffect(()=>{async function s(){try{const[l,p,v]=await Promise.all([o.getMetrics().catch(()=>null),o.getBottlenecks().catch(()=>null),o.getRecommendations().catch(()=>({recommendations:[]}))]);n(l),m(p),h(v.recommendations)}catch(l){u(l instanceof Error?l.message:"Failed to load")}}s()},[]),x?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",x]}):e.jsxs("div",{className:"p-6 max-w-5xl mx-auto space-y-6 overflow-y-auto h-full",children:[a&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Metrics"}),e.jsxs("div",{className:"grid grid-cols-4 gap-3 mb-4",children:[e.jsx(i,{value:a.totalTasks,label:"Total Tasks"}),e.jsx(i,{value:`${a.completionRate}%`,label:"Completion"}),e.jsx(i,{value:a.velocity.tasksCompleted,label:"Completed"}),e.jsx(i,{value:a.velocity.avgPointsPerTask??"-",label:"Avg Points"})]}),a.statusDistribution.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("div",{className:"h-3 rounded-full overflow-hidden flex bg-[var(--color-bg-tertiary)]",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsx("div",{className:"h-full",style:{width:`${s.percentage}%`,background:r[s.status]},title:`${s.status}: ${s.count} (${s.percentage}%)`},s.status))}),e.jsx("div",{className:"flex flex-wrap gap-3 mt-1.5",children:a.statusDistribution.filter(s=>s.count>0).map(s=>e.jsxs("span",{className:"flex items-center gap-1 text-xs",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:r[s.status]}}),s.status.replace("_"," ")," (",s.count,")"]},s.status))})]}),a.sprintProgress.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-2",children:"Sprint Progress"}),e.jsx("div",{className:"space-y-1.5",children:a.sprintProgress.map(s=>e.jsxs("div",{className:"flex items-center gap-2 text-xs",children:[e.jsx("span",{className:"w-20 truncate",children:s.sprint}),e.jsx("div",{className:"flex-1 h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s.percentage}%`,background:r.done}})}),e.jsxs("span",{className:"text-[var(--color-text-muted)] w-10 text-right",children:[s.done,"/",s.total]})]},s.sprint))})]})]}),t&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Bottlenecks"}),t.blockedTasks.length===0&&t.missingAcceptanceCriteria.length===0&&t.oversizedTasks.length===0?e.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"No bottlenecks detected."}):e.jsxs("div",{className:"space-y-3",children:[t.blockedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Blocked Tasks (",t.blockedTasks.length,")"]}),e.jsx("div",{className:"space-y-1",children:t.blockedTasks.slice(0,10).map((s,l)=>e.jsxs("div",{className:"flex items-center gap-2 text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:[e.jsx("span",{className:"px-1 py-0.5 rounded text-[9px] font-medium",style:{background:`${r.blocked}20`,color:r.blocked},children:"blocked"}),e.jsx("span",{className:"truncate",children:s.title}),e.jsxs("span",{className:"text-[var(--color-text-muted)] truncate",children:["by: ",s.blockerTitles.join(", ")]})]},l))})]}),t.missingAcceptanceCriteria.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Missing AC (",t.missingAcceptanceCriteria.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.missingAcceptanceCriteria.slice(0,10).map((s,l)=>e.jsx("li",{children:s.title},l))})]}),t.oversizedTasks.length>0&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Oversized Tasks (",t.oversizedTasks.length,")"]}),e.jsx("ul",{className:"text-xs space-y-0.5 list-disc pl-4 text-[var(--color-text-muted)]",children:t.oversizedTasks.map((s,l)=>e.jsxs("li",{children:[s.title," — ",s.estimateMinutes,"min"]},l))})]}),t.criticalPath&&e.jsxs("div",{children:[e.jsxs("h4",{className:"text-xs font-medium text-[var(--color-text-muted)] mb-1",children:["Critical Path (",t.criticalPath.length," nodes)"]}),e.jsx("div",{className:"text-xs px-2 py-1 rounded bg-[var(--color-bg-secondary)]",children:t.criticalPath.titles.join(" → ")})]})]})]}),d.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"text-sm font-semibold mb-3",children:"Recommendations"}),e.jsx("div",{className:"space-y-2",children:d.map((s,l)=>e.jsxs("div",{className:"px-3 py-2 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)]",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-[var(--color-accent)]20 text-[var(--color-accent)] font-medium",children:s.phase}),e.jsx("span",{className:"text-xs font-medium",children:s.skill})]}),e.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s.reason})]},l))})]})]})}function i({value:a,label:n}){return e.jsxs("div",{className:"p-3 rounded-lg bg-[var(--color-bg-secondary)] border border-[var(--color-border)] text-center",children:[e.jsx("div",{className:"text-xl font-bold",children:a}),e.jsx("div",{className:"text-[10px] text-[var(--color-text-muted)] uppercase",children:n})]})}export{b as InsightsTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as e}from"./index-B_T9j86O.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-Bo7cD1sx.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as e}from"./index-BonF71I0.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-BN7tt0ZS.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as e}from"./index-IK005MzD.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-DrCx5m7q.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as e}from"./index-BVXu3x9W.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-BTV1KGUM.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as e}from"./index-CSyjxREL.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-KQmzMFXM.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as e}from"./index-CbUKe2Fv.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-BkfAOVJ9.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as e}from"./index-D9i2aVjo.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-M7iOhRI-.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as f,j as e}from"./index-DzM6oBA3.js";import{u as w,a as k,f as C,t as S,b as _,c as E,i as M,W as T,d as D,B as P,C as B,N as L}from"./graph-utils-CI4znRl5.js";import{S as v}from"./constants-BIEJOBya.js";const $=f.memo(function({graph:a,onNodeClick:N}){const{groups:j,nextTask:h,nodeMap:g}=f.useMemo(()=>{const r=a.nodes.filter(s=>s.type==="task"||s.type==="subtask"),i=new Map(a.nodes.map(s=>[s.id,s])),m=new Set(a.nodes.filter(s=>s.status==="done").map(s=>s.id)),x=r.filter(s=>s.status!=="backlog"&&s.status!=="ready"||s.blocked?!1:a.edges.filter(o=>o.from===s.id&&o.relationType==="depends_on").every(o=>m.has(o.to)));x.sort((s,t)=>s.priority-t.priority);const c=new Map;for(const s of r){const t=s.parentId||"__root__";c.has(t)||c.set(t,[]),c.get(t).push(s)}for(const s of c.values())s.sort((t,o)=>t.priority-o.priority);return{groups:c,nextTask:x[0]||null,nodeMap:i}},[a]);return a.nodes.filter(r=>r.type==="task"||r.type==="subtask").length===0?e.jsx("div",{className:"p-4 text-center text-[var(--color-text-muted)]",children:"No tasks in backlog."}):e.jsxs("div",{className:"p-2",children:[h&&e.jsxs("div",{className:"mb-3 px-3 py-2 bg-[var(--color-accent)]10 border border-[var(--color-accent)] rounded-lg",children:[e.jsx("span",{className:"text-xs font-medium text-[var(--color-accent)]",children:"Next:"})," ",e.jsx("span",{className:"text-sm font-semibold",children:h.title})]}),Array.from(j.entries()).map(([r,i])=>{const m=r!=="__root__"?g.get(r):null,x=m?m.title:"Ungrouped Tasks",c=i.filter(t=>t.status==="done").length,s=Math.round(c/i.length*100);return e.jsxs("div",{className:"mb-3",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1",children:[e.jsx("h4",{className:"text-xs font-semibold truncate",children:x}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[c,"/",i.length]})]}),e.jsx("div",{className:"h-1 mx-2 mb-1 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full",style:{width:`${s}%`,background:v.done}})}),i.map(t=>{const o=(h==null?void 0:h.id)===t.id,l=v[t.status]||"#9e9e9e",b=a.edges.filter(u=>u.from===t.id&&u.relationType==="depends_on").map(u=>{var d;return((d=g.get(u.to))==null?void 0:d.title)||u.to});return e.jsxs("div",{onClick:()=>N(t),className:`mx-1 mb-1 px-2 py-1.5 rounded cursor-pointer hover:bg-[var(--color-bg-tertiary)] transition-colors ${o?"ring-1 ring-[var(--color-accent)]":""}`,children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"text-[9px] px-1 py-0.5 rounded font-medium shrink-0",style:{background:`${l}20`,color:l},children:t.status.replace("_"," ")}),e.jsx("span",{className:"text-xs truncate flex-1",children:t.title}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:["P",t.priority]}),t.xpSize&&e.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t.xpSize})]}),b.length>0&&e.jsxs("div",{className:"text-[10px] text-[var(--color-text-muted)] mt-0.5 truncate pl-1",children:["Depends on: ",b.join(", ")]})]},t.id)})]},r)})]})}),F={workflowNode:D},z={workflowEdge:T},A={hideAttribution:!0};function W({graph:n}){const[a,N,j]=w([]),[h,g,r]=k([]),[i,m]=f.useState(null),[x,c]=f.useState(!1);f.useEffect(()=>{const l=C(n.nodes,x),p=S(l),b=new Set(p.map(y=>y.id)),u=_(n.edges,b),d=E(p,u,"TB");N(d.nodes),g(d.edges)},[n,N,g,x]);const s=f.useCallback((l,p)=>{m(p.data.sourceNode)},[]),t=f.useCallback(l=>{m(l)},[]),o=f.useMemo(()=>{const l=n.nodes.length,p=n.nodes.filter(d=>d.status==="done").length,b=n.nodes.filter(d=>d.status==="in_progress").length,u=n.nodes.filter(d=>d.status==="blocked").length;return{total:l,done:p,inProgress:b,blocked:u,pctDone:l?Math.round(p/l*100):0}},[n.nodes]);return e.jsxs("div",{className:"flex h-full",children:[e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col",children:[e.jsxs("div",{className:"px-3 py-1.5 bg-[var(--color-bg-secondary)] border-b border-[var(--color-border)] flex items-center gap-2 text-xs",children:[e.jsxs("label",{className:"flex items-center gap-1 cursor-pointer text-[var(--color-text-muted)]",children:[e.jsx("input",{type:"checkbox",checked:x,onChange:()=>c(l=>!l),className:"rounded"}),"Show all nodes (",n.nodes.length,")"]}),!x&&e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["Showing ",a.length," top-level nodes"]})]}),n.nodes.length>0?e.jsxs(M,{nodes:a,edges:h,onNodesChange:j,onEdgesChange:r,onNodeClick:s,nodeTypes:F,edgeTypes:z,nodesDraggable:!1,nodesConnectable:!1,fitView:!0,minZoom:.1,maxZoom:2,proOptions:A,children:[e.jsx(P,{gap:16,size:1}),e.jsx(B,{showInteractive:!1})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Import a PRD to see the workflow"})]}),e.jsxs("div",{className:"w-96 border-l border-[var(--color-border)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-4 py-3 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsxs("span",{children:[o.done,"/",o.total," done (",o.pctDone,"%)"]}),e.jsxs("span",{className:"text-[var(--color-text-muted)]",children:[o.inProgress," in progress, ",o.blocked," blocked"]})]}),e.jsxs("div",{className:"h-2 bg-[var(--color-bg-tertiary)] rounded-full overflow-hidden flex",children:[e.jsx("div",{className:"h-full transition-all",style:{width:`${o.pctDone}%`,background:v.done}}),e.jsx("div",{className:"h-full transition-all",style:{width:`${o.total?Math.round(o.inProgress/o.total*100):0}%`,background:v.in_progress}})]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsx($,{graph:n,onNodeClick:t})})]}),i&&e.jsx(L,{node:i,onClose:()=>m(null)})]})}export{W as PrdBacklogTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,a as b,j as e}from"./index-CbUKe2Fv.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,a as b,j as e}from"./index-BonF71I0.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,a as b,j as e}from"./index-BVXu3x9W.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,a as b,j as e}from"./index-B_T9j86O.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,a as b,j as e}from"./index-IK005MzD.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,a as b,j as e}from"./index-D9i2aVjo.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,a as b,j as e}from"./index-DzM6oBA3.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,a as b,j as e}from"./index-CSyjxREL.js";function j(t){const n=[];for(const l of t){const a=l.name.split("/");let o=n;for(let c=0;c<a.length;c++){const r=a[c],x=a.slice(0,c+1).join("/"),d=c===a.length-1;let s=o.find(f=>f.name===r);s||(s={name:r,path:x,children:[]},d&&(s.memory=l),o.push(s)),d&&!s.memory&&(s.memory=l),o=s.children}}return n}function w(){const[t,n]=i.useState([]),[l,a]=i.useState(null),[o,c]=i.useState(null),[r,x]=i.useState(!0),d=i.useCallback(async()=>{try{x(!0);const s=await b.getSerenaMemories().catch(()=>[]);n(s)}catch(s){c(s instanceof Error?s.message:"Failed to load")}finally{x(!1)}},[]);return i.useEffect(()=>{d()},[d]),r?e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:"Loading Serena..."}):o?e.jsxs("div",{className:"flex items-center justify-center h-full text-[var(--color-danger)]",children:["Failed to load: ",o]}):e.jsxs("div",{className:"h-full flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2 border-b border-[var(--color-border)] bg-[var(--color-bg-secondary)]",children:[e.jsx("h2",{className:"text-sm font-semibold",children:"Serena — Memories"}),e.jsx(g,{label:"Serena",active:t.length>0}),e.jsxs("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:[t.length," memories"]})]}),e.jsxs("div",{className:"flex flex-1 min-h-0",children:[e.jsx(N,{memories:t,selectedMemory:l,onSelect:a}),e.jsx("div",{className:"flex-1 min-w-0 overflow-auto",children:e.jsx(y,{selectedMemory:l})})]})]})}function g({label:t,active:n}){const l=n?"var(--color-success)":"var(--color-text-muted)",a=n?"Active":"No data";return e.jsxs("span",{className:"text-[10px] font-medium px-2 py-0.5 rounded-full",style:{background:`${l}20`,color:l},children:[t,": ",a]})}function N({memories:t,selectedMemory:n,onSelect:l}){const[a,o]=i.useState(""),[c,r]=i.useState(!1),[x,d]=i.useState(new Set),s=i.useMemo(()=>{if(!a.trim())return t;const m=a.toLowerCase();return t.filter(p=>p.name.toLowerCase().includes(m))},[t,a]),f=i.useMemo(()=>j(s),[s]),v=i.useCallback(m=>{d(p=>{const u=new Set(p);return u.has(m)?u.delete(m):u.add(m),u})},[]);return c?e.jsx("div",{className:"w-8 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col items-center pt-2",children:e.jsx("button",{onClick:()=>r(!1),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)] rotate-90",title:"Expand file explorer",children:"Files"})}):e.jsxs("div",{className:"w-64 border-r border-[var(--color-border)] bg-[var(--color-bg-secondary)] flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"flex items-center justify-between px-2 py-1.5 border-b border-[var(--color-border)]",children:[e.jsx("span",{className:"text-[10px] font-semibold text-[var(--color-text-muted)] uppercase tracking-wider",children:"Files"}),e.jsx("button",{onClick:()=>r(!0),className:"text-[10px] text-[var(--color-text-muted)] hover:text-[var(--color-text)]",title:"Collapse",children:"✕"})]}),e.jsx("div",{className:"px-2 py-1.5 border-b border-[var(--color-border)]",children:e.jsx("input",{type:"text",value:a,onChange:m=>o(m.target.value),placeholder:"Search files...",className:"w-full text-[11px] px-2 py-1 rounded bg-[var(--color-bg)] border border-[var(--color-border)] focus:outline-none focus:border-[var(--color-accent)]"})}),e.jsx("div",{className:"flex-1 overflow-y-auto text-[11px]",children:t.length===0?e.jsx("div",{className:"px-2 py-4 text-center text-[var(--color-text-muted)]",children:"No Serena memories"}):e.jsx(h,{nodes:f,depth:0,expandedPaths:x,onToggle:v,selectedMemory:n,onSelect:l})})]})}function h({nodes:t,depth:n,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c}){return e.jsx(e.Fragment,{children:t.map(r=>{const x=r.children.length>0,d=l.has(r.path),s=r.memory!=null&&(o==null?void 0:o.name)===r.memory.name;return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>{x&&a(r.path),r.memory&&c(r.memory)},className:`w-full text-left px-2 py-0.5 flex items-center gap-1 hover:bg-[var(--color-bg-tertiary)] transition-colors ${s?"bg-[var(--color-accent)]15 text-[var(--color-accent)]":"text-[var(--color-text)]"}`,style:{paddingLeft:`${n*12+8}px`},children:[x?e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:d?"▾":"▸"}):e.jsx("span",{className:"w-3 text-[9px] text-[var(--color-text-muted)]",children:"·"}),e.jsx("span",{className:"truncate",children:r.name})]}),x&&d&&e.jsx(h,{nodes:r.children,depth:n+1,expandedPaths:l,onToggle:a,selectedMemory:o,onSelect:c})]},r.path)})})}function y({selectedMemory:t}){return t?e.jsxs("div",{className:"p-4",children:[e.jsx("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-[var(--color-border)]",children:e.jsx("span",{className:"text-sm font-semibold",children:t.name})}),e.jsx("pre",{className:"text-xs whitespace-pre-wrap text-[var(--color-text-muted)] font-mono leading-relaxed",children:t.content})]}):e.jsx("div",{className:"flex items-center justify-center h-full text-[var(--color-text-muted)]",children:e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-sm mb-1",children:"Select a memory from the explorer"}),e.jsx("p",{className:"text-xs",children:"Serena memories appear as navigable files"})]})})}export{w as SerenaTab};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>mcp-graph Workstation</title>
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-D9i2aVjo.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BnLPCC8R.css">
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div id="root"></div>
|
|
12
|
+
</body>
|
|
13
|
+
</html>
|
package/package.json
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mcp-graph-workflow/mcp-graph",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "MCP local-first PRD to task graph — transforms text into executable structure",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"bin": {
|
|
8
|
+
"mcp-graph": "dist/cli/index.js",
|
|
9
|
+
"mcp-graph-stdio": "dist/mcp/stdio.js",
|
|
10
|
+
"mcp-graph-server": "dist/mcp/server.js"
|
|
11
|
+
},
|
|
12
|
+
"scripts": {
|
|
13
|
+
"prepublishOnly": "npm run build",
|
|
14
|
+
"dev": "tsx src/mcp/server.ts",
|
|
15
|
+
"dev:stdio": "tsx src/mcp/stdio.ts",
|
|
16
|
+
"dashboard:install": "cd src/web/dashboard && npm install",
|
|
17
|
+
"dashboard:dev": "cd src/web/dashboard && npm run dev",
|
|
18
|
+
"dashboard:build": "cd src/web/dashboard && npm run build",
|
|
19
|
+
"build": "tsc && npm run dashboard:build && npm run copy-dashboard",
|
|
20
|
+
"copy-dashboard": "mkdir -p dist/web/dashboard && cp -r src/web/dashboard/dist dist/web/dashboard/",
|
|
21
|
+
"start": "node dist/mcp/server.js",
|
|
22
|
+
"test": "vitest run",
|
|
23
|
+
"test:watch": "vitest",
|
|
24
|
+
"test:e2e": "playwright test",
|
|
25
|
+
"test:bench": "vitest bench",
|
|
26
|
+
"test:coverage": "vitest run --coverage",
|
|
27
|
+
"test:all": "vitest run && playwright test",
|
|
28
|
+
"typecheck": "tsc --noEmit",
|
|
29
|
+
"lint": "tsc --noEmit",
|
|
30
|
+
"setup:mcp": "bash scripts/setup-mcp.sh"
|
|
31
|
+
},
|
|
32
|
+
"keywords": [
|
|
33
|
+
"mcp",
|
|
34
|
+
"prd",
|
|
35
|
+
"task-graph",
|
|
36
|
+
"local-first",
|
|
37
|
+
"agent-tooling"
|
|
38
|
+
],
|
|
39
|
+
"files": [
|
|
40
|
+
"dist/",
|
|
41
|
+
"README.md",
|
|
42
|
+
"LICENSE"
|
|
43
|
+
],
|
|
44
|
+
"author": "Diego Nogueira (https://github.com/DiegoNogueiraDev)",
|
|
45
|
+
"license": "MIT",
|
|
46
|
+
"repository": {
|
|
47
|
+
"type": "git",
|
|
48
|
+
"url": "git+https://github.com/DiegoNogueiraDev/mcp-graph-workflow.git"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://github.com/DiegoNogueiraDev/mcp-graph-workflow#readme",
|
|
51
|
+
"bugs": {
|
|
52
|
+
"url": "https://github.com/DiegoNogueiraDev/mcp-graph-workflow/issues"
|
|
53
|
+
},
|
|
54
|
+
"publishConfig": {
|
|
55
|
+
"access": "public"
|
|
56
|
+
},
|
|
57
|
+
"engines": {
|
|
58
|
+
"node": ">=20.0.0"
|
|
59
|
+
},
|
|
60
|
+
"devDependencies": {
|
|
61
|
+
"@playwright/test": "^1.58.2",
|
|
62
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
63
|
+
"@types/express": "^5.0.6",
|
|
64
|
+
"@types/multer": "^2.1.0",
|
|
65
|
+
"@types/node": "^25.3.3",
|
|
66
|
+
"@types/supertest": "^7.2.0",
|
|
67
|
+
"@vitest/coverage-v8": "^4.0.0",
|
|
68
|
+
"gitnexus": "^1.3.11",
|
|
69
|
+
"supertest": "^7.2.2",
|
|
70
|
+
"tsx": "^4.21.0",
|
|
71
|
+
"typescript": "^5.9.3",
|
|
72
|
+
"vitest": "^4.0.18"
|
|
73
|
+
},
|
|
74
|
+
"dependencies": {
|
|
75
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
76
|
+
"better-sqlite3": "^12.6.2",
|
|
77
|
+
"cheerio": "^1.2.0",
|
|
78
|
+
"commander": "^14.0.3",
|
|
79
|
+
"express": "^5.2.1",
|
|
80
|
+
"multer": "^2.1.1",
|
|
81
|
+
"pdf-parse": "^2.4.5",
|
|
82
|
+
"playwright": "^1.58.2",
|
|
83
|
+
"yaml": "^2.8.2",
|
|
84
|
+
"zod": "^4.3.6"
|
|
85
|
+
}
|
|
86
|
+
}
|