@shepai/cli 1.84.0 → 1.85.0-pr167.13dcff5
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/apis/json-schema/Attachment.yaml +31 -0
- package/apis/json-schema/Feature.yaml +5 -0
- package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts +2 -1
- package/dist/packages/core/src/application/ports/output/services/worktree-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.d.ts +22 -0
- package/dist/packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/features/cleanup-feature-worktree.use-case.js +76 -0
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts +3 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/create/create-feature.use-case.js +35 -3
- package/dist/packages/core/src/application/use-cases/features/create/types.d.ts +7 -1
- package/dist/packages/core/src/application/use-cases/features/create/types.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts +7 -2
- package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/features/delete-feature.use-case.js +29 -15
- package/dist/packages/core/src/domain/generated/output.d.ts +33 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +8 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/feature.mapper.js +4 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations.js +16 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/feature-agent-worker.js +3 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts +2 -0
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/feature-agent/nodes/merge/merge.node.js +3 -0
- package/dist/packages/core/src/infrastructure/services/attachment-storage.service.d.ts +31 -0
- package/dist/packages/core/src/infrastructure/services/attachment-storage.service.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/attachment-storage.service.js +136 -0
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/worktree.service.js +6 -2
- package/dist/src/presentation/cli/commands/feat/del.command.d.ts +3 -1
- package/dist/src/presentation/cli/commands/feat/del.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/del.command.js +19 -2
- package/dist/src/presentation/cli/commands/feat/new.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/feat/new.command.js +21 -1
- package/dist/src/presentation/web/app/actions/compose-user-input.d.ts +7 -0
- package/dist/src/presentation/web/app/actions/compose-user-input.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/compose-user-input.js +7 -0
- package/dist/src/presentation/web/app/actions/create-feature.d.ts +1 -0
- package/dist/src/presentation/web/app/actions/create-feature.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/create-feature.js +3 -9
- package/dist/src/presentation/web/app/actions/delete-feature.d.ts +1 -1
- package/dist/src/presentation/web/app/actions/delete-feature.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/delete-feature.js +4 -2
- package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts +4 -0
- package/dist/src/presentation/web/app/api/attachments/preview/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/attachments/preview/route.js +47 -0
- package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts +3 -0
- package/dist/src/presentation/web/app/api/attachments/upload/route.d.ts.map +1 -0
- package/dist/src/presentation/web/app/api/attachments/upload/route.js +100 -0
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts +16 -0
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.js +53 -0
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts +12 -0
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/attachment-card/attachment-card.stories.js +55 -0
- package/dist/src/presentation/web/components/common/attachment-card/index.d.ts +3 -0
- package/dist/src/presentation/web/components/common/attachment-card/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/attachment-card/index.js +1 -0
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts +11 -0
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.js +34 -0
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts +10 -0
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/attachment-chip/attachment-chip.stories.js +44 -0
- package/dist/src/presentation/web/components/common/attachment-chip/index.d.ts +3 -0
- package/dist/src/presentation/web/components/common/attachment-chip/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/attachment-chip/index.js +1 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +5 -4
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.d.ts +9 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog-config.js +1 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts +3 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.js +16 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts +8 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/delete-feature-dialog.stories.js +25 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/index.d.ts +3 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/index.d.ts.map +1 -0
- package/dist/src/presentation/web/components/common/delete-feature-dialog/index.js +1 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts +11 -2
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js +199 -60
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts +6 -0
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.js +18 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.js +5 -7
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts +1 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +2 -2
- package/dist/src/presentation/web/components/ui/dialog.js +1 -1
- package/dist/src/presentation/web/lib/derive-graph.d.ts +1 -1
- package/dist/src/presentation/web/lib/derive-graph.d.ts.map +1 -1
- package/dist/src/presentation/web/next.config.d.ts.map +1 -1
- package/dist/src/presentation/web/next.config.js +6 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/app-path-routes-manifest.json +2 -0
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +4 -1
- package/web/.next/required-server-files.json +4 -1
- package/web/.next/routes-manifest.json +12 -0
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +18 -18
- package/web/.next/server/app/(dashboard)/create/page.js +2 -2
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/page.js +2 -2
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +14 -14
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page.js +2 -2
- package/web/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/web/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page.js +2 -2
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/attachments/preview/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/attachments/preview/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/attachments/preview/route.js +7 -0
- package/web/.next/server/app/api/attachments/preview/route.js.map +5 -0
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -0
- package/web/.next/server/app/api/attachments/preview/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/attachments/upload/route/app-paths-manifest.json +3 -0
- package/web/.next/server/app/api/attachments/upload/route/build-manifest.json +11 -0
- package/web/.next/server/app/api/attachments/upload/route/server-reference-manifest.json +4 -0
- package/web/.next/server/app/api/attachments/upload/route.js +7 -0
- package/web/.next/server/app/api/attachments/upload/route.js.map +5 -0
- package/web/.next/server/app/api/attachments/upload/route.js.nft.json +1 -0
- package/web/.next/server/app/api/attachments/upload/route_client-reference-manifest.js +2 -0
- package/web/.next/server/app/api/feature-logs/route.js +1 -1
- package/web/.next/server/app/api/feature-logs/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/settings/page.js +2 -2
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page.js +2 -2
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page.js +2 -2
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/version/page.js +2 -2
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app-paths-manifest.json +2 -0
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js +3 -0
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_preview_route_actions_0f48c3e9.js.map +1 -0
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_upload_route_actions_48fe4a8f.js +3 -0
- package/web/.next/server/chunks/744ca_web__next-internal_server_app_api_attachments_upload_route_actions_48fe4a8f.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__0b10355c._.js.map +1 -0
- package/web/.next/server/chunks/{[root-of-the-server]__91d44424._.js → [root-of-the-server]__52c318d1._.js} +2 -2
- package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js +3 -0
- package/web/.next/server/chunks/[root-of-the-server]__b2f9a412._.js.map +1 -0
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js +1 -1
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_create-drawer-client_tsx_5e26fc0a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js +3 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js.map +1 -0
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_da7eef33.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_0a9251aa.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__11033878._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__17143953._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__357d99f9._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__4be9a9bb._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5d87af2e._.js +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__3534949f._.js → [root-of-the-server]__8d9536c4._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9de266fa._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b14946f5._.js +10 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__c3694f82._.js.map → [root-of-the-server]__b14946f5._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b3a4cef4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b65f78cf._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__55f60c9d._.js.map → [root-of-the-server]__b65f78cf._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__ad2b2a3c._.js → [root-of-the-server]__f1a05100._.js} +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f8210f45._.js +3 -0
- package/web/.next/server/chunks/ssr/{[root-of-the-server]__01a37f7a._.js.map → [root-of-the-server]__f8210f45._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__fdc75809._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js +3 -0
- package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_1bb131c4._.js +1 -1
- package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_5860e4e2._.js +3 -0
- package/web/.next/server/chunks/ssr/_5860e4e2._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_6e08ce21._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_752e01fd._.js +3 -0
- package/web/.next/server/chunks/ssr/_752e01fd._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_9ac70f88._.js +5 -0
- package/web/.next/server/chunks/ssr/_9ac70f88._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a68d7e1c._.js +1 -1
- package/web/.next/server/chunks/ssr/_a68d7e1c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_3785d5be._.js → _a89aa4ff._.js} +2 -2
- package/web/.next/server/chunks/ssr/_a89aa4ff._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_cc77a143._.js +3 -0
- package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_3e88ce9d._.js → _cf366ac8._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_3e88ce9d._.js.map → _cf366ac8._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_e6f2da4f._.js +7 -0
- package/web/.next/server/chunks/ssr/{_34fbed18._.js.map → _e6f2da4f._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_021a05f2.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_control-center_7ac3562e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js +2 -3
- package/web/.next/server/chunks/ssr/src_presentation_web_e4510d10._.js.map +1 -1
- package/web/.next/server/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +28 -28
- package/web/.next/static/chunks/{4de791d92c72ae58.js → 0c7ff075a27be1eb.js} +1 -1
- package/web/.next/static/chunks/1890f388b9c7b8e5.js +1 -0
- package/web/.next/static/chunks/1cf313836ab93548.js +1 -0
- package/web/.next/static/chunks/30c827a88342741e.js +1 -0
- package/web/.next/static/chunks/3e3eea7add03fbe3.js +1 -0
- package/web/.next/static/chunks/50f89c3112f6dd23.css +2 -0
- package/web/.next/static/chunks/52b56677c842e45f.js +3 -0
- package/web/.next/static/chunks/580e022ac43b698a.js +1 -0
- package/web/.next/static/chunks/6d156be81a831afb.js +1 -0
- package/web/.next/static/chunks/{48060fe38d7b8432.js → a82e857e615d28ba.js} +3 -3
- package/web/.next/static/chunks/{0fb7745c30469b39.js → b31f2c82654437a6.js} +1 -1
- package/web/.next/static/chunks/{d00436ccde44862f.js → ba7279972c2c9937.js} +2 -2
- package/web/.next/static/chunks/d770a3e8d0c547ab.js +1 -0
- package/web/.next/static/chunks/f90d7981a2be96b3.js +1 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_c7cfe351._.js +0 -3
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_c7cfe351._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__01a37f7a._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__55f60c9d._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c3694f82._.js +0 -10
- package/web/.next/server/chunks/ssr/_0387eb83._.js +0 -3
- package/web/.next/server/chunks/ssr/_0387eb83._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js +0 -3
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_34fbed18._.js +0 -7
- package/web/.next/server/chunks/ssr/_3785d5be._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_63868199._.js +0 -3
- package/web/.next/server/chunks/ssr/_63868199._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_67dd9041._.js +0 -3
- package/web/.next/server/chunks/ssr/_67dd9041._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_c3a8bcb1._.js +0 -3
- package/web/.next/server/chunks/ssr/_c3a8bcb1._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js +0 -5
- package/web/.next/server/chunks/ssr/node_modules__pnpm_04f4e45f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_d80c1060._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_d80c1060._.js.map +0 -1
- package/web/.next/static/chunks/2a24ac257fc1c10b.js +0 -1
- package/web/.next/static/chunks/6b4620c8b57a0683.js +0 -1
- package/web/.next/static/chunks/6d0190cd8484320c.js +0 -1
- package/web/.next/static/chunks/6f0622cb06faf358.js +0 -1
- package/web/.next/static/chunks/7e92542991a14568.js +0 -1
- package/web/.next/static/chunks/a56b3854d2169db0.js +0 -1
- package/web/.next/static/chunks/ae01d2be1d0bad47.css +0 -2
- package/web/.next/static/chunks/de2515446676e0ae.js +0 -1
- package/web/.next/static/chunks/df0b93fbb9b512e6.js +0 -1
- package/web/.next/static/chunks/e405f0502431ea60.js +0 -3
- /package/web/.next/server/chunks/{[root-of-the-server]__91d44424._.js.map → [root-of-the-server]__52c318d1._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__3534949f._.js.map → [root-of-the-server]__8d9536c4._.js.map} +0 -0
- /package/web/.next/server/chunks/ssr/{[root-of-the-server]__ad2b2a3c._.js.map → [root-of-the-server]__f1a05100._.js.map} +0 -0
- /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → Wigg6jQyfuuW5Wt1mfO5Z}/_buildManifest.js +0 -0
- /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → Wigg6jQyfuuW5Wt1mfO5Z}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{7IllAyl6ItP_HYk-RfUYQ → Wigg6jQyfuuW5Wt1mfO5Z}/_ssgManifest.js +0 -0
package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import type { FileAttachment } from '../../../../../../packages/core/src/infrastructure/services/file-dialog.service.js';
|
|
2
1
|
import type { WorkflowDefaults } from '../../../app/actions/get-workflow-defaults.js';
|
|
3
2
|
export type { FileAttachment } from '../../../../../../packages/core/src/infrastructure/services/file-dialog.service.js';
|
|
3
|
+
/** Attachment record for the create form — supports both picker and upload sources. */
|
|
4
|
+
export interface FormAttachment {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
size: number;
|
|
8
|
+
mimeType: string;
|
|
9
|
+
path: string;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
}
|
|
4
12
|
/** Minimal feature descriptor for the parent selector. */
|
|
5
13
|
export interface ParentFeatureOption {
|
|
6
14
|
id: string;
|
|
@@ -8,7 +16,7 @@ export interface ParentFeatureOption {
|
|
|
8
16
|
}
|
|
9
17
|
export interface FeatureCreatePayload {
|
|
10
18
|
description: string;
|
|
11
|
-
attachments:
|
|
19
|
+
attachments: FormAttachment[];
|
|
12
20
|
repositoryPath: string;
|
|
13
21
|
approvalGates: {
|
|
14
22
|
allowPrd: boolean;
|
|
@@ -24,6 +32,7 @@ export interface FeatureCreatePayload {
|
|
|
24
32
|
agentType?: string;
|
|
25
33
|
/** Optional model override for this feature run */
|
|
26
34
|
model?: string;
|
|
35
|
+
sessionId?: string;
|
|
27
36
|
}
|
|
28
37
|
export interface FeatureCreateDrawerProps {
|
|
29
38
|
open: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-create-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-create-drawer.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AAI5E,YAAY,EAAE,cAAc,EAAE,MAAM,0DAA0D,CAAC;AAE/F,uFAAuF;AACvF,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,aAAa,EAAE;QACb,QAAQ,EAAE,OAAO,CAAC;QAClB,SAAS,EAAE,OAAO,CAAC;QACnB,UAAU,EAAE,OAAO,CAAC;KACrB,CAAC;IACF,IAAI,EAAE,OAAO,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,IAAI,EAAE,OAAO,CAAC;IACd,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mDAAmD;IACnD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AA+ED,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC/C,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,qEAAqE;IACrE,QAAQ,CAAC,EAAE,mBAAmB,EAAE,CAAC;IACjC,kGAAkG;IAClG,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,QAAQ,EACR,cAAc,EACd,YAAoB,EACpB,gBAAgB,EAChB,QAAQ,EACR,eAAe,EACf,gBAAgB,EAChB,YAAY,GACb,EAAE,wBAAwB,2CAkjB1B"}
|
package/dist/src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useCallback, useEffect, useRef } from 'react';
|
|
4
|
-
import {
|
|
4
|
+
import { PaperclipIcon, ChevronsUpDown, CheckIcon, Zap } from 'lucide-react';
|
|
5
5
|
import { cn } from '../../../lib/utils.js';
|
|
6
6
|
import { useSoundAction } from '../../../hooks/use-sound-action.js';
|
|
7
7
|
import { BaseDrawer } from '../../common/base-drawer/index.js';
|
|
@@ -15,8 +15,71 @@ import { Popover, PopoverContent, PopoverTrigger } from '../../ui/popover.js';
|
|
|
15
15
|
import { Switch } from '../../ui/switch.js';
|
|
16
16
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip.js';
|
|
17
17
|
import { useGuardedDrawerClose } from '../../../hooks/drawer-close-guard.js';
|
|
18
|
+
import { AttachmentChip } from '../../common/attachment-chip/index.js';
|
|
18
19
|
import { AgentModelPicker } from '../../features/settings/AgentModelPicker/index.js';
|
|
19
20
|
import { pickFiles } from './pick-files.js';
|
|
21
|
+
const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10 MB
|
|
22
|
+
const ALLOWED_EXTENSIONS = new Set([
|
|
23
|
+
'.png',
|
|
24
|
+
'.jpg',
|
|
25
|
+
'.jpeg',
|
|
26
|
+
'.gif',
|
|
27
|
+
'.webp',
|
|
28
|
+
'.svg',
|
|
29
|
+
'.bmp',
|
|
30
|
+
'.ico',
|
|
31
|
+
'.pdf',
|
|
32
|
+
'.doc',
|
|
33
|
+
'.docx',
|
|
34
|
+
'.xls',
|
|
35
|
+
'.xlsx',
|
|
36
|
+
'.ppt',
|
|
37
|
+
'.pptx',
|
|
38
|
+
'.txt',
|
|
39
|
+
'.md',
|
|
40
|
+
'.csv',
|
|
41
|
+
'.json',
|
|
42
|
+
'.yaml',
|
|
43
|
+
'.yml',
|
|
44
|
+
'.xml',
|
|
45
|
+
'.ts',
|
|
46
|
+
'.tsx',
|
|
47
|
+
'.js',
|
|
48
|
+
'.jsx',
|
|
49
|
+
'.py',
|
|
50
|
+
'.rb',
|
|
51
|
+
'.go',
|
|
52
|
+
'.rs',
|
|
53
|
+
'.java',
|
|
54
|
+
'.c',
|
|
55
|
+
'.cpp',
|
|
56
|
+
'.h',
|
|
57
|
+
'.hpp',
|
|
58
|
+
'.cs',
|
|
59
|
+
'.swift',
|
|
60
|
+
'.kt',
|
|
61
|
+
'.html',
|
|
62
|
+
'.css',
|
|
63
|
+
'.scss',
|
|
64
|
+
'.less',
|
|
65
|
+
'.sh',
|
|
66
|
+
'.bash',
|
|
67
|
+
'.zsh',
|
|
68
|
+
'.fish',
|
|
69
|
+
'.toml',
|
|
70
|
+
'.ini',
|
|
71
|
+
'.cfg',
|
|
72
|
+
'.conf',
|
|
73
|
+
'.env',
|
|
74
|
+
'.zip',
|
|
75
|
+
'.tar',
|
|
76
|
+
'.gz',
|
|
77
|
+
'.log',
|
|
78
|
+
]);
|
|
79
|
+
function getExtension(filename) {
|
|
80
|
+
const dot = filename.lastIndexOf('.');
|
|
81
|
+
return dot >= 0 ? filename.slice(dot).toLowerCase() : '';
|
|
82
|
+
}
|
|
20
83
|
const AUTO_APPROVE_OPTIONS = [
|
|
21
84
|
{ id: 'allowPrd', label: 'PRD', description: 'Auto-approve requirements move to planning.' },
|
|
22
85
|
{ id: 'allowPlan', label: 'Plan', description: 'Auto-approve planning move to implementation.' },
|
|
@@ -41,6 +104,11 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
|
|
|
41
104
|
const [fast, setFast] = useState(false);
|
|
42
105
|
const [overrideAgent, setOverrideAgent] = useState(undefined);
|
|
43
106
|
const [overrideModel, setOverrideModel] = useState(undefined);
|
|
107
|
+
const [isDragOver, setIsDragOver] = useState(false);
|
|
108
|
+
const [uploadError, setUploadError] = useState(null);
|
|
109
|
+
// Stable sessionId per mount — used for upload dedup grouping
|
|
110
|
+
const sessionIdRef = useRef(crypto.randomUUID());
|
|
111
|
+
const dragCounterRef = useRef(0);
|
|
44
112
|
// Sync state when workflowDefaults load asynchronously
|
|
45
113
|
useEffect(() => {
|
|
46
114
|
if (workflowDefaults) {
|
|
@@ -65,11 +133,121 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
|
|
|
65
133
|
setFast(false);
|
|
66
134
|
setOverrideAgent(undefined);
|
|
67
135
|
setOverrideModel(undefined);
|
|
136
|
+
setUploadError(null);
|
|
137
|
+
dragCounterRef.current = 0;
|
|
138
|
+
setIsDragOver(false);
|
|
68
139
|
}, [defaultGates, defaultPush, defaultOpenPr]);
|
|
69
140
|
// Track whether the form has unsaved data
|
|
70
141
|
const isDirty = description.trim() !== '' || attachments.length > 0;
|
|
71
142
|
// Shared close guard — shows confirmation when dirty, prevents navigation
|
|
72
143
|
const { attemptClose } = useGuardedDrawerClose({ open, isDirty, onClose, onReset: resetForm });
|
|
144
|
+
/** Validate and upload files from drop or paste. */
|
|
145
|
+
const handleFiles = useCallback(async (fileList) => {
|
|
146
|
+
setUploadError(null);
|
|
147
|
+
for (const file of fileList) {
|
|
148
|
+
// Client-side size validation
|
|
149
|
+
if (file.size > MAX_FILE_SIZE) {
|
|
150
|
+
setUploadError(`"${file.name}" exceeds 10 MB limit`);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
// Client-side extension validation
|
|
154
|
+
const ext = getExtension(file.name);
|
|
155
|
+
if (ext && !ALLOWED_EXTENSIONS.has(ext)) {
|
|
156
|
+
setUploadError(`File type "${ext}" is not allowed`);
|
|
157
|
+
return;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
for (const file of fileList) {
|
|
161
|
+
const tempId = crypto.randomUUID();
|
|
162
|
+
// Optimistic loading placeholder
|
|
163
|
+
setAttachments((prev) => [
|
|
164
|
+
...prev,
|
|
165
|
+
{
|
|
166
|
+
id: tempId,
|
|
167
|
+
name: file.name,
|
|
168
|
+
size: file.size,
|
|
169
|
+
mimeType: file.type || 'application/octet-stream',
|
|
170
|
+
path: '',
|
|
171
|
+
loading: true,
|
|
172
|
+
},
|
|
173
|
+
]);
|
|
174
|
+
try {
|
|
175
|
+
const formData = new FormData();
|
|
176
|
+
formData.append('file', file);
|
|
177
|
+
formData.append('sessionId', sessionIdRef.current);
|
|
178
|
+
const res = await fetch('/api/attachments/upload', {
|
|
179
|
+
method: 'POST',
|
|
180
|
+
body: formData,
|
|
181
|
+
});
|
|
182
|
+
if (!res.ok) {
|
|
183
|
+
const body = await res.json().catch(() => ({ error: 'Upload failed' }));
|
|
184
|
+
// Remove loading placeholder on error
|
|
185
|
+
setAttachments((prev) => prev.filter((a) => a.id !== tempId));
|
|
186
|
+
setUploadError(body.error ?? 'Upload failed');
|
|
187
|
+
return;
|
|
188
|
+
}
|
|
189
|
+
const uploaded = await res.json();
|
|
190
|
+
// Server dedup may return the same path for identical content — drop the duplicate.
|
|
191
|
+
setAttachments((prev) => {
|
|
192
|
+
const isDupe = prev.some((a) => a.id !== tempId && a.path === uploaded.path);
|
|
193
|
+
if (isDupe)
|
|
194
|
+
return prev.filter((a) => a.id !== tempId);
|
|
195
|
+
return prev.map((a) => a.id === tempId ? { ...uploaded, id: tempId, loading: false } : a);
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
catch {
|
|
199
|
+
setAttachments((prev) => prev.filter((a) => a.id !== tempId));
|
|
200
|
+
setUploadError('Upload failed');
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}, []);
|
|
204
|
+
const handleDragEnter = useCallback((e) => {
|
|
205
|
+
e.preventDefault();
|
|
206
|
+
e.stopPropagation();
|
|
207
|
+
dragCounterRef.current += 1;
|
|
208
|
+
if (dragCounterRef.current === 1) {
|
|
209
|
+
setIsDragOver(true);
|
|
210
|
+
}
|
|
211
|
+
}, []);
|
|
212
|
+
const handleDragLeave = useCallback((e) => {
|
|
213
|
+
e.preventDefault();
|
|
214
|
+
e.stopPropagation();
|
|
215
|
+
dragCounterRef.current -= 1;
|
|
216
|
+
if (dragCounterRef.current === 0) {
|
|
217
|
+
setIsDragOver(false);
|
|
218
|
+
}
|
|
219
|
+
}, []);
|
|
220
|
+
const handleDragOver = useCallback((e) => {
|
|
221
|
+
e.preventDefault();
|
|
222
|
+
e.stopPropagation();
|
|
223
|
+
}, []);
|
|
224
|
+
const handleDrop = useCallback((e) => {
|
|
225
|
+
e.preventDefault();
|
|
226
|
+
e.stopPropagation();
|
|
227
|
+
dragCounterRef.current = 0;
|
|
228
|
+
setIsDragOver(false);
|
|
229
|
+
const files = Array.from(e.dataTransfer.files);
|
|
230
|
+
if (files.length > 0) {
|
|
231
|
+
handleFiles(files);
|
|
232
|
+
}
|
|
233
|
+
}, [handleFiles]);
|
|
234
|
+
const handlePaste = useCallback((e) => {
|
|
235
|
+
const items = e.clipboardData?.items;
|
|
236
|
+
if (!items)
|
|
237
|
+
return;
|
|
238
|
+
const files = [];
|
|
239
|
+
for (const item of Array.from(items)) {
|
|
240
|
+
if (item.kind === 'file') {
|
|
241
|
+
const file = item.getAsFile();
|
|
242
|
+
if (file)
|
|
243
|
+
files.push(file);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
if (files.length > 0) {
|
|
247
|
+
e.preventDefault();
|
|
248
|
+
handleFiles(files);
|
|
249
|
+
}
|
|
250
|
+
}, [handleFiles]);
|
|
73
251
|
const handleSubmit = useCallback((e) => {
|
|
74
252
|
e.preventDefault();
|
|
75
253
|
if (!description.trim())
|
|
@@ -77,7 +255,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
|
|
|
77
255
|
createSound.play();
|
|
78
256
|
onSubmit({
|
|
79
257
|
description: description.trim(),
|
|
80
|
-
attachments,
|
|
258
|
+
attachments: attachments.filter((a) => !a.loading),
|
|
81
259
|
repositoryPath,
|
|
82
260
|
approvalGates: {
|
|
83
261
|
allowPrd: approvalGates.allowPrd ?? false,
|
|
@@ -90,6 +268,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
|
|
|
90
268
|
...(overrideAgent ? { agentType: overrideAgent } : {}),
|
|
91
269
|
...(overrideModel ? { model: overrideModel } : {}),
|
|
92
270
|
...(parentId ? { parentId } : {}),
|
|
271
|
+
sessionId: sessionIdRef.current,
|
|
93
272
|
});
|
|
94
273
|
resetForm();
|
|
95
274
|
}, [
|
|
@@ -111,15 +290,27 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
|
|
|
111
290
|
try {
|
|
112
291
|
const files = await pickFiles();
|
|
113
292
|
if (files) {
|
|
114
|
-
setAttachments((prev) =>
|
|
293
|
+
setAttachments((prev) => {
|
|
294
|
+
const existingPaths = new Set(prev.map((f) => f.path));
|
|
295
|
+
const unique = files
|
|
296
|
+
.filter((f) => !existingPaths.has(f.path))
|
|
297
|
+
.map((f) => ({
|
|
298
|
+
id: crypto.randomUUID(),
|
|
299
|
+
name: f.name,
|
|
300
|
+
size: f.size,
|
|
301
|
+
mimeType: 'application/octet-stream',
|
|
302
|
+
path: f.path,
|
|
303
|
+
}));
|
|
304
|
+
return unique.length > 0 ? [...prev, ...unique] : prev;
|
|
305
|
+
});
|
|
115
306
|
}
|
|
116
307
|
}
|
|
117
308
|
catch {
|
|
118
309
|
// Native dialog failed — silently ignore (user can retry)
|
|
119
310
|
}
|
|
120
311
|
}, []);
|
|
121
|
-
const handleRemoveFile = useCallback((
|
|
122
|
-
setAttachments((prev) => prev.filter((f) => f.
|
|
312
|
+
const handleRemoveFile = useCallback((id) => {
|
|
313
|
+
setAttachments((prev) => prev.filter((f) => f.id !== id));
|
|
123
314
|
}, []);
|
|
124
315
|
const formRef = useRef(null);
|
|
125
316
|
const handleKeyDown = useCallback((e) => {
|
|
@@ -129,10 +320,10 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
|
|
|
129
320
|
}
|
|
130
321
|
}, []);
|
|
131
322
|
const hasFeatures = features && features.length > 0;
|
|
132
|
-
return (_jsx(BaseDrawer, { open: open, onClose: attemptClose, size: "md", modal: false, dismissOnOutsideClick: true, "data-testid": "feature-create-drawer", header: _jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500" }), _jsx(DrawerTitle, { children: "NEW FEATURE" })] }), isSubmitting ? (_jsx(DrawerDescription, { asChild: true, children: _jsx("div", { children: _jsx(Badge, { variant: "secondary", children: "Creating..." }) }) })) : null] }), footer: _jsxs("div", { className: "flex flex-row justify-end gap-2", children: [_jsx(Button, { variant: "outline", onClick: attemptClose, disabled: isSubmitting, children: "Cancel" }), _jsx(Button, { type: "submit", form: "create-feature-form", disabled: !description.trim() || isSubmitting, children: isSubmitting ? 'Creating...' : '+ Create Feature' })] }), children: _jsx("div", { className: "overflow-y-auto p-4", children: _jsx(TooltipProvider, { delayDuration: 400, children: _jsxs("form", { ref: formRef, id: "create-feature-form", onSubmit: handleSubmit, className: "flex flex-col gap-4", children: [_jsxs("div", { className:
|
|
323
|
+
return (_jsx(BaseDrawer, { open: open, onClose: attemptClose, size: "md", modal: false, dismissOnOutsideClick: true, "data-testid": "feature-create-drawer", header: _jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("div", { className: "h-2.5 w-2.5 shrink-0 rounded-full bg-blue-500" }), _jsx(DrawerTitle, { children: "NEW FEATURE" })] }), isSubmitting ? (_jsx(DrawerDescription, { asChild: true, children: _jsx("div", { children: _jsx(Badge, { variant: "secondary", children: "Creating..." }) }) })) : null] }), footer: _jsxs("div", { className: "flex flex-row justify-end gap-2", children: [_jsx(Button, { variant: "outline", onClick: attemptClose, disabled: isSubmitting, children: "Cancel" }), _jsx(Button, { type: "submit", form: "create-feature-form", disabled: !description.trim() || isSubmitting, children: isSubmitting ? 'Creating...' : '+ Create Feature' })] }), children: _jsx("div", { className: "overflow-y-auto p-4", children: _jsx(TooltipProvider, { delayDuration: 400, children: _jsxs("form", { ref: formRef, id: "create-feature-form", onSubmit: handleSubmit, className: "flex flex-col gap-4", children: [_jsxs("div", { role: "region", "aria-label": "File drop zone", "data-drag-over": isDragOver ? 'true' : 'false', onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDragOver: handleDragOver, onDrop: handleDrop, className: cn('flex flex-col gap-1.5 rounded-md border-2 border-transparent p-1 transition-colors', isDragOver && 'border-primary/50 bg-primary/5'), children: [_jsx(Label, { htmlFor: "feature-description", className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "DESCRIBE YOUR FEATURE" }), _jsxs("div", { className: "border-input focus-within:ring-ring/50 focus-within:border-ring flex h-56 flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]", children: [_jsx(Textarea, { id: "feature-description", placeholder: "e.g. Add GitHub OAuth login with callback handling and token refresh...", value: description, onChange: (e) => setDescription(e.target.value), onKeyDown: handleKeyDown, onPaste: handlePaste, required: true, disabled: isSubmitting, className: "min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0" }), attachments.length > 0 && (_jsx("div", { className: "flex flex-wrap items-center gap-1.5 px-3 py-2", children: attachments.map((file) => (_jsx(AttachmentChip, { name: file.name, size: file.size, mimeType: file.mimeType, path: file.path, onRemove: () => handleRemoveFile(file.id), disabled: isSubmitting, loading: file.loading }, file.id))) })), uploadError ? (_jsx("p", { className: "text-destructive px-3 pb-2 text-xs", children: uploadError })) : null, _jsxs("div", { className: "border-input flex items-center gap-3 border-t px-3 py-1.5", children: [_jsx(AgentModelPicker, { initialAgentType: overrideAgent ?? currentAgentType ?? 'claude-code', initialModel: overrideModel ?? currentModel ?? 'claude-sonnet-4-6', mode: "override", onAgentModelChange: (agent, model) => {
|
|
133
324
|
setOverrideAgent(agent);
|
|
134
325
|
setOverrideModel(model);
|
|
135
|
-
}, disabled: isSubmitting, className: "w-55" }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("div", { className: "ml-auto flex cursor-pointer items-center gap-2", children: [_jsx(Switch, { id: "fast-mode", checked: fast, onCheckedChange: setFast, disabled: isSubmitting }), _jsxs(Label, { htmlFor: "fast-mode", className: "flex cursor-pointer items-center gap-1 text-sm font-medium", children: [_jsx(Zap, { className: "h-3.5 w-3.5" }), "Fast Mode"] })] }) }), _jsx(TooltipContent, { side: "bottom", children: "Skip SDLC phases and implement directly from your prompt." })] })] })] })] }), hasFeatures && initialParentId !== undefined ? (_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "parent-feature", className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "PARENT FEATURE" }), _jsx(ParentFeatureCombobox, { features: features, value: parentId, onChange: setParentId, disabled: isSubmitting })] })) : null, _jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "border-input flex items-center gap-4 rounded-md border px-3 py-2.5", children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { className: "text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider", children: "APPROVE" }) }), _jsx(TooltipContent, { side: "bottom", children: "Auto-approve phase transitions without manual review." })] }), _jsx("div", { className: "flex flex-1 items-center gap-4", children: AUTO_APPROVE_OPTIONS.map((opt) => (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("div", { className: "flex cursor-pointer items-center gap-1.5", children: [_jsx(Switch, { id: `approve-${opt.id}`, size: "sm", checked: approvalGates[opt.id] ?? false, onCheckedChange: (v) => setApprovalGates((prev) => ({ ...prev, [opt.id]: v })), disabled: isSubmitting ||
|
|
326
|
+
}, disabled: isSubmitting, className: "w-55" }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("div", { className: "ml-auto flex cursor-pointer items-center gap-2", children: [_jsx(Switch, { id: "fast-mode", checked: fast, onCheckedChange: setFast, disabled: isSubmitting }), _jsxs(Label, { htmlFor: "fast-mode", className: "flex cursor-pointer items-center gap-1 text-sm font-medium", children: [_jsx(Zap, { className: "h-3.5 w-3.5" }), "Fast Mode"] })] }) }), _jsx(TooltipContent, { side: "bottom", children: "Skip SDLC phases and implement directly from your prompt." })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: handleAddFiles, disabled: isSubmitting, "aria-label": "Attach files", className: "text-muted-foreground hover:text-foreground cursor-pointer rounded p-1 transition-colors", children: _jsx(PaperclipIcon, { className: "h-4 w-4" }) }) }), _jsx(TooltipContent, { side: "bottom", children: "Attach files" })] })] })] })] }), hasFeatures && initialParentId !== undefined ? (_jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "parent-feature", className: "text-muted-foreground text-xs font-semibold tracking-wider", children: "PARENT FEATURE" }), _jsx(ParentFeatureCombobox, { features: features, value: parentId, onChange: setParentId, disabled: isSubmitting })] })) : null, _jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "border-input flex items-center gap-4 rounded-md border px-3 py-2.5", children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { className: "text-muted-foreground w-16 shrink-0 cursor-default text-xs font-semibold tracking-wider", children: "APPROVE" }) }), _jsx(TooltipContent, { side: "bottom", children: "Auto-approve phase transitions without manual review." })] }), _jsx("div", { className: "flex flex-1 items-center gap-4", children: AUTO_APPROVE_OPTIONS.map((opt) => (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("div", { className: "flex cursor-pointer items-center gap-1.5", children: [_jsx(Switch, { id: `approve-${opt.id}`, size: "sm", checked: approvalGates[opt.id] ?? false, onCheckedChange: (v) => setApprovalGates((prev) => ({ ...prev, [opt.id]: v })), disabled: isSubmitting ||
|
|
136
327
|
(fast && (opt.id === 'allowPrd' || opt.id === 'allowPlan')) }), _jsx(Label, { htmlFor: `approve-${opt.id}`, className: "cursor-pointer text-xs font-medium", children: opt.label })] }) }), _jsx(TooltipContent, { side: "bottom", children: fast && (opt.id === 'allowPrd' || opt.id === 'allowPlan')
|
|
137
328
|
? 'Skipped in Fast Mode'
|
|
138
329
|
: opt.description })] }, opt.id))) }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: () => {
|
|
@@ -145,7 +336,7 @@ export function FeatureCreateDrawer({ open, onClose, onSubmit, repositoryPath, i
|
|
|
145
336
|
setPush(v);
|
|
146
337
|
if (!v && openPr)
|
|
147
338
|
setOpenPr(false);
|
|
148
|
-
}, disabled: isSubmitting }), _jsx(Label, { htmlFor: "push", className: "cursor-pointer text-xs font-medium", children: "Push" })] }) }), _jsx(TooltipContent, { side: "bottom", children: "Push branch to remote after implementation." })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("div", { className: "flex cursor-pointer items-center gap-1.5", children: [_jsx(Switch, { id: "open-pr", size: "sm", checked: openPr, onCheckedChange: setOpenPr, disabled: isSubmitting }), _jsx(Label, { htmlFor: "open-pr", className: "cursor-pointer text-xs font-medium", children: "PR" })] }) }), _jsx(TooltipContent, { side: "bottom", children: "Open a pull request after pushing." })] })] })] })] })
|
|
339
|
+
}, disabled: isSubmitting }), _jsx(Label, { htmlFor: "push", className: "cursor-pointer text-xs font-medium", children: "Push" })] }) }), _jsx(TooltipContent, { side: "bottom", children: "Push branch to remote after implementation." })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("div", { className: "flex cursor-pointer items-center gap-1.5", children: [_jsx(Switch, { id: "open-pr", size: "sm", checked: openPr, onCheckedChange: setOpenPr, disabled: isSubmitting }), _jsx(Label, { htmlFor: "open-pr", className: "cursor-pointer text-xs font-medium", children: "PR" })] }) }), _jsx(TooltipContent, { side: "bottom", children: "Open a pull request after pushing." })] })] })] })] })] }) }) }) }));
|
|
149
340
|
}
|
|
150
341
|
function ParentFeatureCombobox({ features, value, onChange, disabled, }) {
|
|
151
342
|
const [open, setOpen] = useState(false);
|
|
@@ -173,55 +364,3 @@ function ParentFeatureCombobox({ features, value, onChange, disabled, }) {
|
|
|
173
364
|
? `${selectedFeature.name} (${selectedFeature.id.slice(0, 8)})`
|
|
174
365
|
: 'Select parent feature...' }), _jsx(ChevronsUpDown, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })] }) }), _jsx(PopoverContent, { className: "w-80 p-0", align: "start", "data-testid": "parent-feature-combobox-content", children: _jsxs("div", { className: "flex flex-col", children: [_jsx("div", { className: "border-b p-2", children: _jsx(Input, { ref: inputRef, placeholder: "Search features...", value: query, onChange: (e) => setQuery(e.target.value), className: "h-8 border-0 p-0 text-sm shadow-none focus-visible:ring-0", "data-testid": "parent-feature-search" }) }), _jsxs("div", { className: "max-h-48 overflow-y-auto py-1", role: "listbox", "aria-label": "Features", children: [_jsxs("button", { type: "button", role: "option", "aria-selected": value === undefined, onClick: () => handleSelect(undefined), className: cn('hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm', value === undefined && 'bg-accent/50'), "data-testid": "parent-feature-option-none", children: [_jsx(CheckIcon, { className: cn('h-4 w-4 shrink-0', value !== undefined && 'invisible') }), _jsx("span", { className: "text-muted-foreground italic", children: "No parent" })] }), filtered.length === 0 && query ? (_jsx("p", { className: "text-muted-foreground px-3 py-2 text-sm", children: "No features found." })) : (filtered.map((f) => (_jsxs("button", { type: "button", role: "option", "aria-selected": value === f.id, onClick: () => handleSelect(f.id), className: cn('hover:bg-accent hover:text-accent-foreground flex w-full items-center gap-2 px-3 py-2 text-sm', value === f.id && 'bg-accent/50'), "data-testid": `parent-feature-option-${f.id}`, children: [_jsx(CheckIcon, { className: cn('h-4 w-4 shrink-0', value !== f.id && 'invisible') }), _jsxs("span", { className: "truncate", children: [f.name, ' ', _jsxs("span", { className: "text-muted-foreground font-mono text-xs", children: ["(", f.id.slice(0, 8), ")"] })] })] }, f.id))))] })] }) })] }));
|
|
175
366
|
}
|
|
176
|
-
/* ---------------------------------------------------------------------------
|
|
177
|
-
* Private sub-components & utilities
|
|
178
|
-
* ------------------------------------------------------------------------- */
|
|
179
|
-
function AttachmentCard({ file, onRemove, disabled, }) {
|
|
180
|
-
const ext = getExtension(file.name);
|
|
181
|
-
const Icon = getFileIcon(ext);
|
|
182
|
-
const iconColorClass = getFileIconColor(ext);
|
|
183
|
-
return (_jsxs("div", { className: "flex items-center gap-3 rounded-md border p-2", children: [_jsx("div", { className: cn('flex h-8 w-8 shrink-0 items-center justify-center rounded', iconColorClass), children: _jsx(Icon, { className: "h-4 w-4" }) }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col", children: [_jsx("span", { className: "truncate text-sm font-medium", children: file.name }), _jsx("span", { className: "text-muted-foreground truncate text-xs", children: file.path }), _jsx("span", { className: "text-muted-foreground text-xs", children: formatFileSize(file.size) })] }), _jsx(Button, { type: "button", variant: "ghost", size: "icon-xs", onClick: onRemove, disabled: disabled, "aria-label": `Remove ${file.name}`, children: _jsx(Trash2Icon, { className: "h-3 w-3" }) })] }));
|
|
184
|
-
}
|
|
185
|
-
function getExtension(filename) {
|
|
186
|
-
const dot = filename.lastIndexOf('.');
|
|
187
|
-
return dot >= 0 ? filename.slice(dot).toLowerCase() : '';
|
|
188
|
-
}
|
|
189
|
-
const IMAGE_EXTS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.svg', '.webp', '.ico', '.bmp']);
|
|
190
|
-
const CODE_EXTS = new Set([
|
|
191
|
-
'.ts',
|
|
192
|
-
'.tsx',
|
|
193
|
-
'.js',
|
|
194
|
-
'.jsx',
|
|
195
|
-
'.json',
|
|
196
|
-
'.yaml',
|
|
197
|
-
'.yml',
|
|
198
|
-
'.xml',
|
|
199
|
-
'.html',
|
|
200
|
-
'.css',
|
|
201
|
-
'.md',
|
|
202
|
-
]);
|
|
203
|
-
function getFileIcon(ext) {
|
|
204
|
-
if (IMAGE_EXTS.has(ext))
|
|
205
|
-
return ImageIcon;
|
|
206
|
-
if (ext === '.pdf')
|
|
207
|
-
return FileTextIcon;
|
|
208
|
-
if (CODE_EXTS.has(ext))
|
|
209
|
-
return CodeIcon;
|
|
210
|
-
return FileIcon;
|
|
211
|
-
}
|
|
212
|
-
function getFileIconColor(ext) {
|
|
213
|
-
if (ext === '.pdf')
|
|
214
|
-
return 'bg-red-50 text-red-600';
|
|
215
|
-
if (IMAGE_EXTS.has(ext))
|
|
216
|
-
return 'bg-blue-50 text-blue-600';
|
|
217
|
-
if (CODE_EXTS.has(ext))
|
|
218
|
-
return 'bg-emerald-50 text-emerald-600';
|
|
219
|
-
return 'bg-gray-50 text-gray-600';
|
|
220
|
-
}
|
|
221
|
-
function formatFileSize(bytes) {
|
|
222
|
-
if (bytes === 0)
|
|
223
|
-
return '0 B';
|
|
224
|
-
const units = ['B', 'KB', 'MB', 'GB'];
|
|
225
|
-
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
226
|
-
return `${(bytes / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 1)} ${units[i]}`;
|
|
227
|
-
}
|
|
@@ -113,5 +113,11 @@ export declare const WithParentFeature: Story;
|
|
|
113
113
|
* "Discard unsaved changes?" dialog. Demonstrates the dirty-form guard.
|
|
114
114
|
*/
|
|
115
115
|
export declare const DiscardConfirmation: Story;
|
|
116
|
+
/**
|
|
117
|
+
* Drawer ready for drag-and-drop — open the drawer and drag a file over
|
|
118
|
+
* the "DESCRIBE YOUR FEATURE" area to see the drag-over highlight.
|
|
119
|
+
* In Storybook, the upload API isn't available, but the visual states render.
|
|
120
|
+
*/
|
|
121
|
+
export declare const DragDropReady: Story;
|
|
116
122
|
export declare const Interactive: Story;
|
|
117
123
|
//# sourceMappingURL=feature-create-drawer.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-create-drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAgC1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAmDlD,uFAAuF;AACvF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAYF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC;AAkDF,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAwCF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAM/B,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KAwCzB,CAAC"}
|
|
1
|
+
{"version":3,"file":"feature-create-drawer.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-create-drawer/feature-create-drawer.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAU9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,mBAAmB,CAgC1C,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAmDlD,uFAAuF;AACvF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAiBvB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,EAAE,KAMhC,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,KAM1B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAUrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAUvB,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,KAMzB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,UAAU,EAAE,KAUxB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAYF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,EAAE,KAWlC,CAAC;AAkDF,+EAA+E;AAC/E,eAAO,MAAM,QAAQ,EAAE,KAEtB,CAAC;AAwCF;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,KAM/B,CAAC;AAMF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,KAgBjC,CAAC;AAMF;;;;GAIG;AACH,eAAO,MAAM,aAAa,EAAE,KAY3B,CAAC;AAMF,eAAO,MAAM,WAAW,EAAE,KAwCzB,CAAC"}
|
|
@@ -360,6 +360,24 @@ export const DiscardConfirmation = {
|
|
|
360
360
|
await userEvent.click(cancelButton);
|
|
361
361
|
},
|
|
362
362
|
};
|
|
363
|
+
/* ---------------------------------------------------------------------------
|
|
364
|
+
* Attachment stories
|
|
365
|
+
* ------------------------------------------------------------------------- */
|
|
366
|
+
/**
|
|
367
|
+
* Drawer ready for drag-and-drop — open the drawer and drag a file over
|
|
368
|
+
* the "DESCRIBE YOUR FEATURE" area to see the drag-over highlight.
|
|
369
|
+
* In Storybook, the upload API isn't available, but the visual states render.
|
|
370
|
+
*/
|
|
371
|
+
export const DragDropReady = {
|
|
372
|
+
render: () => _jsx(CreateDrawerTrigger, { label: "Open (Drag & Drop)" }),
|
|
373
|
+
play: async ({ canvasElement }) => {
|
|
374
|
+
const canvas = within(canvasElement);
|
|
375
|
+
await userEvent.click(canvas.getByRole('button', { name: 'Open (Drag & Drop)' }));
|
|
376
|
+
const body = within(canvasElement.ownerDocument.body);
|
|
377
|
+
const descInput = await body.findByPlaceholderText('e.g. Add GitHub OAuth login with callback handling and token refresh...');
|
|
378
|
+
await userEvent.type(descInput, 'Add attachment support with drag and drop');
|
|
379
|
+
},
|
|
380
|
+
};
|
|
363
381
|
/* ---------------------------------------------------------------------------
|
|
364
382
|
* Interactive story — full paths shown in submitted data panel
|
|
365
383
|
* ------------------------------------------------------------------------- */
|
package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export interface FeatureNodeData {
|
|
|
60
60
|
};
|
|
61
61
|
onAction?: () => void;
|
|
62
62
|
onSettings?: () => void;
|
|
63
|
-
onDelete?: (featureId: string) => void;
|
|
63
|
+
onDelete?: (featureId: string, cleanup?: boolean) => void;
|
|
64
64
|
showHandles?: boolean;
|
|
65
65
|
}
|
|
66
66
|
export type FeatureNodeType = Node<FeatureNodeData, 'featureNode'>;
|
package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-node-state-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node-state-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,MAAM,GACN,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAC7B,cAAc,GACd,UAAU,GACV,gBAAgB,GAChB,QAAQ,GACR,QAAQ,GACR,UAAU,CAAC;AAEf,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAOxE,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAOvE,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,qBAAqB,CAAC;IACjC,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,EAAE,CAAC,EAAE;QACH,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,QAAQ,CAAC;QACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"feature-node-state-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node-state-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,MAAM,GACN,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAC7B,cAAc,GACd,UAAU,GACV,gBAAgB,GAChB,QAAQ,GACR,QAAQ,GACR,UAAU,CAAC;AAEf,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAOxE,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAOvE,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,qBAAqB,CAAC;IACjC,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uEAAuE;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,0DAA0D;IAC1D,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,+DAA+D;IAC/D,EAAE,CAAC,EAAE;QACH,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,EAAE,QAAQ,CAAC;QACjB,QAAQ,CAAC,EAAE,QAAQ,CAAC;QACpB,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IACxB,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAC1D,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,MAAM,eAAe,GAAG,IAAI,CAAC,eAAe,EAAE,aAAa,CAAC,CAAC;AAEnE,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,UAAU,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,gBAAgB,EAAE,sBAAsB,CA6DnF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-node.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-node.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAyDnE,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,eAAe,CAAC;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,2CAwPA"}
|
|
@@ -4,9 +4,8 @@ import { useState } from 'react';
|
|
|
4
4
|
import { Handle, Position } from '@xyflow/react';
|
|
5
5
|
import { Plus, FileText, Wrench, GitMerge, Trash2, Zap } from 'lucide-react';
|
|
6
6
|
import { cn } from '../../../lib/utils.js';
|
|
7
|
-
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, } from '../../ui/dialog.js';
|
|
8
|
-
import { Button } from '../../ui/button.js';
|
|
9
7
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip.js';
|
|
8
|
+
import { DeleteFeatureDialog } from '../../common/delete-feature-dialog/index.js';
|
|
10
9
|
import { featureNodeStateConfig, lifecycleDisplayLabels, lifecycleRunningVerbs, } from './feature-node-state-config.js';
|
|
11
10
|
import { getAgentTypeIcon, agentTypeLabels } from './agent-type-icons.js';
|
|
12
11
|
import { getModelMeta } from '../../../lib/model-metadata.js';
|
|
@@ -70,11 +69,10 @@ export function FeatureNode({ data, selected, }) {
|
|
|
70
69
|
return (_jsxs("div", { className: "group relative", children: [data.showHandles ? (_jsx(Handle, { type: "target", position: Position.Left, isConnectable: false, className: "opacity-0!" })) : null, data.onDelete && data.featureId ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "absolute top-1/2 -left-10 -translate-y-1/2 opacity-0 transition-opacity group-hover:opacity-100", children: _jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { "aria-label": "Delete feature", "data-testid": "feature-node-delete-button", onClick: (e) => {
|
|
71
70
|
e.stopPropagation();
|
|
72
71
|
setConfirmOpen(true);
|
|
73
|
-
}, className: "bg-card text-muted-foreground hover:border-destructive hover:text-destructive flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors", children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Delete feature" })] }) }) }), _jsx(
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}, children: "Delete" })] })] }) })] })) : null, _jsxs("div", { "data-testid": "feature-node-card", "aria-busy": data.state === 'creating' ? 'true' : undefined, className: cn('bg-card flex min-h-35 w-72 flex-col rounded-lg border p-3 shadow-sm', selected && 'ring-primary ring-2'), children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { "data-testid": "feature-node-lifecycle-label", className: cn('text-[10px] font-semibold tracking-wider'), children: data.state === 'blocked' ? 'BLOCKED' : lifecycleDisplayLabels[data.lifecycle] }), _jsxs("div", { className: "flex items-center gap-0.5", children: [data.fastMode ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { "data-testid": "feature-node-fast-mode-badge", className: "-mt-1 p-1", children: _jsx(Zap, { className: "h-3.5 w-3.5 text-amber-500" }) }) }), _jsx(TooltipContent, { side: "bottom", children: "Fast Mode" })] }) })) : null, data.agentType ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": agentTypeLabels[data.agentType] ?? data.agentType, "data-testid": "feature-node-agent-badge", onClick: (e) => {
|
|
72
|
+
}, className: "bg-card text-muted-foreground hover:border-destructive hover:text-destructive flex h-7 w-7 cursor-pointer items-center justify-center rounded-full border shadow-sm transition-colors", children: _jsx(Trash2, { className: "h-3.5 w-3.5" }) }) }), _jsx(TooltipContent, { children: "Delete feature" })] }) }) }), _jsx(DeleteFeatureDialog, { open: confirmOpen, onOpenChange: setConfirmOpen, onConfirm: (cleanup) => {
|
|
73
|
+
setConfirmOpen(false);
|
|
74
|
+
data.onDelete?.(data.featureId, cleanup);
|
|
75
|
+
}, isDeleting: false, featureName: data.name ?? 'this feature', featureId: data.featureId })] })) : null, _jsxs("div", { "data-testid": "feature-node-card", "aria-busy": data.state === 'creating' ? 'true' : undefined, className: cn('bg-card flex min-h-35 w-72 flex-col rounded-lg border p-3 shadow-sm', selected && 'ring-primary ring-2'), children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { "data-testid": "feature-node-lifecycle-label", className: cn('text-[10px] font-semibold tracking-wider'), children: data.state === 'blocked' ? 'BLOCKED' : lifecycleDisplayLabels[data.lifecycle] }), _jsxs("div", { className: "flex items-center gap-0.5", children: [data.fastMode ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { "data-testid": "feature-node-fast-mode-badge", className: "-mt-1 p-1", children: _jsx(Zap, { className: "h-3.5 w-3.5 text-amber-500" }) }) }), _jsx(TooltipContent, { side: "bottom", children: "Fast Mode" })] }) })) : null, data.agentType ? (_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": agentTypeLabels[data.agentType] ?? data.agentType, "data-testid": "feature-node-agent-badge", onClick: (e) => {
|
|
78
76
|
e.stopPropagation();
|
|
79
77
|
data.onSettings?.();
|
|
80
78
|
}, className: cn('nodrag -mt-1 -mr-1 p-1', data.onSettings
|
package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface ControlCenterState {
|
|
|
14
14
|
repoPath: string;
|
|
15
15
|
};
|
|
16
16
|
handleLayout: (direction: LayoutDirection) => void;
|
|
17
|
-
handleDeleteFeature: (featureId: string) => void;
|
|
17
|
+
handleDeleteFeature: (featureId: string, cleanup?: boolean) => void;
|
|
18
18
|
handleDeleteRepository: (repositoryId: string) => Promise<void>;
|
|
19
19
|
createFeatureNode: (sourceNodeId: string | null, dataOverride?: Partial<FeatureNodeData>, edgeType?: string) => string;
|
|
20
20
|
/** Stable lookup: repositoryPath for a feature node. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-control-center-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/use-control-center-state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAcjC,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM7E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/D,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/E,YAAY,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,IAAI,CAAC;IACnD,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"use-control-center-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/use-control-center-state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAcjC,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM7E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/D,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/E,YAAY,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,IAAI,CAAC;IACnD,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACpE,sBAAsB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,iBAAiB,EAAE,CACjB,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,YAAY,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,EACvC,QAAQ,CAAC,EAAE,MAAM,KACd,MAAM,CAAC;IACZ,wDAAwD;IACxD,wBAAwB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACxE,gDAAgD;IAChD,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IACtE,0EAA0E;IAC1E,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;CACnD;AAQD,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,cAAc,EAAE,EAC9B,YAAY,EAAE,IAAI,EAAE,GACnB,kBAAkB,CAuXpB"}
|
package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js
CHANGED
|
@@ -190,7 +190,7 @@ export function useControlCenterState(initialNodes, initialEdges) {
|
|
|
190
190
|
addPendingFeature(id, newFeatureData, parentNodeId);
|
|
191
191
|
return id;
|
|
192
192
|
}, [addPendingFeature]);
|
|
193
|
-
const handleDeleteFeature = useCallback((featureId) => {
|
|
193
|
+
const handleDeleteFeature = useCallback((featureId, cleanup) => {
|
|
194
194
|
const nodeId = `feat-${featureId}`;
|
|
195
195
|
// Find the current entry for rollback
|
|
196
196
|
const prevEntry = nodesRef.current
|
|
@@ -204,7 +204,7 @@ export function useControlCenterState(initialNodes, initialEdges) {
|
|
|
204
204
|
deleteSound.play();
|
|
205
205
|
toast.success('Feature deleted successfully');
|
|
206
206
|
router.push('/');
|
|
207
|
-
deleteFeature(featureId)
|
|
207
|
+
deleteFeature(featureId, cleanup)
|
|
208
208
|
.then((result) => {
|
|
209
209
|
if (result.error) {
|
|
210
210
|
if (prevEntry)
|
|
@@ -15,7 +15,7 @@ const DialogOverlay = React.forwardRef(({ className, onClick, ...props }, ref) =
|
|
|
15
15
|
onClick?.(e);
|
|
16
16
|
}, ...props })));
|
|
17
17
|
DialogOverlay.displayName = DialogPrimitive.Overlay.displayName;
|
|
18
|
-
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn('bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg', className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
|
|
18
|
+
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => (_jsxs(DialogPortal, { children: [_jsx(DialogOverlay, {}), _jsxs(DialogPrimitive.Content, { ref: ref, className: cn('bg-background fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg sm:rounded-lg', className), ...props, children: [children, _jsxs(DialogPrimitive.Close, { className: "ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 cursor-pointer rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none", children: [_jsx(X, { className: "h-4 w-4" }), _jsx("span", { className: "sr-only", children: "Close" })] })] })] })));
|
|
19
19
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
20
20
|
const DialogHeader = ({ className, ...props }) => (_jsx("div", { className: cn('flex flex-col space-y-1.5 text-center sm:text-left', className), ...props }));
|
|
21
21
|
DialogHeader.displayName = 'DialogHeader';
|
|
@@ -28,7 +28,7 @@ export interface GraphCallbacks {
|
|
|
28
28
|
/** Called when the user opens settings/details on a feature node. */
|
|
29
29
|
onNodeSettings?: (nodeId: string) => void;
|
|
30
30
|
/** Called when the user deletes a feature. */
|
|
31
|
-
onFeatureDelete?: (featureId: string) => void;
|
|
31
|
+
onFeatureDelete?: (featureId: string, cleanup?: boolean) => void;
|
|
32
32
|
/** Called when the user clicks the "+" add-feature button on a repo node. */
|
|
33
33
|
onRepositoryAdd?: (repoNodeId: string) => void;
|
|
34
34
|
/** Called when the user clicks a repo node to navigate to its detail page. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive-graph.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/lib/derive-graph.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,qDAAqD;AACrD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,eAAe,CAAC;IACtB,sGAAsG;IACtG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wDAAwD;AACxD,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,4FAA4F;IAC5F,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,qEAAqE;IACrE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,8CAA8C;IAC9C,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"derive-graph.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/lib/derive-graph.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,qDAAqD;AACrD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,eAAe,CAAC;IACtB,sGAAsG;IACtG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wDAAwD;AACxD,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,4FAA4F;IAC5F,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,qEAAqE;IACrE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,8CAA8C;IAC9C,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjE,6EAA6E;IAC7E,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EACrC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAC/B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EACrC,SAAS,CAAC,EAAE,cAAc,GACzB;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CAyH5C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"next.config.d.ts","sourceRoot":"","sources":["../../../../src/presentation/web/next.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAgCvC,QAAA,MAAM,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"next.config.d.ts","sourceRoot":"","sources":["../../../../src/presentation/web/next.config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAgCvC,QAAA,MAAM,UAAU,EAAE,UAsCjB,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -53,5 +53,11 @@ const nextConfig = {
|
|
|
53
53
|
// Use standalone output mode for server-side rendering on demand
|
|
54
54
|
// This prevents issues with statically prerendering pages that depend on client context
|
|
55
55
|
output: 'standalone',
|
|
56
|
+
// Allow attachment uploads up to 11 MB (10 MB limit + multipart overhead)
|
|
57
|
+
experimental: {
|
|
58
|
+
serverActions: {
|
|
59
|
+
bodySizeLimit: '11mb',
|
|
60
|
+
},
|
|
61
|
+
},
|
|
56
62
|
};
|
|
57
63
|
export default nextConfig;
|