@shepai/cli 1.92.2 → 1.94.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/presentation/web/app/actions/get-merge-review-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/get-merge-review-data.js +3 -13
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.js +1 -3
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.js +0 -4
- package/dist/src/presentation/web/components/common/merge-review/merge-review-config.d.ts +0 -8
- 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 +3 -6
- package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.d.ts +0 -2
- package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.js +0 -17
- package/dist/src/presentation/web/lib/format-duration.d.ts +11 -0
- package/dist/src/presentation/web/lib/format-duration.d.ts.map +1 -0
- package/dist/src/presentation/web/lib/format-duration.js +26 -0
- 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 +2 -2
- package/web/.next/required-server-files.json +2 -2
- 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]/[tab]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/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]/[tab]/page/server-reference-manifest.json +21 -21
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/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/api/attachments/preview/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.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.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.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/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/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]__45aad79d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__45aad79d._.js.map +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]__5cc4752a._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__5cc4752a._.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]__845a9d2a._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__845a9d2a._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__89e8a5cc._.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]__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/_8dacd1e7._.js +1 -1
- package/web/.next/server/chunks/ssr/_8dacd1e7._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_16a7514c._.js → _9f6b01ba._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_16a7514c._.js.map → _9f6b01ba._.js.map} +1 -1
- 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/_df15bd24._.js +1 -1
- package/web/.next/server/chunks/ssr/_df15bd24._.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/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 -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_e599bb8c._.js +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/{0a1511515cbdf02e.js → 0e4078228269008c.js} +2 -2
- package/web/.next/static/chunks/{1da59e0c79357cf8.js → 2f0da3c393fc4f04.js} +1 -1
- package/web/.next/static/chunks/{449251751b4908f7.js → 34a9700c5d94478b.js} +1 -1
- package/web/.next/static/chunks/{166e31f7adad1949.js → 47d6a912ef998ba6.js} +1 -1
- package/web/.next/static/chunks/{2ae98439dac3693e.js → 5014c892e1ecc7d6.js} +1 -1
- package/web/.next/static/chunks/{62652f0d1304c333.js → 8656ca74dcb26191.js} +1 -1
- package/web/.next/static/chunks/{85c0a8c9420d2064.js → 949f140ebb0ba001.js} +1 -1
- package/web/.next/static/chunks/{ceb79276cb6d8b88.js → a2d089b6a5c4fe0b.js} +1 -1
- package/web/.next/static/chunks/{7bf51da075913f1c.js → aef300837193b9fe.js} +1 -1
- package/web/.next/static/chunks/{4a13c8befddbfae9.js → b2c294b25be01866.js} +1 -1
- package/web/.next/static/chunks/{97b0a13714eb4d92.js → fca533d905e50d78.js} +1 -1
- /package/web/.next/static/{KEWoM0Hk-MbG0_3S8cSrW → FBd4oUGtZ_PQpjMeHHiks}/_buildManifest.js +0 -0
- /package/web/.next/static/{KEWoM0Hk-MbG0_3S8cSrW → FBd4oUGtZ_PQpjMeHHiks}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{KEWoM0Hk-MbG0_3S8cSrW → FBd4oUGtZ_PQpjMeHHiks}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-merge-review-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-merge-review-data.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"get-merge-review-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-merge-review-data.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sDAAsD,CAAC;AAG5F,KAAK,wBAAwB,GAAG,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAiD7F"}
|
|
@@ -21,22 +21,12 @@ export async function getMergeReviewData(featureId) {
|
|
|
21
21
|
}
|
|
22
22
|
: undefined;
|
|
23
23
|
const branch = feature.branch ? { source: feature.branch, target: 'main' } : undefined;
|
|
24
|
-
// Load plan phases (best-effort)
|
|
25
|
-
let phases;
|
|
26
|
-
try {
|
|
27
|
-
const planUseCase = resolve('GetPlanArtifactUseCase');
|
|
28
|
-
const plan = await planUseCase.execute(featureId);
|
|
29
|
-
phases = plan.phases.map(({ id, name, description }) => ({ id, name, description }));
|
|
30
|
-
}
|
|
31
|
-
catch {
|
|
32
|
-
// Plan unavailable — not critical
|
|
33
|
-
}
|
|
34
24
|
const worktreePath = feature.worktreePath ??
|
|
35
25
|
(feature.repositoryPath && feature.branch
|
|
36
26
|
? computeWorktreePath(feature.repositoryPath, feature.branch)
|
|
37
27
|
: null);
|
|
38
28
|
if (!worktreePath) {
|
|
39
|
-
return { pr, branch,
|
|
29
|
+
return { pr, branch, warning: pr ? undefined : 'No PR or diff data available' };
|
|
40
30
|
}
|
|
41
31
|
try {
|
|
42
32
|
const gitPrService = resolve('IGitPrService');
|
|
@@ -44,10 +34,10 @@ export async function getMergeReviewData(featureId) {
|
|
|
44
34
|
gitPrService.getPrDiffSummary(worktreePath, 'main'),
|
|
45
35
|
gitPrService.getFileDiffs(worktreePath, 'main').catch(() => undefined),
|
|
46
36
|
]);
|
|
47
|
-
return { pr, branch,
|
|
37
|
+
return { pr, branch, diffSummary, fileDiffs };
|
|
48
38
|
}
|
|
49
39
|
catch {
|
|
50
|
-
return { pr, branch,
|
|
40
|
+
return { pr, branch, warning: 'Diff statistics unavailable' };
|
|
51
41
|
}
|
|
52
42
|
}
|
|
53
43
|
catch (error) {
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/activity-tab.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"activity-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/activity-tab.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,eAAe,EACf,qBAAqB,EACtB,MAAM,yCAAyC,CAAC;AAIjD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,eAAe,EAAE,GAAG,IAAI,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,iBAAiB,CAAC,EAAE,qBAAqB,EAAE,CAAC;CAC7C;AA6BD;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,+BAA+B;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,mEAAmE;IACnE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,8DAA8D;IAC9D,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,eAAe,EAAE,EAC1B,QAAQ,CAAC,EAAE,qBAAqB,EAAE,GACjC,iBAAiB,EAAE,CAgErB;AAMD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,iBAAiB,EAAE,EAAE,gBAAgB,2CAyD3F"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { Loader2, AlertCircle, Clock } from 'lucide-react';
|
|
4
4
|
import { InlineAttachments } from '../../common/inline-attachments/index.js';
|
|
5
|
+
import { formatDuration } from '../../../lib/format-duration.js';
|
|
5
6
|
const NODE_TO_PHASE = {
|
|
6
7
|
analyze: 'Analyzing',
|
|
7
8
|
requirements: 'Requirements',
|
|
@@ -22,9 +23,6 @@ const LIFECYCLE_EVENTS = {
|
|
|
22
23
|
function isLifecycleEvent(phase) {
|
|
23
24
|
return phase.startsWith('run:');
|
|
24
25
|
}
|
|
25
|
-
function formatDuration(ms) {
|
|
26
|
-
return `${(ms / 1000).toFixed(1)}s`;
|
|
27
|
-
}
|
|
28
26
|
/**
|
|
29
27
|
* Build a lifecycle-aware timeline from flat timing events and rejection feedback.
|
|
30
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-drawer-tabs.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAO1D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAcxC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"feature-drawer-tabs.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAO1D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAcxC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAqPhD,qEAAqE;AACrE,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,gBAAgB,EAAE,KAK9B,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,iBAAiB,EAAE,KAK/B,CAAC;AAEF,8BAA8B;AAC9B,eAAO,MAAM,UAAU,EAAE,KAKxB,CAAC;AAyBF,oEAAoE;AACpE,eAAO,MAAM,eAAe,EAAE,KAK7B,CAAC;AAMF,6EAA6E;AAC7E,eAAO,MAAM,eAAe,EAAE,KAW7B,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,gBAAgB,EAAE,KAU9B,CAAC;AAEF,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,EAAE,KAS/B,CAAC"}
|
|
@@ -231,10 +231,6 @@ const mergeFixture = {
|
|
|
231
231
|
ciStatus: CiStatus.Success,
|
|
232
232
|
},
|
|
233
233
|
branch: { source: 'feat/add-auth', target: 'main' },
|
|
234
|
-
phases: [
|
|
235
|
-
{ id: 'phase-1', name: 'Foundation & Config', description: 'Set up types and server action' },
|
|
236
|
-
{ id: 'phase-2', name: 'Component Implementation', description: 'Build the merge review UI' },
|
|
237
|
-
],
|
|
238
234
|
diffSummary: { filesChanged: 12, additions: 340, deletions: 85, commitCount: 5 },
|
|
239
235
|
};
|
|
240
236
|
/* ---------------------------------------------------------------------------
|
|
@@ -36,12 +36,6 @@ export interface MergeReviewPr {
|
|
|
36
36
|
commitHash?: string;
|
|
37
37
|
ciStatus?: CiStatus;
|
|
38
38
|
}
|
|
39
|
-
/** A phase from the implementation plan */
|
|
40
|
-
export interface MergeReviewPhase {
|
|
41
|
-
id: string;
|
|
42
|
-
name: string;
|
|
43
|
-
description?: string;
|
|
44
|
-
}
|
|
45
39
|
/** Branch merge direction info */
|
|
46
40
|
export interface MergeReviewBranch {
|
|
47
41
|
/** Feature branch name */
|
|
@@ -57,8 +51,6 @@ export interface MergeReviewData {
|
|
|
57
51
|
diffSummary?: MergeReviewDiffSummary;
|
|
58
52
|
/** Per-file diffs with line-level changes (omitted when worktree is unavailable) */
|
|
59
53
|
fileDiffs?: MergeReviewFileDiff[];
|
|
60
|
-
/** Implementation phases from plan.yaml */
|
|
61
|
-
phases?: MergeReviewPhase[];
|
|
62
54
|
/** Branch merge direction */
|
|
63
55
|
branch?: MergeReviewBranch;
|
|
64
56
|
/** Warning message when diff summary could not be retrieved */
|
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;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,gCAAgC;AAChC,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,gCAAgC;AAChC,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B;AAED,0DAA0D;AAC1D,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAC;IACrD,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B;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,
|
|
1
|
+
{"version":3,"file":"merge-review-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review-config.ts"],"names":[],"mappings":"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"}
|
|
@@ -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,EAAE,MAAM,uBAAuB,CAAC;AAE9D,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,SAAS,EACT,QAAQ,EACR,YAAoB,EACpB,WAAmB,EACnB,SAAS,EACT,iBAAiB,GAClB,EAAE,gBAAgB,2CAsIlB"}
|
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { ExternalLink, AlertTriangle, FileDiff, GitCommitHorizontal, GitBranch, ArrowRight,
|
|
3
|
+
import { ExternalLink, AlertTriangle, FileDiff, GitCommitHorizontal, GitBranch, ArrowRight, } from 'lucide-react';
|
|
4
4
|
import { Badge } from '../../ui/badge.js';
|
|
5
5
|
import { CiStatusBadge } from '../../common/ci-status-badge/index.js';
|
|
6
6
|
import { DrawerActionBar } from '../../common/drawer-action-bar/index.js';
|
|
7
7
|
import { DiffView } from './diff-view.js';
|
|
8
|
-
function PhaseList({ phases }) {
|
|
9
|
-
return (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "px-4 py-3", children: [_jsxs("div", { className: "mb-3 flex items-center gap-2", children: [_jsx(Layers, { className: "text-muted-foreground h-4 w-4" }), _jsx("span", { className: "text-foreground text-xs font-semibold", children: "Implementation Phases" })] }), _jsx("ol", { className: "space-y-2", children: phases.map((phase, i) => (_jsxs("li", { className: "flex items-start gap-2.5", children: [_jsx("span", { className: "flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-emerald-100 text-[10px] font-bold text-emerald-700", children: i + 1 }), _jsxs("div", { className: "min-w-0", children: [_jsx("span", { className: "text-foreground text-xs font-medium", children: phase.name }), phase.description ? (_jsx("p", { className: "text-muted-foreground mt-0.5 text-[11px] leading-relaxed", children: phase.description })) : null] })] }, phase.id))) })] }) }));
|
|
10
|
-
}
|
|
11
8
|
export function MergeReview({ data, onApprove, onReject, isProcessing = false, isRejecting = false, chatInput, onChatInputChange, }) {
|
|
12
|
-
const { pr, diffSummary, fileDiffs,
|
|
9
|
+
const { pr, diffSummary, fileDiffs, branch, warning } = data;
|
|
13
10
|
return (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsxs("div", { className: "flex-1 space-y-4 overflow-y-auto p-4", children: [_jsxs("div", { className: "flex items-start gap-3", children: [_jsx("div", { className: "mt-1.5 h-2.5 w-2.5 shrink-0 rounded-full bg-emerald-500" }), _jsxs("div", { className: "flex-1", children: [_jsx("h2", { className: "text-foreground text-sm font-bold", children: "Merge Review" }), _jsx("p", { className: "text-muted-foreground mt-1 text-xs leading-relaxed", children: pr
|
|
14
11
|
? 'Review the pull request details and approve to merge.'
|
|
15
|
-
: 'Review the changes and approve to merge.' })] })] }), branch ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [_jsx(GitBranch, { className: "text-muted-foreground h-4 w-4 shrink-0" }), _jsx(Badge, { variant: "secondary", className: "font-mono text-[11px]", children: branch.source }), _jsx(ArrowRight, { className: "text-muted-foreground h-3.5 w-3.5 shrink-0" }), _jsx(Badge, { variant: "outline", className: "font-mono text-[11px]", children: branch.target })] }) })) : null, pr ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "space-y-3 px-4 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("a", { href: pr.url, target: "_blank", rel: "noopener noreferrer", className: "text-primary flex items-center gap-1.5 text-sm font-semibold underline underline-offset-2", children: ["PR #", pr.number, _jsx(ExternalLink, { className: "h-3.5 w-3.5" })] }), _jsx(Badge, { variant: "outline", className: "text-xs", children: pr.status })] }), pr.ciStatus ? (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "CI Status" }), _jsx(CiStatusBadge, { status: pr.ciStatus })] })) : null, pr.commitHash ? (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Commit" }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(GitCommitHorizontal, { className: "text-muted-foreground h-3.5 w-3.5" }), _jsx("code", { className: "bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]", children: pr.commitHash.slice(0, 7) })] })] })) : null] }) })) : null, diffSummary ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "px-4 py-3", children: [_jsxs("div", { className: "mb-3 flex items-center gap-2", children: [_jsx(FileDiff, { className: "text-muted-foreground h-4 w-4" }), _jsx("span", { className: "text-foreground text-xs font-semibold", children: "Changes" })] }), _jsxs("div", { className: "grid grid-cols-4 gap-3", children: [_jsxs("div", { className: "text-center", children: [_jsx("div", { className: "text-foreground text-sm font-bold", children: diffSummary.filesChanged }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "files" })] }), _jsxs("div", { className: "text-center", children: [_jsxs("div", { className: "text-sm font-bold text-green-600", children: ["+", diffSummary.additions] }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "additions" })] }), _jsxs("div", { className: "text-center", children: [_jsxs("div", { className: "text-sm font-bold text-red-600", children: ["-", diffSummary.deletions] }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "deletions" })] }), _jsxs("div", { className: "text-center", children: [_jsx("div", { className: "text-foreground text-sm font-bold", children: diffSummary.commitCount }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "commits" })] })] })] }) })) : warning ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [_jsx(AlertTriangle, { className: "text-muted-foreground h-4 w-4 shrink-0" }), _jsx("span", { className: "text-muted-foreground text-xs", children: warning })] }) })) : null, fileDiffs && fileDiffs.length > 0 ? _jsx(DiffView, { fileDiffs: fileDiffs }) : null
|
|
12
|
+
: 'Review the changes and approve to merge.' })] })] }), branch ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [_jsx(GitBranch, { className: "text-muted-foreground h-4 w-4 shrink-0" }), _jsx(Badge, { variant: "secondary", className: "font-mono text-[11px]", children: branch.source }), _jsx(ArrowRight, { className: "text-muted-foreground h-3.5 w-3.5 shrink-0" }), _jsx(Badge, { variant: "outline", className: "font-mono text-[11px]", children: branch.target })] }) })) : null, pr ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "space-y-3 px-4 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("a", { href: pr.url, target: "_blank", rel: "noopener noreferrer", className: "text-primary flex items-center gap-1.5 text-sm font-semibold underline underline-offset-2", children: ["PR #", pr.number, _jsx(ExternalLink, { className: "h-3.5 w-3.5" })] }), _jsx(Badge, { variant: "outline", className: "text-xs", children: pr.status })] }), pr.ciStatus ? (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "CI Status" }), _jsx(CiStatusBadge, { status: pr.ciStatus })] })) : null, pr.commitHash ? (_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Commit" }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx(GitCommitHorizontal, { className: "text-muted-foreground h-3.5 w-3.5" }), _jsx("code", { className: "bg-muted text-foreground rounded-md px-1.5 py-0.5 font-mono text-[11px]", children: pr.commitHash.slice(0, 7) })] })] })) : null] }) })) : null, diffSummary ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "px-4 py-3", children: [_jsxs("div", { className: "mb-3 flex items-center gap-2", children: [_jsx(FileDiff, { className: "text-muted-foreground h-4 w-4" }), _jsx("span", { className: "text-foreground text-xs font-semibold", children: "Changes" })] }), _jsxs("div", { className: "grid grid-cols-4 gap-3", children: [_jsxs("div", { className: "text-center", children: [_jsx("div", { className: "text-foreground text-sm font-bold", children: diffSummary.filesChanged }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "files" })] }), _jsxs("div", { className: "text-center", children: [_jsxs("div", { className: "text-sm font-bold text-green-600", children: ["+", diffSummary.additions] }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "additions" })] }), _jsxs("div", { className: "text-center", children: [_jsxs("div", { className: "text-sm font-bold text-red-600", children: ["-", diffSummary.deletions] }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "deletions" })] }), _jsxs("div", { className: "text-center", children: [_jsx("div", { className: "text-foreground text-sm font-bold", children: diffSummary.commitCount }), _jsx("div", { className: "text-muted-foreground text-[10px]", children: "commits" })] })] })] }) })) : warning ? (_jsx("div", { className: "border-border rounded-lg border", children: _jsxs("div", { className: "flex items-center gap-2 px-4 py-3", children: [_jsx(AlertTriangle, { className: "text-muted-foreground h-4 w-4 shrink-0" }), _jsx("span", { className: "text-muted-foreground text-xs", children: warning })] }) })) : null, fileDiffs && fileDiffs.length > 0 ? _jsx(DiffView, { fileDiffs: fileDiffs }) : null] }), _jsx(DrawerActionBar, { onReject: onReject, onApprove: onApprove, approveLabel: "Approve Merge", revisionPlaceholder: "Ask AI to revise before merging...", isProcessing: isProcessing, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })] }));
|
|
16
13
|
}
|
|
@@ -19,8 +19,6 @@ export declare const Processing: Story;
|
|
|
19
19
|
export declare const NoPrWithDiff: Story;
|
|
20
20
|
/** No PR and no diff — bare merge approval with branch info. */
|
|
21
21
|
export declare const NoPrNoDiff: Story;
|
|
22
|
-
/** With implementation phases shown. */
|
|
23
|
-
export declare const WithPhases: Story;
|
|
24
22
|
/** With file diffs — shows expandable file list with line-level changes. */
|
|
25
23
|
export declare const WithFileDiffs: Story;
|
|
26
24
|
//# sourceMappingURL=merge-review.stories.d.ts.map
|
package/dist/src/presentation/web/components/common/merge-review/merge-review.stories.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-review.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"merge-review.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/merge-review.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AA2F7C,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,WAAW,CAclC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,WAAW,CAAC,CAAC;AAE1C,kDAAkD;AAClD,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,SAAS,EAAE,KAQvB,CAAC;AAEF,wDAAwD;AACxD,eAAO,MAAM,aAAa,EAAE,KAS3B,CAAC;AAEF,yDAAyD;AACzD,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF,+DAA+D;AAC/D,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC;AAEF,qFAAqF;AACrF,eAAO,MAAM,YAAY,EAAE,KAQ1B,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,aAAa,EAAE,KAQ3B,CAAC"}
|
|
@@ -9,11 +9,6 @@ const fullPr = {
|
|
|
9
9
|
commitHash: 'a1b2c3d4e5f6789',
|
|
10
10
|
ciStatus: CiStatus.Success,
|
|
11
11
|
};
|
|
12
|
-
const samplePhases = [
|
|
13
|
-
{ id: 'phase-1', name: 'Foundation & Config', description: 'Set up types and server action' },
|
|
14
|
-
{ id: 'phase-2', name: 'Component Implementation', description: 'Build the merge review UI' },
|
|
15
|
-
{ id: 'phase-3', name: 'Integration & Wiring', description: 'Connect to control center' },
|
|
16
|
-
];
|
|
17
12
|
const sampleBranch = { source: 'feat/add-auth', target: 'main' };
|
|
18
13
|
const sampleFileDiffs = [
|
|
19
14
|
{
|
|
@@ -77,7 +72,6 @@ const sampleFileDiffs = [
|
|
|
77
72
|
const fullData = {
|
|
78
73
|
pr: fullPr,
|
|
79
74
|
branch: sampleBranch,
|
|
80
|
-
phases: samplePhases,
|
|
81
75
|
diffSummary: {
|
|
82
76
|
filesChanged: 12,
|
|
83
77
|
additions: 340,
|
|
@@ -163,7 +157,6 @@ export const NoPrWithDiff = {
|
|
|
163
157
|
args: {
|
|
164
158
|
data: {
|
|
165
159
|
branch: { source: 'feat/fix-login', target: 'main' },
|
|
166
|
-
phases: samplePhases,
|
|
167
160
|
diffSummary: fullData.diffSummary,
|
|
168
161
|
},
|
|
169
162
|
...defaultActions,
|
|
@@ -179,16 +172,6 @@ export const NoPrNoDiff = {
|
|
|
179
172
|
...defaultActions,
|
|
180
173
|
},
|
|
181
174
|
};
|
|
182
|
-
/** With implementation phases shown. */
|
|
183
|
-
export const WithPhases = {
|
|
184
|
-
args: {
|
|
185
|
-
data: {
|
|
186
|
-
...fullData,
|
|
187
|
-
phases: samplePhases,
|
|
188
|
-
},
|
|
189
|
-
...defaultActions,
|
|
190
|
-
},
|
|
191
|
-
};
|
|
192
175
|
/** With file diffs — shows expandable file list with line-level changes. */
|
|
193
176
|
export const WithFileDiffs = {
|
|
194
177
|
args: {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a duration in milliseconds to a human-friendly string.
|
|
3
|
+
*
|
|
4
|
+
* - 0ms → "0s"
|
|
5
|
+
* - <1s → "<1s"
|
|
6
|
+
* - <60s → "Xs"
|
|
7
|
+
* - <1h → "Xm Ys"
|
|
8
|
+
* - ≥1h → "Xh Ym" (seconds omitted)
|
|
9
|
+
*/
|
|
10
|
+
export declare function formatDuration(ms: number): string;
|
|
11
|
+
//# sourceMappingURL=format-duration.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"format-duration.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/lib/format-duration.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAmBjD"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a duration in milliseconds to a human-friendly string.
|
|
3
|
+
*
|
|
4
|
+
* - 0ms → "0s"
|
|
5
|
+
* - <1s → "<1s"
|
|
6
|
+
* - <60s → "Xs"
|
|
7
|
+
* - <1h → "Xm Ys"
|
|
8
|
+
* - ≥1h → "Xh Ym" (seconds omitted)
|
|
9
|
+
*/
|
|
10
|
+
export function formatDuration(ms) {
|
|
11
|
+
if (ms === 0)
|
|
12
|
+
return '0s';
|
|
13
|
+
const totalSeconds = Math.floor(ms / 1000);
|
|
14
|
+
if (totalSeconds === 0)
|
|
15
|
+
return '<1s';
|
|
16
|
+
const hours = Math.floor(totalSeconds / 3600);
|
|
17
|
+
const minutes = Math.floor((totalSeconds % 3600) / 60);
|
|
18
|
+
const seconds = totalSeconds % 60;
|
|
19
|
+
if (hours > 0) {
|
|
20
|
+
return `${hours}h ${minutes}m`;
|
|
21
|
+
}
|
|
22
|
+
if (minutes > 0) {
|
|
23
|
+
return `${minutes}m ${seconds}s`;
|
|
24
|
+
}
|
|
25
|
+
return `${seconds}s`;
|
|
26
|
+
}
|