claude-code-workflow 6.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/.claude/agents/action-planning-agent.md +778 -0
- package/.claude/agents/cli-execution-agent.md +270 -0
- package/.claude/agents/cli-explore-agent.md +182 -0
- package/.claude/agents/cli-lite-planning-agent.md +396 -0
- package/.claude/agents/cli-planning-agent.md +558 -0
- package/.claude/agents/code-developer.md +310 -0
- package/.claude/agents/conceptual-planning-agent.md +308 -0
- package/.claude/agents/context-search-agent.md +582 -0
- package/.claude/agents/doc-generator.md +330 -0
- package/.claude/agents/memory-bridge.md +94 -0
- package/.claude/agents/test-context-search-agent.md +399 -0
- package/.claude/agents/test-fix-agent.md +343 -0
- package/.claude/agents/ui-design-agent.md +593 -0
- package/.claude/agents/universal-executor.md +131 -0
- package/.claude/commands/cli/cli-init.md +440 -0
- package/.claude/commands/enhance-prompt.md +93 -0
- package/.claude/commands/memory/code-map-memory.md +687 -0
- package/.claude/commands/memory/docs-full-cli.md +471 -0
- package/.claude/commands/memory/docs-related-cli.md +386 -0
- package/.claude/commands/memory/docs.md +615 -0
- package/.claude/commands/memory/load-skill-memory.md +182 -0
- package/.claude/commands/memory/load.md +240 -0
- package/.claude/commands/memory/skill-memory.md +525 -0
- package/.claude/commands/memory/style-skill-memory.md +396 -0
- package/.claude/commands/memory/tech-research.md +477 -0
- package/.claude/commands/memory/update-full.md +332 -0
- package/.claude/commands/memory/update-related.md +332 -0
- package/.claude/commands/memory/workflow-skill-memory.md +517 -0
- package/.claude/commands/task/breakdown.md +204 -0
- package/.claude/commands/task/create.md +152 -0
- package/.claude/commands/task/execute.md +270 -0
- package/.claude/commands/task/replan.md +437 -0
- package/.claude/commands/version.md +254 -0
- package/.claude/commands/workflow/action-plan-verify.md +447 -0
- package/.claude/commands/workflow/brainstorm/api-designer.md +585 -0
- package/.claude/commands/workflow/brainstorm/artifacts.md +452 -0
- package/.claude/commands/workflow/brainstorm/auto-parallel.md +443 -0
- package/.claude/commands/workflow/brainstorm/data-architect.md +220 -0
- package/.claude/commands/workflow/brainstorm/product-manager.md +200 -0
- package/.claude/commands/workflow/brainstorm/product-owner.md +200 -0
- package/.claude/commands/workflow/brainstorm/scrum-master.md +200 -0
- package/.claude/commands/workflow/brainstorm/subject-matter-expert.md +200 -0
- package/.claude/commands/workflow/brainstorm/synthesis.md +398 -0
- package/.claude/commands/workflow/brainstorm/system-architect.md +387 -0
- package/.claude/commands/workflow/brainstorm/ui-designer.md +221 -0
- package/.claude/commands/workflow/brainstorm/ux-expert.md +221 -0
- package/.claude/commands/workflow/execute.md +460 -0
- package/.claude/commands/workflow/init.md +164 -0
- package/.claude/commands/workflow/lite-execute.md +686 -0
- package/.claude/commands/workflow/lite-fix.md +621 -0
- package/.claude/commands/workflow/lite-plan.md +592 -0
- package/.claude/commands/workflow/plan.md +551 -0
- package/.claude/commands/workflow/replan.md +515 -0
- package/.claude/commands/workflow/review-fix.md +646 -0
- package/.claude/commands/workflow/review-module-cycle.md +795 -0
- package/.claude/commands/workflow/review-session-cycle.md +805 -0
- package/.claude/commands/workflow/review.md +291 -0
- package/.claude/commands/workflow/session/complete.md +500 -0
- package/.claude/commands/workflow/session/list.md +96 -0
- package/.claude/commands/workflow/session/resume.md +61 -0
- package/.claude/commands/workflow/session/start.md +200 -0
- package/.claude/commands/workflow/status.md +352 -0
- package/.claude/commands/workflow/tdd-plan.md +460 -0
- package/.claude/commands/workflow/tdd-verify.md +386 -0
- package/.claude/commands/workflow/test-cycle-execute.md +498 -0
- package/.claude/commands/workflow/test-fix-gen.md +699 -0
- package/.claude/commands/workflow/test-gen.md +529 -0
- package/.claude/commands/workflow/tools/conflict-resolution.md +680 -0
- package/.claude/commands/workflow/tools/context-gather.md +434 -0
- package/.claude/commands/workflow/tools/task-generate-agent.md +291 -0
- package/.claude/commands/workflow/tools/task-generate-tdd.md +518 -0
- package/.claude/commands/workflow/tools/tdd-coverage-analysis.md +309 -0
- package/.claude/commands/workflow/tools/test-concept-enhanced.md +163 -0
- package/.claude/commands/workflow/tools/test-context-gather.md +235 -0
- package/.claude/commands/workflow/tools/test-task-generate.md +256 -0
- package/.claude/commands/workflow/ui-design/animation-extract.md +1150 -0
- package/.claude/commands/workflow/ui-design/codify-style.md +652 -0
- package/.claude/commands/workflow/ui-design/design-sync.md +454 -0
- package/.claude/commands/workflow/ui-design/explore-auto.md +678 -0
- package/.claude/commands/workflow/ui-design/generate.md +504 -0
- package/.claude/commands/workflow/ui-design/imitate-auto.md +745 -0
- package/.claude/commands/workflow/ui-design/import-from-code.md +537 -0
- package/.claude/commands/workflow/ui-design/layout-extract.md +788 -0
- package/.claude/commands/workflow/ui-design/reference-page-generator.md +356 -0
- package/.claude/commands/workflow/ui-design/style-extract.md +773 -0
- package/.claude/scripts/classify-folders.sh +35 -0
- package/.claude/scripts/convert_tokens_to_css.sh +225 -0
- package/.claude/scripts/detect_changed_modules.sh +157 -0
- package/.claude/scripts/discover-design-files.sh +83 -0
- package/.claude/scripts/extract-animations.js +243 -0
- package/.claude/scripts/extract-computed-styles.js +118 -0
- package/.claude/scripts/extract-layout-structure.js +411 -0
- package/.claude/scripts/generate_module_docs.sh +713 -0
- package/.claude/scripts/get_modules_by_depth.sh +166 -0
- package/.claude/scripts/ui-generate-preview.sh +391 -0
- package/.claude/scripts/ui-instantiate-prototypes.sh +811 -0
- package/.claude/scripts/update_module_claude.sh +333 -0
- package/.claude/skills/command-guide/SKILL.md +388 -0
- package/.claude/skills/command-guide/UPDATE-GUIDELINE.md +592 -0
- package/.claude/skills/command-guide/guides/cli-tools-guide.md +410 -0
- package/.claude/skills/command-guide/guides/examples.md +537 -0
- package/.claude/skills/command-guide/guides/getting-started.md +242 -0
- package/.claude/skills/command-guide/guides/implementation-details.md +1010 -0
- package/.claude/skills/command-guide/guides/index-structure.md +326 -0
- package/.claude/skills/command-guide/guides/troubleshooting.md +92 -0
- package/.claude/skills/command-guide/guides/ui-design-workflow-guide.md +316 -0
- package/.claude/skills/command-guide/guides/workflow-patterns.md +662 -0
- package/.claude/skills/command-guide/index/all-commands.json +783 -0
- package/.claude/skills/command-guide/index/by-category.json +811 -0
- package/.claude/skills/command-guide/index/by-use-case.json +797 -0
- package/.claude/skills/command-guide/index/command-relationships.json +307 -0
- package/.claude/skills/command-guide/index/essential-commands.json +123 -0
- package/.claude/skills/command-guide/reference/agents/action-planning-agent.md +722 -0
- package/.claude/skills/command-guide/reference/agents/cli-execution-agent.md +270 -0
- package/.claude/skills/command-guide/reference/agents/cli-explore-agent.md +182 -0
- package/.claude/skills/command-guide/reference/agents/cli-lite-planning-agent.md +396 -0
- package/.claude/skills/command-guide/reference/agents/cli-planning-agent.md +558 -0
- package/.claude/skills/command-guide/reference/agents/code-developer.md +310 -0
- package/.claude/skills/command-guide/reference/agents/conceptual-planning-agent.md +328 -0
- package/.claude/skills/command-guide/reference/agents/context-search-agent.md +577 -0
- package/.claude/skills/command-guide/reference/agents/doc-generator.md +330 -0
- package/.claude/skills/command-guide/reference/agents/memory-bridge.md +94 -0
- package/.claude/skills/command-guide/reference/agents/test-context-search-agent.md +399 -0
- package/.claude/skills/command-guide/reference/agents/test-fix-agent.md +343 -0
- package/.claude/skills/command-guide/reference/agents/ui-design-agent.md +593 -0
- package/.claude/skills/command-guide/reference/agents/universal-executor.md +131 -0
- package/.claude/skills/command-guide/reference/commands/cli/cli-init.md +440 -0
- package/.claude/skills/command-guide/reference/commands/enhance-prompt.md +93 -0
- package/.claude/skills/command-guide/reference/commands/memory/code-map-memory.md +687 -0
- package/.claude/skills/command-guide/reference/commands/memory/docs-full-cli.md +471 -0
- package/.claude/skills/command-guide/reference/commands/memory/docs-related-cli.md +386 -0
- package/.claude/skills/command-guide/reference/commands/memory/docs.md +610 -0
- package/.claude/skills/command-guide/reference/commands/memory/load-skill-memory.md +182 -0
- package/.claude/skills/command-guide/reference/commands/memory/load.md +240 -0
- package/.claude/skills/command-guide/reference/commands/memory/skill-memory.md +525 -0
- package/.claude/skills/command-guide/reference/commands/memory/style-skill-memory.md +396 -0
- package/.claude/skills/command-guide/reference/commands/memory/tech-research.md +477 -0
- package/.claude/skills/command-guide/reference/commands/memory/update-full.md +332 -0
- package/.claude/skills/command-guide/reference/commands/memory/update-related.md +332 -0
- package/.claude/skills/command-guide/reference/commands/memory/workflow-skill-memory.md +517 -0
- package/.claude/skills/command-guide/reference/commands/task/breakdown.md +204 -0
- package/.claude/skills/command-guide/reference/commands/task/create.md +152 -0
- package/.claude/skills/command-guide/reference/commands/task/execute.md +270 -0
- package/.claude/skills/command-guide/reference/commands/task/replan.md +437 -0
- package/.claude/skills/command-guide/reference/commands/version.md +254 -0
- package/.claude/skills/command-guide/reference/commands/workflow/action-plan-verify.md +447 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/api-designer.md +585 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/artifacts.md +604 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/auto-parallel.md +466 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/data-architect.md +220 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/product-manager.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/product-owner.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/scrum-master.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/subject-matter-expert.md +200 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/synthesis.md +496 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/system-architect.md +387 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/ui-designer.md +221 -0
- package/.claude/skills/command-guide/reference/commands/workflow/brainstorm/ux-expert.md +221 -0
- package/.claude/skills/command-guide/reference/commands/workflow/execute.md +460 -0
- package/.claude/skills/command-guide/reference/commands/workflow/init.md +164 -0
- package/.claude/skills/command-guide/reference/commands/workflow/lite-execute.md +634 -0
- package/.claude/skills/command-guide/reference/commands/workflow/lite-fix.md +602 -0
- package/.claude/skills/command-guide/reference/commands/workflow/lite-plan.md +582 -0
- package/.claude/skills/command-guide/reference/commands/workflow/plan.md +551 -0
- package/.claude/skills/command-guide/reference/commands/workflow/replan.md +515 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review-fix.md +646 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review-module-cycle.md +795 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review-session-cycle.md +805 -0
- package/.claude/skills/command-guide/reference/commands/workflow/review.md +291 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/complete.md +500 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/list.md +96 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/resume.md +61 -0
- package/.claude/skills/command-guide/reference/commands/workflow/session/start.md +180 -0
- package/.claude/skills/command-guide/reference/commands/workflow/status.md +352 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tdd-plan.md +460 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tdd-verify.md +386 -0
- package/.claude/skills/command-guide/reference/commands/workflow/test-cycle-execute.md +498 -0
- package/.claude/skills/command-guide/reference/commands/workflow/test-fix-gen.md +699 -0
- package/.claude/skills/command-guide/reference/commands/workflow/test-gen.md +529 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/conflict-resolution.md +680 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/context-gather.md +434 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-agent.md +151 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/task-generate-tdd.md +518 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/tdd-coverage-analysis.md +309 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/test-concept-enhanced.md +163 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/test-context-gather.md +235 -0
- package/.claude/skills/command-guide/reference/commands/workflow/tools/test-task-generate.md +256 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/animation-extract.md +1150 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/codify-style.md +652 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/design-sync.md +454 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/explore-auto.md +678 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/generate.md +504 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/imitate-auto.md +745 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/import-from-code.md +537 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/layout-extract.md +788 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/reference-page-generator.md +356 -0
- package/.claude/skills/command-guide/reference/commands/workflow/ui-design/style-extract.md +773 -0
- package/.claude/skills/command-guide/scripts/analyze_commands.py +502 -0
- package/.claude/skills/command-guide/scripts/update-index.sh +130 -0
- package/.claude/skills/command-guide/templates/issue-bug.md +104 -0
- package/.claude/skills/command-guide/templates/issue-diagnosis.md +275 -0
- package/.claude/skills/command-guide/templates/issue-feature.md +97 -0
- package/.claude/skills/command-guide/templates/issue-question.md +141 -0
- package/.claude/skills/prompt-enhancer/SKILL.md +124 -0
- package/.claude/workflows/_template-compare-matrix.html +692 -0
- package/.claude/workflows/cli-templates/fix-plan-template.json +75 -0
- package/.claude/workflows/cli-templates/fix-progress-template.json +48 -0
- package/.claude/workflows/cli-templates/memory/style-skill-memory/skill-md-template.md +299 -0
- package/.claude/workflows/cli-templates/planning-roles/data-architect.md +120 -0
- package/.claude/workflows/cli-templates/planning-roles/product-manager.md +119 -0
- package/.claude/workflows/cli-templates/planning-roles/product-owner.md +261 -0
- package/.claude/workflows/cli-templates/planning-roles/scrum-master.md +186 -0
- package/.claude/workflows/cli-templates/planning-roles/subject-matter-expert.md +281 -0
- package/.claude/workflows/cli-templates/planning-roles/synthesis-role.md +414 -0
- package/.claude/workflows/cli-templates/planning-roles/system-architect.md +106 -0
- package/.claude/workflows/cli-templates/planning-roles/test-strategist.md +124 -0
- package/.claude/workflows/cli-templates/planning-roles/ui-designer.md +379 -0
- package/.claude/workflows/cli-templates/planning-roles/ux-expert.md +240 -0
- package/.claude/workflows/cli-templates/prompts/analysis/01-diagnose-bug-root-cause.txt +127 -0
- package/.claude/workflows/cli-templates/prompts/analysis/01-trace-code-execution.txt +115 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-analyze-code-patterns.txt +37 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-analyze-technical-document.txt +33 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-review-architecture.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/analysis/02-review-code-quality.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/analysis/03-analyze-performance.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/analysis/03-assess-security-risks.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/analysis/03-review-quality-standards.txt +29 -0
- package/.claude/workflows/cli-templates/prompts/development/02-generate-tests.txt +70 -0
- package/.claude/workflows/cli-templates/prompts/development/02-implement-component-ui.txt +55 -0
- package/.claude/workflows/cli-templates/prompts/development/02-implement-feature.txt +58 -0
- package/.claude/workflows/cli-templates/prompts/development/02-refactor-codebase.txt +55 -0
- package/.claude/workflows/cli-templates/prompts/development/03-debug-runtime-issues.txt +55 -0
- package/.claude/workflows/cli-templates/prompts/documentation/api.txt +15 -0
- package/.claude/workflows/cli-templates/prompts/documentation/folder-navigation.txt +27 -0
- package/.claude/workflows/cli-templates/prompts/documentation/module-readme.txt +49 -0
- package/.claude/workflows/cli-templates/prompts/documentation/project-architecture.txt +41 -0
- package/.claude/workflows/cli-templates/prompts/documentation/project-examples.txt +35 -0
- package/.claude/workflows/cli-templates/prompts/documentation/project-readme.txt +35 -0
- package/.claude/workflows/cli-templates/prompts/memory/02-document-module-structure.txt +165 -0
- package/.claude/workflows/cli-templates/prompts/planning/01-plan-architecture-design.txt +109 -0
- package/.claude/workflows/cli-templates/prompts/planning/02-breakdown-task-steps.txt +30 -0
- package/.claude/workflows/cli-templates/prompts/planning/02-design-component-spec.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/planning/03-evaluate-concept-feasibility.txt +127 -0
- package/.claude/workflows/cli-templates/prompts/planning/03-plan-migration-strategy.txt +30 -0
- package/.claude/workflows/cli-templates/prompts/tech/tech-module-format.txt +359 -0
- package/.claude/workflows/cli-templates/prompts/tech/tech-skill-index.txt +185 -0
- package/.claude/workflows/cli-templates/prompts/test/test-concept-analysis.txt +179 -0
- package/.claude/workflows/cli-templates/prompts/universal/00-universal-creative-style.txt +95 -0
- package/.claude/workflows/cli-templates/prompts/universal/00-universal-rigorous-style.txt +92 -0
- package/.claude/workflows/cli-templates/prompts/verification/codex-technical.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/verification/cross-validation.txt +28 -0
- package/.claude/workflows/cli-templates/prompts/verification/gemini-strategic.txt +27 -0
- package/.claude/workflows/cli-templates/prompts/workflow/analysis-results-structure.txt +224 -0
- package/.claude/workflows/cli-templates/prompts/workflow/codex-feasibility-validation.txt +176 -0
- package/.claude/workflows/cli-templates/prompts/workflow/gemini-solution-design.txt +131 -0
- package/.claude/workflows/cli-templates/prompts/workflow/impl-plan-template.txt +286 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-aggregation.txt +172 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-conflict-patterns.txt +98 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-index.txt +224 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-lessons-learned.txt +98 -0
- package/.claude/workflows/cli-templates/prompts/workflow/skill-sessions-timeline.txt +53 -0
- package/.claude/workflows/cli-templates/prompts/workflow/task-json-agent-mode.txt +123 -0
- package/.claude/workflows/cli-templates/prompts/workflow/task-json-cli-mode.txt +182 -0
- package/.claude/workflows/cli-templates/schemas/diagnosis-json-schema.json +234 -0
- package/.claude/workflows/cli-templates/schemas/explore-json-schema.json +124 -0
- package/.claude/workflows/cli-templates/schemas/fix-plan-json-schema.json +273 -0
- package/.claude/workflows/cli-templates/schemas/plan-json-schema.json +219 -0
- package/.claude/workflows/cli-templates/schemas/project-json-schema.json +221 -0
- package/.claude/workflows/cli-templates/schemas/review-deep-dive-results-schema.json +82 -0
- package/.claude/workflows/cli-templates/schemas/review-dimension-results-schema.json +51 -0
- package/.claude/workflows/cli-templates/tech-stacks/go-dev.md +91 -0
- package/.claude/workflows/cli-templates/tech-stacks/java-dev.md +107 -0
- package/.claude/workflows/cli-templates/tech-stacks/javascript-dev.md +58 -0
- package/.claude/workflows/cli-templates/tech-stacks/python-dev.md +79 -0
- package/.claude/workflows/cli-templates/tech-stacks/react-dev.md +103 -0
- package/.claude/workflows/cli-templates/tech-stacks/typescript-dev.md +83 -0
- package/.claude/workflows/cli-templates/ui-design/systems/animation-tokens.json +247 -0
- package/.claude/workflows/cli-templates/ui-design/systems/design-tokens.json +342 -0
- package/.claude/workflows/cli-templates/ui-design/systems/layout-templates.json +145 -0
- package/.claude/workflows/context-search-strategy.md +77 -0
- package/.claude/workflows/intelligent-tools-strategy.md +662 -0
- package/.claude/workflows/review-directory-specification.md +336 -0
- package/.claude/workflows/task-core.md +214 -0
- package/.claude/workflows/tool-strategy.md +71 -0
- package/.claude/workflows/workflow-architecture.md +942 -0
- package/.codex/AGENTS.md +330 -0
- package/.gemini/GEMINI.md +164 -0
- package/.qwen/QWEN.md +164 -0
- package/CLAUDE.md +91 -0
- package/LICENSE +21 -0
- package/README.md +219 -0
- package/ccw/README.md +121 -0
- package/ccw/bin/ccw.js +10 -0
- package/ccw/src/cli.js +100 -0
- package/ccw/src/commands/install.js +324 -0
- package/ccw/src/commands/list.js +37 -0
- package/ccw/src/commands/serve.js +67 -0
- package/ccw/src/commands/uninstall.js +238 -0
- package/ccw/src/commands/upgrade.js +307 -0
- package/ccw/src/commands/view.js +14 -0
- package/ccw/src/core/dashboard-generator-patch.js +29 -0
- package/ccw/src/core/dashboard-generator.js +667 -0
- package/ccw/src/core/data-aggregator.js +409 -0
- package/ccw/src/core/lite-scanner.js +290 -0
- package/ccw/src/core/manifest.js +201 -0
- package/ccw/src/core/server.js +1327 -0
- package/ccw/src/core/server.js.bak +385 -0
- package/ccw/src/core/server_original.bak +385 -0
- package/ccw/src/core/session-scanner.js +235 -0
- package/ccw/src/index.js +9 -0
- package/ccw/src/templates/dashboard-js/api.js +200 -0
- package/ccw/src/templates/dashboard-js/components/_conflict_tab.js +112 -0
- package/ccw/src/templates/dashboard-js/components/_exp_helpers.js +54 -0
- package/ccw/src/templates/dashboard-js/components/_review_tab.js +640 -0
- package/ccw/src/templates/dashboard-js/components/carousel.js +398 -0
- package/ccw/src/templates/dashboard-js/components/flowchart.js +493 -0
- package/ccw/src/templates/dashboard-js/components/hook-manager.js +273 -0
- package/ccw/src/templates/dashboard-js/components/mcp-manager.js +506 -0
- package/ccw/src/templates/dashboard-js/components/modals.js +260 -0
- package/ccw/src/templates/dashboard-js/components/navigation.js +239 -0
- package/ccw/src/templates/dashboard-js/components/notifications.js +194 -0
- package/ccw/src/templates/dashboard-js/components/sidebar.js +31 -0
- package/ccw/src/templates/dashboard-js/components/tabs-context.js +1093 -0
- package/ccw/src/templates/dashboard-js/components/tabs-other.js +273 -0
- package/ccw/src/templates/dashboard-js/components/task-drawer-core.js +477 -0
- package/ccw/src/templates/dashboard-js/components/task-drawer-renderers.js +447 -0
- package/ccw/src/templates/dashboard-js/components/theme.js +21 -0
- package/ccw/src/templates/dashboard-js/main.js +57 -0
- package/ccw/src/templates/dashboard-js/state.js +37 -0
- package/ccw/src/templates/dashboard-js/utils.js +153 -0
- package/ccw/src/templates/dashboard-js/views/fix-session.js +180 -0
- package/ccw/src/templates/dashboard-js/views/home.js +193 -0
- package/ccw/src/templates/dashboard-js/views/hook-manager.js +387 -0
- package/ccw/src/templates/dashboard-js/views/lite-tasks.js +390 -0
- package/ccw/src/templates/dashboard-js/views/mcp-manager.js +271 -0
- package/ccw/src/templates/dashboard-js/views/project-overview.js +246 -0
- package/ccw/src/templates/dashboard-js/views/review-session.js +711 -0
- package/ccw/src/templates/dashboard-js/views/session-detail.js +770 -0
- package/ccw/src/templates/dashboard.css +7660 -0
- package/ccw/src/templates/dashboard.html +630 -0
- package/ccw/src/templates/dashboard_tailwind.html +42 -0
- package/ccw/src/templates/dashboard_test.html +37 -0
- package/ccw/src/templates/review-cycle-dashboard.html +1930 -0
- package/ccw/src/templates/tailwind-base.css +212 -0
- package/ccw/src/templates/workflow-dashboard.html +401 -0
- package/ccw/src/utils/browser-launcher.js +49 -0
- package/ccw/src/utils/file-utils.js +48 -0
- package/ccw/src/utils/path-resolver.js +279 -0
- package/ccw/src/utils/ui.js +148 -0
- package/package.json +66 -0
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
// ==========================================
|
|
2
|
+
// MODAL DIALOGS
|
|
3
|
+
// ==========================================
|
|
4
|
+
|
|
5
|
+
// SVG Icons
|
|
6
|
+
const icons = {
|
|
7
|
+
folder: '<svg viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"></path></svg>',
|
|
8
|
+
check: '<svg viewBox="0 0 24 24"><polyline points="20 6 9 17 4 12"></polyline></svg>',
|
|
9
|
+
copy: '<svg viewBox="0 0 24 24"><rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path></svg>',
|
|
10
|
+
terminal: '<svg viewBox="0 0 24 24"><polyline points="4 17 10 11 4 5"></polyline><line x1="12" y1="19" x2="20" y2="19"></line></svg>'
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
function showPathSelectedModal(dirName, dirHandle) {
|
|
14
|
+
// Try to guess full path based on current project path
|
|
15
|
+
const currentPath = projectPath || '';
|
|
16
|
+
const basePath = currentPath.substring(0, currentPath.lastIndexOf('/')) || 'D:/projects';
|
|
17
|
+
const suggestedPath = basePath + '/' + dirName;
|
|
18
|
+
|
|
19
|
+
const modal = document.createElement('div');
|
|
20
|
+
modal.className = 'path-modal-overlay';
|
|
21
|
+
modal.innerHTML = `
|
|
22
|
+
<div class="path-modal">
|
|
23
|
+
<div class="path-modal-header">
|
|
24
|
+
<span class="path-modal-icon">${icons.folder}</span>
|
|
25
|
+
<h3>Folder Selected</h3>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="path-modal-body">
|
|
28
|
+
<div class="selected-folder">
|
|
29
|
+
<strong>${dirName}</strong>
|
|
30
|
+
</div>
|
|
31
|
+
<p class="path-modal-note">
|
|
32
|
+
Confirm or edit the full path:
|
|
33
|
+
</p>
|
|
34
|
+
<div class="path-input-group" style="margin-top: 12px;">
|
|
35
|
+
<label>Full path:</label>
|
|
36
|
+
<input type="text" id="fullPathInput" value="${suggestedPath}" />
|
|
37
|
+
<button class="path-go-btn" id="pathGoBtn">Open</button>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="path-modal-footer">
|
|
41
|
+
<button class="path-modal-close" id="pathCancelBtn">Cancel</button>
|
|
42
|
+
</div>
|
|
43
|
+
</div>
|
|
44
|
+
`;
|
|
45
|
+
document.body.appendChild(modal);
|
|
46
|
+
|
|
47
|
+
// Add event listeners (use arrow functions to ensure proper scope)
|
|
48
|
+
document.getElementById('pathGoBtn').addEventListener('click', () => {
|
|
49
|
+
console.log('Open button clicked');
|
|
50
|
+
goToPath();
|
|
51
|
+
});
|
|
52
|
+
document.getElementById('pathCancelBtn').addEventListener('click', () => closePathModal());
|
|
53
|
+
|
|
54
|
+
// Focus input, select all text, and add enter key listener
|
|
55
|
+
setTimeout(() => {
|
|
56
|
+
const input = document.getElementById('fullPathInput');
|
|
57
|
+
input?.focus();
|
|
58
|
+
input?.select();
|
|
59
|
+
input?.addEventListener('keypress', (e) => {
|
|
60
|
+
if (e.key === 'Enter') goToPath();
|
|
61
|
+
});
|
|
62
|
+
}, 100);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function showPathInputModal() {
|
|
66
|
+
const modal = document.createElement('div');
|
|
67
|
+
modal.className = 'path-modal-overlay';
|
|
68
|
+
modal.innerHTML = `
|
|
69
|
+
<div class="path-modal">
|
|
70
|
+
<div class="path-modal-header">
|
|
71
|
+
<span class="path-modal-icon">${icons.folder}</span>
|
|
72
|
+
<h3>Open Project</h3>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="path-modal-body">
|
|
75
|
+
<div class="path-input-group" style="margin-top: 0;">
|
|
76
|
+
<label>Project path:</label>
|
|
77
|
+
<input type="text" id="fullPathInput" placeholder="D:/projects/my-project" />
|
|
78
|
+
<button class="path-go-btn" id="pathGoBtn">Open</button>
|
|
79
|
+
</div>
|
|
80
|
+
</div>
|
|
81
|
+
<div class="path-modal-footer">
|
|
82
|
+
<button class="path-modal-close" id="pathCancelBtn">Cancel</button>
|
|
83
|
+
</div>
|
|
84
|
+
</div>
|
|
85
|
+
`;
|
|
86
|
+
document.body.appendChild(modal);
|
|
87
|
+
|
|
88
|
+
// Add event listeners (use arrow functions to ensure proper scope)
|
|
89
|
+
document.getElementById('pathGoBtn').addEventListener('click', () => {
|
|
90
|
+
console.log('Open button clicked');
|
|
91
|
+
goToPath();
|
|
92
|
+
});
|
|
93
|
+
document.getElementById('pathCancelBtn').addEventListener('click', () => closePathModal());
|
|
94
|
+
|
|
95
|
+
// Focus input and add enter key listener
|
|
96
|
+
setTimeout(() => {
|
|
97
|
+
const input = document.getElementById('fullPathInput');
|
|
98
|
+
input?.focus();
|
|
99
|
+
input?.addEventListener('keypress', (e) => {
|
|
100
|
+
if (e.key === 'Enter') goToPath();
|
|
101
|
+
});
|
|
102
|
+
}, 100);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function goToPath() {
|
|
106
|
+
const input = document.getElementById('fullPathInput');
|
|
107
|
+
const path = input?.value?.trim();
|
|
108
|
+
if (path) {
|
|
109
|
+
closePathModal();
|
|
110
|
+
selectPath(path);
|
|
111
|
+
} else {
|
|
112
|
+
// Show error - input is empty
|
|
113
|
+
input.style.borderColor = 'var(--danger-color)';
|
|
114
|
+
input.placeholder = 'Please enter a path';
|
|
115
|
+
input.focus();
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function closePathModal() {
|
|
120
|
+
const modal = document.querySelector('.path-modal-overlay');
|
|
121
|
+
if (modal) {
|
|
122
|
+
modal.remove();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function copyCommand(btn, dirName) {
|
|
127
|
+
const input = document.getElementById('fullPathInput');
|
|
128
|
+
const path = input?.value?.trim() || `[full-path-to-${dirName}]`;
|
|
129
|
+
const command = `ccw view -p "${path}"`;
|
|
130
|
+
navigator.clipboard.writeText(command).then(() => {
|
|
131
|
+
btn.innerHTML = icons.check + ' <span>Copied!</span>';
|
|
132
|
+
setTimeout(() => { btn.innerHTML = icons.copy + ' <span>Copy</span>'; }, 2000);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
function showJsonModal(jsonId, taskId) {
|
|
137
|
+
// Get JSON from memory store instead of DOM
|
|
138
|
+
const rawTask = taskJsonStore[jsonId];
|
|
139
|
+
if (!rawTask) return;
|
|
140
|
+
|
|
141
|
+
const jsonContent = JSON.stringify(rawTask, null, 2);
|
|
142
|
+
|
|
143
|
+
// Create modal
|
|
144
|
+
const overlay = document.createElement('div');
|
|
145
|
+
overlay.className = 'json-modal-overlay';
|
|
146
|
+
overlay.innerHTML = `
|
|
147
|
+
<div class="json-modal">
|
|
148
|
+
<div class="json-modal-header">
|
|
149
|
+
<div class="json-modal-title">
|
|
150
|
+
<span class="task-id-badge">${escapeHtml(taskId)}</span>
|
|
151
|
+
<span>Task JSON</span>
|
|
152
|
+
</div>
|
|
153
|
+
<button class="json-modal-close" onclick="closeJsonModal(this)">×</button>
|
|
154
|
+
</div>
|
|
155
|
+
<div class="json-modal-body">
|
|
156
|
+
<pre class="json-modal-content">${escapeHtml(jsonContent)}</pre>
|
|
157
|
+
</div>
|
|
158
|
+
<div class="json-modal-footer">
|
|
159
|
+
<button class="btn-copy-json" onclick="copyJsonToClipboard(this)">Copy JSON</button>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
`;
|
|
163
|
+
|
|
164
|
+
document.body.appendChild(overlay);
|
|
165
|
+
|
|
166
|
+
// Trigger animation
|
|
167
|
+
requestAnimationFrame(() => overlay.classList.add('active'));
|
|
168
|
+
|
|
169
|
+
// Close on overlay click
|
|
170
|
+
overlay.addEventListener('click', (e) => {
|
|
171
|
+
if (e.target === overlay) closeJsonModal(overlay.querySelector('.json-modal-close'));
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
// Close on Escape key
|
|
175
|
+
const escHandler = (e) => {
|
|
176
|
+
if (e.key === 'Escape') {
|
|
177
|
+
closeJsonModal(overlay.querySelector('.json-modal-close'));
|
|
178
|
+
document.removeEventListener('keydown', escHandler);
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
document.addEventListener('keydown', escHandler);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function closeJsonModal(btn) {
|
|
185
|
+
const overlay = btn.closest('.json-modal-overlay');
|
|
186
|
+
overlay.classList.remove('active');
|
|
187
|
+
setTimeout(() => overlay.remove(), 200);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
function copyJsonToClipboard(btn) {
|
|
191
|
+
const content = btn.closest('.json-modal').querySelector('.json-modal-content').textContent;
|
|
192
|
+
navigator.clipboard.writeText(content).then(() => {
|
|
193
|
+
const original = btn.textContent;
|
|
194
|
+
btn.textContent = 'Copied!';
|
|
195
|
+
setTimeout(() => btn.textContent = original, 2000);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function openMarkdownModal(title, content, type = 'markdown') {
|
|
200
|
+
const modal = document.getElementById('markdownModal');
|
|
201
|
+
const titleEl = document.getElementById('markdownModalTitle');
|
|
202
|
+
const rawEl = document.getElementById('markdownRaw');
|
|
203
|
+
const previewEl = document.getElementById('markdownPreview');
|
|
204
|
+
|
|
205
|
+
// Normalize line endings
|
|
206
|
+
const normalizedContent = normalizeLineEndings(content);
|
|
207
|
+
|
|
208
|
+
titleEl.textContent = title;
|
|
209
|
+
rawEl.textContent = normalizedContent;
|
|
210
|
+
|
|
211
|
+
// Render preview based on type
|
|
212
|
+
if (typeof marked !== 'undefined' && type === 'markdown') {
|
|
213
|
+
previewEl.innerHTML = marked.parse(normalizedContent);
|
|
214
|
+
} else if (type === 'json') {
|
|
215
|
+
// For JSON, try to parse and re-stringify with formatting
|
|
216
|
+
try {
|
|
217
|
+
const parsed = typeof normalizedContent === 'string' ? JSON.parse(normalizedContent) : normalizedContent;
|
|
218
|
+
const formatted = JSON.stringify(parsed, null, 2);
|
|
219
|
+
previewEl.innerHTML = '<pre class="whitespace-pre-wrap language-json">' + escapeHtml(formatted) + '</pre>';
|
|
220
|
+
} catch (e) {
|
|
221
|
+
// If not valid JSON, show as-is
|
|
222
|
+
previewEl.innerHTML = '<pre class="whitespace-pre-wrap">' + escapeHtml(normalizedContent) + '</pre>';
|
|
223
|
+
}
|
|
224
|
+
} else {
|
|
225
|
+
// Fallback: simple text with line breaks
|
|
226
|
+
previewEl.innerHTML = '<pre class="whitespace-pre-wrap">' + escapeHtml(normalizedContent) + '</pre>';
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
// Show modal and default to preview tab
|
|
230
|
+
modal.classList.remove('hidden');
|
|
231
|
+
switchMarkdownTab('preview');
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
function closeMarkdownModal() {
|
|
235
|
+
const modal = document.getElementById('markdownModal');
|
|
236
|
+
modal.classList.add('hidden');
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
function switchMarkdownTab(tab) {
|
|
240
|
+
const rawEl = document.getElementById('markdownRaw');
|
|
241
|
+
const previewEl = document.getElementById('markdownPreview');
|
|
242
|
+
const rawTabBtn = document.getElementById('mdTabRaw');
|
|
243
|
+
const previewTabBtn = document.getElementById('mdTabPreview');
|
|
244
|
+
|
|
245
|
+
if (tab === 'raw') {
|
|
246
|
+
rawEl.classList.remove('hidden');
|
|
247
|
+
previewEl.classList.add('hidden');
|
|
248
|
+
rawTabBtn.classList.add('active', 'bg-background', 'text-foreground');
|
|
249
|
+
rawTabBtn.classList.remove('text-muted-foreground');
|
|
250
|
+
previewTabBtn.classList.remove('active', 'bg-background', 'text-foreground');
|
|
251
|
+
previewTabBtn.classList.add('text-muted-foreground');
|
|
252
|
+
} else {
|
|
253
|
+
rawEl.classList.add('hidden');
|
|
254
|
+
previewEl.classList.remove('hidden');
|
|
255
|
+
previewTabBtn.classList.add('active', 'bg-background', 'text-foreground');
|
|
256
|
+
previewTabBtn.classList.remove('text-muted-foreground');
|
|
257
|
+
rawTabBtn.classList.remove('active', 'bg-background', 'text-foreground');
|
|
258
|
+
rawTabBtn.classList.add('text-muted-foreground');
|
|
259
|
+
}
|
|
260
|
+
}
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
// Navigation and Routing
|
|
2
|
+
// Manages navigation events, active state, content title updates, search, and path selector
|
|
3
|
+
|
|
4
|
+
// Path Selector
|
|
5
|
+
function initPathSelector() {
|
|
6
|
+
const btn = document.getElementById('pathButton');
|
|
7
|
+
const menu = document.getElementById('pathMenu');
|
|
8
|
+
const recentContainer = document.getElementById('recentPaths');
|
|
9
|
+
|
|
10
|
+
// Render recent paths
|
|
11
|
+
if (recentPaths && recentPaths.length > 0) {
|
|
12
|
+
recentPaths.forEach(path => {
|
|
13
|
+
const item = document.createElement('div');
|
|
14
|
+
item.className = 'path-item' + (path === projectPath ? ' active' : '');
|
|
15
|
+
item.dataset.path = path;
|
|
16
|
+
|
|
17
|
+
// Path text
|
|
18
|
+
const pathText = document.createElement('span');
|
|
19
|
+
pathText.className = 'path-text';
|
|
20
|
+
pathText.textContent = path;
|
|
21
|
+
pathText.addEventListener('click', () => selectPath(path));
|
|
22
|
+
item.appendChild(pathText);
|
|
23
|
+
|
|
24
|
+
// Delete button (only for non-current paths)
|
|
25
|
+
if (path !== projectPath) {
|
|
26
|
+
const deleteBtn = document.createElement('button');
|
|
27
|
+
deleteBtn.className = 'path-delete-btn';
|
|
28
|
+
deleteBtn.innerHTML = '×';
|
|
29
|
+
deleteBtn.title = 'Remove from recent';
|
|
30
|
+
deleteBtn.addEventListener('click', async (e) => {
|
|
31
|
+
e.stopPropagation();
|
|
32
|
+
await removeRecentPathFromList(path);
|
|
33
|
+
});
|
|
34
|
+
item.appendChild(deleteBtn);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
recentContainer.appendChild(item);
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
btn.addEventListener('click', (e) => {
|
|
42
|
+
e.stopPropagation();
|
|
43
|
+
menu.classList.toggle('hidden');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
document.addEventListener('click', () => {
|
|
47
|
+
menu.classList.add('hidden');
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
document.getElementById('browsePath').addEventListener('click', async () => {
|
|
51
|
+
await browseForFolder();
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// Navigation
|
|
56
|
+
function initNavigation() {
|
|
57
|
+
document.querySelectorAll('.nav-item[data-filter]').forEach(item => {
|
|
58
|
+
item.addEventListener('click', () => {
|
|
59
|
+
setActiveNavItem(item);
|
|
60
|
+
currentFilter = item.dataset.filter;
|
|
61
|
+
currentLiteType = null;
|
|
62
|
+
currentView = 'sessions';
|
|
63
|
+
currentSessionDetailKey = null;
|
|
64
|
+
updateContentTitle();
|
|
65
|
+
showStatsAndSearch();
|
|
66
|
+
renderSessions();
|
|
67
|
+
});
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// Lite Tasks Navigation
|
|
71
|
+
document.querySelectorAll('.nav-item[data-lite]').forEach(item => {
|
|
72
|
+
item.addEventListener('click', () => {
|
|
73
|
+
setActiveNavItem(item);
|
|
74
|
+
currentLiteType = item.dataset.lite;
|
|
75
|
+
currentFilter = null;
|
|
76
|
+
currentView = 'liteTasks';
|
|
77
|
+
currentSessionDetailKey = null;
|
|
78
|
+
updateContentTitle();
|
|
79
|
+
showStatsAndSearch();
|
|
80
|
+
renderLiteTasks();
|
|
81
|
+
});
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
// View Navigation (Project Overview, MCP Manager, etc.)
|
|
85
|
+
document.querySelectorAll('.nav-item[data-view]').forEach(item => {
|
|
86
|
+
item.addEventListener('click', () => {
|
|
87
|
+
setActiveNavItem(item);
|
|
88
|
+
currentView = item.dataset.view;
|
|
89
|
+
currentFilter = null;
|
|
90
|
+
currentLiteType = null;
|
|
91
|
+
currentSessionDetailKey = null;
|
|
92
|
+
updateContentTitle();
|
|
93
|
+
|
|
94
|
+
// Route to appropriate view
|
|
95
|
+
if (currentView === 'mcp-manager') {
|
|
96
|
+
renderMcpManager();
|
|
97
|
+
} else if (currentView === 'project-overview') {
|
|
98
|
+
renderProjectOverview();
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function setActiveNavItem(item) {
|
|
105
|
+
document.querySelectorAll('.nav-item').forEach(i => i.classList.remove('active'));
|
|
106
|
+
item.classList.add('active');
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function updateContentTitle() {
|
|
110
|
+
const titleEl = document.getElementById('contentTitle');
|
|
111
|
+
if (currentView === 'project-overview') {
|
|
112
|
+
titleEl.textContent = 'Project Overview';
|
|
113
|
+
} else if (currentView === 'mcp-manager') {
|
|
114
|
+
titleEl.textContent = 'MCP Server Management';
|
|
115
|
+
} else if (currentView === 'liteTasks') {
|
|
116
|
+
const names = { 'lite-plan': 'Lite Plan Sessions', 'lite-fix': 'Lite Fix Sessions' };
|
|
117
|
+
titleEl.textContent = names[currentLiteType] || 'Lite Tasks';
|
|
118
|
+
} else if (currentView === 'sessionDetail') {
|
|
119
|
+
titleEl.textContent = 'Session Detail';
|
|
120
|
+
} else if (currentView === 'liteTaskDetail') {
|
|
121
|
+
titleEl.textContent = 'Lite Task Detail';
|
|
122
|
+
} else {
|
|
123
|
+
const names = { 'all': 'All Sessions', 'active': 'Active Sessions', 'archived': 'Archived Sessions' };
|
|
124
|
+
titleEl.textContent = names[currentFilter] || 'Sessions';
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Search
|
|
129
|
+
function initSearch() {
|
|
130
|
+
const input = document.getElementById('searchInput');
|
|
131
|
+
input.addEventListener('input', (e) => {
|
|
132
|
+
const query = e.target.value.toLowerCase();
|
|
133
|
+
document.querySelectorAll('.session-card').forEach(card => {
|
|
134
|
+
const text = card.textContent.toLowerCase();
|
|
135
|
+
card.style.display = text.includes(query) ? '' : 'none';
|
|
136
|
+
});
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
// Refresh Workspace
|
|
141
|
+
function initRefreshButton() {
|
|
142
|
+
const btn = document.getElementById('refreshWorkspace');
|
|
143
|
+
if (btn) {
|
|
144
|
+
btn.addEventListener('click', refreshWorkspace);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
async function refreshWorkspace() {
|
|
149
|
+
const btn = document.getElementById('refreshWorkspace');
|
|
150
|
+
|
|
151
|
+
// Add spinning animation
|
|
152
|
+
btn.classList.add('refreshing');
|
|
153
|
+
btn.disabled = true;
|
|
154
|
+
|
|
155
|
+
try {
|
|
156
|
+
if (window.SERVER_MODE) {
|
|
157
|
+
// Reload data from server
|
|
158
|
+
const data = await loadDashboardData(projectPath);
|
|
159
|
+
if (data) {
|
|
160
|
+
// Update stores
|
|
161
|
+
sessionDataStore = {};
|
|
162
|
+
liteTaskDataStore = {};
|
|
163
|
+
|
|
164
|
+
// Populate stores
|
|
165
|
+
[...(data.activeSessions || []), ...(data.archivedSessions || [])].forEach(s => {
|
|
166
|
+
sessionDataStore[s.session_id] = s;
|
|
167
|
+
});
|
|
168
|
+
|
|
169
|
+
[...(data.liteTasks?.litePlan || []), ...(data.liteTasks?.liteFix || [])].forEach(s => {
|
|
170
|
+
liteTaskDataStore[s.session_id] = s;
|
|
171
|
+
});
|
|
172
|
+
|
|
173
|
+
// Update global data
|
|
174
|
+
window.workflowData = data;
|
|
175
|
+
|
|
176
|
+
// Update sidebar counts
|
|
177
|
+
updateSidebarCounts(data);
|
|
178
|
+
|
|
179
|
+
// Re-render current view
|
|
180
|
+
if (currentView === 'sessions') {
|
|
181
|
+
renderSessions();
|
|
182
|
+
} else if (currentView === 'liteTasks') {
|
|
183
|
+
renderLiteTasks();
|
|
184
|
+
} else if (currentView === 'sessionDetail' && currentSessionDetailKey) {
|
|
185
|
+
showSessionDetailPage(currentSessionDetailKey);
|
|
186
|
+
} else if (currentView === 'liteTaskDetail' && currentSessionDetailKey) {
|
|
187
|
+
showLiteTaskDetailPage(currentSessionDetailKey);
|
|
188
|
+
} else if (currentView === 'project-overview') {
|
|
189
|
+
renderProjectOverview();
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
showRefreshToast('Workspace refreshed', 'success');
|
|
193
|
+
}
|
|
194
|
+
} else {
|
|
195
|
+
// Non-server mode: just reload page
|
|
196
|
+
window.location.reload();
|
|
197
|
+
}
|
|
198
|
+
} catch (error) {
|
|
199
|
+
console.error('Refresh failed:', error);
|
|
200
|
+
showRefreshToast('Refresh failed: ' + error.message, 'error');
|
|
201
|
+
} finally {
|
|
202
|
+
btn.classList.remove('refreshing');
|
|
203
|
+
btn.disabled = false;
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
function updateSidebarCounts(data) {
|
|
208
|
+
// Update session counts
|
|
209
|
+
const activeCount = document.querySelector('.nav-item[data-filter="active"] .nav-count');
|
|
210
|
+
const archivedCount = document.querySelector('.nav-item[data-filter="archived"] .nav-count');
|
|
211
|
+
const allCount = document.querySelector('.nav-item[data-filter="all"] .nav-count');
|
|
212
|
+
|
|
213
|
+
if (activeCount) activeCount.textContent = data.activeSessions?.length || 0;
|
|
214
|
+
if (archivedCount) archivedCount.textContent = data.archivedSessions?.length || 0;
|
|
215
|
+
if (allCount) allCount.textContent = (data.activeSessions?.length || 0) + (data.archivedSessions?.length || 0);
|
|
216
|
+
|
|
217
|
+
// Update lite task counts
|
|
218
|
+
const litePlanCount = document.querySelector('.nav-item[data-lite="lite-plan"] .nav-count');
|
|
219
|
+
const liteFixCount = document.querySelector('.nav-item[data-lite="lite-fix"] .nav-count');
|
|
220
|
+
|
|
221
|
+
if (litePlanCount) litePlanCount.textContent = data.liteTasks?.litePlan?.length || 0;
|
|
222
|
+
if (liteFixCount) liteFixCount.textContent = data.liteTasks?.liteFix?.length || 0;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
function showRefreshToast(message, type) {
|
|
226
|
+
// Remove existing toast
|
|
227
|
+
const existing = document.querySelector('.status-toast');
|
|
228
|
+
if (existing) existing.remove();
|
|
229
|
+
|
|
230
|
+
const toast = document.createElement('div');
|
|
231
|
+
toast.className = `status-toast ${type}`;
|
|
232
|
+
toast.textContent = message;
|
|
233
|
+
document.body.appendChild(toast);
|
|
234
|
+
|
|
235
|
+
setTimeout(() => {
|
|
236
|
+
toast.classList.add('fade-out');
|
|
237
|
+
setTimeout(() => toast.remove(), 300);
|
|
238
|
+
}, 2000);
|
|
239
|
+
}
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
// ==========================================
|
|
2
|
+
// NOTIFICATIONS COMPONENT
|
|
3
|
+
// ==========================================
|
|
4
|
+
// Real-time silent refresh (no notification bubbles)
|
|
5
|
+
|
|
6
|
+
let wsConnection = null;
|
|
7
|
+
let autoRefreshInterval = null;
|
|
8
|
+
let lastDataHash = null;
|
|
9
|
+
const AUTO_REFRESH_INTERVAL_MS = 30000; // 30 seconds
|
|
10
|
+
|
|
11
|
+
// ========== WebSocket Connection ==========
|
|
12
|
+
function initWebSocket() {
|
|
13
|
+
const protocol = window.location.protocol === 'https:' ? 'wss:' : 'ws:';
|
|
14
|
+
const wsUrl = `${protocol}//${window.location.host}/ws`;
|
|
15
|
+
|
|
16
|
+
try {
|
|
17
|
+
wsConnection = new WebSocket(wsUrl);
|
|
18
|
+
|
|
19
|
+
wsConnection.onopen = () => {
|
|
20
|
+
console.log('[WS] Connected');
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
wsConnection.onmessage = (event) => {
|
|
24
|
+
try {
|
|
25
|
+
const data = JSON.parse(event.data);
|
|
26
|
+
handleNotification(data);
|
|
27
|
+
} catch (e) {
|
|
28
|
+
console.error('[WS] Failed to parse message:', e);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
wsConnection.onclose = () => {
|
|
33
|
+
console.log('[WS] Disconnected, reconnecting in 5s...');
|
|
34
|
+
setTimeout(initWebSocket, 5000);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
wsConnection.onerror = (error) => {
|
|
38
|
+
console.error('[WS] Error:', error);
|
|
39
|
+
};
|
|
40
|
+
} catch (e) {
|
|
41
|
+
console.log('[WS] WebSocket not available, using polling');
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// ========== Notification Handler ==========
|
|
46
|
+
function handleNotification(data) {
|
|
47
|
+
const { type, payload } = data;
|
|
48
|
+
|
|
49
|
+
// Silent refresh - no notification bubbles
|
|
50
|
+
switch (type) {
|
|
51
|
+
case 'session_updated':
|
|
52
|
+
case 'summary_written':
|
|
53
|
+
case 'task_completed':
|
|
54
|
+
case 'new_session':
|
|
55
|
+
// Just refresh data silently
|
|
56
|
+
refreshIfNeeded();
|
|
57
|
+
// Optionally highlight in carousel if it's the current session
|
|
58
|
+
if (payload.sessionId && typeof carouselGoTo === 'function') {
|
|
59
|
+
carouselGoTo(payload.sessionId);
|
|
60
|
+
}
|
|
61
|
+
break;
|
|
62
|
+
|
|
63
|
+
default:
|
|
64
|
+
console.log('[WS] Unknown notification type:', type);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// ========== Auto Refresh ==========
|
|
69
|
+
function initAutoRefresh() {
|
|
70
|
+
// Calculate initial hash
|
|
71
|
+
lastDataHash = calculateDataHash();
|
|
72
|
+
|
|
73
|
+
// Start polling interval
|
|
74
|
+
autoRefreshInterval = setInterval(checkForChanges, AUTO_REFRESH_INTERVAL_MS);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function calculateDataHash() {
|
|
78
|
+
if (!workflowData) return null;
|
|
79
|
+
|
|
80
|
+
// Simple hash based on key data points
|
|
81
|
+
const hashData = {
|
|
82
|
+
activeSessions: (workflowData.activeSessions || []).length,
|
|
83
|
+
archivedSessions: (workflowData.archivedSessions || []).length,
|
|
84
|
+
totalTasks: workflowData.statistics?.totalTasks || 0,
|
|
85
|
+
completedTasks: workflowData.statistics?.completedTasks || 0,
|
|
86
|
+
generatedAt: workflowData.generatedAt
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return JSON.stringify(hashData);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
async function checkForChanges() {
|
|
93
|
+
if (!window.SERVER_MODE) return;
|
|
94
|
+
|
|
95
|
+
try {
|
|
96
|
+
const response = await fetch(`/api/data?path=${encodeURIComponent(projectPath)}`);
|
|
97
|
+
if (!response.ok) return;
|
|
98
|
+
|
|
99
|
+
const newData = await response.json();
|
|
100
|
+
const newHash = JSON.stringify({
|
|
101
|
+
activeSessions: (newData.activeSessions || []).length,
|
|
102
|
+
archivedSessions: (newData.archivedSessions || []).length,
|
|
103
|
+
totalTasks: newData.statistics?.totalTasks || 0,
|
|
104
|
+
completedTasks: newData.statistics?.completedTasks || 0,
|
|
105
|
+
generatedAt: newData.generatedAt
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
if (newHash !== lastDataHash) {
|
|
109
|
+
lastDataHash = newHash;
|
|
110
|
+
// Silent refresh - no notification
|
|
111
|
+
await refreshWorkspaceData(newData);
|
|
112
|
+
}
|
|
113
|
+
} catch (e) {
|
|
114
|
+
console.error('[AutoRefresh] Check failed:', e);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
async function refreshIfNeeded() {
|
|
119
|
+
if (!window.SERVER_MODE) return;
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
const response = await fetch(`/api/data?path=${encodeURIComponent(projectPath)}`);
|
|
123
|
+
if (!response.ok) return;
|
|
124
|
+
|
|
125
|
+
const newData = await response.json();
|
|
126
|
+
await refreshWorkspaceData(newData);
|
|
127
|
+
} catch (e) {
|
|
128
|
+
console.error('[Refresh] Failed:', e);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
async function refreshWorkspaceData(newData) {
|
|
133
|
+
// Update global data
|
|
134
|
+
window.workflowData = newData;
|
|
135
|
+
|
|
136
|
+
// Clear and repopulate stores
|
|
137
|
+
Object.keys(sessionDataStore).forEach(k => delete sessionDataStore[k]);
|
|
138
|
+
Object.keys(liteTaskDataStore).forEach(k => delete liteTaskDataStore[k]);
|
|
139
|
+
|
|
140
|
+
[...(newData.activeSessions || []), ...(newData.archivedSessions || [])].forEach(s => {
|
|
141
|
+
const key = `session-${s.session_id}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
142
|
+
sessionDataStore[key] = s;
|
|
143
|
+
});
|
|
144
|
+
|
|
145
|
+
[...(newData.liteTasks?.litePlan || []), ...(newData.liteTasks?.liteFix || [])].forEach(s => {
|
|
146
|
+
const key = `lite-${s.session_id}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
147
|
+
liteTaskDataStore[key] = s;
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// Update UI silently
|
|
151
|
+
updateStats();
|
|
152
|
+
updateBadges();
|
|
153
|
+
updateCarousel();
|
|
154
|
+
|
|
155
|
+
// Re-render current view if needed
|
|
156
|
+
if (currentView === 'sessions') {
|
|
157
|
+
renderSessions();
|
|
158
|
+
} else if (currentView === 'liteTasks') {
|
|
159
|
+
renderLiteTasks();
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
lastDataHash = calculateDataHash();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// ========== Cleanup ==========
|
|
166
|
+
function stopAutoRefresh() {
|
|
167
|
+
if (autoRefreshInterval) {
|
|
168
|
+
clearInterval(autoRefreshInterval);
|
|
169
|
+
autoRefreshInterval = null;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
function closeWebSocket() {
|
|
174
|
+
if (wsConnection) {
|
|
175
|
+
wsConnection.close();
|
|
176
|
+
wsConnection = null;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// ========== Navigation Helper ==========
|
|
181
|
+
function goToSession(sessionId) {
|
|
182
|
+
// Find session in carousel and navigate
|
|
183
|
+
const sessionKey = `session-${sessionId}`.replace(/[^a-zA-Z0-9-]/g, '-');
|
|
184
|
+
|
|
185
|
+
// Jump to session in carousel if visible
|
|
186
|
+
if (typeof carouselGoTo === 'function') {
|
|
187
|
+
carouselGoTo(sessionId);
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// Navigate to session detail
|
|
191
|
+
if (sessionDataStore[sessionKey]) {
|
|
192
|
+
showSessionDetailPage(sessionKey);
|
|
193
|
+
}
|
|
194
|
+
}
|