@shepai/cli 1.101.2 → 1.101.3-pr299.26f760e
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/packages/core/src/infrastructure/repositories/sqlite-repository.repository.js +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/agents/common/executors/dev-executor.service.js +5 -3
- package/dist/packages/core/src/infrastructure/services/agents/sessions/claude-code-session.repository.js +1 -1
- package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts +1 -1
- package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/deployment/deployment.service.js +8 -7
- package/dist/packages/core/src/infrastructure/services/ide-launchers/json-driven-ide-launcher.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/ide-launchers/json-driven-ide-launcher.service.js +6 -8
- package/dist/packages/core/src/infrastructure/services/process/tree-kill.d.ts +12 -0
- package/dist/packages/core/src/infrastructure/services/process/tree-kill.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/process/tree-kill.js +11 -0
- package/dist/packages/core/src/infrastructure/services/spec/spec-initializer.service.js +1 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/binary-exists.d.ts +25 -0
- package/dist/packages/core/src/infrastructure/services/tool-installer/binary-exists.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/services/tool-installer/binary-exists.js +32 -0
- package/dist/packages/core/src/infrastructure/services/tool-installer/tool-installer.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tool-installer.service.js +4 -27
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/alacritty.json +3 -2
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/claude-code.json +3 -2
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/cursor-cli.json +3 -2
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/cursor.json +2 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/gh.json +2 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/git.json +2 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/vscode.json +2 -1
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/warp.json +3 -2
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/windsurf.json +3 -2
- package/dist/packages/core/src/infrastructure/services/tool-installer/tools/zed.json +3 -2
- package/dist/src/presentation/cli/commands/daemon/start-daemon.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/daemon/start-daemon.js +1 -0
- package/dist/src/presentation/cli/commands/daemon/stop-daemon.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/daemon/stop-daemon.js +5 -4
- package/dist/src/presentation/web/app/actions/deploy-repository.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/deploy-repository.js +2 -1
- package/dist/src/presentation/web/app/actions/open-folder.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/open-folder.js +4 -2
- package/dist/src/presentation/web/app/actions/open-ide.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/open-ide.js +2 -1
- package/dist/src/presentation/web/app/actions/open-shell.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/open-shell.js +4 -2
- package/dist/src/presentation/web/app/build-graph-nodes.d.ts.map +1 -1
- package/dist/src/presentation/web/app/build-graph-nodes.js +6 -1
- package/dist/src/presentation/web/components/common/repository-node/repository-node-config.d.ts +2 -0
- package/dist/src/presentation/web/components/common/repository-node/repository-node-config.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js +7 -1
- package/dist/src/presentation/web/hooks/use-graph-state.d.ts.map +1 -1
- package/dist/src/presentation/web/hooks/use-graph-state.js +24 -0
- package/dist/src/presentation/web/lib/derive-graph.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/derive-graph.js +9 -2
- package/dist/src/presentation/web/lib/layout-with-dagre.d.ts +2 -2
- package/dist/src/presentation/web/lib/layout-with-dagre.d.ts.map +1 -1
- package/dist/src/presentation/web/lib/layout-with-dagre.js +34 -35
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +3 -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 +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +20 -20
- 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 +25 -25
- 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 +25 -25
- 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 +18 -18
- 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 +20 -20
- 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 +25 -25
- 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 +25 -25
- 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 +18 -18
- 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 +18 -18
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error.html +2 -2
- package/web/.next/server/app/_global-error.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/web/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +5 -5
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +6 -6
- package/web/.next/server/app/tools/page_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_c757eb00.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_@drawer_repository_[repositoryId]_page_actions_c757eb00.js.map +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_7eb49631.js +1 -1
- package/web/.next/server/chunks/ssr/8ba4b_server_app_(dashboard)_repository_[repositoryId]_page_actions_7eb49631.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0b6bb4ae._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__0b6bb4ae._.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]__24dd0927._.js +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__24dd0927._.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]__5d87af2e._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6a82177d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6a82177d._.js.map +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]__89e8a5cc._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__aad040c0._.js +2 -2
- 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]__ec9a1550._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ec9a1550._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f8932d55._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__f8932d55._.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/_0796f5ff._.js +3 -0
- package/web/.next/server/chunks/ssr/{_4473cfb6._.js.map → _0796f5ff._.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/{_280d26ea._.js → _36c19ad6._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_280d26ea._.js.map → _36c19ad6._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/{_7b1078ea._.js → _72b106be._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_7b1078ea._.js.map → _72b106be._.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/_cc77a143._.js +1 -1
- package/web/.next/server/chunks/ssr/_cc77a143._.js.map +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js +1 -1
- package/web/.next/server/chunks/ssr/b1a17_presentation_web_components_features_settings_settings-page-client_tsx_6ed9d5f8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_3c53a23d._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_3c53a23d._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_befd865a.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_(dashboard)_page_actions_befd865a.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_skills_page_actions_1fa8042e.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web__next-internal_server_app_tools_page_actions_24684200.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_(dashboard)_get-graph-data_ts_b018483e._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_(dashboard)_get-graph-data_ts_b018483e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_bf50c527._.js +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_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_ec8c7a4f._.js +2 -2
- package/web/.next/server/chunks/ssr/src_presentation_web_ec8c7a4f._.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 +30 -30
- package/web/.next/static/chunks/{a66eac8ca44acbb8.js → 04a7577d12e4f21a.js} +1 -1
- package/web/.next/static/chunks/{4d833a7ba9df9988.js → 16dfaa54dfd2528d.js} +1 -1
- package/web/.next/static/chunks/{7666092966404f8c.js → 3c5d209316ec8ce6.js} +1 -1
- package/web/.next/static/chunks/{9a8b41844fcfcfac.js → 4a770f409f1f87b1.js} +1 -1
- package/web/.next/static/chunks/{623fe05019d98c59.js → 593b04977b5d928e.js} +1 -1
- package/web/.next/static/chunks/{1f7e94b3b3b34cf8.js → 720325fcd4254859.js} +2 -2
- package/web/.next/static/chunks/8d38ab818783b1ea.js +1 -0
- package/web/.next/static/chunks/{76ff101574593296.js → 91d905a60c9893e3.js} +2 -2
- package/web/.next/static/chunks/{30dfa1c50ed84f72.js → 9c431e3943cffd8e.js} +1 -1
- package/web/.next/static/chunks/{5355ccb00d9222d9.js → c4e6df7d3f9d642b.js} +1 -1
- package/web/.next/static/chunks/{7410dc38a52be411.js → e06d87d6bda01e27.js} +1 -1
- package/web/.next/server/chunks/ssr/_4473cfb6._.js +0 -3
- package/web/.next/static/chunks/8b86d41dab85f3fd.js +0 -1
- /package/web/.next/static/{SKROAp66dxxVOMZZax_Vp → oZM8kM8VMeZVvbFuLCaiB}/_buildManifest.js +0 -0
- /package/web/.next/static/{SKROAp66dxxVOMZZax_Vp → oZM8kM8VMeZVvbFuLCaiB}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{SKROAp66dxxVOMZZax_Vp → oZM8kM8VMeZVvbFuLCaiB}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-shell.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/open-shell.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"open-shell.d.ts","sourceRoot":"","sources":["../../../../../../src/presentation/web/app/actions/open-shell.ts"],"names":[],"mappings":"AAmBA,UAAU,cAAc;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,wBAAsB,SAAS,CAC7B,KAAK,EAAE,cAAc,GACpB,OAAO,CAAC;IAAE,OAAO,EAAE,OAAO,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAoC9E"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use server';
|
|
2
2
|
import { existsSync } from 'node:fs';
|
|
3
3
|
import { platform } from 'node:os';
|
|
4
|
+
import { isAbsolute } from 'node:path';
|
|
4
5
|
import { spawn } from 'node:child_process';
|
|
5
6
|
import { getSettings } from '../../../../../packages/core/src/infrastructure/services/settings.service.js';
|
|
6
7
|
import { computeWorktreePath } from '../../../../../packages/core/src/infrastructure/services/ide-launchers/compute-worktree-path.js';
|
|
@@ -11,10 +12,11 @@ import { computeWorktreePath } from '../../../../../packages/core/src/infrastruc
|
|
|
11
12
|
const SHELL_COMMANDS = {
|
|
12
13
|
darwin: { cmd: 'open', args: (p) => ['-a', 'Terminal', p] },
|
|
13
14
|
linux: { cmd: 'x-terminal-emulator', args: (p) => [`--working-directory=${p}`] },
|
|
15
|
+
win32: { cmd: 'powershell', args: (p) => ['-NoExit', '-Command', `Set-Location "${p}"`] },
|
|
14
16
|
};
|
|
15
17
|
export async function openShell(input) {
|
|
16
18
|
const { repositoryPath, branch } = input;
|
|
17
|
-
if (!repositoryPath
|
|
19
|
+
if (!repositoryPath || !isAbsolute(repositoryPath)) {
|
|
18
20
|
return { success: false, error: 'repositoryPath must be an absolute path' };
|
|
19
21
|
}
|
|
20
22
|
try {
|
|
@@ -28,7 +30,7 @@ export async function openShell(input) {
|
|
|
28
30
|
if (!entry) {
|
|
29
31
|
return {
|
|
30
32
|
success: false,
|
|
31
|
-
error: `Unsupported platform: ${platform()}
|
|
33
|
+
error: `Unsupported platform: ${platform()}`,
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
36
|
const child = spawn(entry.cmd, entry.args(targetPath), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-graph-nodes.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/build-graph-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAM1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,UAAU,EAAE,EAC1B,gBAAgB,EAAE,cAAc,EAAE,GACjC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"build-graph-nodes.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/app/build-graph-nodes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sCAAsC,CAAC;AAM1F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAG1C,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,QAAQ,GAAG,IAAI,CAAC;CACtB;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,YAAY,EAAE,UAAU,EAAE,EAC1B,gBAAgB,EAAE,cAAc,EAAE,GACjC;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CAuE5C"}
|
|
@@ -29,7 +29,12 @@ export function buildGraphNodes(repositories, featuresWithRuns) {
|
|
|
29
29
|
id: repoNodeId,
|
|
30
30
|
type: 'repositoryNode',
|
|
31
31
|
position: { x: 0, y: 0 },
|
|
32
|
-
data: {
|
|
32
|
+
data: {
|
|
33
|
+
name: repo.name,
|
|
34
|
+
repositoryPath: repo.path,
|
|
35
|
+
id: repo.id,
|
|
36
|
+
createdAt: repo.createdAt instanceof Date ? repo.createdAt.getTime() : Number(repo.createdAt),
|
|
37
|
+
},
|
|
33
38
|
});
|
|
34
39
|
const repoFeatures = featuresByRepo[repo.path] ?? [];
|
|
35
40
|
appendFeatureNodes(repoFeatures, repoNodeId, featuresWithRuns, nodes, edges, repo.name);
|
package/dist/src/presentation/web/components/common/repository-node/repository-node-config.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export interface RepositoryNodeData {
|
|
|
7
7
|
name: string;
|
|
8
8
|
/** Absolute path to the repository root, used for IDE/shell actions */
|
|
9
9
|
repositoryPath?: string;
|
|
10
|
+
/** Creation timestamp (epoch ms) — used for stable vertical ordering. */
|
|
11
|
+
createdAt?: number;
|
|
10
12
|
onClick?: () => void;
|
|
11
13
|
onAdd?: () => void;
|
|
12
14
|
onDelete?: (repositoryId: string) => void;
|
package/dist/src/presentation/web/components/common/repository-node/repository-node-config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository-node-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/repository-node/repository-node-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,qEAAqE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"repository-node-config.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/repository-node/repository-node-config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,WAAW,kBAAkB;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;IACvB,qEAAqE;IACrE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,uEAAuE;IACvE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,yEAAyE;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,kBAAkB,EAAE,gBAAgB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-control-center-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/use-control-center-state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAA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K,kBAAkB,GAAG,SAAS,CAAC;IACtE,0EAA0E;IAC1E,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;CACnD;AAQD,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,cAAc,EAAE,EAC9B,YAAY,EAAE,IAAI,EAAE,GACnB,kBAAkB,
|
|
1
|
+
{"version":3,"file":"use-control-center-state.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/use-control-center-state.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAGL,KAAK,eAAe,EACrB,MAAM,yBAAyB,CAAC;AAcjC,OAAO,EAAiB,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAM7E,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,aAAa,EAAE,CAAC,OAAO,EAAE,UAAU,CAAC,cAAc,CAAC,EAAE,KAAK,IAAI,CAAC;IAC/D,aAAa,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD,mBAAmB,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;QAAE,QAAQ,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/E,YAAY,EAAE,CAAC,SAAS,EAAE,eAAe,KAAK,IAAI,CAAC;IACnD,mBAAmB,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACpE,sBAAsB,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChE,iBAAiB,EAAE,CACjB,YAAY,EAAE,MAAM,GAAG,IAAI,EAC3B,YAAY,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,EACvC,QAAQ,CAAC,EAAE,MAAM,KACd,MAAM,CAAC;IACZ,wDAAwD;IACxD,wBAAwB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,MAAM,GAAG,SAAS,CAAC;IACxE,gDAAgD;IAChD,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IACtE,0EAA0E;IAC1E,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;CACnD;AAQD,wBAAgB,qBAAqB,CACnC,YAAY,EAAE,cAAc,EAAE,EAC9B,YAAY,EAAE,IAAI,EAAE,GACnB,kBAAkB,CAmapB"}
|
package/dist/src/presentation/web/components/features/control-center/use-control-center-state.js
CHANGED
|
@@ -318,7 +318,12 @@ export function useControlCenterState(initialNodes, initialEdges) {
|
|
|
318
318
|
.replace(/[\\/]+$/, '')
|
|
319
319
|
.split(/[\\/]/)
|
|
320
320
|
.pop() ?? path;
|
|
321
|
-
addRepositoryToMap(tempId, {
|
|
321
|
+
addRepositoryToMap(tempId, {
|
|
322
|
+
name: repoName,
|
|
323
|
+
repositoryPath: path,
|
|
324
|
+
id: tempId,
|
|
325
|
+
createdAt: Date.now(),
|
|
326
|
+
});
|
|
322
327
|
addRepository({ path, name: repoName })
|
|
323
328
|
.then((result) => {
|
|
324
329
|
if (result.error) {
|
|
@@ -332,6 +337,7 @@ export function useControlCenterState(initialNodes, initialEdges) {
|
|
|
332
337
|
name: repo.name,
|
|
333
338
|
repositoryPath: repo.path,
|
|
334
339
|
id: repo.id,
|
|
340
|
+
createdAt: repo.createdAt instanceof Date ? repo.createdAt.getTime() : Number(repo.createdAt),
|
|
335
341
|
});
|
|
336
342
|
createSound.play();
|
|
337
343
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-graph-state.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/hooks/use-graph-state.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,eAAe,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,OAAO,EAEL,KAAK,YAAY,EAEjB,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAC;AAG5B,YAAY,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEzD,MAAM,WAAW,mBAAmB;IAClC,mDAAmD;IACnD,KAAK,EAAE,cAAc,EAAE,CAAC;IACxB,mDAAmD;IACnD,KAAK,EAAE,IAAI,EAAE,CAAC;IACd;;;OAGG;IACH,SAAS,EAAE,CAAC,QAAQ,EAAE,cAAc,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC;IAClE,uEAAuE;IACvE,aAAa,EAAE,CAAC,aAAa,EAAE,MAAM,EAAE,OAAO,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAC5E,kEAAkE;IAClE,iBAAiB,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,eAAe,EAAE,YAAY,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1F,yDAAyD;IACzD,oBAAoB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,sDAAsD;IACtD,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,uDAAuD;IACvD,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9D,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AAM,EAAE,MAAM,KAAK,kBAAkB,GAAG,SAAS,CAAC;IACtE,+EAA+E;IAC/E,cAAc,EAAE,MAAM,MAAM,CAAC;IAC7B,6EAA6E;IAC7E,YAAY,EAAE,CAAC,SAAS,EAAE,cAAc,KAAK,IAAI,CAAC;CACnD;AAuCD,KAAK,kBAAkB,GAAG,OAAO,CAC/B,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,aAAa,CAAC,CACtE,CAAC;AAWF,wBAAgB,aAAa,CAC3B,YAAY,EAAE,cAAc,EAAE,EAC9B,YAAY,EAAE,IAAI,EAAE,GACnB,mBAAmB,CA6VrB"}
|
|
@@ -90,6 +90,30 @@ export function useGraphState(initialNodes, initialEdges) {
|
|
|
90
90
|
sourcePosition: node.sourcePosition,
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
|
+
// Anchor new layout to previous positions so the graph doesn't drift.
|
|
94
|
+
// Find the first surviving node (exists in both old and new layouts) and
|
|
95
|
+
// shift the entire new layout by the delta between its old and new position.
|
|
96
|
+
const prevPositions = layoutCacheRef.current.positions;
|
|
97
|
+
if (prevPositions.size > 0) {
|
|
98
|
+
let dx = 0;
|
|
99
|
+
let dy = 0;
|
|
100
|
+
for (const [id, newPos] of positions) {
|
|
101
|
+
const oldPos = prevPositions.get(id);
|
|
102
|
+
if (oldPos) {
|
|
103
|
+
dx = oldPos.position.x - newPos.position.x;
|
|
104
|
+
dy = oldPos.position.y - newPos.position.y;
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
if (dx !== 0 || dy !== 0) {
|
|
109
|
+
for (const pos of positions.values()) {
|
|
110
|
+
pos.position = { x: pos.position.x + dx, y: pos.position.y + dy };
|
|
111
|
+
}
|
|
112
|
+
for (const node of result.nodes) {
|
|
113
|
+
node.position = { x: node.position.x + dx, y: node.position.y + dy };
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
93
117
|
layoutCacheRef.current = { key: topologyKey, positions };
|
|
94
118
|
return result;
|
|
95
119
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"derive-graph.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/lib/derive-graph.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AACxE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAC9E,qDAAqD;AACrD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,eAAe,CAAC;IACtB,sGAAsG;IACtG,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wDAAwD;AACxD,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,kBAAkB,CAAC;CAC1B;AAED,gFAAgF;AAChF,MAAM,WAAW,cAAc;IAC7B,4FAA4F;IAC5F,YAAY,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,qEAAqE;IACrE,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,8CAA8C;IAC9C,eAAe,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACjE,6EAA6E;IAC7E,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK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,OAAO,KAAK,IAAI,CAAC;IACjE,6EAA6E;IAC7E,eAAe,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,8EAA8E;IAC9E,iBAAiB,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;IACjD,iDAAiD;IACjD,kBAAkB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAC;CACrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CACzB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EACrC,OAAO,EAAE,GAAG,CAAC,MAAM,EAAE,SAAS,CAAC,EAC/B,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,YAAY,CAAC,EACrC,SAAS,CAAC,EAAE,cAAc,GACzB;IAAE,KAAK,EAAE,cAAc,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CAgI5C"}
|
|
@@ -41,8 +41,15 @@ export function deriveGraph(featureMap, repoMap, pendingMap, callbacks) {
|
|
|
41
41
|
virtualRepos.set(repositoryPath, virtualId);
|
|
42
42
|
return virtualId;
|
|
43
43
|
}
|
|
44
|
-
// Add repo nodes (real ones)
|
|
45
|
-
|
|
44
|
+
// Add repo nodes (real ones) — sorted by createdAt for stable vertical order.
|
|
45
|
+
// The server-side layoutWithDagre may reorder the node array (connected vs
|
|
46
|
+
// disconnected split), so we cannot rely on Map insertion order alone.
|
|
47
|
+
const sortedRepoEntries = [...repoMap.entries()].sort((a, b) => {
|
|
48
|
+
const aTime = a[1].data.createdAt ?? 0;
|
|
49
|
+
const bTime = b[1].data.createdAt ?? 0;
|
|
50
|
+
return aTime - bTime;
|
|
51
|
+
});
|
|
52
|
+
for (const [nodeId, entry] of sortedRepoEntries) {
|
|
46
53
|
const data = {
|
|
47
54
|
...entry.data,
|
|
48
55
|
...(callbacks?.onRepositoryAdd && {
|
|
@@ -19,8 +19,8 @@ export declare const CANVAS_LAYOUT_DEFAULTS: LayoutOptions;
|
|
|
19
19
|
* Compute an automatic hierarchical layout for React Flow nodes and edges
|
|
20
20
|
* using Dagre. Returns new node/edge arrays — never mutates the originals.
|
|
21
21
|
*
|
|
22
|
-
* Disconnected nodes (no edges) are
|
|
23
|
-
*
|
|
22
|
+
* Disconnected nodes (no edges) are interleaved with connected root trees
|
|
23
|
+
* in their original input order, preserving the caller's sort (e.g. createdAt).
|
|
24
24
|
*/
|
|
25
25
|
export declare function layoutWithDagre<N extends Node>(nodes: N[], edges: Edge[], opts?: LayoutOptions): {
|
|
26
26
|
nodes: N[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout-with-dagre.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/lib/layout-with-dagre.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,iEAAiE;IACjE,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,+DAA+D;AAC/D,eAAO,MAAM,sBAAsB,EAAE,aAIpC,CAAC;AAkCF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,IAAI,EAC5C,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,IAAI,EAAE,EACb,IAAI,GAAE,aAAkB,GACvB;IAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"layout-with-dagre.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/lib/layout-with-dagre.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAEhD,MAAM,MAAM,eAAe,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAExD,MAAM,WAAW,aAAa;IAC5B,iEAAiE;IACjE,SAAS,CAAC,EAAE,eAAe,CAAC;IAC5B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7C,qDAAqD;IACrD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,+DAA+D;AAC/D,eAAO,MAAM,sBAAsB,EAAE,aAIpC,CAAC;AAkCF;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,IAAI,EAC5C,KAAK,EAAE,CAAC,EAAE,EACV,KAAK,EAAE,IAAI,EAAE,EACb,IAAI,GAAE,aAAkB,GACvB;IAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAAC,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,CAqL/B"}
|
|
@@ -35,8 +35,8 @@ function getHandlePositions(direction) {
|
|
|
35
35
|
* Compute an automatic hierarchical layout for React Flow nodes and edges
|
|
36
36
|
* using Dagre. Returns new node/edge arrays — never mutates the originals.
|
|
37
37
|
*
|
|
38
|
-
* Disconnected nodes (no edges) are
|
|
39
|
-
*
|
|
38
|
+
* Disconnected nodes (no edges) are interleaved with connected root trees
|
|
39
|
+
* in their original input order, preserving the caller's sort (e.g. createdAt).
|
|
40
40
|
*/
|
|
41
41
|
export function layoutWithDagre(nodes, edges, opts = {}) {
|
|
42
42
|
const { direction = 'TB', nodeSize = { width: 172, height: 36 }, ranksep = 80, nodesep = 30, } = opts;
|
|
@@ -75,6 +75,23 @@ export function layoutWithDagre(nodes, edges, opts = {}) {
|
|
|
75
75
|
const size = getNodeSize(node, nodeSize);
|
|
76
76
|
centerMap.set(node.id, { cx: dagreNode.x, cy: dagreNode.y, w: size.width, h: size.height });
|
|
77
77
|
}
|
|
78
|
+
// Add disconnected nodes to centerMap so they participate in root positioning.
|
|
79
|
+
// Use the same primary-axis position as connected roots (rank 0) so they align
|
|
80
|
+
// visually with repos that have features attached.
|
|
81
|
+
let rootPrimaryAxis = 0;
|
|
82
|
+
for (const c of centerMap.values()) {
|
|
83
|
+
rootPrimaryAxis = isHorizontal ? c.cx : c.cy;
|
|
84
|
+
break; // Use the first connected node's primary position
|
|
85
|
+
}
|
|
86
|
+
for (const node of disconnectedNodes) {
|
|
87
|
+
const size = getNodeSize(node, nodeSize);
|
|
88
|
+
centerMap.set(node.id, {
|
|
89
|
+
cx: isHorizontal ? rootPrimaryAxis : 0,
|
|
90
|
+
cy: isHorizontal ? 0 : rootPrimaryAxis,
|
|
91
|
+
w: size.width,
|
|
92
|
+
h: size.height,
|
|
93
|
+
});
|
|
94
|
+
}
|
|
78
95
|
// ── Proper tree layout for the secondary axis ──
|
|
79
96
|
// Dagre gives us correct primary-axis (rank/X) positions but its secondary-
|
|
80
97
|
// axis (Y) positioning doesn't respect our tree structure well. Replace it
|
|
@@ -94,21 +111,24 @@ export function layoutWithDagre(nodes, edges, opts = {}) {
|
|
|
94
111
|
}
|
|
95
112
|
// Sort children by input order (preserves caller's ordering, e.g. createdAt)
|
|
96
113
|
const inputIndex = new Map();
|
|
97
|
-
for (let i = 0; i <
|
|
98
|
-
inputIndex.set(
|
|
114
|
+
for (let i = 0; i < nodes.length; i++) {
|
|
115
|
+
inputIndex.set(nodes[i].id, i);
|
|
99
116
|
}
|
|
100
117
|
for (const [, kids] of childrenOf) {
|
|
101
118
|
kids.sort((a, b) => (inputIndex.get(a) ?? 0) - (inputIndex.get(b) ?? 0));
|
|
102
119
|
}
|
|
103
|
-
// Find tree roots
|
|
120
|
+
// Find tree roots: connected nodes that are not children of another node
|
|
104
121
|
const childSet = new Set();
|
|
105
122
|
for (const ids of childrenOf.values()) {
|
|
106
123
|
for (const id of ids)
|
|
107
124
|
childSet.add(id);
|
|
108
125
|
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
126
|
+
const connectedRoots = [...connectedIds].filter((id) => centerMap.has(id) && !childSet.has(id));
|
|
127
|
+
// Merge connected roots and disconnected nodes, sorted by input order
|
|
128
|
+
// so repos maintain their original creation-time ordering regardless of
|
|
129
|
+
// whether they have features attached.
|
|
130
|
+
const allRoots = [...connectedRoots, ...disconnectedNodes.map((n) => n.id)];
|
|
131
|
+
allRoots.sort((a, b) => (inputIndex.get(a) ?? 0) - (inputIndex.get(b) ?? 0));
|
|
112
132
|
// Bottom-up: compute the total secondary-axis span each subtree needs
|
|
113
133
|
const subtreeSpan = new Map();
|
|
114
134
|
function computeSpan(nodeId) {
|
|
@@ -130,7 +150,7 @@ export function layoutWithDagre(nodes, edges, opts = {}) {
|
|
|
130
150
|
subtreeSpan.set(nodeId, span);
|
|
131
151
|
return span;
|
|
132
152
|
}
|
|
133
|
-
for (const root of
|
|
153
|
+
for (const root of allRoots)
|
|
134
154
|
computeSpan(root);
|
|
135
155
|
// Top-down: position each node on the secondary axis, centering parent
|
|
136
156
|
// on its children block. For 1-to-1 edges the child gets the same
|
|
@@ -160,17 +180,19 @@ export function layoutWithDagre(nodes, edges, opts = {}) {
|
|
|
160
180
|
cursor += kidSpan + nodesep;
|
|
161
181
|
}
|
|
162
182
|
}
|
|
163
|
-
// Position
|
|
183
|
+
// Position all root trees (connected and disconnected) in input order.
|
|
164
184
|
let rootCursor = 0;
|
|
165
|
-
for (const root of
|
|
185
|
+
for (const root of allRoots) {
|
|
166
186
|
const span = subtreeSpan.get(root) ?? 0;
|
|
167
187
|
positionTree(root, rootCursor + span / 2);
|
|
168
188
|
rootCursor += span + nodesep;
|
|
169
189
|
}
|
|
170
190
|
// Build result array converting center-coords to React Flow top-left
|
|
171
191
|
const result = [];
|
|
172
|
-
for (const node of
|
|
192
|
+
for (const node of nodes) {
|
|
173
193
|
const c = centerMap.get(node.id);
|
|
194
|
+
if (!c)
|
|
195
|
+
continue;
|
|
174
196
|
result.push({
|
|
175
197
|
...node,
|
|
176
198
|
targetPosition,
|
|
@@ -178,28 +200,5 @@ export function layoutWithDagre(nodes, edges, opts = {}) {
|
|
|
178
200
|
position: { x: c.cx - c.w / 2, y: c.cy - c.h / 2 },
|
|
179
201
|
});
|
|
180
202
|
}
|
|
181
|
-
// Place disconnected nodes after the laid-out graph so they don't overlap
|
|
182
|
-
if (disconnectedNodes.length > 0) {
|
|
183
|
-
let maxY = 0;
|
|
184
|
-
let minX = Infinity;
|
|
185
|
-
for (const n of result) {
|
|
186
|
-
const size = getNodeSize(n, nodeSize);
|
|
187
|
-
maxY = Math.max(maxY, n.position.y + size.height);
|
|
188
|
-
minX = Math.min(minX, n.position.x);
|
|
189
|
-
}
|
|
190
|
-
// When no graph nodes exist (all disconnected), default to origin
|
|
191
|
-
if (minX === Infinity)
|
|
192
|
-
minX = 0;
|
|
193
|
-
for (let i = 0; i < disconnectedNodes.length; i++) {
|
|
194
|
-
const node = disconnectedNodes[i];
|
|
195
|
-
const size = getNodeSize(node, nodeSize);
|
|
196
|
-
result.push({
|
|
197
|
-
...node,
|
|
198
|
-
targetPosition,
|
|
199
|
-
sourcePosition,
|
|
200
|
-
position: { x: minX, y: maxY + 30 + i * (size.height + 20) },
|
|
201
|
-
});
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
203
|
return { nodes: result, edges: [...edges] };
|
|
205
204
|
}
|