@shepai/cli 1.162.0 → 1.163.0-pr499.0ce2086
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/README.md +12 -0
- package/apis/json-schema/FabLayoutConfig.yaml +11 -0
- package/apis/json-schema/Settings.yaml +3 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts +20 -0
- package/dist/packages/core/src/application/ports/output/services/github-repository-service.interface.d.ts.map +1 -1
- package/dist/packages/core/src/application/ports/output/services/index.d.ts +1 -1
- package/dist/packages/core/src/application/ports/output/services/index.d.ts.map +1 -1
- package/dist/packages/core/src/application/use-cases/repositories/list-github-organizations.use-case.d.ts +13 -0
- package/dist/packages/core/src/application/use-cases/repositories/list-github-organizations.use-case.d.ts.map +1 -0
- package/dist/packages/core/src/application/use-cases/repositories/list-github-organizations.use-case.js +35 -0
- package/dist/packages/core/src/domain/generated/output.d.ts +13 -0
- package/dist/packages/core/src/domain/generated/output.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/di/container.js +5 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/persistence/sqlite/mappers/settings.mapper.js +6 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/050-add-fab-position-swapped.d.ts +15 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/050-add-fab-position-swapped.d.ts.map +1 -0
- package/dist/packages/core/src/infrastructure/persistence/sqlite/migrations/050-add-fab-position-swapped.js +20 -0
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts +2 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.d.ts.map +1 -1
- package/dist/packages/core/src/infrastructure/services/external/github-repository.service.js +20 -0
- package/dist/src/presentation/cli/commands/repo/add.command.d.ts.map +1 -1
- package/dist/src/presentation/cli/commands/repo/add.command.js +3 -1
- package/dist/src/presentation/tui/wizards/github-import.wizard.d.ts +5 -2
- package/dist/src/presentation/tui/wizards/github-import.wizard.d.ts.map +1 -1
- package/dist/src/presentation/tui/wizards/github-import.wizard.js +38 -6
- package/dist/src/presentation/web/app/actions/get-git-log.d.ts +44 -0
- package/dist/src/presentation/web/app/actions/get-git-log.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/get-git-log.js +125 -0
- package/dist/src/presentation/web/app/actions/list-github-organizations.d.ts +6 -0
- package/dist/src/presentation/web/app/actions/list-github-organizations.d.ts.map +1 -0
- package/dist/src/presentation/web/app/actions/list-github-organizations.js +17 -0
- package/dist/src/presentation/web/app/actions/list-github-repositories.d.ts +1 -0
- package/dist/src/presentation/web/app/actions/list-github-repositories.d.ts.map +1 -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 +5 -2
- package/dist/src/presentation/web/app/layout.d.ts.map +1 -1
- package/dist/src/presentation/web/app/layout.js +3 -1
- package/dist/src/presentation/web/components/common/base-drawer/base-drawer.js +1 -1
- 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 +46 -15
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/repository-drawer-client.js +77 -5
- package/dist/src/presentation/web/components/common/control-center-drawer/use-drawer-sync.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/control-center-drawer/use-drawer-sync.js +11 -0
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/deployment-status-badge/deployment-status-badge.js +10 -9
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts +5 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js +24 -13
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.js +56 -81
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.d.ts +8 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.js +37 -7
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.d.ts +1 -0
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.js +35 -0
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.d.ts.map +1 -1
- package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.js +11 -6
- package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatSheet.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/chat/ChatSheet.js +22 -2
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/control-center/control-center-inner.js +15 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.d.ts.map +1 -1
- package/dist/src/presentation/web/components/features/settings/settings-page-client.js +9 -2
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.d.ts.map +1 -1
- package/dist/src/presentation/web/components/layouts/app-sidebar/app-sidebar.js +7 -2
- package/dist/src/presentation/web/hooks/fab-layout-context.d.ts +18 -0
- package/dist/src/presentation/web/hooks/fab-layout-context.d.ts.map +1 -0
- package/dist/src/presentation/web/hooks/fab-layout-context.js +19 -0
- package/dist/src/presentation/web/hooks/use-animations-enabled.d.ts +6 -0
- package/dist/src/presentation/web/hooks/use-animations-enabled.d.ts.map +1 -0
- package/dist/src/presentation/web/hooks/use-animations-enabled.js +30 -0
- package/dist/src/presentation/web/lib/fab-layout.d.ts +11 -0
- package/dist/src/presentation/web/lib/fab-layout.d.ts.map +1 -0
- package/dist/src/presentation/web/lib/fab-layout.js +21 -0
- package/dist/translations/ar/web.json +8 -0
- package/dist/translations/de/web.json +8 -0
- package/dist/translations/en/web.json +8 -0
- package/dist/translations/es/web.json +8 -0
- package/dist/translations/fr/web.json +8 -0
- package/dist/translations/he/web.json +8 -0
- package/dist/translations/pt/web.json +8 -0
- package/dist/translations/ru/web.json +8 -0
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +3 -3
- package/web/.next/required-server-files.json +3 -3
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +71 -56
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page/server-reference-manifest.json +67 -52
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page/server-reference-manifest.json +73 -58
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page/server-reference-manifest.json +87 -72
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/[tab]/page.js +2 -2
- 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 +87 -72
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +82 -52
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page/server-reference-manifest.json +82 -52
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/chat/page/server-reference-manifest.json +67 -52
- package/web/.next/server/app/(dashboard)/chat/page.js +2 -2
- package/web/.next/server/app/(dashboard)/chat/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/chat/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/create/page/server-reference-manifest.json +73 -58
- package/web/.next/server/app/(dashboard)/create/page.js +2 -2
- package/web/.next/server/app/(dashboard)/create/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/create/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page/server-reference-manifest.json +87 -72
- package/web/.next/server/app/(dashboard)/feature/[featureId]/[tab]/page.js +2 -2
- 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 +87 -72
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/feature/[featureId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/page/server-reference-manifest.json +67 -52
- package/web/.next/server/app/(dashboard)/page.js +2 -2
- package/web/.next/server/app/(dashboard)/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page/server-reference-manifest.json +82 -52
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page/server-reference-manifest.json +82 -52
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +2 -2
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js.nft.json +1 -1
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/_global-error/page_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 +25 -10
- package/web/.next/server/app/_not-found/page.js +2 -2
- package/web/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/web/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/api/attachments/preview/route.js.nft.json +1 -1
- package/web/.next/server/app/api/evidence/route.js.nft.json +1 -1
- package/web/.next/server/app/api/graph-data/route.js +1 -1
- package/web/.next/server/app/api/graph-data/route.js.nft.json +1 -1
- package/web/.next/server/app/api/interactive/chat/[featureId]/messages/route.js.nft.json +1 -1
- package/web/.next/server/app/settings/page/server-reference-manifest.json +31 -16
- package/web/.next/server/app/settings/page.js +2 -2
- package/web/.next/server/app/settings/page.js.nft.json +1 -1
- package/web/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/skills/page/server-reference-manifest.json +35 -20
- package/web/.next/server/app/skills/page.js +2 -2
- package/web/.next/server/app/skills/page.js.nft.json +1 -1
- package/web/.next/server/app/skills/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/tools/page/server-reference-manifest.json +35 -20
- package/web/.next/server/app/tools/page.js +2 -2
- package/web/.next/server/app/tools/page.js.nft.json +1 -1
- package/web/.next/server/app/tools/page_client-reference-manifest.js +1 -1
- package/web/.next/server/app/version/page/server-reference-manifest.json +25 -10
- package/web/.next/server/app/version/page.js +2 -2
- package/web/.next/server/app/version/page.js.nft.json +1 -1
- package/web/.next/server/app/version/page_client-reference-manifest.js +1 -1
- package/web/.next/server/chunks/[root-of-the-server]__a402b567._.js +1 -1
- package/web/.next/server/chunks/{[root-of-the-server]__beda892a._.js → [root-of-the-server]__c78383b1._.js} +2 -2
- package/web/.next/server/chunks/[root-of-the-server]__c78383b1._.js.map +1 -0
- package/web/.next/server/chunks/[root-of-the-server]__cd67a84c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/403f9_next_dist_esm_ceb2fa1e._.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/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js +3 -3
- package/web/.next/server/chunks/ssr/744ca_web_components_common_control-center-drawer_feature-drawer-client_tsx_e9755fc8._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{7f428_lucide-react_dist_esm_icons_4b319ae6._.js → 7f428_lucide-react_dist_esm_icons_281e0ef8._.js} +2 -2
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_281e0ef8._.js.map +1 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_a593f310._.js +3 -0
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_a593f310._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1abe77bb._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1abe77bb._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__23b5ca2c._.js +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]__563e4faf._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__563e4faf._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6eb2a2b0._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7528eb6f._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7562afc6._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7562afc6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__821a11c1._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__821a11c1._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__86ff0bc5._.js +7 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__86ff0bc5._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8b0aac03._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__98740ee4._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__98740ee4._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba9f9e11._.js +4 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba9f9e11._.js.map +1 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e0be67c7._.js +3 -0
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e0be67c7._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_02e01240._.js +4 -0
- package/web/.next/server/chunks/ssr/_02e01240._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_05c23ad9._.js +1 -1
- package/web/.next/server/chunks/ssr/_05c23ad9._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_9495d50b._.js → _0727935d._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_9495d50b._.js.map → _0727935d._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_0dc06d07._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js +1 -1
- package/web/.next/server/chunks/ssr/_16eb4fec._.js.map +1 -1
- package/web/.next/server/chunks/ssr/{_bcaea66b._.js → _1879404a._.js} +2 -2
- package/web/.next/server/chunks/ssr/_1879404a._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_18886033._.js +4 -0
- package/web/.next/server/chunks/ssr/_18886033._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_b9ba2473._.js → _1e08a336._.js} +2 -2
- package/web/.next/server/chunks/ssr/_1e08a336._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_22e00a14._.js +4 -0
- package/web/.next/server/chunks/ssr/_22e00a14._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_07635b7c._.js → _3625b35c._.js} +2 -2
- package/web/.next/server/chunks/ssr/_3625b35c._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_4d49a312._.js +3 -0
- package/web/.next/server/chunks/ssr/_4d49a312._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_5119a3df._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js +1 -1
- package/web/.next/server/chunks/ssr/_56b9d60f._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_9215e9ec._.js +3 -0
- package/web/.next/server/chunks/ssr/_9215e9ec._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_954c5b3f._.js +3 -0
- package/web/.next/server/chunks/ssr/_954c5b3f._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_a5a5901d._.js +4 -0
- package/web/.next/server/chunks/ssr/_a5a5901d._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ad09f271._.js +4 -0
- package/web/.next/server/chunks/ssr/_ad09f271._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_b7a43c05._.js +3 -0
- package/web/.next/server/chunks/ssr/_b7a43c05._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_c3f595c6._.js +4 -0
- package/web/.next/server/chunks/ssr/_c3f595c6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_c45aee16._.js +3 -0
- package/web/.next/server/chunks/ssr/_c45aee16._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_1c309165._.js → _cc654b75._.js} +3 -3
- package/web/.next/server/chunks/ssr/_cc654b75._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_ea9e1556._.js +4 -0
- package/web/.next/server/chunks/ssr/_ea9e1556._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_73e1eb5f._.js → _ea9f5467._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_73e1eb5f._.js.map → _ea9f5467._.js.map} +1 -1
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js +6 -0
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_f33cd07e._.js +6 -0
- package/web/.next/server/chunks/ssr/_f33cd07e._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_f8b45233._.js +4 -0
- package/web/.next/server/chunks/ssr/_f8b45233._.js.map +1 -0
- 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/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js +3 -0
- package/web/.next/server/chunks/ssr/f3a1f_components_common_control-center-drawer_repository-drawer-client_tsx_39a00c03._.js.map +1 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js +3 -0
- package/web/.next/server/chunks/ssr/node_modules__pnpm_1300ae39._.js.map +1 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_app_actions_open-ide_ts_baaca5d5._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_895e5bfa._.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_components_features_tools_tools-page-client_tsx_3d0aa70c._.js +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_features_tools_tools-page-client_tsx_3d0aa70c._.js.map +1 -1
- package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_select_tsx_45d6b8ae._.js +3 -0
- package/web/.next/server/chunks/ssr/src_presentation_web_components_ui_select_tsx_45d6b8ae._.js.map +1 -0
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.js +1 -1
- package/web/.next/server/chunks/ssr/translations_23dd5e7e._.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 +672 -495
- package/web/.next/static/chunks/039b43423300c5fb.js +7 -0
- package/web/.next/static/chunks/{04b3e8b2c0b2a310.js → 16faea5f198d1c15.js} +2 -2
- package/web/.next/static/chunks/28ae5046faef6cec.js +1 -0
- package/web/.next/static/chunks/29f0d874b1fde3d6.js +5 -0
- package/web/.next/static/chunks/2c498b3dc30a33d4.js +1 -0
- package/web/.next/static/chunks/3b9e9bcb040b302b.js +1 -0
- package/web/.next/static/chunks/400e93efac983a76.css +1 -0
- package/web/.next/static/chunks/5a5455d111b22e62.js +1 -0
- package/web/.next/static/chunks/76e2b554ca427213.js +1 -0
- package/web/.next/static/chunks/779b5c49587b074e.js +1 -0
- package/web/.next/static/chunks/89f0ff47b59fcd7b.js +1 -0
- package/web/.next/static/chunks/{1db4dfa35a1637ed.js → 91ff36bca978b7c0.js} +1 -1
- package/web/.next/static/chunks/966eb2688300b7f5.js +1 -0
- package/web/.next/static/chunks/971e52f3f386ccfd.js +1 -0
- package/web/.next/static/chunks/9d6b4bfb854588a9.js +1 -0
- package/web/.next/static/chunks/{2770aabb38d76609.js → a76c0a69840530a0.js} +1 -1
- package/web/.next/static/chunks/a8243f8d06bdcef0.js +5 -0
- package/web/.next/static/chunks/b63e6727c84f30e2.js +1 -0
- package/web/.next/static/chunks/c744b25661a572d6.js +5 -0
- package/web/.next/static/chunks/c89c71e1d2e4e3f6.js +1 -0
- package/web/.next/static/chunks/{192dd30a464572ef.js → fc52571f411eb0c7.js} +2 -2
- package/web/.next/server/chunks/[root-of-the-server]__beda892a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/7f428_lucide-react_dist_esm_icons_4b319ae6._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__209c9597._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__209c9597._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__27301e38._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__27301e38._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__56b70465._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6fecf886._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__6fecf886._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8d27866c._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__8d27866c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9f3504c7._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__9f3504c7._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__bd6ed91a._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__bd6ed91a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js +0 -4
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c30f1f82._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e91ffd5e._.js +0 -7
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e91ffd5e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ee0eaaf9._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ee0eaaf9._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_07635b7c._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_1c309165._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_3a0b989f._.js +0 -6
- package/web/.next/server/chunks/ssr/_3a0b989f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_573caadf._.js +0 -3
- package/web/.next/server/chunks/ssr/_573caadf._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_5f69c13f._.js +0 -4
- package/web/.next/server/chunks/ssr/_5f69c13f._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_7c5b97c6._.js +0 -4
- package/web/.next/server/chunks/ssr/_7c5b97c6._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_82c57f10._.js +0 -4
- package/web/.next/server/chunks/ssr/_82c57f10._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_9c5bd84a._.js +0 -3
- package/web/.next/server/chunks/ssr/_9c5bd84a._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_a0e3f7e4._.js +0 -4
- package/web/.next/server/chunks/ssr/_a0e3f7e4._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ac4a3873._.js +0 -3
- package/web/.next/server/chunks/ssr/_ac4a3873._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_b9ba2473._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_bcaea66b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ca0aa7f0._.js +0 -4
- package/web/.next/server/chunks/ssr/_ca0aa7f0._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_cb5a021e._.js +0 -4
- package/web/.next/server/chunks/ssr/_cb5a021e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_cfbd1d7e._.js +0 -3
- package/web/.next/server/chunks/ssr/_cfbd1d7e._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_d86175ae._.js +0 -4
- package/web/.next/server/chunks/ssr/_d86175ae._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_d8bedf13._.js +0 -4
- package/web/.next/server/chunks/ssr/_d8bedf13._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_d90b0a06._.js +0 -3
- package/web/.next/server/chunks/ssr/_d90b0a06._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_fa7efce3._.js +0 -6
- package/web/.next/server/chunks/ssr/_fa7efce3._.js.map +0 -1
- package/web/.next/server/chunks/ssr/node_modules__pnpm_8ec2c790._.js +0 -3
- package/web/.next/server/chunks/ssr/node_modules__pnpm_8ec2c790._.js.map +0 -1
- package/web/.next/static/chunks/0a79dfbb8486b66e.js +0 -5
- package/web/.next/static/chunks/14d9d9181bb4e337.js +0 -1
- package/web/.next/static/chunks/1d980f961818ff68.js +0 -1
- package/web/.next/static/chunks/2c9404cf96b0a5a0.js +0 -1
- package/web/.next/static/chunks/47477ed4c5871747.js +0 -1
- package/web/.next/static/chunks/4864ff06a738d58b.js +0 -1
- package/web/.next/static/chunks/5281c5a2011132bc.js +0 -5
- package/web/.next/static/chunks/63b4954715fc3423.js +0 -1
- package/web/.next/static/chunks/74db65fa7bfb80bd.js +0 -1
- package/web/.next/static/chunks/7cd7aef397d53b94.js +0 -1
- package/web/.next/static/chunks/83928a921868a809.js +0 -1
- package/web/.next/static/chunks/86c476f04ff32e7b.css +0 -1
- package/web/.next/static/chunks/a81350e847797ff8.js +0 -1
- package/web/.next/static/chunks/cb41e1da2ce3a710.js +0 -7
- package/web/.next/static/chunks/d0613380bbaa9a8e.js +0 -1
- package/web/.next/static/chunks/d2cbeefbc8967b16.js +0 -1
- package/web/.next/static/chunks/d6e702c209c413ce.js +0 -5
- /package/web/.next/static/{GXMtXdKTjklQ1IkrOohzE → SFr_DcWGpl2mSNLzCZet_}/_buildManifest.js +0 -0
- /package/web/.next/static/{GXMtXdKTjklQ1IkrOohzE → SFr_DcWGpl2mSNLzCZet_}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{GXMtXdKTjklQ1IkrOohzE → SFr_DcWGpl2mSNLzCZet_}/_ssgManifest.js +0 -0
|
@@ -2,75 +2,54 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect, useRef } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { AlertTriangle, Check, ExternalLink, FileSearch, GitBranch, GitCommitHorizontal,
|
|
5
|
+
import { AlertTriangle, Check, CheckCircle2, Clock, ExternalLink, FileSearch, GitBranch, GitCommitHorizontal, GitMerge, Info, RefreshCw, Settings, ShieldCheck, X, Zap, } from 'lucide-react';
|
|
6
6
|
import { InlineAttachments } from '../../common/inline-attachments/index.js';
|
|
7
7
|
import { PrStatus } from '../../../../../../packages/core/src/domain/generated/output.js';
|
|
8
8
|
import { cn } from '../../../lib/utils.js';
|
|
9
|
-
import { Badge } from '../../ui/badge.js';
|
|
10
|
-
import { Separator } from '../../ui/separator.js';
|
|
11
9
|
import { CiStatusBadge } from '../../common/ci-status-badge/index.js';
|
|
12
10
|
import { CometSpinner } from '../../ui/comet-spinner.js';
|
|
13
|
-
import {
|
|
11
|
+
import { ActionButton } from '../../common/action-button/index.js';
|
|
12
|
+
import { featureNodeStateConfig } from '../../common/feature-node/index.js';
|
|
14
13
|
import { getAgentTypeIcon, agentTypeLabels, } from '../../common/feature-node/agent-type-icons.js';
|
|
15
14
|
import { getModelMeta } from '../../../lib/model-metadata.js';
|
|
16
15
|
import { formatDuration } from '../../../lib/format-duration.js';
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
return (_jsxs(_Fragment, { children: [_jsxs("div", { "data-testid": "feature-drawer-status", className: "flex flex-col gap-3 p-4", children: [_jsx("div", { className: "text-muted-foreground text-xs font-semibold tracking-wider", children: lifecycleDisplayLabels[data.lifecycle] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(FeatureStateBadge, { data: data }), data.state === 'error' && data.onRetry ? (_jsxs("button", { "data-testid": "feature-drawer-retry-button", onClick: () => data.onRetry(data.featureId), className: "flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-red-50 px-3 py-1.5 text-sm font-medium text-red-700 transition-colors hover:bg-red-100", children: [_jsx(RotateCcw, { className: "h-3.5 w-3.5" }), "Retry"] })) : null, (data.state === 'running' || data.state === 'action-required') && data.onStop ? (_jsxs("button", { "data-testid": "feature-drawer-stop-button", onClick: () => data.onStop(data.featureId), className: "flex shrink-0 cursor-pointer items-center gap-1.5 rounded-full bg-red-50 px-3 py-1.5 text-sm font-medium text-red-700 transition-colors hover:bg-red-100", children: [_jsx(Square, { className: "h-3.5 w-3.5" }), "Stop"] })) : null] }), !isCompleted && data.progress > 0 ? (_jsxs("div", { "data-testid": "feature-drawer-progress", className: "flex flex-col gap-1", children: [_jsxs("div", { className: "text-muted-foreground flex items-center justify-between text-xs", children: [_jsx("span", { children: "Progress" }), _jsxs("span", { children: [data.progress, "%"] })] }), _jsx("div", { className: "bg-muted h-2 w-full overflow-hidden rounded-full", children: _jsx("div", { className: cn('h-full rounded-full transition-all', featureNodeStateConfig[data.state].progressClass), style: { width: `${data.progress}%` } }) })] })) : null, isCompleted && data.pr ? (_jsx(FeaturePrInfo, { pr: data.pr, hideCiStatus: data.hideCiStatus })) : null] }), _jsx(FeatureInfo, { data: data }), !isCompleted && data.pr ? (_jsxs(_Fragment, { children: [_jsx(Separator, {}), _jsx("div", { className: "p-4", children: _jsx(FeaturePrInfo, { pr: data.pr, hideCiStatus: data.hideCiStatus }) })] })) : null, _jsx(FeatureDetails, { data: data }), onRebaseOnMain && data.branch && onRefreshSync ? (_jsx(BranchSyncStatus, { syncStatus: syncStatus ?? null, syncLoading: syncLoading ?? false, syncError: syncError ?? null, onRefreshSync: onRefreshSync, onRebaseOnMain: onRebaseOnMain, rebaseLoading: rebaseLoading ?? false, rebaseError: rebaseError ?? null })) : null, _jsx(FeatureSettings, { data: data })] }));
|
|
16
|
+
// ── Primitives ──────────────────────────────────────────────────────
|
|
17
|
+
function Section({ icon: Icon, title, children, }) {
|
|
18
|
+
return (_jsxs("div", { className: "px-3 pt-4 pb-1", children: [_jsxs("div", { className: "text-foreground mb-2 flex items-center gap-1.5 text-sm font-semibold tracking-wider uppercase", children: [_jsx(Icon, { className: "size-4 opacity-50" }), title] }), children] }));
|
|
21
19
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
const Icon = config.icon;
|
|
25
|
-
return (_jsxs("div", { className: cn('flex items-center gap-2 rounded-full px-3 py-1.5 text-sm font-medium', config.badgeBgClass, config.badgeClass), children: [data.state === 'running' ? (_jsx(CometSpinner, { size: "sm", className: "shrink-0" })) : (_jsx(Icon, { className: "h-4 w-4 shrink-0" })), _jsx("span", { children: config.label })] }));
|
|
20
|
+
function Card({ children, className }) {
|
|
21
|
+
return (_jsx("div", { className: cn('bg-muted/60 rounded-md border border-transparent p-3', className), children: children }));
|
|
26
22
|
}
|
|
27
|
-
|
|
23
|
+
function KV({ label, children }) {
|
|
24
|
+
return (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-foreground/40 text-[11px] font-medium tracking-wider uppercase", children: label }), _jsx("span", { className: "text-sm leading-snug", children: children })] }));
|
|
25
|
+
}
|
|
26
|
+
function Flag({ on, label }) {
|
|
27
|
+
return (_jsxs("span", { className: cn('inline-flex items-center gap-1 rounded px-2 py-0.5 text-xs font-medium', on
|
|
28
|
+
? 'bg-emerald-500/10 text-emerald-600 dark:text-emerald-400'
|
|
29
|
+
: 'bg-foreground/[0.04] text-foreground/25'), children: [on ? _jsx(Check, { className: "size-3" }) : _jsx(X, { className: "size-3" }), label] }));
|
|
30
|
+
}
|
|
31
|
+
// ── Helpers ──────────────────────────────────────────────────────────
|
|
28
32
|
function formatRelativeTime(timestamp) {
|
|
29
33
|
const now = Date.now();
|
|
30
34
|
const time = typeof timestamp === 'string' ? new Date(timestamp).getTime() : timestamp;
|
|
31
35
|
const diffMs = now - time;
|
|
32
|
-
const
|
|
33
|
-
const diffMin = Math.floor(diffSec / 60);
|
|
36
|
+
const diffMin = Math.floor(diffMs / 60000);
|
|
34
37
|
const diffHr = Math.floor(diffMin / 60);
|
|
35
38
|
const diffDay = Math.floor(diffHr / 24);
|
|
36
|
-
if (diffDay > 30)
|
|
39
|
+
if (diffDay > 30)
|
|
37
40
|
return new Date(time).toLocaleDateString(undefined, {
|
|
38
41
|
year: 'numeric',
|
|
39
42
|
month: 'short',
|
|
40
43
|
day: 'numeric',
|
|
41
44
|
});
|
|
42
|
-
}
|
|
43
45
|
if (diffDay > 0)
|
|
44
|
-
return `${diffDay}
|
|
46
|
+
return `${diffDay}d ago`;
|
|
45
47
|
if (diffHr > 0)
|
|
46
|
-
return `${diffHr}
|
|
48
|
+
return `${diffHr}h ago`;
|
|
47
49
|
if (diffMin > 0)
|
|
48
|
-
return `${diffMin}
|
|
50
|
+
return `${diffMin}m ago`;
|
|
49
51
|
return 'just now';
|
|
50
52
|
}
|
|
51
|
-
function FeatureInfo({ data }) {
|
|
52
|
-
const { t } = useTranslation('web');
|
|
53
|
-
const showSummary = Boolean(data.summary) && !(data.userQuery && data.summary?.trim() === data.userQuery.trim());
|
|
54
|
-
const hasInfo = Boolean(data.branch) ||
|
|
55
|
-
Boolean(data.oneLiner) ||
|
|
56
|
-
showSummary ||
|
|
57
|
-
Boolean(data.userQuery) ||
|
|
58
|
-
Boolean(data.createdAt);
|
|
59
|
-
if (!hasInfo)
|
|
60
|
-
return null;
|
|
61
|
-
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(InlineAttachments, { text: data.userQuery })] })) : null, showSummary ? (_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: t('overviewTab.created'), value: formatRelativeTime(data.createdAt) })) : null] })] }));
|
|
62
|
-
}
|
|
63
|
-
// ── PR Info section ──────────────────────────────────────────────────
|
|
64
|
-
const prStatusStyles = {
|
|
65
|
-
[PrStatus.Open]: 'border-transparent bg-blue-50 text-blue-700 hover:bg-blue-50',
|
|
66
|
-
[PrStatus.Merged]: 'border-transparent bg-purple-50 text-purple-700 hover:bg-purple-50',
|
|
67
|
-
[PrStatus.Closed]: 'border-transparent bg-red-50 text-red-700 hover:bg-red-50',
|
|
68
|
-
};
|
|
69
|
-
function FeaturePrInfo({ pr, hideCiStatus, }) {
|
|
70
|
-
return (_jsx("div", { "data-testid": "feature-drawer-pr", children: _jsxs("div", { className: "space-y-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, { className: prStatusStyles[pr.status], children: pr.status })] }), pr.ciStatus && hideCiStatus !== true ? (_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.mergeable === false ? (_jsxs("div", { "data-testid": "pr-merge-conflict", className: "flex items-center justify-between", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Merge Status" }), _jsxs(Badge, { className: "border-transparent bg-orange-50 text-orange-700 hover:bg-orange-50", children: [_jsx(AlertTriangle, { className: "me-1 h-3.5 w-3.5" }), "Conflicts"] })] })) : 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] }) }));
|
|
71
|
-
}
|
|
72
|
-
// ── Details section ──────────────────────────────────────────────────
|
|
73
|
-
/** Hook that returns a live-updating elapsed time string for running features. */
|
|
74
53
|
function useElapsedTime(startedAt) {
|
|
75
54
|
const [elapsed, setElapsed] = useState(null);
|
|
76
55
|
const intervalRef = useRef(null);
|
|
@@ -79,62 +58,58 @@ function useElapsedTime(startedAt) {
|
|
|
79
58
|
setElapsed(null);
|
|
80
59
|
return;
|
|
81
60
|
}
|
|
82
|
-
// Compute immediately
|
|
83
61
|
setElapsed(formatDuration(Math.max(0, Date.now() - startedAt)));
|
|
84
|
-
// Tick every second
|
|
85
62
|
intervalRef.current = setInterval(() => {
|
|
86
63
|
setElapsed(formatDuration(Math.max(0, Date.now() - startedAt)));
|
|
87
64
|
}, 1000);
|
|
88
65
|
return () => {
|
|
89
|
-
if (intervalRef.current)
|
|
66
|
+
if (intervalRef.current)
|
|
90
67
|
clearInterval(intervalRef.current);
|
|
91
|
-
intervalRef.current = null;
|
|
92
|
-
}
|
|
93
68
|
};
|
|
94
69
|
}, [startedAt]);
|
|
95
70
|
return elapsed;
|
|
96
71
|
}
|
|
97
|
-
|
|
98
|
-
|
|
72
|
+
const prColor = {
|
|
73
|
+
[PrStatus.Open]: 'text-blue-600 dark:text-blue-400',
|
|
74
|
+
[PrStatus.Merged]: 'text-purple-600 dark:text-purple-400',
|
|
75
|
+
[PrStatus.Closed]: 'text-red-600 dark:text-red-400',
|
|
76
|
+
};
|
|
77
|
+
export function OverviewTab({ data, syncStatus, syncLoading, syncError, onRefreshSync, onRebaseOnMain, rebaseLoading, rebaseError, }) {
|
|
78
|
+
const isCompleted = data.lifecycle === 'maintain';
|
|
99
79
|
const isRunning = data.state === 'running' || data.state === 'action-required';
|
|
100
80
|
const elapsedTime = useElapsedTime(isRunning ? data.startedAt : undefined);
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
function AgentDetailRow({ agentType }) {
|
|
112
|
-
const Icon = getAgentTypeIcon(agentType);
|
|
113
|
-
const label = agentTypeLabels[agentType] ?? agentType;
|
|
114
|
-
return (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: "Agent" }), _jsxs("span", { className: "flex items-center gap-2 text-sm", children: [_jsx(Icon, { className: "h-4 w-4 shrink-0" }), label] })] }));
|
|
115
|
-
}
|
|
116
|
-
// ── Settings section ─────────────────────────────────────────────────
|
|
117
|
-
function SettingBadge({ enabled, label }) {
|
|
118
|
-
return (_jsxs("span", { className: cn('inline-flex items-center gap-1 rounded-full px-2 py-0.5 text-xs font-medium', enabled ? 'bg-emerald-50 text-emerald-700' : 'bg-muted text-muted-foreground'), children: [enabled ? _jsx(Check, { className: "h-3 w-3" }) : _jsx(X, { className: "h-3 w-3" }), label] }));
|
|
81
|
+
const config = featureNodeStateConfig[data.state];
|
|
82
|
+
const showSummary = Boolean(data.summary) && !(data.userQuery && data.summary?.trim() === data.userQuery.trim());
|
|
83
|
+
return (_jsxs("div", { "data-testid": "feature-drawer-status", className: "pb-4", children: [!isCompleted && data.progress > 0 ? (_jsx("div", { "data-testid": "feature-drawer-progress", className: "px-3 pb-2", children: _jsx("div", { className: "bg-foreground/[0.06] h-1.5 w-full overflow-hidden rounded-full", children: _jsx("div", { className: cn('h-full rounded-full transition-all', config.progressClass), style: { width: `${data.progress}%` } }) }) })) : null, data.oneLiner || data.userQuery || showSummary ? (_jsx(Section, { icon: Info, title: "Description", children: _jsxs(Card, { className: "flex flex-col gap-2", children: [data.oneLiner ? _jsx(KV, { label: "One-Liner", children: data.oneLiner }) : null, data.userQuery ? (_jsx(KV, { label: "Query", children: _jsx(InlineAttachments, { text: data.userQuery }) })) : null, showSummary ? (_jsx(KV, { label: "Summary", children: _jsx("span", { className: "leading-snug", children: data.summary }) })) : null] }) })) : null, data.pr ? (_jsx(Section, { icon: GitCommitHorizontal, title: "Pull Request", children: _jsx(Card, { children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("a", { href: data.pr.url, target: "_blank", rel: "noopener noreferrer", className: "text-primary inline-flex items-center gap-1 text-sm font-semibold hover:underline", children: ["#", data.pr.number, " ", _jsx(ExternalLink, { className: "size-3" })] }), _jsx("span", { className: cn('text-xs font-semibold', prColor[data.pr.status]), children: data.pr.status }), data.pr.mergeable === false ? (_jsxs("span", { className: "inline-flex items-center gap-1 text-xs font-medium text-orange-600 dark:text-orange-400", children: [_jsx(AlertTriangle, { className: "size-3 shrink-0" }), " Conflicts"] })) : null, data.pr.ciStatus && data.hideCiStatus !== true ? (_jsx(CiStatusBadge, { status: data.pr.ciStatus })) : null, data.pr.commitHash ? (_jsx("code", { className: "text-foreground/40 ml-auto font-mono text-[11px]", children: data.pr.commitHash.slice(0, 7) })) : null] }) }) })) : null, _jsxs("div", { className: "grid grid-cols-2 gap-2 px-3 pb-1", children: [data.branch ? (_jsx(Card, { children: _jsxs(KV, { label: "Branch", children: [_jsxs("span", { className: "inline-flex items-center gap-1", children: [_jsx(GitBranch, { className: "text-foreground/30 size-3 shrink-0" }), _jsx("code", { className: "font-mono text-[11px]", children: data.branch })] }), data.baseBranch ? (_jsxs("span", { className: "text-foreground/30 block text-[10px]", children: ["from ", data.baseBranch] })) : null] }) })) : null, data.agentType || data.modelId ? (_jsx(Card, { children: _jsx(KV, { label: "Agent", children: _jsxs("span", { className: "inline-flex items-center gap-1.5", children: [data.agentType
|
|
84
|
+
? (() => {
|
|
85
|
+
const I = getAgentTypeIcon(data.agentType);
|
|
86
|
+
return _jsx(I, { className: "size-3.5 shrink-0 opacity-50" });
|
|
87
|
+
})()
|
|
88
|
+
: null, data.agentType ? (_jsx("span", { children: agentTypeLabels[data.agentType] ??
|
|
89
|
+
data.agentType })) : null, data.agentType && data.modelId ? (_jsx("span", { className: "text-foreground/20", children: "/" })) : null, data.modelId ? (_jsx("span", { className: "text-foreground/50 text-[12px]", children: getModelMeta(data.modelId).displayName || data.modelId })) : null] }) }) })) : null, data.createdAt ? (_jsx(Card, { children: _jsx(KV, { label: "Created", children: _jsxs("span", { className: "inline-flex items-center gap-1", children: [_jsx(Clock, { className: "text-foreground/30 size-3 shrink-0" }), formatRelativeTime(data.createdAt)] }) }) })) : null, data.fastMode ? (_jsx(Card, { children: _jsx(KV, { label: "Mode", children: _jsxs("span", { className: "inline-flex items-center gap-1 text-amber-600 dark:text-amber-400", children: [_jsx(Zap, { className: "size-3.5" }), " Fast"] }) }) })) : null, data.runtime || elapsedTime ? (_jsx(Card, { children: _jsx(KV, { label: data.runtime ? 'Runtime' : 'Elapsed', children: _jsxs("span", { className: "inline-flex items-center gap-1", children: [_jsx(Clock, { className: "text-foreground/30 size-3 shrink-0" }), data.runtime ?? elapsedTime] }) }) })) : null] }), data.blockedBy || data.errorMessage ? (_jsx(Section, { icon: AlertTriangle, title: "Issues", children: _jsxs(Card, { className: "border-destructive/20 bg-destructive/5", children: [data.blockedBy ? _jsx(KV, { label: "Blocked By", children: data.blockedBy }) : null, data.errorMessage ? (_jsx(KV, { label: "Error", children: _jsx("span", { className: "text-destructive", children: data.errorMessage }) })) : null] }) })) : null, onRebaseOnMain && data.branch && onRefreshSync ? (_jsx(Section, { icon: RefreshCw, title: "Branch Sync", children: _jsx(SyncCard, { syncStatus: syncStatus ?? null, syncLoading: syncLoading ?? false, syncError: syncError ?? null, onRefreshSync: onRefreshSync, onRebaseOnMain: onRebaseOnMain, rebaseLoading: rebaseLoading ?? false, rebaseError: rebaseError ?? null }) })) : null, _jsx(SettingsBlock, { data: data })] }));
|
|
119
90
|
}
|
|
120
|
-
|
|
91
|
+
// ── Sync card ───────────────────────────────────────────────────────
|
|
92
|
+
function SyncCard({ syncStatus, syncLoading, syncError, onRefreshSync, onRebaseOnMain, rebaseLoading, rebaseError, }) {
|
|
121
93
|
const { t } = useTranslation('web');
|
|
122
|
-
const
|
|
94
|
+
const isBehind = syncStatus != null && syncStatus.behind > 0;
|
|
95
|
+
const isUpToDate = syncStatus?.behind === 0;
|
|
96
|
+
const base = syncStatus?.baseBranch ?? 'main';
|
|
97
|
+
return (_jsxs(Card, { children: [_jsxs("div", { "data-testid": "branch-sync-status", className: "flex items-center justify-between", children: [_jsx("div", { className: "flex items-center gap-1.5 text-[13px]", children: syncLoading && !syncStatus ? (_jsxs(_Fragment, { children: [_jsx(CometSpinner, { size: "sm" }), _jsx("span", { className: "text-foreground/40", children: "Checking..." })] })) : syncError ? (_jsxs(_Fragment, { children: [_jsx(AlertTriangle, { className: "size-3.5 text-red-500" }), _jsx("span", { className: "text-destructive text-xs", children: syncError })] })) : rebaseLoading ? (_jsxs(_Fragment, { children: [_jsx(CometSpinner, { size: "sm" }), _jsxs("span", { children: ["Rebasing on ", _jsx("code", { className: "font-mono text-[11px]", children: base }), "..."] })] })) : isBehind ? (_jsxs(_Fragment, { children: [_jsx(AlertTriangle, { className: "size-3.5 text-orange-500" }), _jsxs("span", { children: [syncStatus.behind, " behind ", _jsx("code", { className: "font-mono text-[11px]", children: base }), syncStatus.ahead > 0 ? (_jsxs("span", { className: "text-foreground/30 ml-1 text-[11px]", children: ["\u00B7 ", syncStatus.ahead, " ahead"] })) : null] })] })) : isUpToDate ? (_jsxs(_Fragment, { children: [_jsx(CheckCircle2, { className: "size-3.5 text-green-500" }), _jsxs("span", { children: ["Up to date \u00B7 ", _jsx("code", { className: "font-mono text-[11px]", children: base }), syncStatus.ahead > 0 ? (_jsxs("span", { className: "text-foreground/30 ml-1 text-[11px]", children: ["\u00B7 ", syncStatus.ahead, " ahead"] })) : null] })] })) : null }), (syncStatus || syncError) && !rebaseLoading ? (_jsx("button", { onClick: onRefreshSync, disabled: syncLoading, className: "text-foreground/30 hover:text-foreground/60 hover:bg-foreground/5 inline-flex size-6 items-center justify-center rounded-sm disabled:opacity-50", "aria-label": t('branchSyncStatus.refreshSyncStatus'), children: _jsx(RefreshCw, { className: cn('size-3', syncLoading && 'animate-spin') }) })) : null] }), isBehind && !rebaseLoading ? (_jsx("div", { className: "pt-2", children: _jsx(ActionButton, { label: t('branchSyncStatus.rebaseOnMain'), onClick: onRebaseOnMain, loading: false, error: !!rebaseError, icon: GitMerge, variant: "outline", size: "sm" }) })) : null, rebaseError ? _jsx("p", { className: "text-destructive pt-1 text-[11px]", children: rebaseError }) : null] }));
|
|
98
|
+
}
|
|
99
|
+
// ── Settings ────────────────────────────────────────────────────────
|
|
100
|
+
function SettingsBlock({ data }) {
|
|
101
|
+
const has = data.approvalGates != null ||
|
|
123
102
|
data.push != null ||
|
|
124
103
|
data.openPr != null ||
|
|
125
104
|
data.ciWatchEnabled != null ||
|
|
126
105
|
data.enableEvidence != null ||
|
|
127
106
|
data.forkAndPr != null ||
|
|
128
|
-
data.commitSpecs != null
|
|
129
|
-
|
|
130
|
-
if (!hasSettings)
|
|
107
|
+
data.commitSpecs != null;
|
|
108
|
+
if (!has)
|
|
131
109
|
return null;
|
|
132
|
-
return (
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
}
|
|
138
|
-
function DetailRow({ label, value }) {
|
|
139
|
-
return (_jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx("span", { className: "text-muted-foreground text-xs font-medium", children: label }), _jsx("span", { className: "text-sm", children: value })] }));
|
|
110
|
+
return (_jsx(Section, { icon: Settings, title: "Settings", children: _jsxs("div", { className: "grid grid-cols-3 gap-2", children: [data.approvalGates ? (_jsxs(Card, { children: [_jsxs("div", { className: "text-foreground/40 mb-1.5 flex items-center gap-1 text-[10px] font-medium tracking-wider uppercase", children: [_jsx(ShieldCheck, { className: "size-3" }), " Approve"] }), _jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx(Flag, { on: data.approvalGates.allowPrd, label: "PRD" }), _jsx(Flag, { on: data.approvalGates.allowPlan, label: "Plan" }), _jsx(Flag, { on: data.approvalGates.allowMerge, label: "Merge" })] })] })) : null, data.enableEvidence != null ? (_jsxs(Card, { children: [_jsxs("div", { className: "text-foreground/40 mb-1.5 flex items-center gap-1 text-[10px] font-medium tracking-wider uppercase", children: [_jsx(FileSearch, { className: "size-3" }), " Evidence"] }), _jsxs("div", { className: "flex flex-col gap-0.5", children: [_jsx(Flag, { on: data.enableEvidence, label: "Collect" }), data.commitEvidence != null ? (_jsx(Flag, { on: data.commitEvidence, label: "Add to PR" })) : null] })] })) : null, data.push != null ||
|
|
111
|
+
data.openPr != null ||
|
|
112
|
+
data.ciWatchEnabled != null ||
|
|
113
|
+
data.commitSpecs != null ||
|
|
114
|
+
data.forkAndPr != null ? (_jsxs(Card, { children: [_jsxs("div", { className: "text-foreground/40 mb-1.5 flex items-center gap-1 text-[10px] font-medium tracking-wider uppercase", children: [_jsx(GitBranch, { className: "size-3" }), " Git"] }), _jsxs("div", { className: "flex flex-col gap-0.5", children: [data.push != null ? _jsx(Flag, { on: data.push, label: "Push" }) : null, data.openPr != null ? _jsx(Flag, { on: data.openPr, label: "PR" }) : null, data.ciWatchEnabled != null ? _jsx(Flag, { on: data.ciWatchEnabled, label: "Watch" }) : null, data.commitSpecs != null ? _jsx(Flag, { on: data.commitSpecs, label: "Specs" }) : null, data.forkAndPr != null ? _jsx(Flag, { on: data.forkAndPr, label: "Fork" }) : null] })] })) : null] }) }));
|
|
140
115
|
}
|
package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { GitHubRepo } from '../../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.js';
|
|
2
|
+
import type { GitHubOrganization } from '../../../../../../packages/core/src/application/ports/output/services/github-repository-service.interface.js';
|
|
2
3
|
export interface GitHubRepoBrowserProps {
|
|
3
4
|
onSelect: (nameWithOwner: string) => void;
|
|
4
5
|
loading?: boolean;
|
|
@@ -6,10 +7,16 @@ export interface GitHubRepoBrowserProps {
|
|
|
6
7
|
fetchRepos?: (input?: {
|
|
7
8
|
search?: string;
|
|
8
9
|
limit?: number;
|
|
10
|
+
owner?: string;
|
|
9
11
|
}) => Promise<{
|
|
10
12
|
repos?: GitHubRepo[];
|
|
11
13
|
error?: string;
|
|
12
14
|
}>;
|
|
15
|
+
/** Override the fetch function for testing/stories */
|
|
16
|
+
fetchOrgs?: () => Promise<{
|
|
17
|
+
orgs?: GitHubOrganization[];
|
|
18
|
+
error?: string;
|
|
19
|
+
}>;
|
|
13
20
|
}
|
|
14
|
-
export declare function GitHubRepoBrowser({ onSelect, loading: externalLoading, fetchRepos, }: GitHubRepoBrowserProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function GitHubRepoBrowser({ onSelect, loading: externalLoading, fetchRepos, fetchOrgs, }: GitHubRepoBrowserProps): import("react/jsx-runtime").JSX.Element;
|
|
15
22
|
//# sourceMappingURL=github-repo-browser.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-repo-browser.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/github-import-dialog/github-repo-browser.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"github-repo-browser.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/github-import-dialog/github-repo-browser.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oFAAoF,CAAC;AACrH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oFAAoF,CAAC;AAK7H,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sDAAsD;IACtD,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE;QACpB,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,KAAK,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,UAAU,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,OAAO,CAAC;QAAE,IAAI,CAAC,EAAE,kBAAkB,EAAE,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC5E;AAED,wBAAgB,iBAAiB,CAAC,EAChC,QAAQ,EACR,OAAO,EAAE,eAAuB,EAChC,UAAmC,EACnC,SAAmC,GACpC,EAAE,sBAAsB,2CA+KxB"}
|
package/dist/src/presentation/web/components/common/github-import-dialog/github-repo-browser.js
CHANGED
|
@@ -5,18 +5,44 @@ import { Lock, Globe, Loader2, Search, AlertCircle } from 'lucide-react';
|
|
|
5
5
|
import { Input } from '../../ui/input.js';
|
|
6
6
|
import { Badge } from '../../ui/badge.js';
|
|
7
7
|
import { Skeleton } from '../../ui/skeleton.js';
|
|
8
|
+
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from '../../ui/select.js';
|
|
8
9
|
import { listGitHubRepositories } from '../../../app/actions/list-github-repositories.js';
|
|
9
|
-
|
|
10
|
+
import { listGitHubOrganizations } from '../../../app/actions/list-github-organizations.js';
|
|
11
|
+
/** Sentinel value representing the authenticated user's personal account */
|
|
12
|
+
const PERSONAL_OWNER = '__personal__';
|
|
13
|
+
export function GitHubRepoBrowser({ onSelect, loading: externalLoading = false, fetchRepos = listGitHubRepositories, fetchOrgs = listGitHubOrganizations, }) {
|
|
10
14
|
const [repos, setRepos] = useState([]);
|
|
15
|
+
const [orgs, setOrgs] = useState([]);
|
|
11
16
|
const [fetching, setFetching] = useState(true);
|
|
12
17
|
const [error, setError] = useState('');
|
|
13
18
|
const [search, setSearch] = useState('');
|
|
19
|
+
const [selectedOwner, setSelectedOwner] = useState(PERSONAL_OWNER);
|
|
14
20
|
const debounceRef = useRef(null);
|
|
15
|
-
|
|
21
|
+
// Fetch organizations on mount
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
async function loadOrgs() {
|
|
24
|
+
try {
|
|
25
|
+
const result = await fetchOrgs();
|
|
26
|
+
if (result.orgs) {
|
|
27
|
+
setOrgs(result.orgs);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
catch {
|
|
31
|
+
// Org listing failure is non-critical — user can still browse personal repos
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
loadOrgs();
|
|
35
|
+
}, [fetchOrgs]);
|
|
36
|
+
const fetchData = useCallback(async (searchTerm, owner) => {
|
|
16
37
|
setFetching(true);
|
|
17
38
|
setError('');
|
|
18
39
|
try {
|
|
19
|
-
const
|
|
40
|
+
const input = {};
|
|
41
|
+
if (searchTerm)
|
|
42
|
+
input.search = searchTerm;
|
|
43
|
+
if (owner && owner !== PERSONAL_OWNER)
|
|
44
|
+
input.owner = owner;
|
|
45
|
+
const result = await fetchRepos(Object.keys(input).length > 0 ? input : undefined);
|
|
20
46
|
if (result.error) {
|
|
21
47
|
setError(result.error);
|
|
22
48
|
setRepos([]);
|
|
@@ -34,19 +60,23 @@ export function GitHubRepoBrowser({ onSelect, loading: externalLoading = false,
|
|
|
34
60
|
}
|
|
35
61
|
}, [fetchRepos]);
|
|
36
62
|
useEffect(() => {
|
|
37
|
-
fetchData();
|
|
38
|
-
}, [fetchData]);
|
|
63
|
+
fetchData(search || undefined, selectedOwner);
|
|
64
|
+
}, [fetchData, selectedOwner]); // eslint-disable-line react-hooks/exhaustive-deps
|
|
39
65
|
function handleSearchChange(value) {
|
|
40
66
|
setSearch(value);
|
|
41
67
|
if (debounceRef.current)
|
|
42
68
|
clearTimeout(debounceRef.current);
|
|
43
69
|
debounceRef.current = setTimeout(() => {
|
|
44
|
-
fetchData(value || undefined);
|
|
70
|
+
fetchData(value || undefined, selectedOwner);
|
|
45
71
|
}, 300);
|
|
46
72
|
}
|
|
73
|
+
function handleOwnerChange(value) {
|
|
74
|
+
setSelectedOwner(value);
|
|
75
|
+
setSearch('');
|
|
76
|
+
}
|
|
47
77
|
const disabled = externalLoading;
|
|
48
78
|
if (error && !fetching) {
|
|
49
79
|
return (_jsxs("div", { className: "flex flex-col items-center gap-2 py-8 text-center", "data-testid": "repo-browser-error", children: [_jsx(AlertCircle, { className: "text-destructive h-8 w-8" }), _jsx("p", { className: "text-destructive text-sm", children: error })] }));
|
|
50
80
|
}
|
|
51
|
-
return (_jsxs("div", { className: "flex flex-col gap-3", children: [_jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2" }), _jsx(Input, { placeholder: "Search repositories...", value: search, onChange: (e) => handleSearchChange(e.target.value), className: "ps-9", disabled: disabled, "aria-label": "Search repositories" })] }), _jsx("div", { className: "max-h-64 overflow-x-hidden overflow-y-auto rounded-md border", role: "listbox", "aria-label": "GitHub repositories", children: fetching ? (_jsx("div", { className: "flex flex-col gap-2 p-3", "data-testid": "repo-browser-loading", children: Array.from({ length: 5 }).map((_, i) => (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx(Skeleton, { className: "h-4 w-48" }), _jsx(Skeleton, { className: "h-3 w-72" })] }, `skeleton-${String(i)}`))) })) : repos.length === 0 ? (_jsx("div", { className: "text-muted-foreground py-8 text-center text-sm", "data-testid": "repo-browser-empty", children: "No repositories found" })) : (repos.map((repo) => (_jsxs("button", { type: "button", role: "option", "aria-selected": false, className: "hover:bg-accent flex w-full items-start gap-2 border-b px-3 py-2.5 text-start last:border-b-0 disabled:opacity-50", onClick: () => onSelect(repo.nameWithOwner), disabled: disabled, children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "truncate text-sm font-medium", children: repo.nameWithOwner }), _jsx(Badge, { variant: repo.isPrivate ? 'secondary' : 'outline', className: "shrink-0 text-xs", children: repo.isPrivate ? (_jsxs(_Fragment, { children: [_jsx(Lock, { className: "me-1 h-3 w-3" }), "Private"] })) : (_jsxs(_Fragment, { children: [_jsx(Globe, { className: "me-1 h-3 w-3" }), "Public"] })) })] }), repo.description ? (_jsx("p", { className: "text-muted-foreground mt-0.5 truncate text-xs", children: repo.description })) : null] }), disabled ? _jsx(Loader2, { className: "mt-0.5 h-4 w-4 shrink-0 animate-spin" }) : null] }, repo.nameWithOwner)))) })] }));
|
|
81
|
+
return (_jsxs("div", { className: "flex flex-col gap-3", children: [orgs.length > 0 ? (_jsxs(Select, { value: selectedOwner, onValueChange: handleOwnerChange, disabled: disabled, children: [_jsx(SelectTrigger, { "aria-label": "Select owner", children: _jsx(SelectValue, { placeholder: "Select owner" }) }), _jsxs(SelectContent, { children: [_jsx(SelectItem, { value: PERSONAL_OWNER, children: "My repositories" }), orgs.map((org) => (_jsx(SelectItem, { value: org.login, children: org.login }, org.login)))] })] })) : null, _jsxs("div", { className: "relative", children: [_jsx(Search, { className: "text-muted-foreground absolute top-1/2 left-3 h-4 w-4 -translate-y-1/2" }), _jsx(Input, { placeholder: "Search repositories...", value: search, onChange: (e) => handleSearchChange(e.target.value), className: "ps-9", disabled: disabled, "aria-label": "Search repositories" })] }), _jsx("div", { className: "max-h-64 overflow-x-hidden overflow-y-auto rounded-md border", role: "listbox", "aria-label": "GitHub repositories", children: fetching ? (_jsx("div", { className: "flex flex-col gap-2 p-3", "data-testid": "repo-browser-loading", children: Array.from({ length: 5 }).map((_, i) => (_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx(Skeleton, { className: "h-4 w-48" }), _jsx(Skeleton, { className: "h-3 w-72" })] }, `skeleton-${String(i)}`))) })) : repos.length === 0 ? (_jsx("div", { className: "text-muted-foreground py-8 text-center text-sm", "data-testid": "repo-browser-empty", children: "No repositories found" })) : (repos.map((repo) => (_jsxs("button", { type: "button", role: "option", "aria-selected": false, className: "hover:bg-accent flex w-full items-start gap-2 border-b px-3 py-2.5 text-start last:border-b-0 disabled:opacity-50", onClick: () => onSelect(repo.nameWithOwner), disabled: disabled, children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "truncate text-sm font-medium", children: repo.nameWithOwner }), _jsx(Badge, { variant: repo.isPrivate ? 'secondary' : 'outline', className: "shrink-0 text-xs", children: repo.isPrivate ? (_jsxs(_Fragment, { children: [_jsx(Lock, { className: "me-1 h-3 w-3" }), "Private"] })) : (_jsxs(_Fragment, { children: [_jsx(Globe, { className: "me-1 h-3 w-3" }), "Public"] })) })] }), repo.description ? (_jsx("p", { className: "text-muted-foreground mt-0.5 truncate text-xs", children: repo.description })) : null] }), disabled ? _jsx(Loader2, { className: "mt-0.5 h-4 w-4 shrink-0 animate-spin" }) : null] }, repo.nameWithOwner)))) })] }));
|
|
52
82
|
}
|
|
@@ -4,6 +4,7 @@ declare const meta: Meta<typeof GitHubRepoBrowser>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof GitHubRepoBrowser>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
+
export declare const WithOrganizations: Story;
|
|
7
8
|
export declare const Loading: Story;
|
|
8
9
|
export declare const Empty: Story;
|
|
9
10
|
export declare const Error: Story;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"github-repo-browser.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"github-repo-browser.stories.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/github-import-dialog/github-repo-browser.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAgE1D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,iBAAiB,CAiBxC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhD,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,KAU/B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAMrB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAKnB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAQnB,CAAC"}
|
|
@@ -38,6 +38,26 @@ const mockRepos = [
|
|
|
38
38
|
pushedAt: '2025-03-11T09:00:00Z',
|
|
39
39
|
},
|
|
40
40
|
];
|
|
41
|
+
const mockOrgRepos = [
|
|
42
|
+
{
|
|
43
|
+
name: 'platform',
|
|
44
|
+
nameWithOwner: 'acme-corp/platform',
|
|
45
|
+
description: 'Core platform monorepo',
|
|
46
|
+
isPrivate: true,
|
|
47
|
+
pushedAt: '2025-03-15T10:00:00Z',
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
name: 'design-system',
|
|
51
|
+
nameWithOwner: 'acme-corp/design-system',
|
|
52
|
+
description: 'Shared design system components',
|
|
53
|
+
isPrivate: false,
|
|
54
|
+
pushedAt: '2025-03-14T08:00:00Z',
|
|
55
|
+
},
|
|
56
|
+
];
|
|
57
|
+
const mockOrgs = [
|
|
58
|
+
{ login: 'acme-corp', description: 'Acme Corporation' },
|
|
59
|
+
{ login: 'open-source-collective', description: 'Open source projects' },
|
|
60
|
+
];
|
|
41
61
|
const meta = {
|
|
42
62
|
title: 'Composed/GitHubRepoBrowser',
|
|
43
63
|
component: GitHubRepoBrowser,
|
|
@@ -56,17 +76,31 @@ export default meta;
|
|
|
56
76
|
export const Default = {
|
|
57
77
|
args: {
|
|
58
78
|
fetchRepos: () => Promise.resolve({ repos: mockRepos }),
|
|
79
|
+
fetchOrgs: () => Promise.resolve({ orgs: [] }),
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
export const WithOrganizations = {
|
|
83
|
+
args: {
|
|
84
|
+
fetchRepos: (input) => {
|
|
85
|
+
if (input?.owner === 'acme-corp') {
|
|
86
|
+
return Promise.resolve({ repos: mockOrgRepos });
|
|
87
|
+
}
|
|
88
|
+
return Promise.resolve({ repos: mockRepos });
|
|
89
|
+
},
|
|
90
|
+
fetchOrgs: () => Promise.resolve({ orgs: mockOrgs }),
|
|
59
91
|
},
|
|
60
92
|
};
|
|
61
93
|
export const Loading = {
|
|
62
94
|
args: {
|
|
63
95
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
64
96
|
fetchRepos: () => new Promise(() => { }), // never resolves
|
|
97
|
+
fetchOrgs: () => Promise.resolve({ orgs: [] }),
|
|
65
98
|
},
|
|
66
99
|
};
|
|
67
100
|
export const Empty = {
|
|
68
101
|
args: {
|
|
69
102
|
fetchRepos: () => Promise.resolve({ repos: [] }),
|
|
103
|
+
fetchOrgs: () => Promise.resolve({ orgs: [] }),
|
|
70
104
|
},
|
|
71
105
|
};
|
|
72
106
|
export const Error = {
|
|
@@ -74,5 +108,6 @@ export const Error = {
|
|
|
74
108
|
fetchRepos: () => Promise.resolve({
|
|
75
109
|
error: 'GitHub CLI is not authenticated. Run `gh auth login` to sign in.',
|
|
76
110
|
}),
|
|
111
|
+
fetchOrgs: () => Promise.resolve({ orgs: [] }),
|
|
77
112
|
},
|
|
78
113
|
};
|
package/dist/src/presentation/web/components/common/open-action-menu/open-action-menu.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"open-action-menu.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/open-action-menu/open-action-menu.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"open-action-menu.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/open-action-menu/open-action-menu.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAqBpD,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,cAAc,EACd,YAAY,EACZ,SAAS,GACV,EAAE,mBAAmB,2CAmGrB"}
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useState } from 'react';
|
|
4
|
-
import { Code2, Terminal, FolderOpen,
|
|
5
|
-
import {
|
|
6
|
-
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, } from '../../ui/dropdown-menu.js';
|
|
4
|
+
import { Code2, Terminal, FolderOpen, FileText, Copy, Check, Loader2, CircleAlert, } from 'lucide-react';
|
|
5
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip.js';
|
|
7
6
|
const COPY_FEEDBACK_DELAY = 2000;
|
|
7
|
+
const tbBtn = 'text-muted-foreground hover:bg-foreground/8 hover:text-foreground inline-flex size-8 items-center justify-center rounded-[3px] disabled:opacity-40';
|
|
8
|
+
function TbIcon({ loading, error, icon: Icon, }) {
|
|
9
|
+
if (loading)
|
|
10
|
+
return _jsx(Loader2, { className: "size-3.5 animate-spin" });
|
|
11
|
+
if (error)
|
|
12
|
+
return _jsx(CircleAlert, { className: "text-destructive size-3.5" });
|
|
13
|
+
return _jsx(Icon, { className: "size-4" });
|
|
14
|
+
}
|
|
8
15
|
export function OpenActionMenu({ actions, repositoryPath, worktreePath, showSpecs, }) {
|
|
9
16
|
const [copied, setCopied] = useState(false);
|
|
10
17
|
const handleCopyPath = () => {
|
|
@@ -12,7 +19,5 @@ export function OpenActionMenu({ actions, repositoryPath, worktreePath, showSpec
|
|
|
12
19
|
setCopied(true);
|
|
13
20
|
setTimeout(() => setCopied(false), COPY_FEEDBACK_DELAY);
|
|
14
21
|
};
|
|
15
|
-
|
|
16
|
-
const anyError = actions.ideError ?? actions.shellError ?? actions.folderError ?? actions.specsError;
|
|
17
|
-
return (_jsxs(DropdownMenu, { modal: false, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(Button, { variant: "outline", size: "sm", className: "gap-1.5", disabled: anyLoading, children: [anyLoading ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : anyError ? (_jsx(CircleAlert, { className: "text-destructive size-4" })) : (_jsx(FolderOpen, { className: "size-4" })), "Open", _jsx(ChevronDown, { className: "size-3 opacity-60" })] }) }), _jsxs(DropdownMenuContent, { align: "start", className: "w-48", children: [_jsx(DropdownMenuLabel, { children: "Open in" }), _jsxs(DropdownMenuItem, { onClick: actions.openInIde, disabled: actions.ideLoading, className: "gap-2", children: [actions.ideLoading ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : actions.ideError ? (_jsx(CircleAlert, { className: "text-destructive size-4" })) : (_jsx(Code2, { className: "size-4" })), "IDE"] }), _jsxs(DropdownMenuItem, { onClick: actions.openInShell, disabled: actions.shellLoading, className: "gap-2", children: [actions.shellLoading ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : actions.shellError ? (_jsx(CircleAlert, { className: "text-destructive size-4" })) : (_jsx(Terminal, { className: "size-4" })), "Terminal"] }), _jsxs(DropdownMenuItem, { onClick: actions.openFolder, disabled: actions.folderLoading, className: "gap-2", children: [actions.folderLoading ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : actions.folderError ? (_jsx(CircleAlert, { className: "text-destructive size-4" })) : (_jsx(FolderOpen, { className: "size-4" })), "Folder"] }), _jsxs(DropdownMenuItem, { onClick: actions.openSpecsFolder, disabled: actions.specsLoading || !showSpecs, className: "gap-2", children: [actions.specsLoading ? (_jsx(Loader2, { className: "size-4 animate-spin" })) : actions.specsError ? (_jsx(CircleAlert, { className: "text-destructive size-4" })) : (_jsx(FolderOpen, { className: "size-4" })), "Specs Folder"] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { onClick: handleCopyPath, className: "gap-2", children: [copied ? _jsx(Check, { className: "size-4 text-green-600" }) : _jsx(Copy, { className: "size-4" }), copied ? 'Copied!' : 'Copy path'] })] })] }));
|
|
22
|
+
return (_jsx(TooltipProvider, { delayDuration: 300, children: _jsxs("div", { className: "flex items-center", children: [_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", className: tbBtn, onClick: actions.openInIde, disabled: actions.ideLoading, "aria-label": "Open in IDE", children: _jsx(TbIcon, { loading: actions.ideLoading, error: actions.ideError, icon: Code2 }) }) }), _jsx(TooltipContent, { side: "bottom", className: "text-xs", children: "Open in IDE" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", className: tbBtn, onClick: actions.openInShell, disabled: actions.shellLoading, "aria-label": "Open terminal", children: _jsx(TbIcon, { loading: actions.shellLoading, error: actions.shellError, icon: Terminal }) }) }), _jsx(TooltipContent, { side: "bottom", className: "text-xs", children: "Open terminal" })] }), _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", className: tbBtn, onClick: actions.openFolder, disabled: actions.folderLoading, "aria-label": "Open folder", children: _jsx(TbIcon, { loading: actions.folderLoading, error: actions.folderError, icon: FolderOpen }) }) }), _jsx(TooltipContent, { side: "bottom", className: "text-xs", children: "Open folder" })] }), showSpecs ? (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", className: tbBtn, onClick: actions.openSpecsFolder, disabled: actions.specsLoading, "aria-label": "Open specs", children: _jsx(TbIcon, { loading: actions.specsLoading, error: actions.specsError, icon: FileText }) }) }), _jsx(TooltipContent, { side: "bottom", className: "text-xs", children: "Open specs" })] })) : null, _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", className: tbBtn, onClick: handleCopyPath, "aria-label": "Copy path", children: copied ? _jsx(Check, { className: "size-3.5 text-green-500" }) : _jsx(Copy, { className: "size-4" }) }) }), _jsx(TooltipContent, { side: "bottom", className: "text-xs", children: copied ? 'Copied!' : 'Copy path' })] })] }) }));
|
|
18
23
|
}
|
package/dist/src/presentation/web/components/common/repository-node/repository-node.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"repository-node.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/repository-node/repository-node.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AASnE,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,
|
|
1
|
+
{"version":3,"file":"repository-node.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/repository-node/repository-node.tsx"],"names":[],"mappings":"AAqCA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AASnE,wBAAgB,cAAc,CAAC,EAC7B,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,kBAAkB,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB,2CA2cA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatSheet.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/chat/ChatSheet.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChatSheet.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/chat/ChatSheet.tsx"],"names":[],"mappings":"AA2DA,wBAAgB,eAAe,4CAwY9B"}
|
|
@@ -8,6 +8,8 @@ import { Button } from '../../ui/button.js';
|
|
|
8
8
|
import { ChatTab } from './ChatTab.js';
|
|
9
9
|
import { ChatDotIndicator } from './ChatDotIndicator.js';
|
|
10
10
|
import { useTurnStatus } from '../../../hooks/turn-statuses-provider.js';
|
|
11
|
+
import { useFabLayout } from '../../../hooks/fab-layout-context.js';
|
|
12
|
+
import { useSidebar } from '../../ui/sidebar.js';
|
|
11
13
|
// ── Persistent global chat popup (draggable + resizable) ──────────────────
|
|
12
14
|
const DEFAULT_W = 520;
|
|
13
15
|
const DEFAULT_H_VH = 70; // percentage of viewport height
|
|
@@ -48,6 +50,8 @@ export function GlobalChatPopup() {
|
|
|
48
50
|
const [hasOpened, setHasOpened] = useState(false);
|
|
49
51
|
const [isMaximized, setIsMaximized] = useState(false);
|
|
50
52
|
const globalChatTurnStatus = useTurnStatus('global');
|
|
53
|
+
const { swapPosition } = useFabLayout();
|
|
54
|
+
const { state: sidebarState } = useSidebar();
|
|
51
55
|
// Position/size — initialized from localStorage
|
|
52
56
|
// eslint-disable-next-line react/hook-use-state -- wrapped setters below
|
|
53
57
|
const [pos, setPosRaw] = useState(() => loadPersistedState().pos);
|
|
@@ -229,7 +233,7 @@ export function GlobalChatPopup() {
|
|
|
229
233
|
};
|
|
230
234
|
return (_jsxs(_Fragment, { children: [hasOpened ? (_jsxs("div", { ref: panelRef, className: cn(isMaximized
|
|
231
235
|
? 'bg-background fixed inset-0 z-[60] flex flex-col overflow-hidden dark:bg-neutral-900'
|
|
232
|
-
: cn(!pos && 'fixed end-8 bottom-24', 'z-[60] flex flex-col overflow-hidden rounded-lg', 'border-border/60 border dark:border-white/10', 'bg-background dark:bg-neutral-900', 'shadow-[0_8px_40px_-8px_rgba(0,0,0,0.2)] dark:shadow-[0_8px_40px_-8px_rgba(0,0,0,0.6)]'), 'transition-opacity duration-300 ease-out', isOpen ? 'pointer-events-auto opacity-100' : 'pointer-events-none opacity-0'), style: panelStyle, children: [!isMaximized ? (_jsx("div", { className: "h-[2px] shrink-0 bg-gradient-to-r from-transparent via-violet-500/50 to-transparent" })) : null, !isMaximized ? (_jsx("div", { onMouseDown: onResizeStart, className: "absolute end-0 top-0 z-10 h-4 w-4 cursor-ne-resize" })) : null, _jsxs("div", { onMouseDown: isMaximized ? undefined : onDragStart, className: cn('relative flex h-11 shrink-0 items-center gap-2.5 border-b border-black/[0.06] px-3.5 dark:border-white/[0.06]', !isMaximized && 'cursor-grab active:cursor-grabbing'), children: [_jsx("div", { className: "from-foreground/[0.02] to-foreground/[0.02] pointer-events-none absolute inset-0 bg-gradient-to-r via-transparent" }), !isMaximized ? (_jsx(GripVertical, { className: "text-foreground/15 relative h-3.5 w-3.5 shrink-0" })) : null, _jsx("div", { className: "relative flex h-5 w-5 items-center justify-center", children: _jsx(Bot, { className: "text-foreground/50 h-4 w-4" }) }), _jsxs("div", { className: "relative flex items-baseline gap-2", children: [_jsx("span", { className: "text-foreground/90 text-base font-bold tracking-tight", children: "Shep" }), _jsx("span", { className: "text-foreground/30 text-xs font-medium tracking-widest uppercase", children: "global" })] }), _jsxs("div", { className: "relative ms-auto flex items-center gap-0.5", children: [_jsx("button", { type: "button", onClick: toggleMaximize, className: "text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors", title: isMaximized ? 'Restore (⌘⇧M)' : 'Maximize (⌘⇧M)', children: isMaximized ? (_jsx(Minimize2, { className: "h-3.5 w-3.5" })) : (_jsx(Maximize2, { className: "h-3.5 w-3.5" })) }), _jsx("button", { type: "button", onClick: handleClose, className: "text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors", title: "Close (\u2318\u21E7K)", children: _jsx(X, { className: "h-3.5 w-3.5" }) })] })] }), _jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: _jsx(ChatTab, { featureId: "global" }) }), !isMaximized ? (_jsx("div", { onMouseDown: (e) => {
|
|
236
|
+
: cn(!pos && (swapPosition ? 'fixed start-8 bottom-24' : 'fixed end-8 bottom-24'), 'z-[60] flex flex-col overflow-hidden rounded-lg', 'border-border/60 border dark:border-white/10', 'bg-background dark:bg-neutral-900', 'shadow-[0_8px_40px_-8px_rgba(0,0,0,0.2)] dark:shadow-[0_8px_40px_-8px_rgba(0,0,0,0.6)]'), 'transition-opacity duration-300 ease-out', isOpen ? 'pointer-events-auto opacity-100' : 'pointer-events-none opacity-0'), style: panelStyle, children: [!isMaximized ? (_jsx("div", { className: "h-[2px] shrink-0 bg-gradient-to-r from-transparent via-violet-500/50 to-transparent" })) : null, !isMaximized ? (_jsx("div", { onMouseDown: onResizeStart, className: "absolute end-0 top-0 z-10 h-4 w-4 cursor-ne-resize" })) : null, _jsxs("div", { onMouseDown: isMaximized ? undefined : onDragStart, className: cn('relative flex h-11 shrink-0 items-center gap-2.5 border-b border-black/[0.06] px-3.5 dark:border-white/[0.06]', !isMaximized && 'cursor-grab active:cursor-grabbing'), children: [_jsx("div", { className: "from-foreground/[0.02] to-foreground/[0.02] pointer-events-none absolute inset-0 bg-gradient-to-r via-transparent" }), !isMaximized ? (_jsx(GripVertical, { className: "text-foreground/15 relative h-3.5 w-3.5 shrink-0" })) : null, _jsx("div", { className: "relative flex h-5 w-5 items-center justify-center", children: _jsx(Bot, { className: "text-foreground/50 h-4 w-4" }) }), _jsxs("div", { className: "relative flex items-baseline gap-2", children: [_jsx("span", { className: "text-foreground/90 text-base font-bold tracking-tight", children: "Shep" }), _jsx("span", { className: "text-foreground/30 text-xs font-medium tracking-widest uppercase", children: "global" })] }), _jsxs("div", { className: "relative ms-auto flex items-center gap-0.5", children: [_jsx("button", { type: "button", onClick: toggleMaximize, className: "text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors", title: isMaximized ? 'Restore (⌘⇧M)' : 'Maximize (⌘⇧M)', children: isMaximized ? (_jsx(Minimize2, { className: "h-3.5 w-3.5" })) : (_jsx(Maximize2, { className: "h-3.5 w-3.5" })) }), _jsx("button", { type: "button", onClick: handleClose, className: "text-foreground/30 hover:text-foreground/60 rounded-md p-1 transition-colors", title: "Close (\u2318\u21E7K)", children: _jsx(X, { className: "h-3.5 w-3.5" }) })] })] }), _jsx("div", { className: "flex min-h-0 flex-1 flex-col overflow-hidden", children: _jsx(ChatTab, { featureId: "global" }) }), !isMaximized ? (_jsx("div", { onMouseDown: (e) => {
|
|
233
237
|
e.preventDefault();
|
|
234
238
|
e.stopPropagation();
|
|
235
239
|
const panel = panelRef.current;
|
|
@@ -255,7 +259,23 @@ export function GlobalChatPopup() {
|
|
|
255
259
|
};
|
|
256
260
|
document.addEventListener('mousemove', onMove);
|
|
257
261
|
document.addEventListener('mouseup', onUp);
|
|
258
|
-
}, className: "absolute end-0 bottom-0 z-10 h-4 w-4 cursor-se-resize" })) : null] })) : null, _jsxs(
|
|
262
|
+
}, className: "absolute end-0 bottom-0 z-10 h-4 w-4 cursor-se-resize" })) : null] })) : null, _jsxs(ChatFabWrapper, { swapPosition: swapPosition, sidebarState: sidebarState, isMaximized: isMaximized, children: [_jsxs(Button, { size: "icon", onClick: toggle, className: cn('relative h-14 w-14 rounded-full shadow-lg', 'transition-all duration-200 hover:scale-105 hover:shadow-xl active:scale-95', isOpen
|
|
259
263
|
? 'bg-violet-600 text-white hover:bg-violet-500'
|
|
260
264
|
: 'bg-violet-500 text-white hover:bg-violet-400 dark:bg-violet-500 dark:hover:bg-violet-400'), children: [_jsx(MessageSquare, { className: cn('absolute h-7 w-7 stroke-[2.5] transition-all duration-200', isOpen ? 'scale-0 rotate-90 opacity-0' : 'scale-100 rotate-0 opacity-100') }), _jsx(X, { className: cn('absolute h-6 w-6 stroke-[2.5] transition-all duration-200', isOpen ? 'scale-100 rotate-0 opacity-100' : 'scale-0 -rotate-90 opacity-0') }), !isOpen && _jsx(ChatDotIndicator, { status: globalChatTurnStatus, className: "end-0 top-0" })] }), _jsx("div", { className: "pointer-events-none absolute bottom-[calc(100%+8px)] left-1/2 -translate-x-1/2 translate-y-1 opacity-0 transition-all duration-200 group-hover/fab:translate-y-0 group-hover/fab:opacity-100", children: _jsxs("div", { className: "bg-foreground rounded-lg px-3 py-1.5 text-center shadow-lg", children: [_jsx("p", { className: "text-background text-xs font-medium whitespace-nowrap", children: t('chat.shepChat') }), _jsxs("p", { className: "text-background/50 mt-0.5 flex items-center justify-center gap-1 text-[10px]", children: [_jsx("kbd", { className: "bg-background/15 rounded px-1 py-px font-mono", children: "\u2318" }), _jsx("kbd", { className: "bg-background/15 rounded px-1 py-px font-mono", children: "\u21E7" }), _jsx("kbd", { className: "bg-background/15 rounded px-1 py-px font-mono", children: "K" })] })] }) })] })] }));
|
|
261
265
|
}
|
|
266
|
+
/** Wrapper for the Chat FAB that handles position swapping. */
|
|
267
|
+
function ChatFabWrapper({ swapPosition, sidebarState, isMaximized, children, }) {
|
|
268
|
+
const { i18n } = useTranslation('web');
|
|
269
|
+
const isRtl = i18n.dir() === 'rtl';
|
|
270
|
+
if (!swapPosition) {
|
|
271
|
+
return (_jsx("div", { className: cn('group/fab fixed end-8 bottom-6 z-30', isMaximized && 'hidden'), children: children }));
|
|
272
|
+
}
|
|
273
|
+
// Swapped: chat FAB moves to start side, tracking sidebar width
|
|
274
|
+
const sidebarOffset = sidebarState === 'expanded'
|
|
275
|
+
? 'calc(var(--sidebar-width) + 32px)'
|
|
276
|
+
: 'calc(var(--sidebar-width-icon) + 32px)';
|
|
277
|
+
const positionStyle = isRtl
|
|
278
|
+
? { right: sidebarOffset, transition: 'right 200ms ease-in-out' }
|
|
279
|
+
: { left: sidebarOffset, transition: 'left 200ms ease-in-out' };
|
|
280
|
+
return (_jsx("div", { className: cn('group/fab fixed bottom-6 z-30', isMaximized && 'hidden'), style: positionStyle, children: children }));
|
|
281
|
+
}
|
package/dist/src/presentation/web/components/features/control-center/control-center-inner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control-center-inner.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/control-center-inner.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,eAAe,CAAC;AAIpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"control-center-inner.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/features/control-center/control-center-inner.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,IAAI,EAAY,MAAM,eAAe,CAAC;AAIpD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAgC5E,UAAU,uBAAuB;IAC/B,YAAY,EAAE,cAAc,EAAE,CAAC;IAC/B,YAAY,EAAE,IAAI,EAAE,CAAC;CACtB;AAED,wBAAgB,kBAAkB,CAAC,EAAE,YAAY,EAAE,YAAY,EAAE,EAAE,uBAAuB,2CA+czF"}
|