@shepai/cli 1.163.0 → 1.164.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -0
- 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/open-folder.d.ts.map +1 -1
- package/dist/src/presentation/web/app/actions/open-folder.js +5 -2
- 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/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/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/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/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/web/.next/BUILD_ID +1 -1
- package/web/.next/build-manifest.json +2 -2
- package/web/.next/fallback-build-manifest.json +2 -2
- package/web/.next/prerender-manifest.json +3 -3
- package/web/.next/required-server-files.js +2 -2
- package/web/.next/required-server-files.json +2 -2
- package/web/.next/server/app/(dashboard)/@drawer/adopt/page/server-reference-manifest.json +29 -29
- 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 +27 -27
- 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 +30 -30
- 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 +37 -37
- 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 +37 -37
- 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 +69 -54
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/[tab]/page.js +1 -1
- 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 +69 -54
- package/web/.next/server/app/(dashboard)/@drawer/repository/[repositoryId]/page.js +1 -1
- 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 +27 -27
- 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 +30 -30
- 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 +37 -37
- 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 +37 -37
- 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 +27 -27
- 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 +69 -54
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/[tab]/page.js +1 -1
- 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 +69 -54
- package/web/.next/server/app/(dashboard)/repository/[repositoryId]/page.js +1 -1
- 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 +6 -6
- 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 +9 -9
- 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 +11 -11
- 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 +11 -11
- 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 +6 -6
- 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]__beda892a._.js.map → [root-of-the-server]__c78383b1._.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 +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1abe77bb._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__1f389e5d._.js.map +1 -1
- 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 +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__563e4faf._.js.map +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 +2 -2
- package/web/.next/server/chunks/ssr/[root-of-the-server]__7562afc6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__821a11c1._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__821a11c1._.js.map +1 -1
- 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]__98740ee4._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__98740ee4._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__b7b96453._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba9f9e11._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__ba9f9e11._.js.map +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js +1 -1
- package/web/.next/server/chunks/ssr/[root-of-the-server]__c9777776._.js.map +1 -1
- 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/_0727935d._.js +1 -1
- package/web/.next/server/chunks/ssr/_0727935d._.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/_18886033._.js +4 -0
- package/web/.next/server/chunks/ssr/_18886033._.js.map +1 -0
- package/web/.next/server/chunks/ssr/_22e00a14._.js +1 -1
- package/web/.next/server/chunks/ssr/_22e00a14._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_2f8f89fb._.js +3 -0
- package/web/.next/server/chunks/ssr/_2f8f89fb._.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/{_def82237._.js → _52403a07._.js} +2 -2
- package/web/.next/server/chunks/ssr/{_def82237._.js.map → _52403a07._.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/_a5a5901d._.js +1 -1
- package/web/.next/server/chunks/ssr/_a5a5901d._.js.map +1 -1
- 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 +1 -1
- package/web/.next/server/chunks/ssr/_c3f595c6._.js.map +1 -1
- 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/{_b881a389._.js → _c9f903f2._.js} +2 -2
- package/web/.next/server/chunks/ssr/_c9f903f2._.js.map +1 -0
- package/web/.next/server/chunks/ssr/{_ce97386b._.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/_f1ba9be6._.js +2 -2
- package/web/.next/server/chunks/ssr/_f1ba9be6._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f33cd07e._.js +2 -2
- package/web/.next/server/chunks/ssr/_f33cd07e._.js.map +1 -1
- package/web/.next/server/chunks/ssr/_f8b45233._.js +1 -1
- package/web/.next/server/chunks/ssr/_f8b45233._.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/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/pages/500.html +2 -2
- package/web/.next/server/server-reference-manifest.js +1 -1
- package/web/.next/server/server-reference-manifest.json +190 -154
- package/web/.next/static/chunks/25e894a1de46b5fb.js +1 -0
- package/web/.next/static/chunks/2609c8fc6f14cb26.js +1 -0
- package/web/.next/static/chunks/29f0d874b1fde3d6.js +5 -0
- package/web/.next/static/chunks/400e93efac983a76.css +1 -0
- package/web/.next/static/chunks/498e45f8e05a5491.js +1 -0
- package/web/.next/static/chunks/{0d9e3aa7e10cf6e6.js → 56955fa252a9f3ed.js} +2 -2
- package/web/.next/static/chunks/779b5c49587b074e.js +1 -0
- package/web/.next/static/chunks/7f491899a2fe2fd7.js +1 -0
- package/web/.next/static/chunks/966eb2688300b7f5.js +1 -0
- package/web/.next/static/chunks/971e52f3f386ccfd.js +1 -0
- package/web/.next/static/chunks/a8243f8d06bdcef0.js +5 -0
- package/web/.next/static/chunks/b63e6727c84f30e2.js +1 -0
- package/web/.next/static/chunks/{0613d3829ce90fe9.js → ce0316338f7e01e6.js} +1 -1
- package/web/.next/static/chunks/ce87ded6cc38b4de.js +1 -0
- package/web/.next/static/chunks/cf000ba1a3f11439.js +7 -0
- package/web/.next/static/chunks/cf75fade434602c6.js +5 -0
- package/web/.next/static/chunks/{5f40b5c4f859b573.js → d9e4d90ef254da84.js} +1 -1
- package/web/.next/static/chunks/{780f688b8568331d.js → dc21cf85bfa262a7.js} +2 -2
- package/web/.next/static/chunks/e6398f94cffe9bc2.js +1 -0
- package/web/.next/static/chunks/ecfd93d61bf4d933.js +1 -0
- 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]__e5ceba65._.js +0 -3
- package/web/.next/server/chunks/ssr/[root-of-the-server]__e5ceba65._.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/_075fae20._.js +0 -4
- package/web/.next/server/chunks/ssr/_075fae20._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_125c55af._.js +0 -4
- package/web/.next/server/chunks/ssr/_125c55af._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_391e499a._.js +0 -3
- package/web/.next/server/chunks/ssr/_391e499a._.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/_628621c7._.js +0 -4
- package/web/.next/server/chunks/ssr/_628621c7._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_68996e5b._.js +0 -3
- package/web/.next/server/chunks/ssr/_68996e5b._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_9412b27f._.js +0 -4
- package/web/.next/server/chunks/ssr/_9412b27f._.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/_b881a389._.js.map +0 -1
- package/web/.next/server/chunks/ssr/_ce97386b._.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/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/4581eaf51543601d.js +0 -1
- package/web/.next/static/chunks/47477ed4c5871747.js +0 -1
- package/web/.next/static/chunks/74db65fa7bfb80bd.js +0 -1
- package/web/.next/static/chunks/8b64414cdb4a4dc7.js +0 -1
- package/web/.next/static/chunks/bf55fb50a69f7350.js +0 -5
- package/web/.next/static/chunks/c04ada25ace6f30c.js +0 -1
- package/web/.next/static/chunks/c3a67566f78b5bc3.js +0 -1
- package/web/.next/static/chunks/ca8752df0e809c1b.js +0 -7
- package/web/.next/static/chunks/d2cbeefbc8967b16.js +0 -1
- package/web/.next/static/chunks/d39ae882d080aa52.js +0 -1
- package/web/.next/static/chunks/d6e702c209c413ce.js +0 -5
- package/web/.next/static/chunks/dbfbd9d9ee5eb2d0.js +0 -1
- package/web/.next/static/chunks/dc39dd4276779dec.js +0 -1
- package/web/.next/static/chunks/e779296e738a812b.css +0 -1
- /package/web/.next/static/{qfCnoWSr4qmt2_dT28B-O → rav6zzO3q2NtCKwg9XZXP}/_buildManifest.js +0 -0
- /package/web/.next/static/{qfCnoWSr4qmt2_dT28B-O → rav6zzO3q2NtCKwg9XZXP}/_clientMiddlewareManifest.json +0 -0
- /package/web/.next/static/{qfCnoWSr4qmt2_dT28B-O → rav6zzO3q2NtCKwg9XZXP}/_ssgManifest.js +0 -0
|
@@ -3,22 +3,23 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { Loader2, ExternalLink, Terminal } from 'lucide-react';
|
|
5
5
|
import { DeploymentState } from '../../../../../../packages/core/src/domain/generated/output.js';
|
|
6
|
-
import {
|
|
6
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip.js';
|
|
7
7
|
import { ServerLogViewer } from '../../common/server-log-viewer/index.js';
|
|
8
|
+
const tbBtn = 'text-muted-foreground hover:bg-foreground/8 hover:text-foreground inline-flex size-7 items-center justify-center rounded-[3px]';
|
|
8
9
|
export function DeploymentStatusBadge({ status, url, targetId }) {
|
|
9
10
|
const [logViewerOpen, setLogViewerOpen] = useState(false);
|
|
10
11
|
const showLogButton = targetId && (status === DeploymentState.Booting || status === DeploymentState.Ready);
|
|
11
12
|
switch (status) {
|
|
12
13
|
case DeploymentState.Booting:
|
|
13
|
-
return (_jsxs(_Fragment, { children: [_jsxs(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex items-center gap-1 pl-1", children: [_jsx(Loader2, { className: "size-3 animate-spin text-blue-500" }), _jsx("span", { className: "text-muted-foreground text-[11px]", children: "Starting..." }), showLogButton ? (_jsx(TooltipProvider, { delayDuration: 300, children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": "View server logs", className: tbBtn, onClick: (e) => {
|
|
15
|
+
e.stopPropagation();
|
|
16
|
+
setLogViewerOpen(true);
|
|
17
|
+
}, children: _jsx(Terminal, { className: "size-3.5" }) }) }), _jsx(TooltipContent, { side: "bottom", className: "text-xs", children: "Server logs" })] }) })) : null] }), showLogButton ? (_jsx(ServerLogViewer, { open: logViewerOpen, onOpenChange: setLogViewerOpen, targetId: targetId })) : null] }));
|
|
17
18
|
case DeploymentState.Ready:
|
|
18
|
-
return (_jsxs(_Fragment, { children: [_jsxs(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "flex translate-y-px items-center gap-1 pl-1", children: [_jsx("span", { className: "inline-block size-1.5 rounded-full bg-green-500" }), url ? (_jsxs("a", { href: url, target: "_blank", rel: "noopener noreferrer", className: "inline-flex items-center gap-0.5 text-[11px] text-green-600 hover:text-green-500 dark:text-green-400 dark:hover:text-green-300", onClick: (e) => e.stopPropagation(), children: [url, _jsx(ExternalLink, { className: "size-2.5 shrink-0" })] })) : (_jsx("span", { className: "text-[11px] text-green-600 dark:text-green-400", children: "Ready" })), showLogButton ? (_jsx(TooltipProvider, { delayDuration: 300, children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("button", { type: "button", "aria-label": "View server logs", className: tbBtn, onClick: (e) => {
|
|
20
|
+
e.stopPropagation();
|
|
21
|
+
setLogViewerOpen(true);
|
|
22
|
+
}, children: _jsx(Terminal, { className: "size-3.5" }) }) }), _jsx(TooltipContent, { side: "bottom", className: "text-xs", children: "Server logs" })] }) })) : null] }), showLogButton ? (_jsx(ServerLogViewer, { open: logViewerOpen, onOpenChange: setLogViewerOpen, targetId: targetId })) : null] }));
|
|
22
23
|
default:
|
|
23
24
|
return null;
|
|
24
25
|
}
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export interface FeatureDrawerTabsProps {
|
|
|
14
14
|
headerContent?: React.ReactNode;
|
|
15
15
|
featureNode: FeatureNodeData;
|
|
16
16
|
featureId: string;
|
|
17
|
+
/** Action handlers for the status chip in the title row. */
|
|
18
|
+
onRetry?: (featureId: string) => void;
|
|
19
|
+
onStop?: (featureId: string) => void;
|
|
20
|
+
onStart?: (featureId: string) => void;
|
|
17
21
|
initialTab?: FeatureTabKey;
|
|
18
22
|
/** Tab key from URL path segment (e.g. /feature/[id]/activity → 'activity'). */
|
|
19
23
|
urlTab?: FeatureTabKey;
|
|
@@ -47,5 +51,5 @@ export interface FeatureDrawerTabsProps {
|
|
|
47
51
|
/** When false, the Chat tab is hidden from the tab bar (FR-17). Defaults to true. */
|
|
48
52
|
interactiveAgentEnabled?: boolean;
|
|
49
53
|
}
|
|
50
|
-
export declare function FeatureDrawerTabs({ featureName, headerContent, featureNode, featureId, initialTab, urlTab, prdData, prdSelections, onPrdSelect, onPrdApprove, onPrdReject, isPrdLoading, techData, onTechApprove, onTechReject, isTechLoading, productData, mergeData, onMergeApprove, onMergeReject, isMergeLoading, syncStatus, syncLoading, syncError, onRefreshSync, onRebaseOnMain, rebaseLoading, rebaseError, isRejecting, chatInput, onChatInputChange, sseEvents, interactiveAgentEnabled, }: FeatureDrawerTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
export declare function FeatureDrawerTabs({ featureName, headerContent, featureNode, featureId, initialTab, urlTab, prdData, prdSelections, onPrdSelect, onPrdApprove, onPrdReject, isPrdLoading, techData, onTechApprove, onTechReject, isTechLoading, productData, mergeData, onMergeApprove, onMergeReject, isMergeLoading, syncStatus, syncLoading, syncError, onRefreshSync, onRebaseOnMain, rebaseLoading, rebaseError, isRejecting, chatInput, onChatInputChange, sseEvents, interactiveAgentEnabled, onRetry, onStop, onStart, }: FeatureDrawerTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
51
55
|
//# sourceMappingURL=feature-drawer-tabs.d.ts.map
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-drawer-tabs.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"feature-drawer-tabs.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.tsx"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAU9E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAIxE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AACzF,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,+CAA+C,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAMxE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AAS9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,uDAAuD,CAAC;AAC3F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AA4DrE,MAAM,WAAW,sBAAsB;IACrC,kDAAkD;IAClD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,WAAW,EAAE,eAAe,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,4DAA4D;IAC5D,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,MAAM,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,gFAAgF;IAChF,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,mFAAmF;IACnF,SAAS,CAAC,EAAE,SAAS,iBAAiB,EAAE,CAAC;IAGzC,OAAO,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC1E,YAAY,CAAC,EAAE,OAAO,CAAC;IAGvB,QAAQ,CAAC,EAAE,uBAAuB,GAAG,IAAI,CAAC;IAC1C,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC3E,aAAa,CAAC,EAAE,OAAO,CAAC;IAGxB,WAAW,CAAC,EAAE,2BAA2B,GAAG,IAAI,CAAC;IAGjD,SAAS,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACnC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,gBAAgB,EAAE,KAAK,IAAI,CAAC;IAC5E,cAAc,CAAC,EAAE,OAAO,CAAC;IAGzB,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAG3B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAG5B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAG5C,qFAAqF;IACrF,uBAAuB,CAAC,EAAE,OAAO,CAAC;CACnC;AAwBD,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,aAAa,EACb,WAAW,EACX,SAAS,EACT,UAAU,EACV,MAAM,EACN,OAAO,EACP,aAAa,EACb,WAAW,EACX,YAAY,EACZ,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,aAAa,EACb,WAAW,EACX,SAAS,EACT,cAAc,EACd,aAAa,EACb,cAAc,EACd,UAAU,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,cAAc,EACd,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,SAAS,EACT,uBAA8B,EAC9B,OAAO,EACP,MAAM,EACN,OAAO,GACR,EAAE,sBAAsB,2CAwexB"}
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/feature-drawer-tabs.js
CHANGED
|
@@ -3,11 +3,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
import { useState, useEffect, useCallback, useRef, useMemo } from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { usePathname } from 'next/navigation';
|
|
6
|
-
import { Loader2, AlertCircle } from 'lucide-react';
|
|
6
|
+
import { Loader2, AlertCircle, LayoutDashboard, Activity, ScrollText, Map, FileCheck, Cpu, Package, GitMerge, MessageSquare, Play, Square, RotateCcw, Zap, Layers, } from 'lucide-react';
|
|
7
7
|
import { Tabs, TabsList, TabsTrigger, TabsContent } from '../../ui/tabs.js';
|
|
8
|
-
import {
|
|
8
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '../../ui/tooltip.js';
|
|
9
9
|
import { getFeaturePhaseTimings } from '../../../app/actions/get-feature-phase-timings.js';
|
|
10
10
|
import { getFeaturePlan } from '../../../app/actions/get-feature-plan.js';
|
|
11
|
+
import { cn } from '../../../lib/utils.js';
|
|
12
|
+
import { featureNodeStateConfig } from '../../common/feature-node/index.js';
|
|
13
|
+
import { CometSpinner } from '../../ui/comet-spinner.js';
|
|
11
14
|
import { PrdQuestionnaire } from '../../common/prd-questionnaire/index.js';
|
|
12
15
|
import { TechDecisionsContent } from '../../common/tech-decisions-review/index.js';
|
|
13
16
|
import { ProductDecisionsSummary } from '../../common/product-decisions-summary/index.js';
|
|
@@ -22,15 +25,15 @@ import { useFeatureLogs } from '../../../hooks/use-feature-logs.js';
|
|
|
22
25
|
import { useTabDataFetch } from './use-tab-data-fetch.js';
|
|
23
26
|
/** All possible tabs in display order. */
|
|
24
27
|
const ALL_TABS = [
|
|
25
|
-
{ key: 'overview', label: 'Overview' },
|
|
26
|
-
{ key: 'activity', label: 'Activity' },
|
|
27
|
-
{ key: 'log', label: 'Log' },
|
|
28
|
-
{ key: 'plan', label: 'Plan' },
|
|
29
|
-
{ key: 'prd-review', label: 'PRD Review' },
|
|
30
|
-
{ key: 'tech-decisions', label: 'Tech Decisions' },
|
|
31
|
-
{ key: 'product-decisions', label: 'Product' },
|
|
32
|
-
{ key: 'merge-review', label: 'Merge Review' },
|
|
33
|
-
{ key: 'chat', label: 'Chat' },
|
|
28
|
+
{ key: 'overview', label: 'Overview', icon: LayoutDashboard },
|
|
29
|
+
{ key: 'activity', label: 'Activity', icon: Activity },
|
|
30
|
+
{ key: 'log', label: 'Log', icon: ScrollText },
|
|
31
|
+
{ key: 'plan', label: 'Plan', icon: Map },
|
|
32
|
+
{ key: 'prd-review', label: 'PRD Review', icon: FileCheck },
|
|
33
|
+
{ key: 'tech-decisions', label: 'Tech Decisions', icon: Cpu },
|
|
34
|
+
{ key: 'product-decisions', label: 'Product', icon: Package },
|
|
35
|
+
{ key: 'merge-review', label: 'Merge Review', icon: GitMerge },
|
|
36
|
+
{ key: 'chat', label: 'Chat', icon: MessageSquare },
|
|
34
37
|
];
|
|
35
38
|
/** Compute which tabs are visible based on feature lifecycle + state. */
|
|
36
39
|
function computeVisibleTabs(node, interactiveAgentEnabled = true) {
|
|
@@ -75,7 +78,7 @@ const TAB_FETCHERS = {
|
|
|
75
78
|
activity: fetchActivity,
|
|
76
79
|
plan: fetchPlan,
|
|
77
80
|
};
|
|
78
|
-
export function FeatureDrawerTabs({ featureName, headerContent, featureNode, featureId, initialTab, urlTab, prdData, prdSelections, onPrdSelect, onPrdApprove, onPrdReject, isPrdLoading, techData, onTechApprove, onTechReject, isTechLoading, productData, mergeData, onMergeApprove, onMergeReject, isMergeLoading, syncStatus, syncLoading, syncError, onRefreshSync, onRebaseOnMain, rebaseLoading, rebaseError, isRejecting, chatInput, onChatInputChange, sseEvents, interactiveAgentEnabled = true, }) {
|
|
81
|
+
export function FeatureDrawerTabs({ featureName, headerContent, featureNode, featureId, initialTab, urlTab, prdData, prdSelections, onPrdSelect, onPrdApprove, onPrdReject, isPrdLoading, techData, onTechApprove, onTechReject, isTechLoading, productData, mergeData, onMergeApprove, onMergeReject, isMergeLoading, syncStatus, syncLoading, syncError, onRefreshSync, onRebaseOnMain, rebaseLoading, rebaseError, isRejecting, chatInput, onChatInputChange, sseEvents, interactiveAgentEnabled = true, onRetry, onStop, onStart, }) {
|
|
79
82
|
const pathname = usePathname();
|
|
80
83
|
const visibleTabs = useMemo(() => computeVisibleTabs(featureNode, interactiveAgentEnabled), [featureNode, interactiveAgentEnabled]);
|
|
81
84
|
const visibleTabDefs = useMemo(() => ALL_TABS.filter((t) => visibleTabs.includes(t.key)).map((t) => t.key === 'merge-review' && featureNode.lifecycle === 'maintain'
|
|
@@ -252,7 +255,15 @@ export function FeatureDrawerTabs({ featureName, headerContent, featureNode, fea
|
|
|
252
255
|
fetchTab(tab);
|
|
253
256
|
}
|
|
254
257
|
}, [fetchTab]);
|
|
255
|
-
return (_jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: _jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "flex min-h-0 flex-1 flex-col", children: [
|
|
258
|
+
return (_jsx("div", { className: "flex min-h-0 flex-1 flex-col", children: _jsxs(Tabs, { value: activeTab, onValueChange: handleTabChange, className: "flex min-h-0 flex-1 flex-col", children: [_jsx(TabsList, { className: "bg-muted/50 h-auto w-full shrink-0 justify-start gap-0 rounded-none border-b p-0", children: visibleTabDefs.map((tab) => {
|
|
259
|
+
const Icon = tab.icon;
|
|
260
|
+
return (_jsxs(TabsTrigger, { value: tab.key, className: "text-muted-foreground hover:bg-muted hover:text-foreground data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:border-t-primary [&:not([data-state=active])]:border-r-border relative h-auto rounded-none border-t-2 border-r border-t-transparent border-r-transparent bg-transparent px-3.5 py-2.5 text-[13px] font-normal shadow-none transition-none last:border-r-transparent data-[state=active]:shadow-none", children: [_jsx(Icon, { className: "mr-1.5 size-4" }), tab.label] }, tab.key));
|
|
261
|
+
}) }), _jsxs("div", { className: "bg-muted/40 shrink-0 border-b", children: [featureName ? (_jsxs("div", { className: "flex h-12 items-stretch gap-2 pr-0 pl-4", "data-testid": "feature-drawer-header", children: [_jsx("div", { className: "flex items-center", children: featureNode.fastMode ? (_jsx(Zap, { className: "size-4 shrink-0 text-amber-500" })) : (_jsx(Layers, { className: "text-muted-foreground/50 size-4 shrink-0" })) }), _jsx("h2", { className: "text-foreground flex min-w-0 items-center truncate text-base font-semibold tracking-tight", children: featureName }), featureNode.repositoryName ? (_jsxs("span", { className: "animate-in fade-in flex shrink-0 items-center gap-1.5 self-center duration-200", children: [_jsx("span", { className: "text-muted-foreground/30 text-sm", children: "/" }), featureNode.remoteUrl ? (_jsx("a", { href: featureNode.remoteUrl, target: "_blank", rel: "noopener noreferrer", className: "text-muted-foreground hover:text-foreground text-sm", children: featureNode.repositoryName })) : (_jsx("span", { className: "text-muted-foreground text-sm", children: featureNode.repositoryName }))] })) : (_jsxs("span", { className: "flex items-center gap-1.5 self-center", children: [_jsx("span", { className: "text-muted-foreground/30 text-sm", children: "/" }), _jsx("span", { className: "bg-muted h-4 w-16 animate-pulse rounded" })] })), _jsx(TooltipProvider, { delayDuration: 300, children: _jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsxs("div", { className: "ml-auto flex shrink-0 cursor-default items-center self-stretch text-xs font-medium", children: [_jsxs("div", { className: cn('flex items-center gap-1.5 self-stretch px-3', featureNodeStateConfig[featureNode.state].labelClass), children: [featureNode.state === 'running' ? (_jsx(CometSpinner, { size: "sm", className: "shrink-0" })) : ((() => {
|
|
262
|
+
const I = featureNodeStateConfig[featureNode.state].icon;
|
|
263
|
+
return _jsx(I, { className: "size-3.5 shrink-0" });
|
|
264
|
+
})()), featureNodeStateConfig[featureNode.state].label] }), featureNode.state === 'pending' && onStart ? (_jsxs("button", { type: "button", onClick: () => onStart(featureNode.featureId), className: "text-muted-foreground flex items-center gap-1 self-stretch px-3 hover:bg-green-500/10 hover:text-green-600 dark:hover:text-green-400", "data-testid": "feature-drawer-start-button", children: [_jsx(Play, { className: "size-3.5" }), " Start"] })) : featureNode.state === 'error' && onRetry ? (_jsxs("button", { type: "button", onClick: () => onRetry(featureNode.featureId), className: "text-muted-foreground flex items-center gap-1 self-stretch px-3 hover:bg-red-500/10 hover:text-red-500 dark:hover:text-red-400", "data-testid": "feature-drawer-retry-button", children: [_jsx(RotateCcw, { className: "size-3.5" }), " Retry"] })) : featureNode.state === 'running' && onStop ? (_jsxs("button", { type: "button", onClick: () => onStop(featureNode.featureId), className: "text-muted-foreground flex items-center gap-1 self-stretch px-3 hover:bg-red-500/10 hover:text-red-500 dark:hover:text-red-400", "data-testid": "feature-drawer-stop-button", children: [_jsx(Square, { className: "size-3.5" }), " Stop"] })) : null] }) }), featureNode.errorMessage ? (_jsxs(TooltipContent, { side: "bottom", align: "end", sideOffset: 4, className: "z-[100] max-w-xs cursor-pointer text-xs leading-relaxed select-text", onClick: () => {
|
|
265
|
+
void navigator.clipboard.writeText(featureNode.errorMessage);
|
|
266
|
+
}, children: [featureNode.errorMessage, _jsx("span", { className: "text-muted-foreground ml-1 text-[10px] italic", children: "(click to copy)" })] })) : null] }) })] })) : null, headerContent] }), _jsx(TabsContent, { value: "overview", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(OverviewTab, { data: featureNode, syncStatus: syncStatus, syncLoading: syncLoading, syncError: syncError, onRefreshSync: onRefreshSync, onRebaseOnMain: onRebaseOnMain, rebaseLoading: rebaseLoading, rebaseError: rebaseError }) }), _jsx(TabsContent, { value: "activity", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(ActivityTab, { timings: tabs.activity.data?.timings ?? null, loading: tabs.activity.loading, error: tabs.activity.error, rejectionFeedback: tabs.activity.data?.rejectionFeedback }) }), _jsx(TabsContent, { value: "log", className: "mt-0 flex-1 overflow-hidden", children: _jsx(LogTab, { content: featureLogs.content, isConnected: featureLogs.isConnected, error: featureLogs.error }) }), _jsx(TabsContent, { value: "plan", className: "mt-0 flex-1 overflow-y-auto", children: _jsx(PlanTab, { plan: tabs.plan.data, loading: tabs.plan.loading, error: tabs.plan.error }) }), visibleTabs.includes('prd-review') ? (_jsx(TabsContent, { value: "prd-review", className: "mt-0 flex min-h-0 flex-1 flex-col", children: prdData ? (_jsx(PrdQuestionnaire, { data: prdData, selections: prdSelections ?? {}, onSelect: onPrdSelect ?? (() => undefined), onApprove: onPrdApprove ?? (() => undefined), onReject: onPrdReject, isProcessing: isPrdLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null, visibleTabs.includes('tech-decisions') ? (_jsx(TabsContent, { value: "tech-decisions", className: "mt-0 flex min-h-0 flex-1 flex-col", children: techData ? (_jsxs("div", { className: "flex min-h-0 flex-1 flex-col", children: [_jsx("div", { className: "flex-1 overflow-y-auto", children: _jsx(TechDecisionsContent, { data: techData }) }), _jsx(DrawerActionBarForTech, { onApprove: onTechApprove ?? (() => undefined), onReject: onTechReject, isProcessing: isTechLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })] })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) })) : null, visibleTabs.includes('product-decisions') ? (_jsx(TabsContent, { value: "product-decisions", className: "mt-0 flex-1 overflow-y-auto", children: productData === null ? (_jsx("div", { className: "flex items-center justify-center p-8", children: _jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" }) })) : productData ? (_jsx(ProductDecisionsSummary, { data: productData })) : (_jsx("p", { className: "text-muted-foreground p-4 text-center text-sm", children: "No product decisions available." })) })) : null, visibleTabs.includes('merge-review') ? (_jsx(TabsContent, { value: "merge-review", className: "mt-0 flex min-h-0 flex-1 flex-col", children: mergeData ? (_jsx(MergeReview, { data: mergeData, readOnly: featureNode.lifecycle === 'maintain', onApprove: onMergeApprove ?? (() => undefined), onReject: onMergeReject, isProcessing: isMergeLoading, isRejecting: isRejecting, chatInput: chatInput, onChatInputChange: onChatInputChange })) : (_jsx("div", { className: "flex items-center justify-center p-8", children: isMergeLoading ? (_jsx(Loader2, { className: "text-muted-foreground h-6 w-6 animate-spin" })) : (_jsxs("div", { className: "text-muted-foreground flex flex-col items-center gap-2 text-sm", children: [_jsx(AlertCircle, { className: "h-6 w-6" }), _jsx("span", { children: "Merge review data unavailable" })] })) })) })) : null, visibleTabs.includes('chat') ? (_jsx(TabsContent, { value: "chat", className: "mt-0 flex min-h-0 flex-1 flex-col overflow-hidden", children: _jsx(ChatTab, { featureId: featureId, worktreePath: featureNode.worktreePath }) })) : null] }) }));
|
|
256
267
|
}
|
|
257
268
|
// ── Private helper ──────────────────────────────────────────────────────
|
|
258
269
|
function DrawerActionBarForTech({ onApprove, onReject, isProcessing, isRejecting, chatInput, onChatInputChange, }) {
|
package/dist/src/presentation/web/components/common/feature-drawer-tabs/overview-tab.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overview-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/overview-tab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"overview-tab.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/common/feature-drawer-tabs/overview-tab.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAC;AAOxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gCAAgC,CAAC;AA2GrE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,CAAC,EAAE,cAAc,GAAG,IAAI,CAAC;IACnC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC7B;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,UAAU,EACV,WAAW,EACX,SAAS,EACT,aAAa,EACb,cAAc,EACd,aAAa,EACb,WAAW,GACZ,EAAE,gBAAgB,2CAuLlB"}
|
|
@@ -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/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":"app-sidebar.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/layouts/app-sidebar/app-sidebar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app-sidebar.d.ts","sourceRoot":"","sources":["../../../../../../../src/presentation/web/components/layouts/app-sidebar/app-sidebar.tsx"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAI/E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,MAAM,WAAW,eAAe;IAC9B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,YAAY,EAAE,iBAAiB,CAAC;IAEhC,cAAc,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,YAAY,EAEZ,cAAc,GACf,EAAE,eAAe,2CAqQjB"}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { usePathname } from 'next/navigation';
|
|
5
|
-
import { Home, Moon, Sun, Volume2, VolumeOff, Wrench, Puzzle, Settings } from 'lucide-react';
|
|
5
|
+
import { Home, Moon, Sun, Volume2, VolumeOff, Zap, ZapOff, Wrench, Puzzle, Settings, } from 'lucide-react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { Sidebar, SidebarHeader, SidebarContent, SidebarFooter, SidebarMenu, SidebarMenuItem, SidebarMenuButton, SidebarRail, useSidebar, } from '../../ui/sidebar.js';
|
|
8
8
|
import { ScrollArea } from '../../ui/scroll-area.js';
|
|
@@ -12,6 +12,7 @@ import { ShepLogo } from '../../common/shep-logo/index.js';
|
|
|
12
12
|
import { VersionBadge } from '../../common/version-badge/index.js';
|
|
13
13
|
import { FeatureListItem } from '../../common/feature-list-item/index.js';
|
|
14
14
|
import { useSoundEnabled } from '../../../hooks/use-sound-enabled.js';
|
|
15
|
+
import { useAnimationsEnabled } from '../../../hooks/use-animations-enabled.js';
|
|
15
16
|
import { useTheme } from '../../../hooks/useTheme.js';
|
|
16
17
|
import { useSoundAction } from '../../../hooks/use-sound-action.js';
|
|
17
18
|
import { FeatureStatusGroup } from '../../common/feature-status-group/index.js';
|
|
@@ -29,6 +30,7 @@ export function AppSidebar({ features, featureFlags, onFeatureClick, }) {
|
|
|
29
30
|
const { mounted: showExpanded, visible: expandedVisible } = useDeferredMount(collapsed, 200);
|
|
30
31
|
const versionData = useVersion();
|
|
31
32
|
const { enabled: soundEnabled, toggle: toggleSound } = useSoundEnabled();
|
|
33
|
+
const { enabled: animationsEnabled, toggle: toggleAnimations } = useAnimationsEnabled();
|
|
32
34
|
const { resolvedTheme, theme, setTheme } = useTheme();
|
|
33
35
|
const toggleOnSound = useSoundAction('toggle-on');
|
|
34
36
|
const toggleOffSound = useSoundAction('toggle-off');
|
|
@@ -100,5 +102,8 @@ export function AppSidebar({ features, featureFlags, onFeatureClick, }) {
|
|
|
100
102
|
: t('sidebar.switchToDark') })] }), !collapsed && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(SidebarMenuButton, { className: "w-auto flex-none", onClick: () => {
|
|
101
103
|
clickSound.play();
|
|
102
104
|
toggleSound();
|
|
103
|
-
}, "aria-label": soundEnabled ? t('sidebar.muteSounds') : t('sidebar.unmuteSounds'), children: soundEnabled ? (_jsx(Volume2, { className: "h-4 w-4" })) : (_jsx(VolumeOff, { className: "h-4 w-4" })) }) }), _jsx(TooltipContent, { side: "top", children: soundEnabled ? t('sidebar.muteSounds') : t('sidebar.unmuteSounds') })] }))
|
|
105
|
+
}, "aria-label": soundEnabled ? t('sidebar.muteSounds') : t('sidebar.unmuteSounds'), children: soundEnabled ? (_jsx(Volume2, { className: "h-4 w-4" })) : (_jsx(VolumeOff, { className: "h-4 w-4" })) }) }), _jsx(TooltipContent, { side: "top", children: soundEnabled ? t('sidebar.muteSounds') : t('sidebar.unmuteSounds') })] })), !collapsed && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(SidebarMenuButton, { className: "w-auto flex-none", onClick: () => {
|
|
106
|
+
clickSound.play();
|
|
107
|
+
toggleAnimations();
|
|
108
|
+
}, "aria-label": animationsEnabled ? 'Disable animations' : 'Enable animations', children: animationsEnabled ? (_jsx(Zap, { className: "h-4 w-4" })) : (_jsx(ZapOff, { className: "h-4 w-4" })) }) }), _jsx(TooltipContent, { side: "top", children: animationsEnabled ? 'Disable animations' : 'Enable animations' })] }))] }) }) }) }) }), _jsx(SidebarRail, {})] }));
|
|
104
109
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-animations-enabled.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/web/hooks/use-animations-enabled.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,0BAA0B;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,oBAAoB,IAAI,0BAA0B,CA4BjE"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
const STORAGE_KEY = 'shep-animations-enabled';
|
|
4
|
+
const SYNC_EVENT = 'shep:animations-toggle';
|
|
5
|
+
const BODY_CLASS = 'no-animations';
|
|
6
|
+
export function useAnimationsEnabled() {
|
|
7
|
+
const [enabled, setEnabled] = useState(true);
|
|
8
|
+
useEffect(() => {
|
|
9
|
+
const stored = localStorage.getItem(STORAGE_KEY);
|
|
10
|
+
if (stored === 'false') {
|
|
11
|
+
setEnabled(false);
|
|
12
|
+
document.body.classList.add(BODY_CLASS);
|
|
13
|
+
}
|
|
14
|
+
const onSync = (e) => {
|
|
15
|
+
const next = e.detail;
|
|
16
|
+
setEnabled(next);
|
|
17
|
+
document.body.classList.toggle(BODY_CLASS, !next);
|
|
18
|
+
};
|
|
19
|
+
window.addEventListener(SYNC_EVENT, onSync);
|
|
20
|
+
return () => window.removeEventListener(SYNC_EVENT, onSync);
|
|
21
|
+
}, []);
|
|
22
|
+
const toggle = useCallback(() => {
|
|
23
|
+
const next = !enabled;
|
|
24
|
+
localStorage.setItem(STORAGE_KEY, String(next));
|
|
25
|
+
setEnabled(next);
|
|
26
|
+
document.body.classList.toggle(BODY_CLASS, !next);
|
|
27
|
+
window.dispatchEvent(new CustomEvent(SYNC_EVENT, { detail: next }));
|
|
28
|
+
}, [enabled]);
|
|
29
|
+
return { enabled, toggle };
|
|
30
|
+
}
|