@shepai/cli 1.87.0 → 1.88.0-pr261.1582032
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/PrdRejectionPayload.yaml +5 -0
- package/apis/json-schema/RejectionFeedbackEntry.yaml +5 -0
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts +1 -1
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/agents/reject-agent-run.use-case.js +3 -1
- package/dist/packages/core/src/domain/generated/output.d.ts +8 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/get-graph-data.js +22 -0
- package/dist/src/presentation/web/app/actions/reject-feature.d.ts +1 -1
- package/dist/src/presentation/web/app/actions/reject-feature.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/reject-feature.js +2 -2
- 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 +6 -5
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar-config.d.ts +12 -5
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.d.ts +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.js +266 -13
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.d.ts +2 -4
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.js +3 -11
- package/dist/src/presentation/web/components/common/drawer-action-bar/index.d.ts +1 -1
- package/dist/src/presentation/web/components/common/drawer-action-bar/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts +4 -3
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +2 -2
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +6 -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 +7 -2
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts +3 -0
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.js +41 -0
- package/dist/src/presentation/web/components/common/merge-review/merge-review-config.d.ts +2 -1
- package/dist/src/presentation/web/components/common/merge-review/merge-review-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/merge-review/merge-review.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/merge-review/merge-review.js +2 -2
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.d.ts +2 -1
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/prd-questionnaire/prd-questionnaire.js +2 -2
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/tech-decisions-review/tech-decisions-review.js +2 -2
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- 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 +1 -1
- package/web/.next/required-server-files.json +1 -1
- 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.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.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.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.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.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.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.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.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_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
- 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_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.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_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/403f9_next_dist_esm_build_templates_app-route_4d623b8e.js.map +1 -1
- 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_9027d30a._.js +3 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9027d30a._.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]__5d87af2e._.js +1 -1
- 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]__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]__c2173b6d._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c2173b6d._.js.map +1 -0
- 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]__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 +1 -1
- package/web/.next/server/chunks/ssr/_135edb9c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_1bb131c4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_cf366ac8._.js → _411648c4._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_cf366ac8._.js.map → _411648c4._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_6e08ce21._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_752e01fd._.js +1 -1
- package/web/.next/server/chunks/ssr/_752e01fd._.js.map +1 -1
- 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/{_887258d0._.js → _903aed47._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_887258d0._.js.map → _903aed47._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_c8695490._.js +4 -0
- package/web/.next/server/chunks/ssr/_c8695490._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_cc46119f._.js +3 -0
- package/web/.next/server/chunks/ssr/_cc46119f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_cc77a143._.js +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.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_c931457d._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_c931457d._.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_app_(dashboard)_get-graph-data_ts_b018483e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_(dashboard)_get-graph-data_ts_b018483e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_c4348b8a._.js +2 -2
- 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 +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_de814675._.js.map +1 -1
- 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_e4510d10._.js +2 -2
- 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/0183aafcaf9930dc.js +2 -0
- package/web/.next/static/chunks/13f001d288fadb37.css +2 -0
- package/web/.next/static/chunks/{553ebb57e23539a0.js → 186ae72f3f324718.js} +1 -1
- package/web/.next/static/chunks/1e0cfdcb44a16493.js +1 -0
- package/web/.next/static/chunks/{07c448f82a47be9b.js → 2689eaed9dbdfb7f.js} +1 -1
- package/web/.next/static/chunks/{370ff313c8ecbf40.js → 3067a5eb1d522628.js} +1 -1
- package/web/.next/static/chunks/42207de02e4b7ba5.js +1 -0
- package/web/.next/static/chunks/59e937d05c58e81e.js +1 -0
- package/web/.next/static/chunks/5c55da0e28e6cdc8.js +1 -0
- package/web/.next/static/chunks/{291ca11b0444a406.js → 61e6d3b46f17c87e.js} +1 -1
- package/web/.next/static/chunks/{a7b53fdf8b1142dd.js → 7cf5c770e8e76892.js} +1 -1
- package/web/.next/static/chunks/89da0c2b84796c10.js +1 -0
- package/web/.next/static/chunks/{6297253706a181d9.js → be746bae3c21b5c8.js} +1 -1
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js +0 -3
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_9751e686._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ae824a5b._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ae824a5b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_5860e4e2._.js +0 -3
- package/web/.next/server/chunks/ssr/_5860e4e2._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_b29b7044._.js +0 -4
- package/web/.next/server/chunks/ssr/_b29b7044._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_07f6911c._.js.map +0 -1
- package/web/.next/static/chunks/13b44f31bc42c75f.js +0 -1
- package/web/.next/static/chunks/30c827a88342741e.js +0 -1
- package/web/.next/static/chunks/3e8082bdb91101cd.js +0 -1
- package/web/.next/static/chunks/4e793015b0080efb.js +0 -2
- package/web/.next/static/chunks/91d63f8e429f5900.css +0 -2
- package/web/.next/static/chunks/a1c2ecb710b44081.js +0 -1
- package/web/.next/static/chunks/a4c011f21bb06fe3.js +0 -1
- /package/web/.next/static/{8io5aUA9fyFtLguGngwMV → f3GhuqZV36zTIufRvccQu}/_buildManifest.js +0 -0
- /package/web/.next/static/{8io5aUA9fyFtLguGngwMV → f3GhuqZV36zTIufRvccQu}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{8io5aUA9fyFtLguGngwMV → f3GhuqZV36zTIufRvccQu}/_ssgManifest.js +0 -0
|
@@ -1,29 +1,282 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { Send } from 'lucide-react';
|
|
3
|
+
import { useState, useCallback, useRef, useEffect } from 'react';
|
|
4
|
+
import { PaperclipIcon, Send, ChevronLeft, Check } from 'lucide-react';
|
|
5
|
+
import { cn } from '../../../lib/utils.js';
|
|
5
6
|
import { Button } from '../../ui/button.js';
|
|
6
|
-
import {
|
|
7
|
+
import { Textarea } from '../../ui/textarea.js';
|
|
8
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip.js';
|
|
7
9
|
import { useSoundAction } from '../../../hooks/use-sound-action.js';
|
|
8
|
-
|
|
10
|
+
import { AttachmentChip } from '../../common/attachment-chip/index.js';
|
|
11
|
+
import { pickFiles } from '../../common/feature-create-drawer/pick-files.js';
|
|
12
|
+
const MAX_FILE_SIZE = 10 * 1024 * 1024; // 10 MB
|
|
13
|
+
const ALLOWED_EXTENSIONS = new Set([
|
|
14
|
+
'.png',
|
|
15
|
+
'.jpg',
|
|
16
|
+
'.jpeg',
|
|
17
|
+
'.gif',
|
|
18
|
+
'.webp',
|
|
19
|
+
'.svg',
|
|
20
|
+
'.bmp',
|
|
21
|
+
'.ico',
|
|
22
|
+
'.pdf',
|
|
23
|
+
'.doc',
|
|
24
|
+
'.docx',
|
|
25
|
+
'.xls',
|
|
26
|
+
'.xlsx',
|
|
27
|
+
'.ppt',
|
|
28
|
+
'.pptx',
|
|
29
|
+
'.txt',
|
|
30
|
+
'.md',
|
|
31
|
+
'.csv',
|
|
32
|
+
'.json',
|
|
33
|
+
'.yaml',
|
|
34
|
+
'.yml',
|
|
35
|
+
'.xml',
|
|
36
|
+
'.ts',
|
|
37
|
+
'.tsx',
|
|
38
|
+
'.js',
|
|
39
|
+
'.jsx',
|
|
40
|
+
'.py',
|
|
41
|
+
'.rb',
|
|
42
|
+
'.go',
|
|
43
|
+
'.rs',
|
|
44
|
+
'.java',
|
|
45
|
+
'.c',
|
|
46
|
+
'.cpp',
|
|
47
|
+
'.h',
|
|
48
|
+
'.hpp',
|
|
49
|
+
'.cs',
|
|
50
|
+
'.swift',
|
|
51
|
+
'.kt',
|
|
52
|
+
'.html',
|
|
53
|
+
'.css',
|
|
54
|
+
'.scss',
|
|
55
|
+
'.less',
|
|
56
|
+
'.sh',
|
|
57
|
+
'.bash',
|
|
58
|
+
'.zsh',
|
|
59
|
+
'.fish',
|
|
60
|
+
'.toml',
|
|
61
|
+
'.ini',
|
|
62
|
+
'.cfg',
|
|
63
|
+
'.conf',
|
|
64
|
+
'.env',
|
|
65
|
+
'.zip',
|
|
66
|
+
'.tar',
|
|
67
|
+
'.gz',
|
|
68
|
+
'.log',
|
|
69
|
+
]);
|
|
70
|
+
function getExtension(filename) {
|
|
71
|
+
const dot = filename.lastIndexOf('.');
|
|
72
|
+
return dot >= 0 ? filename.slice(dot).toLowerCase() : '';
|
|
73
|
+
}
|
|
74
|
+
export function DrawerActionBar({ onReject, onApprove, approveLabel, revisionPlaceholder, isProcessing = false, isRejecting = false, children, chatInput: controlledChatInput, onChatInputChange, }) {
|
|
9
75
|
const [internalChatInput, setInternalChatInput] = useState('');
|
|
10
76
|
const chatInput = controlledChatInput ?? internalChatInput;
|
|
11
77
|
const setChatInput = onChatInputChange ?? setInternalChatInput;
|
|
12
78
|
const approveSound = useSoundAction('approve');
|
|
13
79
|
const disabled = isProcessing || isRejecting;
|
|
14
|
-
|
|
80
|
+
const [attachments, setAttachments] = useState([]);
|
|
81
|
+
const [isDragOver, setIsDragOver] = useState(false);
|
|
82
|
+
const [uploadError, setUploadError] = useState(null);
|
|
83
|
+
const [hoverExpanded, setHoverExpanded] = useState(false);
|
|
84
|
+
const [ctrlHeld, setCtrlHeld] = useState(false);
|
|
85
|
+
const [shiftHeld, setShiftHeld] = useState(false);
|
|
86
|
+
const approveExpanded = hoverExpanded || (ctrlHeld && shiftHeld);
|
|
87
|
+
const rejectHighlighted = ctrlHeld && !shiftHeld;
|
|
88
|
+
const dragCounterRef = useRef(0);
|
|
89
|
+
const sessionIdRef = useRef(crypto.randomUUID());
|
|
90
|
+
const formRef = useRef(null);
|
|
91
|
+
// Track Ctrl/Meta + Shift keys for button state
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
function onKeyDown(e) {
|
|
94
|
+
if (e.key === 'Control' || e.key === 'Meta')
|
|
95
|
+
setCtrlHeld(true);
|
|
96
|
+
if (e.key === 'Shift')
|
|
97
|
+
setShiftHeld(true);
|
|
98
|
+
}
|
|
99
|
+
function onKeyUp(e) {
|
|
100
|
+
if (e.key === 'Control' || e.key === 'Meta')
|
|
101
|
+
setCtrlHeld(false);
|
|
102
|
+
if (e.key === 'Shift')
|
|
103
|
+
setShiftHeld(false);
|
|
104
|
+
}
|
|
105
|
+
function onBlur() {
|
|
106
|
+
setCtrlHeld(false);
|
|
107
|
+
setShiftHeld(false);
|
|
108
|
+
}
|
|
109
|
+
window.addEventListener('keydown', onKeyDown);
|
|
110
|
+
window.addEventListener('keyup', onKeyUp);
|
|
111
|
+
window.addEventListener('blur', onBlur);
|
|
112
|
+
return () => {
|
|
113
|
+
window.removeEventListener('keydown', onKeyDown);
|
|
114
|
+
window.removeEventListener('keyup', onKeyUp);
|
|
115
|
+
window.removeEventListener('blur', onBlur);
|
|
116
|
+
};
|
|
117
|
+
}, []);
|
|
118
|
+
const handleFiles = useCallback(async (fileList) => {
|
|
119
|
+
setUploadError(null);
|
|
120
|
+
for (const file of fileList) {
|
|
121
|
+
if (file.size > MAX_FILE_SIZE) {
|
|
122
|
+
setUploadError(`"${file.name}" exceeds 10 MB limit`);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
const ext = getExtension(file.name);
|
|
126
|
+
if (ext && !ALLOWED_EXTENSIONS.has(ext)) {
|
|
127
|
+
setUploadError(`File type "${ext}" is not allowed`);
|
|
128
|
+
return;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
for (const file of fileList) {
|
|
132
|
+
const tempId = crypto.randomUUID();
|
|
133
|
+
setAttachments((prev) => [
|
|
134
|
+
...prev,
|
|
135
|
+
{
|
|
136
|
+
id: tempId,
|
|
137
|
+
name: file.name,
|
|
138
|
+
size: file.size,
|
|
139
|
+
mimeType: file.type || 'application/octet-stream',
|
|
140
|
+
path: '',
|
|
141
|
+
loading: true,
|
|
142
|
+
},
|
|
143
|
+
]);
|
|
144
|
+
try {
|
|
145
|
+
const formData = new FormData();
|
|
146
|
+
formData.append('file', file);
|
|
147
|
+
formData.append('sessionId', sessionIdRef.current);
|
|
148
|
+
const res = await fetch('/api/attachments/upload', {
|
|
149
|
+
method: 'POST',
|
|
150
|
+
body: formData,
|
|
151
|
+
});
|
|
152
|
+
if (!res.ok) {
|
|
153
|
+
const body = await res.json().catch(() => ({ error: 'Upload failed' }));
|
|
154
|
+
setAttachments((prev) => prev.filter((a) => a.id !== tempId));
|
|
155
|
+
setUploadError(body.error ?? 'Upload failed');
|
|
156
|
+
return;
|
|
157
|
+
}
|
|
158
|
+
const uploaded = await res.json();
|
|
159
|
+
setAttachments((prev) => {
|
|
160
|
+
const isDupe = prev.some((a) => a.id !== tempId && a.path === uploaded.path);
|
|
161
|
+
if (isDupe)
|
|
162
|
+
return prev.filter((a) => a.id !== tempId);
|
|
163
|
+
return prev.map((a) => a.id === tempId ? { ...uploaded, id: tempId, loading: false } : a);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
catch {
|
|
167
|
+
setAttachments((prev) => prev.filter((a) => a.id !== tempId));
|
|
168
|
+
setUploadError('Upload failed');
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}, []);
|
|
172
|
+
const handleDragEnter = useCallback((e) => {
|
|
15
173
|
e.preventDefault();
|
|
16
|
-
|
|
17
|
-
|
|
174
|
+
e.stopPropagation();
|
|
175
|
+
dragCounterRef.current += 1;
|
|
176
|
+
if (dragCounterRef.current === 1)
|
|
177
|
+
setIsDragOver(true);
|
|
178
|
+
}, []);
|
|
179
|
+
const handleDragLeave = useCallback((e) => {
|
|
180
|
+
e.preventDefault();
|
|
181
|
+
e.stopPropagation();
|
|
182
|
+
dragCounterRef.current -= 1;
|
|
183
|
+
if (dragCounterRef.current === 0)
|
|
184
|
+
setIsDragOver(false);
|
|
185
|
+
}, []);
|
|
186
|
+
const handleDragOver = useCallback((e) => {
|
|
187
|
+
e.preventDefault();
|
|
188
|
+
e.stopPropagation();
|
|
189
|
+
}, []);
|
|
190
|
+
const handleDrop = useCallback((e) => {
|
|
191
|
+
e.preventDefault();
|
|
192
|
+
e.stopPropagation();
|
|
193
|
+
dragCounterRef.current = 0;
|
|
194
|
+
setIsDragOver(false);
|
|
195
|
+
const files = Array.from(e.dataTransfer.files);
|
|
196
|
+
if (files.length > 0)
|
|
197
|
+
handleFiles(files);
|
|
198
|
+
}, [handleFiles]);
|
|
199
|
+
const handlePaste = useCallback((e) => {
|
|
200
|
+
const items = e.clipboardData?.items;
|
|
201
|
+
if (!items)
|
|
18
202
|
return;
|
|
19
|
-
|
|
203
|
+
const files = [];
|
|
204
|
+
for (const item of Array.from(items)) {
|
|
205
|
+
if (item.kind === 'file') {
|
|
206
|
+
const file = item.getAsFile();
|
|
207
|
+
if (file)
|
|
208
|
+
files.push(file);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
if (files.length > 0) {
|
|
212
|
+
e.preventDefault();
|
|
213
|
+
handleFiles(files);
|
|
214
|
+
}
|
|
215
|
+
}, [handleFiles]);
|
|
216
|
+
const handleAddFiles = useCallback(async () => {
|
|
217
|
+
try {
|
|
218
|
+
const files = await pickFiles();
|
|
219
|
+
if (files) {
|
|
220
|
+
setAttachments((prev) => {
|
|
221
|
+
const existingPaths = new Set(prev.map((f) => f.path));
|
|
222
|
+
const unique = files
|
|
223
|
+
.filter((f) => !existingPaths.has(f.path))
|
|
224
|
+
.map((f) => ({
|
|
225
|
+
id: crypto.randomUUID(),
|
|
226
|
+
name: f.name,
|
|
227
|
+
size: f.size,
|
|
228
|
+
mimeType: 'application/octet-stream',
|
|
229
|
+
path: f.path,
|
|
230
|
+
}));
|
|
231
|
+
return unique.length > 0 ? [...prev, ...unique] : prev;
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
catch {
|
|
236
|
+
// Native dialog failed — silently ignore
|
|
237
|
+
}
|
|
238
|
+
}, []);
|
|
239
|
+
const handleRemoveFile = useCallback((id) => {
|
|
240
|
+
setAttachments((prev) => prev.filter((f) => f.id !== id));
|
|
241
|
+
}, []);
|
|
242
|
+
const clearForm = useCallback(() => {
|
|
20
243
|
setChatInput('');
|
|
244
|
+
setAttachments([]);
|
|
245
|
+
setUploadError(null);
|
|
246
|
+
}, [setChatInput]);
|
|
247
|
+
function handleFormSubmit(e) {
|
|
248
|
+
e.preventDefault();
|
|
249
|
+
const text = chatInput.trim();
|
|
250
|
+
if (hoverExpanded || (ctrlHeld && shiftHeld)) {
|
|
251
|
+
// Approve mode (hovering arrow or Shift held)
|
|
252
|
+
approveSound.play();
|
|
253
|
+
onApprove();
|
|
254
|
+
clearForm();
|
|
255
|
+
}
|
|
256
|
+
else {
|
|
257
|
+
// Reject mode — text required
|
|
258
|
+
if (!text || !onReject)
|
|
259
|
+
return;
|
|
260
|
+
onReject(text, attachments.filter((a) => !a.loading));
|
|
261
|
+
clearForm();
|
|
262
|
+
}
|
|
21
263
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
264
|
+
const handleKeyDown = useCallback((e) => {
|
|
265
|
+
if ((e.ctrlKey || e.metaKey) && e.key === 'Enter') {
|
|
266
|
+
e.preventDefault();
|
|
267
|
+
// Ctrl+Shift+Enter = approve, Ctrl+Enter = reject
|
|
268
|
+
formRef.current?.requestSubmit();
|
|
269
|
+
}
|
|
270
|
+
}, []);
|
|
271
|
+
const modKey = typeof navigator !== 'undefined' && /Mac/i.test(navigator.userAgent) ? '⌘' : 'Ctrl';
|
|
272
|
+
return (_jsxs("div", { className: "border-border shrink-0 border-t", children: [children, onReject ? (_jsx(TooltipProvider, { delayDuration: 400, children: _jsx("form", { ref: formRef, onSubmit: handleFormSubmit, className: "p-3", children: _jsx("div", { role: "region", "aria-label": "File drop zone", "data-drag-over": isDragOver ? 'true' : 'false', onDragEnter: handleDragEnter, onDragLeave: handleDragLeave, onDragOver: handleDragOver, onDrop: handleDrop, className: cn('rounded-md border-2 border-transparent transition-colors', isDragOver && 'border-primary/50 bg-primary/5'), children: _jsxs("div", { className: "border-input focus-within:ring-ring/50 focus-within:border-ring flex flex-col overflow-hidden rounded-md border shadow-xs transition-[color,box-shadow] focus-within:ring-[3px]", children: [_jsx(Textarea, { placeholder: revisionPlaceholder ?? 'Ask AI to revise...', "aria-label": revisionPlaceholder ?? 'Ask AI to revise...', disabled: disabled, value: chatInput, onChange: (e) => setChatInput(e.target.value), onKeyDown: handleKeyDown, onPaste: handlePaste, rows: 3, className: "min-h-0 flex-1 resize-none rounded-none border-0 shadow-none focus-visible:ring-0", "data-testid": "drawer-chat-input" }), 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: disabled, 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-2 border-t px-3 py-1.5", children: [_jsxs("span", { className: "text-muted-foreground flex-1 truncate text-[11px]", children: [_jsxs("kbd", { className: "bg-muted rounded px-1 py-0.5 font-mono text-[10px]", children: [modKey, "+Enter"] }), ' ', "reject", _jsx("span", { className: "mx-1 opacity-40", children: "|" }), _jsxs("kbd", { className: "bg-muted rounded px-1 py-0.5 font-mono text-[10px]", children: [modKey, "+Shift+Enter"] }), ' ', "approve"] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", onClick: handleAddFiles, disabled: disabled, "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: "top", children: "Attach files" })] }), _jsx("div", { onMouseLeave: () => setHoverExpanded(false), children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("button", { type: "submit", disabled: disabled, "data-testid": "drawer-action-submit", className: cn('relative flex h-8 min-w-[10rem] cursor-pointer items-center overflow-hidden rounded-md border pr-10 pl-4 text-sm font-medium whitespace-nowrap transition-colors', 'disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50', approveExpanded
|
|
273
|
+
? 'border-blue-400/60 text-white'
|
|
274
|
+
: rejectHighlighted
|
|
275
|
+
? 'border-primary bg-muted ring-primary/30 shadow-sm ring-1'
|
|
276
|
+
: 'border-border bg-muted/50 hover:bg-muted shadow-sm'), children: [_jsx("div", { className: "pointer-events-none absolute inset-0 bg-blue-500/85 transition-transform duration-300 ease-in-out", style: {
|
|
277
|
+
transform: approveExpanded ? 'translateX(0)' : 'translateX(100%)',
|
|
278
|
+
} }), _jsxs("span", { className: cn('absolute inset-0 z-10 flex items-center justify-center gap-1.5 pr-8 transition-opacity duration-300', approveExpanded ? 'opacity-0' : 'opacity-100'), children: [_jsx(Send, { className: "h-3.5 w-3.5 shrink-0" }), "Reject"] }), _jsxs("span", { className: cn('absolute inset-0 z-10 flex items-center justify-center gap-1.5 text-white transition-opacity duration-300', approveExpanded ? 'opacity-100' : 'opacity-0'), children: [_jsx(Check, { className: "h-3.5 w-3.5 shrink-0" }), approveLabel] }), _jsx("span", { className: cn('border-input/60 absolute inset-y-0 right-0 z-20 flex w-8 cursor-pointer items-center justify-center rounded-r-[5px] border-l bg-blue-500/85 transition-opacity duration-300', approveExpanded && 'pointer-events-none opacity-0'), onMouseEnter: () => setHoverExpanded(true), children: _jsx(ChevronLeft, { className: "h-3.5 w-3.5 text-white" }) })] }) }), _jsx(TooltipContent, { side: "top", children: approveExpanded ? 'Approve' : 'Send revision feedback' })] }) })] })] }) }) }) })) : (_jsx("div", { className: "flex items-center gap-2 px-4 pb-4", children: _jsx(Button, { type: "button", className: "flex-1", disabled: disabled, onClick: () => {
|
|
26
279
|
approveSound.play();
|
|
27
280
|
onApprove();
|
|
28
|
-
}, children:
|
|
281
|
+
}, children: approveLabel }) }))] }));
|
|
29
282
|
}
|
package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.d.ts
CHANGED
|
@@ -3,11 +3,9 @@ import { DrawerActionBar } from './drawer-action-bar.js';
|
|
|
3
3
|
declare const meta: Meta<typeof DrawerActionBar>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof DrawerActionBar>;
|
|
6
|
-
/** Default — approve button
|
|
6
|
+
/** Default — approve-only button (no reject input). */
|
|
7
7
|
export declare const Default: Story;
|
|
8
|
-
/**
|
|
9
|
-
export declare const WithIcon: Story;
|
|
10
|
-
/** With revision input — single line: chat input, send, approve. */
|
|
8
|
+
/** Two-button bar: Reject + Approve with slide-expand animation on hover. */
|
|
11
9
|
export declare const WithReject: Story;
|
|
12
10
|
/** Processing state — all controls disabled. */
|
|
13
11
|
export declare const Processing: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drawer-action-bar.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"drawer-action-bar.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,eAAe,CAkBtC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9C,uDAAuD;AACvD,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,6EAA6E;AAC7E,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAEF,gDAAgD;AAChD,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC;AAEF,+CAA+C;AAC/C,eAAO,MAAM,SAAS,EAAE,KAMvB,CAAC;AAEF,mCAAmC;AACnC,eAAO,MAAM,iBAAiB,EAAE,KAM/B,CAAC"}
|
package/dist/src/presentation/web/components/common/drawer-action-bar/drawer-action-bar.stories.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { fn } from '@storybook/test';
|
|
3
|
-
import { Check } from 'lucide-react';
|
|
4
3
|
import { DrawerActionBar } from './drawer-action-bar.js';
|
|
5
4
|
const meta = {
|
|
6
5
|
title: 'Drawers/Base/DrawerActionBar',
|
|
@@ -18,16 +17,9 @@ const meta = {
|
|
|
18
17
|
],
|
|
19
18
|
};
|
|
20
19
|
export default meta;
|
|
21
|
-
/** Default — approve button
|
|
20
|
+
/** Default — approve-only button (no reject input). */
|
|
22
21
|
export const Default = {};
|
|
23
|
-
/**
|
|
24
|
-
export const WithIcon = {
|
|
25
|
-
args: {
|
|
26
|
-
approveLabel: 'Approve PRD',
|
|
27
|
-
approveIcon: _jsx(Check, { className: "mr-1.5 h-4 w-4" }),
|
|
28
|
-
},
|
|
29
|
-
};
|
|
30
|
-
/** With revision input — single line: chat input, send, approve. */
|
|
22
|
+
/** Two-button bar: Reject + Approve with slide-expand animation on hover. */
|
|
31
23
|
export const WithReject = {
|
|
32
24
|
args: {
|
|
33
25
|
onReject: fn().mockName('onReject'),
|
|
@@ -54,7 +46,7 @@ export const Rejecting = {
|
|
|
54
46
|
export const WithRevisionInput = {
|
|
55
47
|
args: {
|
|
56
48
|
onReject: fn().mockName('onReject'),
|
|
57
|
-
approveLabel: 'Approve',
|
|
49
|
+
approveLabel: 'Approve Plan',
|
|
58
50
|
revisionPlaceholder: 'Ask AI to revise the plan...',
|
|
59
51
|
},
|
|
60
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/drawer-action-bar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/drawer-action-bar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC"}
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import type { PrdQuestionnaireData } from '../../common/prd-questionnaire/index.
|
|
|
3
3
|
import type { TechDecisionsReviewData } from '../../common/tech-decisions-review/index.js';
|
|
4
4
|
import type { ProductDecisionsSummaryData } from '../../common/product-decisions-summary/index.js';
|
|
5
5
|
import type { MergeReviewData } from '../../common/merge-review/index.js';
|
|
6
|
+
import type { RejectAttachment } from '../../common/drawer-action-bar/index.js';
|
|
6
7
|
import type { FeatureTabKey } from '../../common/control-center-drawer/drawer-view.js';
|
|
7
8
|
export interface FeatureDrawerTabsProps {
|
|
8
9
|
featureNode: FeatureNodeData;
|
|
@@ -12,16 +13,16 @@ export interface FeatureDrawerTabsProps {
|
|
|
12
13
|
prdSelections?: Record<string, string>;
|
|
13
14
|
onPrdSelect?: (questionId: string, optionId: string) => void;
|
|
14
15
|
onPrdApprove?: (actionId: string) => void;
|
|
15
|
-
onPrdReject?: (feedback: string) => void;
|
|
16
|
+
onPrdReject?: (feedback: string, attachments: RejectAttachment[]) => void;
|
|
16
17
|
isPrdLoading?: boolean;
|
|
17
18
|
techData?: TechDecisionsReviewData | null;
|
|
18
19
|
onTechApprove?: () => void;
|
|
19
|
-
onTechReject?: (feedback: string) => void;
|
|
20
|
+
onTechReject?: (feedback: string, attachments: RejectAttachment[]) => void;
|
|
20
21
|
isTechLoading?: boolean;
|
|
21
22
|
productData?: ProductDecisionsSummaryData | null;
|
|
22
23
|
mergeData?: MergeReviewData | null;
|
|
23
24
|
onMergeApprove?: () => void;
|
|
24
|
-
onMergeReject?: (feedback: string) => void;
|
|
25
|
+
onMergeReject?: (feedback: string, attachments: RejectAttachment[]) => void;
|
|
25
26
|
isMergeLoading?: boolean;
|
|
26
27
|
isRejecting?: boolean;
|
|
27
28
|
chatInput?: string;
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-drawer-tabs.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"feature-drawer-tabs.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAMxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAQ9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AAiD3F,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,eAAe,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,aAAa,CAAC;IAG3B,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IAGvB,QAAQ,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC3E,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,WAAW,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAGjD,SAAS,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC5E,cAAc,CAAC,EAAE,OAAO,CAAC;IAGzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAwBD,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,SAAS,EACT,UAAU,EACV,OAAO,EACP,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,EACb,WAAW,EACX,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EACd,WAAW,EACX,SAAS,EACT,iBAAiB,GAClB,EAAE,sBAAsB,2CA4MxB"}
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect, useCallback, useRef, useMemo } from 'react';
|
|
4
|
-
import { Loader2
|
|
4
|
+
import { Loader2 } from 'lucide-react';
|
|
5
5
|
import { Tabs, TabsList, TabsTrigger, TabsContent } from '../../ui/tabs.js';
|
|
6
6
|
import { getFeaturePhaseTimings } from '../../../app/actions/get-feature-phase-timings.js';
|
|
7
7
|
import { getFeaturePlan } from '../../../app/actions/get-feature-plan.js';
|
|
@@ -119,5 +119,5 @@ export function FeatureDrawerTabs({ featureNode, featureId, initialTab, prdData,
|
|
|
119
119
|
}
|
|
120
120
|
// ── Private helper ──────────────────────────────────────────────────────
|
|
121
121
|
function DrawerActionBarForTech({ onApprove, onReject, isProcessing, isRejecting, chatInput, onChatInputChange, }) {
|
|
122
|
-
return (_jsx(DrawerActionBar, { onReject: onReject, onApprove: onApprove, approveLabel: "Approve Plan",
|
|
122
|
+
return (_jsx(DrawerActionBar, { onReject: onReject, onApprove: onApprove, approveLabel: "Approve Plan", revisionPlaceholder: "Ask AI to revise the plan...", isProcessing: isProcessing, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange }));
|
|
123
123
|
}
|
package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type LucideIcon } from 'lucide-react';
|
|
2
2
|
import type { Node } from '@xyflow/react';
|
|
3
|
-
import type { PrStatus, CiStatus } from '../../../../../../packages/core/src/domain/generated/output.js';
|
|
3
|
+
import type { PrStatus, CiStatus, DeploymentState } from '../../../../../../packages/core/src/domain/generated/output.js';
|
|
4
4
|
import type { AgentTypeValue } from './agent-type-icons.js';
|
|
5
5
|
export type FeatureNodeState = 'creating' | 'running' | 'action-required' | 'done' | 'blocked' | 'error';
|
|
6
6
|
export type FeatureLifecyclePhase = 'requirements' | 'research' | 'implementation' | 'review' | 'deploy' | 'maintain';
|
|
@@ -58,6 +58,11 @@ export interface FeatureNodeData {
|
|
|
58
58
|
ciStatus?: CiStatus;
|
|
59
59
|
commitHash?: string;
|
|
60
60
|
};
|
|
61
|
+
/** Deployment status for features with an active deployment */
|
|
62
|
+
deployment?: {
|
|
63
|
+
status: DeploymentState;
|
|
64
|
+
url?: string;
|
|
65
|
+
};
|
|
61
66
|
onAction?: () => void;
|
|
62
67
|
onSettings?: () => void;
|
|
63
68
|
onDelete?: (featureId: string, cleanup?: boolean) => void;
|
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;
|
|
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,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAChG,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,+DAA+D;IAC/D,UAAU,CAAC,EAAE;QACX,MAAM,EAAE,eAAe,CAAC;QACxB,GAAG,CAAC,EAAE,MAAM,CAAC;KACd,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":"AAuBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AA0DnE,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,2CAgRA"}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Handle, Position } from '@xyflow/react';
|
|
5
|
-
import { Plus, FileText, Wrench, GitMerge, Trash2, Zap } from 'lucide-react';
|
|
5
|
+
import { Plus, FileText, Wrench, GitMerge, Trash2, Zap, Loader2, Globe, } from 'lucide-react';
|
|
6
6
|
import { cn } from '../../../lib/utils.js';
|
|
7
7
|
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip.js';
|
|
8
8
|
import { DeleteFeatureDialog } from '../../common/delete-feature-dialog/index.js';
|
|
9
9
|
import { featureNodeStateConfig, lifecycleDisplayLabels, lifecycleRunningVerbs, } from './feature-node-state-config.js';
|
|
10
10
|
import { getAgentTypeIcon, agentTypeLabels } from './agent-type-icons.js';
|
|
11
11
|
import { getModelMeta } from '../../../lib/model-metadata.js';
|
|
12
|
+
import { DeploymentState } from '../../../../../../packages/core/src/domain/generated/output.js';
|
|
12
13
|
function AgentIcon({ agentType, className }) {
|
|
13
14
|
const IconComponent = getAgentTypeIcon(agentType);
|
|
14
15
|
return _jsx(IconComponent, { className: className });
|
|
@@ -77,7 +78,11 @@ export function FeatureNode({ data, selected, }) {
|
|
|
77
78
|
data.onSettings?.();
|
|
78
79
|
}, className: cn('nodrag -mt-1 -mr-1 p-1', data.onSettings
|
|
79
80
|
? 'cursor-pointer opacity-80 transition-opacity hover:opacity-100'
|
|
80
|
-
: 'cursor-default'), children: _jsx(AgentIcon, { agentType: data.agentType, className: "h-3.5 w-3.5" }) }) }), _jsxs(TooltipContent, { side: "bottom", children: [_jsx("span", { className: "font-medium", children: agentTypeLabels[data.agentType] ?? data.agentType }), data.modelId ? (_jsxs("span", { className: "ml-1 opacity-70", children: ["\u00B7 ", getModelMeta(data.modelId).displayName || data.modelId] })) : null] })] }) })) : null] })] }), _jsx("h3", { className: "mt-1 truncate text-sm font-bold", children: data.name }), data.description ? (_jsx("p", { "data-testid": "feature-node-description", className: "text-muted-foreground mt-0.5 truncate text-xs", children: data.description })) : null,
|
|
81
|
+
: 'cursor-default'), children: _jsx(AgentIcon, { agentType: data.agentType, className: "h-3.5 w-3.5" }) }) }), _jsxs(TooltipContent, { side: "bottom", children: [_jsx("span", { className: "font-medium", children: agentTypeLabels[data.agentType] ?? data.agentType }), data.modelId ? (_jsxs("span", { className: "ml-1 opacity-70", children: ["\u00B7 ", getModelMeta(data.modelId).displayName || data.modelId] })) : null] })] }) })) : null] })] }), _jsx("h3", { className: "mt-1 truncate text-sm font-bold", children: data.name }), data.description ? (_jsx("p", { "data-testid": "feature-node-description", className: "text-muted-foreground mt-0.5 truncate text-xs", children: data.description })) : null, data.deployment ? (_jsxs("div", { "data-testid": "feature-node-deployment-indicator", className: cn('mt-1.5 flex items-center gap-1.5 rounded-full px-2 py-0.5 text-[10px] font-medium', data.deployment.status === DeploymentState.Booting
|
|
82
|
+
? 'bg-blue-50 text-blue-700'
|
|
83
|
+
: 'bg-green-50 text-green-700'), children: [data.deployment.status === DeploymentState.Booting ? (_jsx(Loader2, { className: "h-3 w-3 animate-spin" })) : (_jsx(Globe, { className: "h-3 w-3" })), _jsx("span", { className: "truncate", children: data.deployment.status === DeploymentState.Booting
|
|
84
|
+
? 'Deploying...'
|
|
85
|
+
: (data.deployment.url ?? 'Live') })] })) : null, _jsx("div", { className: "mt-auto pt-2", children: data.state === 'creating' ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mt-1.5 flex items-center gap-1.5 text-xs", children: [_jsx(Icon, { className: "h-3.5 w-3.5 shrink-0 animate-spin" }), _jsx("span", { className: "text-muted-foreground", children: getBadgeText(data) })] }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "motion-safe:animate-indeterminate-progress bg-foreground/30 h-full w-1/3 rounded-full" }) })] })) : data.state === 'running' ? (_jsxs(_Fragment, { children: [_jsxs("div", { className: "mt-1.5 flex items-center gap-1.5 text-xs", children: [_jsx(AgentIcon, { agentType: data.agentType, className: "h-3.5 w-3.5 shrink-0" }), _jsx("span", { className: "text-muted-foreground", children: getBadgeText(data) })] }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: "animate-indeterminate-progress bg-foreground/30 h-full w-1/3 rounded-full" }) })] })) : config.showProgressBar ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground flex items-center justify-end text-[10px]", children: _jsxs("span", { children: [data.progress, "%"] }) }), _jsx("div", { "data-testid": "feature-node-progress-bar", className: "bg-muted mt-1.5 h-1 w-full overflow-hidden rounded-full", children: _jsx("div", { className: cn('h-full rounded-full transition-all', config.progressClass), style: { width: `${data.progress}%` } }) })] })) : (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-muted-foreground text-[10px]", children: _jsx("span", { children: data.featureId }) }), _jsxs("div", { "data-testid": "feature-node-badge", className: (() => {
|
|
81
86
|
const override = getActionRequiredBadgeClasses(data);
|
|
82
87
|
return cn('mt-1.5 flex items-center justify-center gap-1.5 rounded-full px-2.5 py-1 text-[11px] font-medium', override?.badgeBgClass ?? config.badgeBgClass, override?.badgeClass ?? config.badgeClass);
|
|
83
88
|
})(), children: [(() => {
|
|
@@ -17,5 +17,8 @@ export declare const ErrorWithMessage: Story;
|
|
|
17
17
|
export declare const WithDeleteButton: Story;
|
|
18
18
|
export declare const FastMode: Story;
|
|
19
19
|
export declare const FastModeDone: Story;
|
|
20
|
+
export declare const DeploymentBooting: Story;
|
|
21
|
+
export declare const DeploymentReady: Story;
|
|
22
|
+
export declare const DeploymentReadyNoUrl: Story;
|
|
20
23
|
export declare const Interactive: Story;
|
|
21
24
|
//# sourceMappingURL=feature-node.stories.d.ts.map
|
package/dist/src/presentation/web/components/common/feature-node/feature-node.stories.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-node.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"feature-node.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAMvD,OAAO,KAAK,EACV,eAAe,EAIhB,MAAM,6BAA6B,CAAC;AAiCrC,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,eAAe,CAc/B,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,eAAe,CAAC,CAAC;AAEvC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAsGF,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAWF,eAAO,MAAM,aAAa,EAAE,KAqB3B,CAAC;AA2EF,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAW7B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,KAUvC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAW9B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAatB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAc1B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAY/B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,KAa7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAYlC,CAAC;AA4EF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { expect, fn, waitFor } from '@storybook/test';
|
|
4
4
|
import { ReactFlowProvider, ReactFlow, useNodesState } from '@xyflow/react';
|
|
5
|
+
import { DeploymentState } from '../../../../../../packages/core/src/domain/generated/output.js';
|
|
5
6
|
import { FeatureNode } from './feature-node.js';
|
|
6
7
|
const nodeTypes = { featureNode: FeatureNode };
|
|
7
8
|
/** Renders a single FeatureNode as a proper React Flow node (with node wrapper + pointer events). */
|
|
@@ -338,6 +339,46 @@ export const FastModeDone = {
|
|
|
338
339
|
},
|
|
339
340
|
render: (args) => _jsx(FeatureNodeCanvas, { data: args }),
|
|
340
341
|
};
|
|
342
|
+
export const DeploymentBooting = {
|
|
343
|
+
args: {
|
|
344
|
+
name: 'API Server',
|
|
345
|
+
description: 'REST API with Express',
|
|
346
|
+
featureId: '#d1',
|
|
347
|
+
lifecycle: 'deploy',
|
|
348
|
+
state: 'running',
|
|
349
|
+
progress: 80,
|
|
350
|
+
agentType: 'claude-code',
|
|
351
|
+
deployment: { status: DeploymentState.Booting },
|
|
352
|
+
},
|
|
353
|
+
render: (args) => _jsx(FeatureNodeCanvas, { data: args }),
|
|
354
|
+
};
|
|
355
|
+
export const DeploymentReady = {
|
|
356
|
+
args: {
|
|
357
|
+
name: 'Web Dashboard',
|
|
358
|
+
description: 'Next.js dashboard app',
|
|
359
|
+
featureId: '#d2',
|
|
360
|
+
lifecycle: 'deploy',
|
|
361
|
+
state: 'done',
|
|
362
|
+
progress: 100,
|
|
363
|
+
runtime: '45m',
|
|
364
|
+
agentType: 'claude-code',
|
|
365
|
+
deployment: { status: DeploymentState.Ready, url: 'http://localhost:3000' },
|
|
366
|
+
},
|
|
367
|
+
render: (args) => _jsx(FeatureNodeCanvas, { data: args }),
|
|
368
|
+
};
|
|
369
|
+
export const DeploymentReadyNoUrl = {
|
|
370
|
+
args: {
|
|
371
|
+
name: 'Background Worker',
|
|
372
|
+
description: 'Queue processor service',
|
|
373
|
+
featureId: '#d3',
|
|
374
|
+
lifecycle: 'deploy',
|
|
375
|
+
state: 'done',
|
|
376
|
+
progress: 100,
|
|
377
|
+
runtime: '30m',
|
|
378
|
+
deployment: { status: DeploymentState.Ready },
|
|
379
|
+
},
|
|
380
|
+
render: (args) => _jsx(FeatureNodeCanvas, { data: args }),
|
|
381
|
+
};
|
|
341
382
|
const interactiveInitialNodes = [
|
|
342
383
|
{
|
|
343
384
|
id: 'node-1',
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { PrStatus, CiStatus } from '../../../../../../packages/core/src/domain/generated/output.js';
|
|
2
|
+
import type { RejectAttachment } from '../../common/drawer-action-bar/index.js';
|
|
2
3
|
/** Diff summary statistics for the PR */
|
|
3
4
|
export interface MergeReviewDiffSummary {
|
|
4
5
|
filesChanged: number;
|
|
@@ -47,7 +48,7 @@ export interface MergeReviewProps {
|
|
|
47
48
|
/** Approve merge callback */
|
|
48
49
|
onApprove: () => void;
|
|
49
50
|
/** Reject merge callback — opens feedback dialog when provided; also used for inline text rejection */
|
|
50
|
-
onReject?: (feedback: string) => void;
|
|
51
|
+
onReject?: (feedback: string, attachments: RejectAttachment[]) => void;
|
|
51
52
|
/** Controls disabled state during approval */
|
|
52
53
|
isProcessing?: boolean;
|
|
53
54
|
/** Whether a reject operation is in flight */
|
package/dist/src/presentation/web/components/common/merge-review/merge-review-config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-review-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"merge-review-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAE9E,yCAAyC;AACzC,MAAM,WAAW,sBAAsB;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,4CAA4C;AAC5C,MAAM,WAAW,aAAa;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,QAAQ,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,2CAA2C;AAC3C,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,kCAAkC;AAClC,MAAM,WAAW,iBAAiB;IAChC,0BAA0B;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,uDAAuD;IACvD,EAAE,CAAC,EAAE,aAAa,CAAC;IACnB,uEAAuE;IACvE,WAAW,CAAC,EAAE,sBAAsB,CAAC;IACrC,2CAA2C;IAC3C,MAAM,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC5B,6BAA6B;IAC7B,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,mDAAmD;AACnD,MAAM,WAAW,gBAAgB;IAC/B,+CAA+C;IAC/C,IAAI,EAAE,eAAe,CAAC;IACtB,6BAA6B;IAC7B,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,uGAAuG;IACvG,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IACvE,8CAA8C;IAC9C,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,8CAA8C;IAC9C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oDAAoD;IACpD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sCAAsC;IACtC,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,wDAAwD;AACxD,MAAM,WAAW,sBAAuB,SAAQ,IAAI,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAC5E,6CAA6C;IAC7C,IAAI,EAAE,eAAe,GAAG,IAAI,CAAC;IAC7B,iCAAiC;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,wCAAwC;IACxC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,0CAA0C;IAC1C,WAAW,EAAE,MAAM,CAAC;IACpB,sCAAsC;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,8CAA8C;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,gEAAgE;IAChE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yEAAyE;IACzE,QAAQ,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-review.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"merge-review.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,gBAAgB,EAAoB,MAAM,uBAAuB,CAAC;AAgChF,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,YAAoB,EACpB,WAAmB,EACnB,SAAS,EACT,iBAAiB,GAClB,EAAE,gBAAgB,2CAsIlB"}
|