@shepai/cli 1.82.0-pr254.277165d → 1.82.0-pr256.27e2c41
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/Feature.yaml +0 -5
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts +9 -48
- package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts +2 -4
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/git/git-pr.service.js +17 -103
- package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/page.d.ts.map +1 -1
- package/dist/src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/page.js +3 -1
- 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 +2 -5
- package/dist/src/presentation/web/app/build-feature-node-data.d.ts +2 -0
- package/dist/src/presentation/web/app/build-feature-node-data.d.ts.map +1 -1
- package/dist/src/presentation/web/app/build-feature-node-data.js +1 -0
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js +5 -2
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +3 -4
- package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts +2 -0
- 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/merge-review/index.d.ts +1 -2
- package/dist/src/presentation/web/components/common/merge-review/index.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/merge-review/index.js +0 -1
- package/dist/src/presentation/web/components/common/merge-review/merge-review-config.d.ts +0 -23
- 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 -3
- 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 -69
- 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/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.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]__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]__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]__c3c963c6._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c3c963c6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f0d8d054._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__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/_038da3b0._.js +4 -0
- package/web/.next/server/chunks/ssr/{_440a3db4._.js.map → _038da3b0._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_f7a8d4dd._.js → _0f7bfa41._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_f7a8d4dd._.js.map → _0f7bfa41._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js +1 -1
- package/web/.next/server/chunks/ssr/_1e3cf73b._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_2ced1bad._.js → _4bc991fd._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_2ced1bad._.js.map → _4bc991fd._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_63868199._.js +1 -1
- package/web/.next/server/chunks/ssr/_63868199._.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/_c3a8bcb1._.js +3 -0
- package/web/.next/server/chunks/ssr/{_2f3a54c6._.js.map → _c3a8bcb1._.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_7efa14ca._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_7efa14ca._.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_b59d79db._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_b59d79db._.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_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/1509a16092442727.js +2 -0
- package/web/.next/static/chunks/32224dcdf69ec174.js +1 -0
- package/web/.next/static/chunks/{71732e5466c44408.js → 5589df50aaea4780.js} +1 -1
- package/web/.next/static/chunks/{f3f07f7a70a3e275.js → 5cc51ffde2d8b8ce.js} +1 -1
- package/web/.next/static/chunks/62472dc85d1980c4.js +1 -0
- package/web/.next/static/chunks/{3fb38599fa02670a.js → 77a83961602a4a16.js} +1 -1
- package/web/.next/static/chunks/{151bc9cb40276142.js → 86f8f17fe2d39cb5.js} +1 -1
- package/web/.next/static/chunks/96bab6d3820504f3.css +2 -0
- package/web/.next/static/chunks/{123dc2bd9254c73b.js → a1cdb2c1539a99cb.js} +1 -1
- package/web/.next/static/chunks/{fde15c628b30b107.js → bdc1a1c6b7882095.js} +1 -1
- package/web/.next/static/chunks/{fa0866b6b0e4dfd1.js → f6082b6178d7622d.js} +1 -1
- package/dist/src/presentation/web/components/common/merge-review/diff-view.d.ts +0 -6
- package/dist/src/presentation/web/components/common/merge-review/diff-view.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/merge-review/diff-view.js +0 -30
- package/dist/src/presentation/web/components/common/merge-review/diff-view.stories.d.ts +0 -18
- package/dist/src/presentation/web/components/common/merge-review/diff-view.stories.d.ts.map +0 -1
- package/dist/src/presentation/web/components/common/merge-review/diff-view.stories.js +0 -174
- package/web/.next/server/chunks/ssr/_2f3a54c6._.js +0 -3
- package/web/.next/server/chunks/ssr/_440a3db4._.js +0 -4
- package/web/.next/static/chunks/45380c149fa1d4c4.js +0 -1
- package/web/.next/static/chunks/9dc311d9e5c84094.js +0 -2
- package/web/.next/static/chunks/ad8ba7829353cf47.js +0 -1
- package/web/.next/static/chunks/b8019132d9d42c18.css +0 -2
- /package/web/.next/static/{DVftHXLk3n_1HUyfhoQOJ → K0Q9yZjzqviTHErw8Z3Sq}/_buildManifest.js +0 -0
- /package/web/.next/static/{DVftHXLk3n_1HUyfhoQOJ → K0Q9yZjzqviTHErw8Z3Sq}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{DVftHXLk3n_1HUyfhoQOJ → K0Q9yZjzqviTHErw8Z3Sq}/_ssgManifest.js +0 -0
|
@@ -45,10 +45,6 @@ properties:
|
|
|
45
45
|
repositoryId:
|
|
46
46
|
$ref: UUID.yaml
|
|
47
47
|
description: ID of the Repository entity this feature belongs to
|
|
48
|
-
fast:
|
|
49
|
-
type: boolean
|
|
50
|
-
default: false
|
|
51
|
-
description: When true, SDLC phases were skipped and the feature was implemented directly from the prompt
|
|
52
48
|
push:
|
|
53
49
|
type: boolean
|
|
54
50
|
default: false
|
|
@@ -79,7 +75,6 @@ required:
|
|
|
79
75
|
- lifecycle
|
|
80
76
|
- messages
|
|
81
77
|
- relatedArtifacts
|
|
82
|
-
- fast
|
|
83
78
|
- push
|
|
84
79
|
- openPr
|
|
85
80
|
- approvalGates
|
package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts
CHANGED
|
@@ -55,45 +55,6 @@ export interface DiffSummary {
|
|
|
55
55
|
/** Number of commits in the diff */
|
|
56
56
|
commitCount: number;
|
|
57
57
|
}
|
|
58
|
-
/**
|
|
59
|
-
* A single hunk in a file diff showing the actual line changes.
|
|
60
|
-
*/
|
|
61
|
-
export interface DiffHunk {
|
|
62
|
-
/** Header line (e.g. "@@ -1,5 +1,7 @@") */
|
|
63
|
-
header: string;
|
|
64
|
-
/** Lines in this hunk with their type and content */
|
|
65
|
-
lines: DiffLine[];
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* A single line within a diff hunk.
|
|
69
|
-
*/
|
|
70
|
-
export interface DiffLine {
|
|
71
|
-
/** Type of change: added, removed, or context (unchanged) */
|
|
72
|
-
type: 'added' | 'removed' | 'context';
|
|
73
|
-
/** The line content (without the leading +/-/space) */
|
|
74
|
-
content: string;
|
|
75
|
-
/** Old file line number (undefined for added lines) */
|
|
76
|
-
oldNumber?: number;
|
|
77
|
-
/** New file line number (undefined for removed lines) */
|
|
78
|
-
newNumber?: number;
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Per-file diff data showing what changed in a single file.
|
|
82
|
-
*/
|
|
83
|
-
export interface FileDiff {
|
|
84
|
-
/** File path (new path for renames) */
|
|
85
|
-
path: string;
|
|
86
|
-
/** Previous path if the file was renamed */
|
|
87
|
-
oldPath?: string;
|
|
88
|
-
/** Number of lines added */
|
|
89
|
-
additions: number;
|
|
90
|
-
/** Number of lines removed */
|
|
91
|
-
deletions: number;
|
|
92
|
-
/** Change type */
|
|
93
|
-
status: 'added' | 'modified' | 'deleted' | 'renamed';
|
|
94
|
-
/** Diff hunks with actual line changes */
|
|
95
|
-
hunks: DiffHunk[];
|
|
96
|
-
}
|
|
97
58
|
/**
|
|
98
59
|
* Result of creating a pull request.
|
|
99
60
|
*/
|
|
@@ -131,6 +92,15 @@ export interface IGitPrService {
|
|
|
131
92
|
* @returns True if at least one remote is configured
|
|
132
93
|
*/
|
|
133
94
|
hasRemote(cwd: string): Promise<boolean>;
|
|
95
|
+
/**
|
|
96
|
+
* Get the remote URL for the repository (origin remote).
|
|
97
|
+
* Returns an HTTPS-style URL suitable for browser linking.
|
|
98
|
+
* SSH URLs (git@...) are converted to https:// equivalents.
|
|
99
|
+
*
|
|
100
|
+
* @param cwd - Working directory path
|
|
101
|
+
* @returns The remote URL, or null if no remote is configured
|
|
102
|
+
*/
|
|
103
|
+
getRemoteUrl(cwd: string): Promise<string | null>;
|
|
134
104
|
/**
|
|
135
105
|
* Detect the repository's default branch with robust fallback chain:
|
|
136
106
|
* 1. Remote HEAD (git symbolic-ref refs/remotes/origin/HEAD)
|
|
@@ -231,15 +201,6 @@ export interface IGitPrService {
|
|
|
231
201
|
* @throws GitPrError with GIT_ERROR code
|
|
232
202
|
*/
|
|
233
203
|
getPrDiffSummary(cwd: string, baseBranch: string): Promise<DiffSummary>;
|
|
234
|
-
/**
|
|
235
|
-
* Get per-file diffs between the current branch and a base branch.
|
|
236
|
-
*
|
|
237
|
-
* @param cwd - Working directory path
|
|
238
|
-
* @param baseBranch - Base branch to compare against
|
|
239
|
-
* @returns Array of per-file diffs with hunks and line changes
|
|
240
|
-
* @throws GitPrError with GIT_ERROR code
|
|
241
|
-
*/
|
|
242
|
-
getFileDiffs(cwd: string, baseBranch: string): Promise<FileDiff[]>;
|
|
243
204
|
/**
|
|
244
205
|
* List PR statuses for all open and recently-updated PRs in a repository.
|
|
245
206
|
*
|
package/dist/packages/core/src/application/ports/output/services/git-pr-service.interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-pr-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/git-pr-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;GAEG;AACH,oBAAY,cAAc;IACxB,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,gBAAgB,qBAAqB;IACrC,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;CAC9B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;aAGjB,IAAI,EAAE,cAAc;aACpB,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,cAAc,EACpB,KAAK,CAAC,EAAE,KAAK,YAAA;CAKhC;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAC;AAEzD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,wBAAwB;IACxB,MAAM,EAAE,QAAQ,CAAC;IACjB,uDAAuD;IACvD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kDAAkD;IAClD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,8BAA8B;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,oCAAoC;IACpC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"git-pr-service.interface.d.ts","sourceRoot":"","sources":["../../../../../../../../packages/core/src/application/ports/output/services/git-pr-service.interface.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,wCAAwC,CAAC;AAEvE;;GAEG;AACH,oBAAY,cAAc;IACxB,cAAc,mBAAmB;IACjC,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;IAC7B,aAAa,kBAAkB;IAC/B,UAAU,eAAe;IACzB,gBAAgB,qBAAqB;IACrC,SAAS,cAAc;IACvB,YAAY,iBAAiB;IAC7B,YAAY,iBAAiB;CAC9B;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,KAAK;aAGjB,IAAI,EAAE,cAAc;aACpB,KAAK,CAAC,EAAE,KAAK;gBAF7B,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,cAAc,EACpB,KAAK,CAAC,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AAgB,CAAC,GAAG,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IAExE;;;;;;OAMG;IACH,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IAErD;;;;;;;;;OASG;IACH,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEtF;;;;;;;;;;OAUG;IACH,cAAc,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CACtF"}
|
|
@@ -5,12 +5,13 @@
|
|
|
5
5
|
* Uses constructor dependency injection for the command executor.
|
|
6
6
|
*/
|
|
7
7
|
import type { IGitPrService } from '../../../application/ports/output/services/git-pr-service.interface.js';
|
|
8
|
-
import type { CiStatusResult, DiffSummary,
|
|
8
|
+
import type { CiStatusResult, DiffSummary, MergeStrategy, PrCreateResult, PrStatusInfo } from '../../../application/ports/output/services/git-pr-service.interface.js';
|
|
9
9
|
import type { ExecFunction } from './worktree.service.js';
|
|
10
10
|
export declare class GitPrService implements IGitPrService {
|
|
11
11
|
private readonly execFile;
|
|
12
12
|
constructor(execFile: ExecFunction);
|
|
13
13
|
hasRemote(cwd: string): Promise<boolean>;
|
|
14
|
+
getRemoteUrl(cwd: string): Promise<string | null>;
|
|
14
15
|
getDefaultBranch(cwd: string): Promise<string>;
|
|
15
16
|
hasUncommittedChanges(cwd: string): Promise<boolean>;
|
|
16
17
|
commitAll(cwd: string, message: string): Promise<string>;
|
|
@@ -22,9 +23,6 @@ export declare class GitPrService implements IGitPrService {
|
|
|
22
23
|
watchCi(cwd: string, branch: string, timeoutMs?: number): Promise<CiStatusResult>;
|
|
23
24
|
deleteBranch(cwd: string, branch: string, deleteRemote?: boolean): Promise<void>;
|
|
24
25
|
getPrDiffSummary(cwd: string, baseBranch: string): Promise<DiffSummary>;
|
|
25
|
-
getFileDiffs(cwd: string, baseBranch: string): Promise<FileDiff[]>;
|
|
26
|
-
private parseUnifiedDiff;
|
|
27
|
-
private parseFileDiff;
|
|
28
26
|
listPrStatuses(cwd: string): Promise<PrStatusInfo[]>;
|
|
29
27
|
verifyMerge(cwd: string, featureBranch: string, baseBranch: string): Promise<boolean>;
|
|
30
28
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,EACV,cAAc,
|
|
1
|
+
{"version":3,"file":"git-pr.service.d.ts","sourceRoot":"","sources":["../../../../../../../packages/core/src/infrastructure/services/git/git-pr.service.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wEAAwE,CAAC;AAC5G,OAAO,KAAK,EACV,cAAc,EACd,WAAW,EACX,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,wEAAwE,CAAC;AAQhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,qBACa,YAAa,YAAW,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,YAAY;IAErE,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAgBjD,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgF9C,qBAAqB,CAAC,GAAG,EAAE,MAAM,GA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AC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC;IAW3F,OAAO,CAAC,WAAW;IAQnB,OAAO,CAAC,gBAAgB;IAKxB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,YAAY;IAepB,OAAO,CAAC,oBAAoB;IAK5B,OAAO,CAAC,aAAa;CAiBtB"}
|
|
@@ -29,6 +29,23 @@ let GitPrService = class GitPrService {
|
|
|
29
29
|
const { stdout } = await this.execFile('git', ['remote'], { cwd });
|
|
30
30
|
return stdout.trim().length > 0;
|
|
31
31
|
}
|
|
32
|
+
async getRemoteUrl(cwd) {
|
|
33
|
+
try {
|
|
34
|
+
const { stdout } = await this.execFile('git', ['remote', 'get-url', 'origin'], { cwd });
|
|
35
|
+
const raw = stdout.trim();
|
|
36
|
+
if (!raw)
|
|
37
|
+
return null;
|
|
38
|
+
// Convert SSH URLs to HTTPS: git@github.com:org/repo.git → https://github.com/org/repo
|
|
39
|
+
if (raw.startsWith('git@')) {
|
|
40
|
+
return raw.replace(/^git@([^:]+):/, 'https://$1/').replace(/\.git$/, '');
|
|
41
|
+
}
|
|
42
|
+
// Strip trailing .git from HTTPS URLs
|
|
43
|
+
return raw.replace(/\.git$/, '');
|
|
44
|
+
}
|
|
45
|
+
catch {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
32
49
|
async getDefaultBranch(cwd) {
|
|
33
50
|
// 1. Try remote HEAD reference (most reliable when remote exists)
|
|
34
51
|
try {
|
|
@@ -258,109 +275,6 @@ let GitPrService = class GitPrService {
|
|
|
258
275
|
const { stdout: logOutput } = await this.execFile('git', ['log', '--oneline', `${baseBranch}...HEAD`], { cwd });
|
|
259
276
|
return this.parseDiffStat(diffStat, logOutput);
|
|
260
277
|
}
|
|
261
|
-
async getFileDiffs(cwd, baseBranch) {
|
|
262
|
-
try {
|
|
263
|
-
const { stdout } = await this.execFile('git', ['diff', '--unified=3', `${baseBranch}...HEAD`], { cwd });
|
|
264
|
-
return this.parseUnifiedDiff(stdout);
|
|
265
|
-
}
|
|
266
|
-
catch (error) {
|
|
267
|
-
throw this.parseGitError(error);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
parseUnifiedDiff(rawDiff) {
|
|
271
|
-
if (!rawDiff.trim())
|
|
272
|
-
return [];
|
|
273
|
-
const files = [];
|
|
274
|
-
// Split on "diff --git" boundaries (keeping the delimiter)
|
|
275
|
-
const fileSections = rawDiff.split(/^(?=diff --git )/m).filter((s) => s.trim());
|
|
276
|
-
for (const section of fileSections) {
|
|
277
|
-
const file = this.parseFileDiff(section);
|
|
278
|
-
if (file)
|
|
279
|
-
files.push(file);
|
|
280
|
-
}
|
|
281
|
-
return files;
|
|
282
|
-
}
|
|
283
|
-
parseFileDiff(section) {
|
|
284
|
-
const lines = section.split('\n');
|
|
285
|
-
if (lines.length === 0)
|
|
286
|
-
return null;
|
|
287
|
-
// Parse header: "diff --git a/path b/path"
|
|
288
|
-
const headerMatch = lines[0].match(/^diff --git a\/(.+?) b\/(.+)$/);
|
|
289
|
-
if (!headerMatch)
|
|
290
|
-
return null;
|
|
291
|
-
const oldPath = headerMatch[1];
|
|
292
|
-
const newPath = headerMatch[2];
|
|
293
|
-
// Determine status from diff header lines
|
|
294
|
-
let status = 'modified';
|
|
295
|
-
const isNew = lines.some((l) => l.startsWith('new file mode'));
|
|
296
|
-
const isDeleted = lines.some((l) => l.startsWith('deleted file mode'));
|
|
297
|
-
const isRenamed = lines.some((l) => l.startsWith('rename from'));
|
|
298
|
-
if (isNew)
|
|
299
|
-
status = 'added';
|
|
300
|
-
else if (isDeleted)
|
|
301
|
-
status = 'deleted';
|
|
302
|
-
else if (isRenamed)
|
|
303
|
-
status = 'renamed';
|
|
304
|
-
// Parse hunks
|
|
305
|
-
const hunks = [];
|
|
306
|
-
let currentHunk = null;
|
|
307
|
-
let oldLineNum = 0;
|
|
308
|
-
let newLineNum = 0;
|
|
309
|
-
let additions = 0;
|
|
310
|
-
let deletions = 0;
|
|
311
|
-
for (const line of lines) {
|
|
312
|
-
const hunkHeaderMatch = line.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@(.*)$/);
|
|
313
|
-
if (hunkHeaderMatch) {
|
|
314
|
-
currentHunk = { header: line, lines: [] };
|
|
315
|
-
hunks.push(currentHunk);
|
|
316
|
-
oldLineNum = parseInt(hunkHeaderMatch[1], 10);
|
|
317
|
-
newLineNum = parseInt(hunkHeaderMatch[2], 10);
|
|
318
|
-
continue;
|
|
319
|
-
}
|
|
320
|
-
if (!currentHunk)
|
|
321
|
-
continue;
|
|
322
|
-
if (line.startsWith('+')) {
|
|
323
|
-
const diffLine = {
|
|
324
|
-
type: 'added',
|
|
325
|
-
content: line.slice(1),
|
|
326
|
-
newNumber: newLineNum,
|
|
327
|
-
};
|
|
328
|
-
currentHunk.lines.push(diffLine);
|
|
329
|
-
newLineNum++;
|
|
330
|
-
additions++;
|
|
331
|
-
}
|
|
332
|
-
else if (line.startsWith('-')) {
|
|
333
|
-
const diffLine = {
|
|
334
|
-
type: 'removed',
|
|
335
|
-
content: line.slice(1),
|
|
336
|
-
oldNumber: oldLineNum,
|
|
337
|
-
};
|
|
338
|
-
currentHunk.lines.push(diffLine);
|
|
339
|
-
oldLineNum++;
|
|
340
|
-
deletions++;
|
|
341
|
-
}
|
|
342
|
-
else if (line.startsWith(' ')) {
|
|
343
|
-
const diffLine = {
|
|
344
|
-
type: 'context',
|
|
345
|
-
content: line.slice(1),
|
|
346
|
-
oldNumber: oldLineNum,
|
|
347
|
-
newNumber: newLineNum,
|
|
348
|
-
};
|
|
349
|
-
currentHunk.lines.push(diffLine);
|
|
350
|
-
oldLineNum++;
|
|
351
|
-
newLineNum++;
|
|
352
|
-
}
|
|
353
|
-
// Skip lines like ""
|
|
354
|
-
}
|
|
355
|
-
return {
|
|
356
|
-
path: newPath,
|
|
357
|
-
oldPath: isRenamed || oldPath !== newPath ? oldPath : undefined,
|
|
358
|
-
additions,
|
|
359
|
-
deletions,
|
|
360
|
-
status,
|
|
361
|
-
hunks,
|
|
362
|
-
};
|
|
363
|
-
}
|
|
364
278
|
async listPrStatuses(cwd) {
|
|
365
279
|
try {
|
|
366
280
|
const { stdout } = await this.execFile('gh', [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/page.tsx"],"names":[],"mappings":"AAUA,oEAAoE;AACpE,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,UAAU,sBAAsB;IAC9B,MAAM,EAAE,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxC;AAED,wBAA8B,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,sBAAsB,
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../../../../../../../src/presentation/web/app/(dashboard)/@drawer/feature/[featureId]/page.tsx"],"names":[],"mappings":"AAUA,oEAAoE;AACpE,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAEvC,UAAU,sBAAsB;IAC9B,MAAM,EAAE,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxC;AAED,wBAA8B,iBAAiB,CAAC,EAAE,MAAM,EAAE,EAAE,sBAAsB,2DA+CjF"}
|
|
@@ -18,15 +18,17 @@ export default async function FeatureDrawerPage({ params }) {
|
|
|
18
18
|
const run = feature.agentRunId ? await agentRunRepo.findById(feature.agentRunId) : null;
|
|
19
19
|
// Resolve repository name, base branch, and one-liner for the overview tab
|
|
20
20
|
const getArtifact = resolve('GetFeatureArtifactUseCase');
|
|
21
|
-
const [repo, baseBranch, artifact] = await Promise.all([
|
|
21
|
+
const [repo, baseBranch, artifact, remoteUrl] = await Promise.all([
|
|
22
22
|
repoRepo.findByPath(feature.repositoryPath).catch(() => null),
|
|
23
23
|
gitPrService.getDefaultBranch(feature.repositoryPath).catch(() => 'main'),
|
|
24
24
|
getArtifact.execute(featureId).catch(() => null),
|
|
25
|
+
gitPrService.getRemoteUrl(feature.repositoryPath).catch(() => null),
|
|
25
26
|
]);
|
|
26
27
|
const nodeData = buildFeatureNodeData(feature, run, {
|
|
27
28
|
repositoryName: repo?.name,
|
|
28
29
|
baseBranch,
|
|
29
30
|
oneLiner: artifact?.oneLiner,
|
|
31
|
+
remoteUrl: remoteUrl ?? undefined,
|
|
30
32
|
});
|
|
31
33
|
const view = computeDrawerView({
|
|
32
34
|
selectedNode: nodeData,
|
|
@@ -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":"AAMA,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,sDAAsD,CAAC;AAE9D,KAAK,wBAAwB,GAAG,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,
|
|
1
|
+
{"version":3,"file":"get-merge-review-data.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/get-merge-review-data.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,eAAe,EAEhB,MAAM,sDAAsD,CAAC;AAE9D,KAAK,wBAAwB,GAAG,eAAe,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEpE,wBAAsB,kBAAkB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC,CAkD7F"}
|
|
@@ -35,11 +35,8 @@ export async function getMergeReviewData(featureId) {
|
|
|
35
35
|
}
|
|
36
36
|
try {
|
|
37
37
|
const gitPrService = resolve('IGitPrService');
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
gitPrService.getFileDiffs(feature.worktreePath, 'main').catch(() => undefined),
|
|
41
|
-
]);
|
|
42
|
-
return { pr, branch, phases, diffSummary, fileDiffs };
|
|
38
|
+
const diffSummary = await gitPrService.getPrDiffSummary(feature.worktreePath, 'main');
|
|
39
|
+
return { pr, branch, phases, diffSummary };
|
|
43
40
|
}
|
|
44
41
|
catch {
|
|
45
42
|
return { pr, branch, phases, warning: 'Diff statistics unavailable' };
|
|
@@ -5,6 +5,8 @@ export interface BuildFeatureNodeDataOptions {
|
|
|
5
5
|
repositoryName?: string;
|
|
6
6
|
/** AI-generated one-liner from FeatureArtifact */
|
|
7
7
|
oneLiner?: string;
|
|
8
|
+
/** Remote URL for the repository (HTTPS) */
|
|
9
|
+
remoteUrl?: string;
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* Builds a FeatureNodeData object from a Feature entity and optional AgentRun.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-feature-node-data.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/build-feature-node-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAM9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"build-feature-node-data.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/build-feature-node-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAM9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAExE,MAAM,WAAW,2BAA2B;IAC1C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,QAAQ,GAAG,IAAI,EACpB,OAAO,CAAC,EAAE,2BAA2B,GACpC,eAAe,CAgCjB"}
|
|
@@ -21,6 +21,7 @@ export function buildFeatureNodeData(feature, run, options) {
|
|
|
21
21
|
...(options?.repositoryName && { repositoryName: options.repositoryName }),
|
|
22
22
|
...(options?.baseBranch && { baseBranch: options.baseBranch }),
|
|
23
23
|
...(options?.oneLiner && { oneLiner: options.oneLiner }),
|
|
24
|
+
...(options?.remoteUrl && { remoteUrl: options.remoteUrl }),
|
|
24
25
|
...(run?.agentType && { agentType: run.agentType }),
|
|
25
26
|
...(run?.modelId && { modelId: run.modelId }),
|
|
26
27
|
...(run?.error && { errorMessage: run.error }),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/feature-drawer-client.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,wBAAwB,
|
|
1
|
+
{"version":3,"file":"feature-drawer-client.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/control-center-drawer/feature-drawer-client.tsx"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAGhD,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,UAAU,CAAC;CAClB;AAED,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,wBAAwB,2CAkjBlF"}
|
package/dist/src/presentation/web/components/common/control-center-drawer/feature-drawer-client.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import { useState, useCallback, useEffect, useRef } from 'react';
|
|
4
4
|
import { useRouter, usePathname } from 'next/navigation';
|
|
5
5
|
import { toast } from 'sonner';
|
|
6
|
-
import { Loader2, Trash2, Play, Square, Copy, Check } from 'lucide-react';
|
|
6
|
+
import { Loader2, Trash2, Play, Square, Copy, Check, Code2, ExternalLink } from 'lucide-react';
|
|
7
7
|
import { approveFeature } from '../../../app/actions/approve-feature.js';
|
|
8
8
|
import { rejectFeature } from '../../../app/actions/reject-feature.js';
|
|
9
9
|
import { getFeatureArtifact } from '../../../app/actions/get-feature-artifact.js';
|
|
@@ -314,7 +314,10 @@ export function FeatureDrawerClient({ view: initialView }) {
|
|
|
314
314
|
let header = undefined;
|
|
315
315
|
if (featureNode) {
|
|
316
316
|
const shortId = featureNode.featureId.slice(0, 8);
|
|
317
|
-
|
|
317
|
+
const repoName = featureNode.repositoryName ??
|
|
318
|
+
featureNode.repositoryPath.split('/').filter(Boolean).at(-1) ??
|
|
319
|
+
'';
|
|
320
|
+
header = (_jsxs(_Fragment, { children: [_jsxs("div", { "data-testid": "feature-drawer-header", children: [_jsx(DrawerTitle, { children: featureNode.name }), repoName ? (_jsxs("div", { className: "flex items-center gap-1.5 pt-0.5", children: [_jsx(Code2, { className: "text-muted-foreground size-3.5 shrink-0" }), featureNode.remoteUrl ? (_jsxs("a", { href: featureNode.remoteUrl, target: "_blank", rel: "noopener noreferrer", className: "text-muted-foreground hover:text-foreground inline-flex items-center gap-1 text-xs transition-colors", "data-testid": "feature-drawer-repo-link", children: [repoName, _jsx(ExternalLink, { className: "size-3" })] })) : (_jsx("span", { className: "text-muted-foreground text-xs", children: repoName }))] })) : null, _jsx(DrawerDescription, { className: "sr-only", children: featureNode.name })] }), featureActionsInput ? (_jsxs("div", { className: "flex items-center gap-2 pt-2", "data-testid": "feature-drawer-actions", children: [_jsx(OpenActionMenu, { actions: featureActions, repositoryPath: featureActionsInput.repositoryPath, showSpecs: !!featureActionsInput.specPath }), featureFlags.envDeploy && featureDeployTarget ? (_jsxs(_Fragment, { children: [_jsx(TooltipProvider, { children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { children: _jsx(ActionButton, { label: isFeatureDeployActive ? 'Stop Dev Server' : 'Start Dev Server', onClick: isFeatureDeployActive ? deployAction.stop : deployAction.deploy, loading: deployAction.deployLoading || deployAction.stopLoading, error: !!deployAction.deployError, icon: isFeatureDeployActive ? Square : Play, iconOnly: true, variant: "outline", size: "icon-sm" }) }) }), _jsx(TooltipContent, { children: isFeatureDeployActive ? 'Stop Dev Server' : 'Start Dev Server' })] }) }), isFeatureDeployActive ? (_jsx(DeploymentStatusBadge, { status: deployAction.status, url: deployAction.url, targetId: featureDeployTarget?.targetId })) : null] })) : null, _jsxs("div", { className: "ml-auto flex items-center gap-1.5", children: [_jsx("code", { className: "bg-muted text-muted-foreground rounded px-1.5 py-0.5 font-mono text-xs", children: shortId }), _jsx("button", { type: "button", onClick: handleCopyId, className: "text-muted-foreground hover:text-foreground inline-flex items-center rounded p-0.5 transition-colors", "aria-label": "Copy feature ID", "data-testid": "feature-drawer-copy-id", children: idCopied ? (_jsx(Check, { className: "size-3.5 text-green-600" })) : (_jsx(Copy, { className: "size-3.5" })) })] }), featureNode.featureId ? (_jsxs(AlertDialog, { children: [_jsx(AlertDialogTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Delete feature", disabled: isDeleting, className: "text-muted-foreground hover:text-destructive", "data-testid": "feature-drawer-delete", children: isDeleting ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : (_jsx(Trash2, { className: "size-4" })) }) }), _jsxs(AlertDialogContent, { children: [_jsxs(AlertDialogHeader, { children: [_jsx(AlertDialogTitle, { children: "Delete feature?" }), _jsxs(AlertDialogDescription, { children: ["This will permanently delete ", _jsx("strong", { children: featureNode.name }), " (", featureNode.featureId, "). This action cannot be undone.", featureNode.state === 'running' ? (_jsx(_Fragment, { children: " This feature has a running agent that will be stopped." })) : null] })] }), _jsxs(AlertDialogFooter, { children: [_jsx(AlertDialogCancel, { disabled: isDeleting, children: "Cancel" }), _jsx(AlertDialogAction, { variant: "destructive", disabled: isDeleting, onClick: () => handleDelete(featureNode.featureId), children: isDeleting ? (_jsxs(_Fragment, { children: [_jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }), "Deleting\u2026"] })) : ('Delete') })] })] })] })) : null] })) : null] }));
|
|
318
321
|
}
|
|
319
322
|
// ── Body ──────────────────────────────────────────────────────────────
|
|
320
323
|
let body = null;
|
|
@@ -42,15 +42,14 @@ function formatRelativeTime(timestamp) {
|
|
|
42
42
|
return 'just now';
|
|
43
43
|
}
|
|
44
44
|
function FeatureInfo({ data }) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
Boolean(data.branch) ||
|
|
45
|
+
const hasInfo = Boolean(data.branch) ||
|
|
46
|
+
Boolean(data.oneLiner) ||
|
|
48
47
|
Boolean(data.summary) ||
|
|
49
48
|
Boolean(data.userQuery) ||
|
|
50
49
|
Boolean(data.createdAt);
|
|
51
50
|
if (!hasInfo)
|
|
52
51
|
return null;
|
|
53
|
-
return (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsxs("div", { "data-testid": "feature-drawer-info", className: "flex flex-col gap-3 p-4", children: [
|
|
52
|
+
return (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsxs("div", { "data-testid": "feature-drawer-info", className: "flex flex-col gap-3 p-4", children: [data.branch ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Branch" }), _jsxs("span", { className: "flex items-center gap-1.5 text-sm", children: [_jsx(GitBranch, { className: "text-muted-foreground h-3.5 w-3.5 shrink-0" }), _jsx("code", { className: "bg-muted rounded px-1 py-0.5 font-mono text-xs", children: data.branch }), data.baseBranch ? (_jsxs("span", { className: "text-muted-foreground text-xs", children: ["from ", data.baseBranch] })) : null] })] })) : null, data.oneLiner ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "One-Liner" }), _jsx("span", { className: "text-sm leading-relaxed", children: data.oneLiner })] })) : null, data.userQuery ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "User Query" }), _jsx("span", { className: "text-sm leading-relaxed", children: data.userQuery })] })) : null, data.summary ? (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Summary" }), _jsx("span", { className: "text-sm leading-relaxed", children: data.summary })] })) : null, data.createdAt ? (_jsx(DetailRow, { label: "Created", value: formatRelativeTime(data.createdAt) })) : null] })] }));
|
|
54
53
|
}
|
|
55
54
|
// ── PR Info section ──────────────────────────────────────────────────
|
|
56
55
|
const prStatusStyles = {
|
package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts
CHANGED
|
@@ -42,6 +42,8 @@ export interface FeatureNodeData {
|
|
|
42
42
|
createdAt?: string | number;
|
|
43
43
|
/** Repository display name (e.g. "my-repo") */
|
|
44
44
|
repositoryName?: string;
|
|
45
|
+
/** Remote URL for the repository (HTTPS, suitable for browser linking) */
|
|
46
|
+
remoteUrl?: string;
|
|
45
47
|
/** Base branch the feature was branched from (e.g. "main") */
|
|
46
48
|
baseBranch?: string;
|
|
47
49
|
/** AI-generated one-line description of the feature (from spec artifact) */
|
package/dist/src/presentation/web/components/common/feature-node/feature-node-state-config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-node-state-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node-state-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,MAAM,GACN,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAC7B,cAAc,GACd,UAAU,GACV,gBAAgB,GAChB,QAAQ,GACR,QAAQ,GACR,UAAU,CAAC;AAEf,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAOxE,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAOvE,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,qBAAqB,CAAC;IACjC,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,cAAc,EAAE,MAAM,CAAC;IACvB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gFAAgF;IAChF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB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AC;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
|
+
{"version":3,"file":"feature-node-state-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-node/feature-node-state-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmD,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AAChG,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAC/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,MAAM,gBAAgB,GACxB,UAAU,GACV,SAAS,GACT,iBAAiB,GACjB,MAAM,GACN,SAAS,GACT,OAAO,CAAC;AAEZ,MAAM,MAAM,qBAAqB,GAC7B,cAAc,GACd,UAAU,GACV,gBAAgB,GAChB,QAAQ,GACR,QAAQ,GACR,UAAU,CAAC;AAEf,0DAA0D;AAC1D,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAOxE,CAAC;AAEF,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAOvE,CAAC;AAEF,MAAM,WAAW,eAAe;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,qBAAqB,CAAC;IACjC,KAAK,EAAE,gBAAgB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,cAAc,EAAE,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E,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,4 +1,3 @@
|
|
|
1
1
|
export { MergeReview } from './merge-review.js';
|
|
2
|
-
export {
|
|
3
|
-
export type { MergeReviewProps, MergeReviewData, MergeReviewFileDiff } from './merge-review-config.js';
|
|
2
|
+
export type { MergeReviewProps, MergeReviewData } from './merge-review-config.js';
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/merge-review/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,YAAY,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC"}
|
|
@@ -6,27 +6,6 @@ export interface MergeReviewDiffSummary {
|
|
|
6
6
|
deletions: number;
|
|
7
7
|
commitCount: number;
|
|
8
8
|
}
|
|
9
|
-
/** A line within a diff hunk */
|
|
10
|
-
export interface MergeReviewDiffLine {
|
|
11
|
-
type: 'added' | 'removed' | 'context';
|
|
12
|
-
content: string;
|
|
13
|
-
oldNumber?: number;
|
|
14
|
-
newNumber?: number;
|
|
15
|
-
}
|
|
16
|
-
/** A hunk within a file diff */
|
|
17
|
-
export interface MergeReviewDiffHunk {
|
|
18
|
-
header: string;
|
|
19
|
-
lines: MergeReviewDiffLine[];
|
|
20
|
-
}
|
|
21
|
-
/** Per-file diff showing what changed in a single file */
|
|
22
|
-
export interface MergeReviewFileDiff {
|
|
23
|
-
path: string;
|
|
24
|
-
oldPath?: string;
|
|
25
|
-
additions: number;
|
|
26
|
-
deletions: number;
|
|
27
|
-
status: 'added' | 'modified' | 'deleted' | 'renamed';
|
|
28
|
-
hunks: MergeReviewDiffHunk[];
|
|
29
|
-
}
|
|
30
9
|
/** PR metadata extracted from Feature.pr */
|
|
31
10
|
export interface MergeReviewPr {
|
|
32
11
|
url: string;
|
|
@@ -54,8 +33,6 @@ export interface MergeReviewData {
|
|
|
54
33
|
pr?: MergeReviewPr;
|
|
55
34
|
/** Aggregate diff statistics (omitted when worktree is unavailable) */
|
|
56
35
|
diffSummary?: MergeReviewDiffSummary;
|
|
57
|
-
/** Per-file diffs with line-level changes (omitted when worktree is unavailable) */
|
|
58
|
-
fileDiffs?: MergeReviewFileDiff[];
|
|
59
36
|
/** Implementation phases from plan.yaml */
|
|
60
37
|
phases?: MergeReviewPhase[];
|
|
61
38
|
/** Branch merge direction */
|
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;AAE/E,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,
|
|
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;AAE/E,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,KAAK,IAAI,CAAC;IACtC,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":"AAgBA,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,2CA6IlB"}
|
|
@@ -4,13 +4,12 @@ import { ExternalLink, GitMerge, Loader2, AlertTriangle, FileDiff, GitCommitHori
|
|
|
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
|
-
import { DiffView } from './diff-view.js';
|
|
8
7
|
function PhaseList({ phases }) {
|
|
9
8
|
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
9
|
}
|
|
11
10
|
export function MergeReview({ data, onApprove, onReject, isProcessing = false, isRejecting = false, chatInput, onChatInputChange, }) {
|
|
12
|
-
const { pr, diffSummary,
|
|
11
|
+
const { pr, diffSummary, phases, branch, warning } = data;
|
|
13
12
|
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
13
|
? '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,
|
|
14
|
+
: '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, phases && phases.length > 0 ? _jsx(PhaseList, { phases: phases }) : null] }), _jsx(DrawerActionBar, { onReject: onReject, onApprove: onApprove, approveLabel: "Approve Merge", approveIcon: isProcessing ? (_jsx(Loader2, { className: "mr-1.5 h-4 w-4 animate-spin" })) : (_jsx(GitMerge, { className: "mr-1.5 h-4 w-4" })), revisionPlaceholder: "Ask AI to revise before merging...", isProcessing: isProcessing, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })] }));
|
|
16
15
|
}
|
|
@@ -21,6 +21,4 @@ export declare const NoPrWithDiff: Story;
|
|
|
21
21
|
export declare const NoPrNoDiff: Story;
|
|
22
22
|
/** With implementation phases shown. */
|
|
23
23
|
export declare const WithPhases: Story;
|
|
24
|
-
/** With file diffs — shows expandable file list with line-level changes. */
|
|
25
|
-
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;AAsC7C,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,KAS1B,CAAC;AAEF,gEAAgE;AAChE,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC;AAEF,wCAAwC;AACxC,eAAO,MAAM,UAAU,EAAE,KAQxB,CAAC"}
|