@pennyfarthing/cyclist 10.4.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api/agent-load.d.ts +1 -2
- package/dist/api/agent-load.d.ts.map +1 -1
- package/dist/api/agent-load.js +2 -123
- package/dist/api/agent-load.js.map +1 -1
- package/dist/api/audit-log.d.ts +1 -17
- package/dist/api/audit-log.d.ts.map +1 -1
- package/dist/api/audit-log.js +2 -162
- package/dist/api/audit-log.js.map +1 -1
- package/dist/api/background-tasks.d.ts +1 -26
- package/dist/api/background-tasks.d.ts.map +1 -1
- package/dist/api/background-tasks.js +2 -55
- package/dist/api/background-tasks.js.map +1 -1
- package/dist/api/bell.d.ts +1 -18
- package/dist/api/bell.d.ts.map +1 -1
- package/dist/api/bell.js +2 -33
- package/dist/api/bell.js.map +1 -1
- package/dist/api/code-markers.d.ts +1 -8
- package/dist/api/code-markers.d.ts.map +1 -1
- package/dist/api/code-markers.js +2 -61
- package/dist/api/code-markers.js.map +1 -1
- package/dist/api/complexity.d.ts +1 -2
- package/dist/api/complexity.d.ts.map +1 -1
- package/dist/api/complexity.js +2 -46
- package/dist/api/complexity.js.map +1 -1
- package/dist/api/context.d.ts +1 -37
- package/dist/api/context.d.ts.map +1 -1
- package/dist/api/context.js +2 -143
- package/dist/api/context.js.map +1 -1
- package/dist/api/dead-code.d.ts +1 -2
- package/dist/api/dead-code.d.ts.map +1 -1
- package/dist/api/dead-code.js +2 -69
- package/dist/api/dead-code.js.map +1 -1
- package/dist/api/dependencies.d.ts +1 -2
- package/dist/api/dependencies.d.ts.map +1 -1
- package/dist/api/dependencies.js +2 -42
- package/dist/api/dependencies.js.map +1 -1
- package/dist/api/evaluation.d.ts +1 -19
- package/dist/api/evaluation.d.ts.map +1 -1
- package/dist/api/evaluation.js +2 -127
- package/dist/api/evaluation.js.map +1 -1
- package/dist/api/file-browser.d.ts +1 -8
- package/dist/api/file-browser.d.ts.map +1 -1
- package/dist/api/file-browser.js +2 -114
- package/dist/api/file-browser.js.map +1 -1
- package/dist/api/git.d.ts +1 -46
- package/dist/api/git.d.ts.map +1 -1
- package/dist/api/git.js +2 -354
- package/dist/api/git.js.map +1 -1
- package/dist/api/health-score.d.ts +1 -2
- package/dist/api/health-score.d.ts.map +1 -1
- package/dist/api/health-score.js +2 -46
- package/dist/api/health-score.js.map +1 -1
- package/dist/api/hook-request.d.ts +1 -40
- package/dist/api/hook-request.d.ts.map +1 -1
- package/dist/api/hook-request.js +2 -277
- package/dist/api/hook-request.js.map +1 -1
- package/dist/api/hotspots.d.ts +1 -2
- package/dist/api/hotspots.d.ts.map +1 -1
- package/dist/api/hotspots.js +2 -61
- package/dist/api/hotspots.js.map +1 -1
- package/dist/api/identity.d.ts +1 -16
- package/dist/api/identity.d.ts.map +1 -1
- package/dist/api/identity.js +2 -78
- package/dist/api/identity.js.map +1 -1
- package/dist/api/index.d.ts +1 -34
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +2 -44
- package/dist/api/index.js.map +1 -1
- package/dist/api/mode.d.ts +1 -22
- package/dist/api/mode.d.ts.map +1 -1
- package/dist/api/mode.js +2 -37
- package/dist/api/mode.js.map +1 -1
- package/dist/api/otlp.d.ts +1 -2
- package/dist/api/otlp.d.ts.map +1 -1
- package/dist/api/otlp.js +2 -46
- package/dist/api/otlp.js.map +1 -1
- package/dist/api/permissions.d.ts +1 -15
- package/dist/api/permissions.d.ts.map +1 -1
- package/dist/api/permissions.js +2 -66
- package/dist/api/permissions.js.map +1 -1
- package/dist/api/persona.d.ts +1 -8
- package/dist/api/persona.d.ts.map +1 -1
- package/dist/api/persona.js +2 -67
- package/dist/api/persona.js.map +1 -1
- package/dist/api/portrait.d.ts +1 -5
- package/dist/api/portrait.d.ts.map +1 -1
- package/dist/api/portrait.js +2 -27
- package/dist/api/portrait.js.map +1 -1
- package/dist/api/settings.d.ts +1 -53
- package/dist/api/settings.d.ts.map +1 -1
- package/dist/api/settings.js +2 -464
- package/dist/api/settings.js.map +1 -1
- package/dist/api/spans.d.ts +1 -16
- package/dist/api/spans.d.ts.map +1 -1
- package/dist/api/spans.js +2 -244
- package/dist/api/spans.js.map +1 -1
- package/dist/api/stats.d.ts +1 -12
- package/dist/api/stats.d.ts.map +1 -1
- package/dist/api/stats.js +2 -84
- package/dist/api/stats.js.map +1 -1
- package/dist/api/story.d.ts +1 -2
- package/dist/api/story.d.ts.map +1 -1
- package/dist/api/story.js +2 -14
- package/dist/api/story.js.map +1 -1
- package/dist/api/telemetry.d.ts +1 -18
- package/dist/api/telemetry.d.ts.map +1 -1
- package/dist/api/telemetry.js +2 -164
- package/dist/api/telemetry.js.map +1 -1
- package/dist/api/theme-agents.d.ts +1 -60
- package/dist/api/theme-agents.d.ts.map +1 -1
- package/dist/api/theme-agents.js +2 -213
- package/dist/api/theme-agents.js.map +1 -1
- package/dist/api/todos.d.ts +1 -32
- package/dist/api/todos.d.ts.map +1 -1
- package/dist/api/todos.js +2 -43
- package/dist/api/todos.js.map +1 -1
- package/dist/api/token-stats.d.ts +1 -7
- package/dist/api/token-stats.d.ts.map +1 -1
- package/dist/api/token-stats.js +2 -35
- package/dist/api/token-stats.js.map +1 -1
- package/dist/api/welcome.d.ts +1 -21
- package/dist/api/welcome.d.ts.map +1 -1
- package/dist/api/welcome.js +2 -34
- package/dist/api/welcome.js.map +1 -1
- package/dist/bikerack.js +2 -2
- package/dist/bikerack.js.map +1 -1
- package/dist/env.d.ts +6 -0
- package/dist/env.d.ts.map +1 -0
- package/dist/env.js +10 -0
- package/dist/env.js.map +1 -0
- package/dist/focus.d.ts +53 -0
- package/dist/focus.d.ts.map +1 -0
- package/dist/focus.js +122 -0
- package/dist/focus.js.map +1 -0
- package/dist/git-cache.d.ts +1 -0
- package/dist/git-cache.d.ts.map +1 -1
- package/dist/git-cache.js +3 -1
- package/dist/git-cache.js.map +1 -1
- package/dist/menu-builder.d.ts.map +1 -1
- package/dist/menu-builder.js +0 -1
- package/dist/menu-builder.js.map +1 -1
- package/dist/prime.d.ts +3 -3
- package/dist/prime.d.ts.map +1 -1
- package/dist/prime.js +38 -14
- package/dist/prime.js.map +1 -1
- package/dist/public/css/react.css +1 -1
- package/dist/public/js/react/react.js +53 -61
- package/dist/server.d.ts +18 -85
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +105 -405
- package/dist/server.js.map +1 -1
- package/dist/sprint-data.d.ts +1 -1
- package/dist/sprint-data.d.ts.map +1 -1
- package/dist/sprint-data.js +2 -2
- package/dist/sprint-data.js.map +1 -1
- package/dist/theme-metadata.d.ts +3 -3
- package/dist/theme-metadata.d.ts.map +1 -1
- package/dist/theme-metadata.js +4 -4
- package/dist/theme-metadata.js.map +1 -1
- package/dist/websocket.d.ts +2 -0
- package/dist/websocket.d.ts.map +1 -1
- package/dist/websocket.js +53 -75
- package/dist/websocket.js.map +1 -1
- package/package.json +2 -6
- package/portraits/hogans-heroes/large/burkhalter-35312.png +0 -0
- package/portraits/hogans-heroes/large/carter-34352.png +0 -0
- package/portraits/hogans-heroes/large/hochstetter-45314.png +0 -0
- package/portraits/hogans-heroes/large/hogan-44541.png +0 -0
- package/portraits/hogans-heroes/large/kinch-35241.png +0 -0
- package/portraits/hogans-heroes/large/klink-23434.png +0 -0
- package/portraits/hogans-heroes/large/lebeau-45443.png +0 -0
- package/portraits/hogans-heroes/large/marya-53543.png +0 -0
- package/portraits/hogans-heroes/large/newkirk-54432.png +0 -0
- package/portraits/hogans-heroes/large/schultz-42453.png +0 -0
- package/portraits/hogans-heroes/large/underground-55131.png +0 -0
- package/portraits/hogans-heroes/medium/burkhalter-35312.png +0 -0
- package/portraits/hogans-heroes/medium/carter-34352.png +0 -0
- package/portraits/hogans-heroes/medium/hochstetter-45314.png +0 -0
- package/portraits/hogans-heroes/medium/hogan-44541.png +0 -0
- package/portraits/hogans-heroes/medium/kinch-35241.png +0 -0
- package/portraits/hogans-heroes/medium/klink-23434.png +0 -0
- package/portraits/hogans-heroes/medium/lebeau-45443.png +0 -0
- package/portraits/hogans-heroes/medium/marya-53543.png +0 -0
- package/portraits/hogans-heroes/medium/newkirk-54432.png +0 -0
- package/portraits/hogans-heroes/medium/schultz-42453.png +0 -0
- package/portraits/hogans-heroes/medium/underground-55131.png +0 -0
- package/portraits/monty-python/large/announcer-44441.png +0 -0
- package/portraits/monty-python/large/arguer-35412.png +0 -0
- package/portraits/monty-python/large/bicycle-repair-man-35241.png +0 -0
- package/portraits/monty-python/large/colonel-35423.png +0 -0
- package/portraits/monty-python/large/counsellor-45341.png +0 -0
- package/portraits/monty-python/large/gumbys-23524.png +0 -0
- package/portraits/monty-python/large/nudge-43533.png +0 -0
- package/portraits/monty-python/large/praline-45413.png +0 -0
- package/portraits/monty-python/large/silly-walks-55322.png +0 -0
- package/portraits/monty-python/large/wensleydale-54451.png +0 -0
- package/portraits/monty-python/large/xim-nez-43534.png +0 -0
- package/portraits/monty-python/medium/announcer-44441.png +0 -0
- package/portraits/monty-python/medium/arguer-35412.png +0 -0
- package/portraits/monty-python/medium/bicycle-repair-man-35241.png +0 -0
- package/portraits/monty-python/medium/colonel-35423.png +0 -0
- package/portraits/monty-python/medium/counsellor-45341.png +0 -0
- package/portraits/monty-python/medium/gumbys-23524.png +0 -0
- package/portraits/monty-python/medium/nudge-43533.png +0 -0
- package/portraits/monty-python/medium/praline-45413.png +0 -0
- package/portraits/monty-python/medium/silly-walks-55322.png +0 -0
- package/portraits/monty-python/medium/wensleydale-54451.png +0 -0
- package/portraits/monty-python/medium/xim-nez-43534.png +0 -0
- package/portraits/stephen-king/large/andy-55231.png +0 -0
- package/portraits/stephen-king/large/christine-25112.png +0 -0
- package/portraits/stephen-king/large/danny-53243.png +0 -0
- package/portraits/stephen-king/large/flagg-55311.png +0 -0
- package/portraits/stephen-king/large/gaunt-54421.png +0 -0
- package/portraits/stephen-king/large/jack-44224.png +0 -0
- package/portraits/stephen-king/large/johnny-44353.png +0 -0
- package/portraits/stephen-king/large/margaret-15415.png +0 -0
- package/portraits/stephen-king/large/paul-45233.png +0 -0
- package/portraits/stephen-king/large/pennywise-54411.png +0 -0
- package/portraits/stephen-king/large/roland-35121.png +0 -0
- package/portraits/stephen-king/medium/andy-55231.png +0 -0
- package/portraits/stephen-king/medium/christine-25112.png +0 -0
- package/portraits/stephen-king/medium/danny-53243.png +0 -0
- package/portraits/stephen-king/medium/flagg-55311.png +0 -0
- package/portraits/stephen-king/medium/gaunt-54421.png +0 -0
- package/portraits/stephen-king/medium/jack-44224.png +0 -0
- package/portraits/stephen-king/medium/johnny-44353.png +0 -0
- package/portraits/stephen-king/medium/margaret-15415.png +0 -0
- package/portraits/stephen-king/medium/paul-45233.png +0 -0
- package/portraits/stephen-king/medium/pennywise-54411.png +0 -0
- package/portraits/stephen-king/medium/roland-35121.png +0 -0
- package/portraits/star-trek-tng/large/beverly-44352.png +0 -0
- package/portraits/star-trek-tng/large/data-55241.png +0 -0
- package/portraits/star-trek-tng/large/deanna-43353.png +0 -0
- package/portraits/star-trek-tng/large/geordi-54342.png +0 -0
- package/portraits/star-trek-tng/large/jean-luc-45342.png +0 -0
- package/portraits/star-trek-tng/large/kathryn-45332.png +0 -0
- package/portraits/star-trek-tng/large/miles-35342.png +0 -0
- package/portraits/star-trek-tng/large/q-53521.png +0 -0
- package/portraits/star-trek-tng/large/spock-45231.png +0 -0
- package/portraits/star-trek-tng/large/troi-44352.png +0 -0
- package/portraits/star-trek-tng/medium/beverly-44352.png +0 -0
- package/portraits/star-trek-tng/medium/data-55241.png +0 -0
- package/portraits/star-trek-tng/medium/deanna-43353.png +0 -0
- package/portraits/star-trek-tng/medium/geordi-54342.png +0 -0
- package/portraits/star-trek-tng/medium/jean-luc-45342.png +0 -0
- package/portraits/star-trek-tng/medium/kathryn-45332.png +0 -0
- package/portraits/star-trek-tng/medium/miles-35342.png +0 -0
- package/portraits/star-trek-tng/medium/q-53521.png +0 -0
- package/portraits/star-trek-tng/medium/spock-45231.png +0 -0
- package/portraits/star-trek-tng/medium/troi-44352.png +0 -0
- package/src/public/App.tsx +0 -340
- package/src/public/components/AgentLoadDialog.tsx +0 -202
- package/src/public/components/AgentPopup.tsx +0 -308
- package/src/public/components/ApprovalModal/ApprovalModal.css +0 -35
- package/src/public/components/ApprovalModal/index.tsx +0 -632
- package/src/public/components/BikeRackIndex.tsx +0 -54
- package/src/public/components/BikeRackWorkspace.tsx +0 -142
- package/src/public/components/CommandPalette.tsx +0 -555
- package/src/public/components/ConfirmDialog.tsx +0 -168
- package/src/public/components/ContextIndicator/ContextIndicator.css +0 -85
- package/src/public/components/ContextIndicator/index.tsx +0 -330
- package/src/public/components/ContextSparkline.tsx +0 -56
- package/src/public/components/ControlBar.tsx +0 -636
- package/src/public/components/DeadCodeDialog.tsx +0 -169
- package/src/public/components/DiffViewer.tsx +0 -585
- package/src/public/components/DockviewWorkspace.tsx +0 -737
- package/src/public/components/Editor.tsx +0 -630
- package/src/public/components/ErrorBoundary.tsx +0 -67
- package/src/public/components/FileTree.tsx +0 -379
- package/src/public/components/FontPicker/FontPicker.css +0 -276
- package/src/public/components/FontPicker/index.tsx +0 -430
- package/src/public/components/FullFileTree.tsx +0 -237
- package/src/public/components/HealthGauge.tsx +0 -181
- package/src/public/components/Message.tsx +0 -225
- package/src/public/components/MessageList.tsx +0 -98
- package/src/public/components/MessageView.tsx +0 -400
- package/src/public/components/ModeSwitch/ModeSwitch.css +0 -165
- package/src/public/components/ModeSwitch/index.tsx +0 -372
- package/src/public/components/PersonaHeader.tsx +0 -240
- package/src/public/components/QuickActions.tsx +0 -267
- package/src/public/components/SpanTimeline.tsx +0 -352
- package/src/public/components/StandalonePanel.tsx +0 -84
- package/src/public/components/StatsStrip.tsx +0 -162
- package/src/public/components/StreamingContent.tsx +0 -77
- package/src/public/components/SubagentSpan.tsx +0 -180
- package/src/public/components/TandemPortrait.tsx +0 -72
- package/src/public/components/ThemePalette/ThemePalette.css +0 -179
- package/src/public/components/ThemePalette/index.tsx +0 -326
- package/src/public/components/ToolCallBlock.tsx +0 -252
- package/src/public/components/ToolStack.tsx +0 -209
- package/src/public/components/ToolStatus.tsx +0 -57
- package/src/public/components/dialogs/CodeMarkersDialog.tsx +0 -169
- package/src/public/components/dialogs/ComplexityDialog.tsx +0 -163
- package/src/public/components/dialogs/DependenciesDialog.tsx +0 -120
- package/src/public/components/dialogs/HotspotsDialog.tsx +0 -451
- package/src/public/components/dialogs/ToolDialog.tsx +0 -43
- package/src/public/components/panel-registry.ts +0 -11
- package/src/public/components/panels/ACPanel.tsx +0 -93
- package/src/public/components/panels/AcceptanceCriteriaPanel.tsx +0 -104
- package/src/public/components/panels/AuditLogPanel.tsx +0 -465
- package/src/public/components/panels/BackgroundPanel.tsx +0 -115
- package/src/public/components/panels/BikeLanePanel.tsx +0 -214
- package/src/public/components/panels/ChangedPanel.tsx +0 -65
- package/src/public/components/panels/DebugPanel.tsx +0 -344
- package/src/public/components/panels/DiffsPanel.tsx +0 -155
- package/src/public/components/panels/GitPanel.tsx +0 -216
- package/src/public/components/panels/HotspotsPanel.tsx +0 -365
- package/src/public/components/panels/MessagePanel.tsx +0 -497
- package/src/public/components/panels/SettingsPanel.tsx +0 -453
- package/src/public/components/panels/SprintPanel.tsx +0 -670
- package/src/public/components/panels/TTYPanel.tsx +0 -299
- package/src/public/components/panels/TodoPanel.tsx +0 -142
- package/src/public/components/panels/WorkflowPanel.tsx +0 -224
- package/src/public/components/panels/index.ts +0 -24
- package/src/public/components/ui/alert-dialog.tsx +0 -139
- package/src/public/components/ui/badge.tsx +0 -36
- package/src/public/components/ui/button.tsx +0 -57
- package/src/public/components/ui/checkbox.tsx +0 -28
- package/src/public/components/ui/collapsible.tsx +0 -9
- package/src/public/components/ui/command.tsx +0 -151
- package/src/public/components/ui/dialog.tsx +0 -120
- package/src/public/components/ui/popover.tsx +0 -31
- package/src/public/components/ui/progress.tsx +0 -28
- package/src/public/components/ui/scroll-area.tsx +0 -46
- package/src/public/components/ui/select.tsx +0 -157
- package/src/public/components/ui/separator.tsx +0 -29
- package/src/public/components/ui/skeleton.tsx +0 -15
- package/src/public/components/ui/switch.tsx +0 -27
- package/src/public/components/ui/toggle-group.tsx +0 -59
- package/src/public/components/ui/toggle.tsx +0 -43
- package/src/public/components/ui/tooltip.tsx +0 -30
- package/src/public/contexts/ClaudeContext.tsx +0 -311
- package/src/public/contexts/MessageQueueContext.tsx +0 -143
- package/src/public/css/theme-browser.css +0 -550
- package/src/public/css/theme-system.css +0 -630
- package/src/public/hooks/index.ts +0 -49
- package/src/public/hooks/useAgentLoad.ts +0 -105
- package/src/public/hooks/useBackgroundTasks.ts +0 -131
- package/src/public/hooks/useClaude.ts +0 -234
- package/src/public/hooks/useCodeMarkers.ts +0 -101
- package/src/public/hooks/useColorScheme.ts +0 -42
- package/src/public/hooks/useCommandHistory.ts +0 -99
- package/src/public/hooks/useComplexity.ts +0 -80
- package/src/public/hooks/useDeadCode.ts +0 -99
- package/src/public/hooks/useDependencies.ts +0 -82
- package/src/public/hooks/useDiffs.ts +0 -143
- package/src/public/hooks/useFileBrowser.ts +0 -71
- package/src/public/hooks/useGitStatus.ts +0 -233
- package/src/public/hooks/useHealthScore.ts +0 -69
- package/src/public/hooks/useHotspots.ts +0 -123
- package/src/public/hooks/useLayoutPersistence.ts +0 -138
- package/src/public/hooks/useMarkdownParser.ts +0 -36
- package/src/public/hooks/useMarkerActions.ts +0 -234
- package/src/public/hooks/useMessageQueue.ts +0 -380
- package/src/public/hooks/useMessageStream.ts +0 -131
- package/src/public/hooks/usePersona.ts +0 -112
- package/src/public/hooks/usePlanModeExit.ts +0 -105
- package/src/public/hooks/useResponsiveLayout.ts +0 -173
- package/src/public/hooks/useSprint.ts +0 -147
- package/src/public/hooks/useStatsStrip.ts +0 -204
- package/src/public/hooks/useStory.ts +0 -135
- package/src/public/hooks/useSubagentHelper.ts +0 -64
- package/src/public/hooks/useSyntaxHighlighter.ts +0 -52
- package/src/public/hooks/useTabCompletion.ts +0 -124
- package/src/public/hooks/useTodos.ts +0 -93
- package/src/public/hooks/useUserAvatar.ts +0 -54
- package/src/public/index.tsx +0 -10
- package/src/public/lib/utils.ts +0 -6
- package/src/public/styles/dockview-theme.css +0 -459
- package/src/public/styles/tailwind.css +0 -4396
- package/src/public/types/electron.d.ts +0 -18
- package/src/public/types/message.ts +0 -51
- package/src/public/utils/avatar-service.ts +0 -73
- package/src/public/utils/color-presets.ts +0 -940
- package/src/public/utils/font-presets.ts +0 -362
- package/src/public/utils/formatDuration.ts +0 -14
- package/src/public/utils/markdown.ts +0 -249
- package/src/public/utils/messageFilters.ts +0 -128
- package/src/public/utils/slash-commands.ts +0 -353
- package/src/public/utils/subagent-display.ts +0 -146
- package/src/public/utils/syntax.ts +0 -219
- package/src/public/utils/toolIntentSummarizer.ts +0 -199
- package/src/public/utils/toolStackGrouper.ts +0 -106
- package/src/public/utils/toolTypeColors.ts +0 -45
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import { Badge } from '@/components/ui/badge';
|
|
3
|
-
import { Button } from '@/components/ui/button';
|
|
4
|
-
import { Skeleton } from '@/components/ui/skeleton';
|
|
5
|
-
import { ToolDialog } from './ToolDialog';
|
|
6
|
-
import { useDependencies } from '../../hooks/useDependencies';
|
|
7
|
-
|
|
8
|
-
export interface DependenciesDialogProps {
|
|
9
|
-
open: boolean;
|
|
10
|
-
onOpenChange: (open: boolean) => void;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
function severityVariant(severity: string): 'destructive' | 'outline' | 'secondary' {
|
|
14
|
-
if (severity === 'high' || severity === 'critical') return 'destructive';
|
|
15
|
-
if (severity === 'moderate') return 'outline';
|
|
16
|
-
return 'secondary';
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function DependenciesDialog({ open, onOpenChange }: DependenciesDialogProps): React.ReactElement {
|
|
20
|
-
const { data, isLoading, error, refresh } = useDependencies({});
|
|
21
|
-
|
|
22
|
-
useEffect(() => {
|
|
23
|
-
if (open) refresh();
|
|
24
|
-
}, [open, refresh]);
|
|
25
|
-
|
|
26
|
-
const renderContent = () => {
|
|
27
|
-
if (isLoading) {
|
|
28
|
-
return (
|
|
29
|
-
<div className="dependencies-panel loading" data-testid="dependencies-panel">
|
|
30
|
-
<div className="space-y-3 p-2">
|
|
31
|
-
<Skeleton className="h-4 w-40" />
|
|
32
|
-
<Skeleton className="h-3 w-full" />
|
|
33
|
-
<Skeleton className="h-3 w-full" />
|
|
34
|
-
<Skeleton className="h-3 w-3/4" />
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if (error) {
|
|
41
|
-
return (
|
|
42
|
-
<div className="dependencies-panel error" data-testid="dependencies-panel">
|
|
43
|
-
<div className="error-message">Error: {error.message}</div>
|
|
44
|
-
<Button variant="outline" size="sm" onClick={refresh}>Retry</Button>
|
|
45
|
-
</div>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
if (!data) {
|
|
50
|
-
return (
|
|
51
|
-
<div className="dependencies-panel" data-testid="dependencies-panel">
|
|
52
|
-
<p>Click <strong>Analyze</strong> to check dependencies</p>
|
|
53
|
-
</div>
|
|
54
|
-
);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
return (
|
|
58
|
-
<div className="dependencies-panel" data-testid="dependencies-panel">
|
|
59
|
-
{data.outdated.length > 0 && (
|
|
60
|
-
<div className="outdated-section" style={{ marginBottom: '16px' }}>
|
|
61
|
-
<h4>Outdated Packages ({data.outdated.length})</h4>
|
|
62
|
-
<table role="table" style={{ width: '100%', borderCollapse: 'collapse' }}>
|
|
63
|
-
<thead>
|
|
64
|
-
<tr>
|
|
65
|
-
<th className="text-left" style={{ padding: '4px 8px' }}>Package</th>
|
|
66
|
-
<th className="text-left" style={{ padding: '4px 8px' }}>Current</th>
|
|
67
|
-
<th className="text-left" style={{ padding: '4px 8px' }}>Wanted</th>
|
|
68
|
-
<th className="text-left" style={{ padding: '4px 8px' }}>Latest</th>
|
|
69
|
-
<th className="text-left" style={{ padding: '4px 8px' }}>Type</th>
|
|
70
|
-
</tr>
|
|
71
|
-
</thead>
|
|
72
|
-
<tbody>
|
|
73
|
-
{data.outdated.map((pkg) => (
|
|
74
|
-
<tr key={pkg.name}>
|
|
75
|
-
<td style={{ padding: '4px 8px' }}>{pkg.name}</td>
|
|
76
|
-
<td style={{ padding: '4px 8px' }}>{pkg.current}</td>
|
|
77
|
-
<td style={{ padding: '4px 8px' }}>{pkg.wanted}</td>
|
|
78
|
-
<td style={{ padding: '4px 8px' }}>{pkg.latest}</td>
|
|
79
|
-
<td style={{ padding: '4px 8px' }}>{pkg.type}</td>
|
|
80
|
-
</tr>
|
|
81
|
-
))}
|
|
82
|
-
</tbody>
|
|
83
|
-
</table>
|
|
84
|
-
</div>
|
|
85
|
-
)}
|
|
86
|
-
|
|
87
|
-
{data.advisories.length > 0 && (
|
|
88
|
-
<div className="security-section">
|
|
89
|
-
<h4>Security Advisories</h4>
|
|
90
|
-
<div style={{ display: 'flex', gap: '8px', flexWrap: 'wrap' }}>
|
|
91
|
-
{data.advisories.map((adv) => (
|
|
92
|
-
<div key={adv.severity} style={{ display: 'flex', alignItems: 'center', gap: '4px' }}>
|
|
93
|
-
<Badge variant={severityVariant(adv.severity)}>
|
|
94
|
-
{adv.severity}
|
|
95
|
-
</Badge>
|
|
96
|
-
<span>{adv.count}</span>
|
|
97
|
-
</div>
|
|
98
|
-
))}
|
|
99
|
-
</div>
|
|
100
|
-
</div>
|
|
101
|
-
)}
|
|
102
|
-
|
|
103
|
-
{data.outdated.length === 0 && data.advisories.length === 0 && (
|
|
104
|
-
<p>All dependencies are up to date with no known vulnerabilities.</p>
|
|
105
|
-
)}
|
|
106
|
-
</div>
|
|
107
|
-
);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
return (
|
|
111
|
-
<ToolDialog
|
|
112
|
-
open={open}
|
|
113
|
-
onOpenChange={onOpenChange}
|
|
114
|
-
title="Dependencies"
|
|
115
|
-
description="Package staleness and security analysis"
|
|
116
|
-
>
|
|
117
|
-
{renderContent()}
|
|
118
|
-
</ToolDialog>
|
|
119
|
-
);
|
|
120
|
-
}
|
|
@@ -1,451 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* HotspotsDialog - Git history hotspot detector in a dialog
|
|
3
|
-
*
|
|
4
|
-
* Story: MSSCI-14442 - Migrate HotspotsPanel into HotspotsDialog
|
|
5
|
-
* Epic: epic-79 (Dialog Infrastructure + Hotspot Refactor)
|
|
6
|
-
*
|
|
7
|
-
* Migrated from HotspotsPanel — uses ToolDialog wrapper from 79-1.
|
|
8
|
-
* Shows files and directories with highest change frequency, bug fix
|
|
9
|
-
* concentration, and multi-author churn. Sortable table with time window controls.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
import React, { useState, useMemo, useCallback } from 'react';
|
|
13
|
-
import { Button } from '@/components/ui/button';
|
|
14
|
-
import { Badge } from '@/components/ui/badge';
|
|
15
|
-
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
|
|
16
|
-
import { Skeleton } from '@/components/ui/skeleton';
|
|
17
|
-
import { ToolDialog } from './ToolDialog';
|
|
18
|
-
import { useHotspots, FileHotspot, DirectoryHotspot, HotspotRepoResult } from '../../hooks/useHotspots';
|
|
19
|
-
|
|
20
|
-
export interface HotspotsDialogProps {
|
|
21
|
-
open: boolean;
|
|
22
|
-
onOpenChange: (open: boolean) => void;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
type SortField = 'hotspot_score' | 'change_count' | 'bug_fix_count' | 'author_count' | 'churn' | 'path';
|
|
26
|
-
type SortDirection = 'asc' | 'desc';
|
|
27
|
-
type ViewMode = 'files' | 'dirs';
|
|
28
|
-
|
|
29
|
-
const TIME_WINDOWS = [30, 60, 90] as const;
|
|
30
|
-
|
|
31
|
-
const SOURCE_EXTENSIONS = new Set([
|
|
32
|
-
'.ts', '.tsx', '.js', '.jsx', '.py', '.md', '.css', '.scss', '.html',
|
|
33
|
-
]);
|
|
34
|
-
|
|
35
|
-
const CONFIG_EXTENSIONS = new Set([
|
|
36
|
-
'.json', '.yaml', '.yml', '.toml', '.env',
|
|
37
|
-
]);
|
|
38
|
-
|
|
39
|
-
function getExtension(path: string): string {
|
|
40
|
-
const basename = path.split('/').pop() || '';
|
|
41
|
-
// Handle dotfiles like .env
|
|
42
|
-
if (basename.startsWith('.') && !basename.includes('.', 1)) {
|
|
43
|
-
return '.' + basename.slice(1);
|
|
44
|
-
}
|
|
45
|
-
const dotIndex = basename.lastIndexOf('.');
|
|
46
|
-
return dotIndex > 0 ? basename.slice(dotIndex) : '';
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
function matchesFilter(path: string, codeOnly: boolean, includeConfig: boolean): boolean {
|
|
50
|
-
if (!codeOnly) return true;
|
|
51
|
-
const ext = getExtension(path);
|
|
52
|
-
if (SOURCE_EXTENSIONS.has(ext)) return true;
|
|
53
|
-
if (includeConfig && CONFIG_EXTENSIONS.has(ext)) return true;
|
|
54
|
-
return false;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
function SortableHeader({
|
|
58
|
-
label,
|
|
59
|
-
field,
|
|
60
|
-
currentSort,
|
|
61
|
-
currentDirection,
|
|
62
|
-
onSort,
|
|
63
|
-
align = 'right',
|
|
64
|
-
}: {
|
|
65
|
-
label: string;
|
|
66
|
-
field: SortField;
|
|
67
|
-
currentSort: SortField;
|
|
68
|
-
currentDirection: SortDirection;
|
|
69
|
-
onSort: (field: SortField) => void;
|
|
70
|
-
align?: 'left' | 'right';
|
|
71
|
-
}) {
|
|
72
|
-
const isActive = currentSort === field;
|
|
73
|
-
const arrow = isActive ? (currentDirection === 'desc' ? ' v' : ' ^') : '';
|
|
74
|
-
|
|
75
|
-
return (
|
|
76
|
-
<th
|
|
77
|
-
className={`text-xs font-medium uppercase tracking-wider text-[var(--text-muted)] pb-2 cursor-pointer select-none ${align === 'left' ? 'text-left' : 'text-right'} ${isActive ? 'text-[var(--text-primary)]' : ''}`}
|
|
78
|
-
onClick={() => onSort(field)}
|
|
79
|
-
role="columnheader"
|
|
80
|
-
aria-sort={isActive ? (currentDirection === 'desc' ? 'descending' : 'ascending') : 'none'}
|
|
81
|
-
>
|
|
82
|
-
{label}{arrow}
|
|
83
|
-
</th>
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function FileTable({
|
|
88
|
-
hotspots,
|
|
89
|
-
sortField,
|
|
90
|
-
sortDirection,
|
|
91
|
-
onSort,
|
|
92
|
-
}: {
|
|
93
|
-
hotspots: FileHotspot[];
|
|
94
|
-
sortField: SortField;
|
|
95
|
-
sortDirection: SortDirection;
|
|
96
|
-
onSort: (field: SortField) => void;
|
|
97
|
-
}) {
|
|
98
|
-
const sorted = useMemo(() => {
|
|
99
|
-
const items = [...hotspots];
|
|
100
|
-
items.sort((a, b) => {
|
|
101
|
-
const aVal = a[sortField as keyof FileHotspot];
|
|
102
|
-
const bVal = b[sortField as keyof FileHotspot];
|
|
103
|
-
if (typeof aVal === 'number' && typeof bVal === 'number') {
|
|
104
|
-
return sortDirection === 'desc' ? bVal - aVal : aVal - bVal;
|
|
105
|
-
}
|
|
106
|
-
const aStr = String(aVal);
|
|
107
|
-
const bStr = String(bVal);
|
|
108
|
-
return sortDirection === 'desc' ? bStr.localeCompare(aStr) : aStr.localeCompare(bStr);
|
|
109
|
-
});
|
|
110
|
-
return items;
|
|
111
|
-
}, [hotspots, sortField, sortDirection]);
|
|
112
|
-
|
|
113
|
-
return (
|
|
114
|
-
<table className="w-full text-sm" role="table">
|
|
115
|
-
<thead>
|
|
116
|
-
<tr className="border-b border-[var(--border)]">
|
|
117
|
-
<SortableHeader label="Score" field="hotspot_score" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} />
|
|
118
|
-
<SortableHeader label="Changes" field="change_count" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} />
|
|
119
|
-
<SortableHeader label="Fixes" field="bug_fix_count" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} />
|
|
120
|
-
<SortableHeader label="Authors" field="author_count" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} />
|
|
121
|
-
<SortableHeader label="Churn" field="churn" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} />
|
|
122
|
-
<SortableHeader label="File" field="path" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} align="left" />
|
|
123
|
-
</tr>
|
|
124
|
-
</thead>
|
|
125
|
-
<tbody>
|
|
126
|
-
{sorted.map((h) => (
|
|
127
|
-
<tr key={h.path} className="text-[var(--text-primary)]">
|
|
128
|
-
<td className="text-right py-1.5">
|
|
129
|
-
<Badge variant={h.hotspot_score >= 50 ? 'destructive' : h.hotspot_score >= 25 ? 'outline' : 'secondary'}>
|
|
130
|
-
{h.hotspot_score.toFixed(1)}
|
|
131
|
-
</Badge>
|
|
132
|
-
</td>
|
|
133
|
-
<td className="text-right py-1.5 tabular-nums font-mono">{h.change_count}</td>
|
|
134
|
-
<td className="text-right py-1.5 tabular-nums font-mono">{h.bug_fix_count}</td>
|
|
135
|
-
<td className="text-right py-1.5 tabular-nums font-mono">{h.author_count}</td>
|
|
136
|
-
<td className="text-right py-1.5 tabular-nums font-mono">{h.churn}</td>
|
|
137
|
-
<td className="text-left py-1.5">
|
|
138
|
-
<Tooltip>
|
|
139
|
-
<TooltipTrigger asChild>
|
|
140
|
-
<span className="truncate max-w-xs inline-block align-bottom font-mono text-xs">{h.path}</span>
|
|
141
|
-
</TooltipTrigger>
|
|
142
|
-
<TooltipContent>{h.path}</TooltipContent>
|
|
143
|
-
</Tooltip>
|
|
144
|
-
</td>
|
|
145
|
-
</tr>
|
|
146
|
-
))}
|
|
147
|
-
</tbody>
|
|
148
|
-
</table>
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
function DirTable({
|
|
153
|
-
hotspots,
|
|
154
|
-
sortField,
|
|
155
|
-
sortDirection,
|
|
156
|
-
onSort,
|
|
157
|
-
}: {
|
|
158
|
-
hotspots: DirectoryHotspot[];
|
|
159
|
-
sortField: SortField;
|
|
160
|
-
sortDirection: SortDirection;
|
|
161
|
-
onSort: (field: SortField) => void;
|
|
162
|
-
}) {
|
|
163
|
-
const sorted = useMemo(() => {
|
|
164
|
-
const items = [...hotspots];
|
|
165
|
-
items.sort((a, b) => {
|
|
166
|
-
const fieldMap: Record<string, keyof DirectoryHotspot> = {
|
|
167
|
-
change_count: 'total_changes',
|
|
168
|
-
bug_fix_count: 'total_bug_fixes',
|
|
169
|
-
author_count: 'avg_author_count',
|
|
170
|
-
churn: 'file_count',
|
|
171
|
-
};
|
|
172
|
-
const key = (fieldMap[sortField] || sortField) as keyof DirectoryHotspot;
|
|
173
|
-
const aVal = a[key];
|
|
174
|
-
const bVal = b[key];
|
|
175
|
-
if (typeof aVal === 'number' && typeof bVal === 'number') {
|
|
176
|
-
return sortDirection === 'desc' ? bVal - aVal : aVal - bVal;
|
|
177
|
-
}
|
|
178
|
-
return sortDirection === 'desc'
|
|
179
|
-
? String(bVal).localeCompare(String(aVal))
|
|
180
|
-
: String(aVal).localeCompare(String(bVal));
|
|
181
|
-
});
|
|
182
|
-
return items;
|
|
183
|
-
}, [hotspots, sortField, sortDirection]);
|
|
184
|
-
|
|
185
|
-
return (
|
|
186
|
-
<table className="w-full text-sm" role="table">
|
|
187
|
-
<thead>
|
|
188
|
-
<tr className="border-b border-[var(--border)]">
|
|
189
|
-
<SortableHeader label="Score" field="hotspot_score" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} />
|
|
190
|
-
<SortableHeader label="Changes" field="change_count" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} />
|
|
191
|
-
<SortableHeader label="Fixes" field="bug_fix_count" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} />
|
|
192
|
-
<SortableHeader label="Authors" field="author_count" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} />
|
|
193
|
-
<SortableHeader label="Files" field="churn" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} />
|
|
194
|
-
<SortableHeader label="Directory" field="path" currentSort={sortField} currentDirection={sortDirection} onSort={onSort} align="left" />
|
|
195
|
-
</tr>
|
|
196
|
-
</thead>
|
|
197
|
-
<tbody>
|
|
198
|
-
{sorted.map((d) => (
|
|
199
|
-
<tr key={d.path} className="text-[var(--text-primary)]">
|
|
200
|
-
<td className="text-right py-1.5">
|
|
201
|
-
<Badge variant={d.hotspot_score >= 50 ? 'destructive' : d.hotspot_score >= 25 ? 'outline' : 'secondary'}>
|
|
202
|
-
{d.hotspot_score.toFixed(1)}
|
|
203
|
-
</Badge>
|
|
204
|
-
</td>
|
|
205
|
-
<td className="text-right py-1.5 tabular-nums font-mono">{d.total_changes}</td>
|
|
206
|
-
<td className="text-right py-1.5 tabular-nums font-mono">{d.total_bug_fixes}</td>
|
|
207
|
-
<td className="text-right py-1.5 tabular-nums font-mono">{d.avg_author_count.toFixed(1)}</td>
|
|
208
|
-
<td className="text-right py-1.5 tabular-nums font-mono">{d.file_count}</td>
|
|
209
|
-
<td className="text-left py-1.5">
|
|
210
|
-
<Tooltip>
|
|
211
|
-
<TooltipTrigger asChild>
|
|
212
|
-
<span className="truncate max-w-xs inline-block align-bottom font-mono text-xs">{d.path}</span>
|
|
213
|
-
</TooltipTrigger>
|
|
214
|
-
<TooltipContent>{d.path}</TooltipContent>
|
|
215
|
-
</Tooltip>
|
|
216
|
-
</td>
|
|
217
|
-
</tr>
|
|
218
|
-
))}
|
|
219
|
-
</tbody>
|
|
220
|
-
</table>
|
|
221
|
-
);
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
export function HotspotsDialog({ open, onOpenChange }: HotspotsDialogProps): React.ReactElement {
|
|
225
|
-
const [days, setDays] = useState<number>(90);
|
|
226
|
-
const [viewMode, setViewMode] = useState<ViewMode>('files');
|
|
227
|
-
const [sortField, setSortField] = useState<SortField>('hotspot_score');
|
|
228
|
-
const [sortDirection, setSortDirection] = useState<SortDirection>('desc');
|
|
229
|
-
const [includeOrchestrator, setIncludeOrchestrator] = useState(false);
|
|
230
|
-
const [codeOnly, setCodeOnly] = useState(false);
|
|
231
|
-
const [includeConfig, setIncludeConfig] = useState(false);
|
|
232
|
-
|
|
233
|
-
const { data, isLoading, error, refresh } = useHotspots({ days, includeOrchestrator });
|
|
234
|
-
|
|
235
|
-
const handleSort = useCallback((field: SortField) => {
|
|
236
|
-
setSortField((prev) => {
|
|
237
|
-
if (prev === field) {
|
|
238
|
-
setSortDirection((d) => (d === 'desc' ? 'asc' : 'desc'));
|
|
239
|
-
return prev;
|
|
240
|
-
}
|
|
241
|
-
setSortDirection('desc');
|
|
242
|
-
return field;
|
|
243
|
-
});
|
|
244
|
-
}, []);
|
|
245
|
-
|
|
246
|
-
const repoResults: HotspotRepoResult[] = useMemo(() => {
|
|
247
|
-
if (!data) return [];
|
|
248
|
-
if (data.repo_results) return data.repo_results;
|
|
249
|
-
if (data.file_hotspots) {
|
|
250
|
-
return [{
|
|
251
|
-
success: data.success,
|
|
252
|
-
repo_name: data.repo_name || '',
|
|
253
|
-
repo_path: data.repo_path || '',
|
|
254
|
-
time_window_days: data.time_window_days || days,
|
|
255
|
-
commit_count: data.commit_count || 0,
|
|
256
|
-
file_hotspots: data.file_hotspots || [],
|
|
257
|
-
directory_hotspots: data.directory_hotspots || [],
|
|
258
|
-
}];
|
|
259
|
-
}
|
|
260
|
-
return [];
|
|
261
|
-
}, [data, days]);
|
|
262
|
-
|
|
263
|
-
const allFiles = useMemo(() => {
|
|
264
|
-
const files: FileHotspot[] = [];
|
|
265
|
-
for (const r of repoResults) {
|
|
266
|
-
if (r.success) files.push(...r.file_hotspots);
|
|
267
|
-
}
|
|
268
|
-
return files;
|
|
269
|
-
}, [repoResults]);
|
|
270
|
-
|
|
271
|
-
const allDirs = useMemo(() => {
|
|
272
|
-
const dirs: DirectoryHotspot[] = [];
|
|
273
|
-
for (const r of repoResults) {
|
|
274
|
-
if (r.success) dirs.push(...r.directory_hotspots);
|
|
275
|
-
}
|
|
276
|
-
return dirs;
|
|
277
|
-
}, [repoResults]);
|
|
278
|
-
|
|
279
|
-
const filteredFiles = useMemo(
|
|
280
|
-
() => allFiles.filter((f) => matchesFilter(f.path, codeOnly, includeConfig)),
|
|
281
|
-
[allFiles, codeOnly, includeConfig],
|
|
282
|
-
);
|
|
283
|
-
|
|
284
|
-
const filteredDirs = useMemo(
|
|
285
|
-
() => allDirs.filter((d) => matchesFilter(d.path, codeOnly, includeConfig)),
|
|
286
|
-
[allDirs, codeOnly, includeConfig],
|
|
287
|
-
);
|
|
288
|
-
|
|
289
|
-
const totalCommits = repoResults.reduce((sum, r) => sum + (r.commit_count || 0), 0);
|
|
290
|
-
|
|
291
|
-
const renderContent = () => {
|
|
292
|
-
if (isLoading) {
|
|
293
|
-
return (
|
|
294
|
-
<div className="hotspots-panel loading" data-testid="hotspots-panel">
|
|
295
|
-
<div className="space-y-3 p-2">
|
|
296
|
-
<Skeleton className="h-4 w-40" />
|
|
297
|
-
<Skeleton className="h-3 w-full" />
|
|
298
|
-
<Skeleton className="h-3 w-full" />
|
|
299
|
-
<Skeleton className="h-3 w-3/4" />
|
|
300
|
-
<Skeleton className="h-3 w-full" />
|
|
301
|
-
<Skeleton className="h-3 w-5/6" />
|
|
302
|
-
</div>
|
|
303
|
-
</div>
|
|
304
|
-
);
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
if (error) {
|
|
308
|
-
return (
|
|
309
|
-
<div className="hotspots-panel error" data-testid="hotspots-panel">
|
|
310
|
-
<div className="error-message">{error.message}</div>
|
|
311
|
-
<Button variant="outline" size="sm" onClick={refresh}>Retry</Button>
|
|
312
|
-
</div>
|
|
313
|
-
);
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
return (
|
|
317
|
-
<TooltipProvider delayDuration={300}>
|
|
318
|
-
<div className="hotspots-panel" data-testid="hotspots-panel">
|
|
319
|
-
<div className="space-y-3">
|
|
320
|
-
<div className="flex flex-wrap items-center gap-x-4 gap-y-2">
|
|
321
|
-
<div className="flex gap-1">
|
|
322
|
-
{TIME_WINDOWS.map((w) => (
|
|
323
|
-
<Button
|
|
324
|
-
key={w}
|
|
325
|
-
variant={days === w ? 'default' : 'outline'}
|
|
326
|
-
size="sm"
|
|
327
|
-
onClick={() => setDays(w)}
|
|
328
|
-
>
|
|
329
|
-
{w}d
|
|
330
|
-
</Button>
|
|
331
|
-
))}
|
|
332
|
-
</div>
|
|
333
|
-
|
|
334
|
-
<div className="flex gap-1">
|
|
335
|
-
<Button
|
|
336
|
-
variant={viewMode === 'files' ? 'default' : 'outline'}
|
|
337
|
-
size="sm"
|
|
338
|
-
onClick={() => setViewMode('files')}
|
|
339
|
-
>
|
|
340
|
-
Files
|
|
341
|
-
</Button>
|
|
342
|
-
<Button
|
|
343
|
-
variant={viewMode === 'dirs' ? 'default' : 'outline'}
|
|
344
|
-
size="sm"
|
|
345
|
-
onClick={() => setViewMode('dirs')}
|
|
346
|
-
>
|
|
347
|
-
Dirs
|
|
348
|
-
</Button>
|
|
349
|
-
</div>
|
|
350
|
-
|
|
351
|
-
<div className="ml-auto">
|
|
352
|
-
<Tooltip>
|
|
353
|
-
<TooltipTrigger asChild>
|
|
354
|
-
<Button variant="outline" size="sm" onClick={refresh}>
|
|
355
|
-
Analyze
|
|
356
|
-
</Button>
|
|
357
|
-
</TooltipTrigger>
|
|
358
|
-
<TooltipContent>Run hotspot analysis</TooltipContent>
|
|
359
|
-
</Tooltip>
|
|
360
|
-
</div>
|
|
361
|
-
</div>
|
|
362
|
-
|
|
363
|
-
<div className="flex flex-wrap items-center gap-x-6 gap-y-2">
|
|
364
|
-
<label className="flex items-center gap-2 text-sm text-[var(--text-secondary)] cursor-pointer">
|
|
365
|
-
<input
|
|
366
|
-
type="checkbox"
|
|
367
|
-
checked={includeOrchestrator}
|
|
368
|
-
onChange={(e) => setIncludeOrchestrator(e.target.checked)}
|
|
369
|
-
/>
|
|
370
|
-
Include orchestrator
|
|
371
|
-
</label>
|
|
372
|
-
|
|
373
|
-
<label className="flex items-center gap-2 text-sm text-[var(--text-secondary)] cursor-pointer">
|
|
374
|
-
<input
|
|
375
|
-
type="checkbox"
|
|
376
|
-
aria-label="Code only"
|
|
377
|
-
checked={codeOnly}
|
|
378
|
-
onChange={(e) => setCodeOnly(e.target.checked)}
|
|
379
|
-
/>
|
|
380
|
-
Code only
|
|
381
|
-
</label>
|
|
382
|
-
|
|
383
|
-
<label className="flex items-center gap-2 text-sm text-[var(--text-secondary)] cursor-pointer">
|
|
384
|
-
<input
|
|
385
|
-
type="checkbox"
|
|
386
|
-
aria-label="Include config"
|
|
387
|
-
checked={includeConfig}
|
|
388
|
-
disabled={!codeOnly}
|
|
389
|
-
onChange={(e) => setIncludeConfig(e.target.checked)}
|
|
390
|
-
className="disabled:opacity-40"
|
|
391
|
-
/>
|
|
392
|
-
<span className={!codeOnly ? 'opacity-40' : ''}>Include config</span>
|
|
393
|
-
</label>
|
|
394
|
-
</div>
|
|
395
|
-
</div>
|
|
396
|
-
|
|
397
|
-
{data && (
|
|
398
|
-
<div className="flex gap-4 text-xs text-[var(--text-muted)]">
|
|
399
|
-
<span>{totalCommits} commits</span>
|
|
400
|
-
<span>{filteredFiles.length} files</span>
|
|
401
|
-
<span>{filteredDirs.length} dirs</span>
|
|
402
|
-
</div>
|
|
403
|
-
)}
|
|
404
|
-
|
|
405
|
-
{!data && (
|
|
406
|
-
<div className="text-center py-12 text-[var(--text-muted)]">
|
|
407
|
-
Click <strong>Analyze</strong> to detect code hotspots
|
|
408
|
-
</div>
|
|
409
|
-
)}
|
|
410
|
-
|
|
411
|
-
{data && viewMode === 'files' && (
|
|
412
|
-
filteredFiles.length > 0 ? (
|
|
413
|
-
<FileTable
|
|
414
|
-
hotspots={filteredFiles.slice(0, 50)}
|
|
415
|
-
sortField={sortField}
|
|
416
|
-
sortDirection={sortDirection}
|
|
417
|
-
onSort={handleSort}
|
|
418
|
-
/>
|
|
419
|
-
) : (
|
|
420
|
-
<div className="text-center py-12 text-[var(--text-muted)]">No file hotspots found</div>
|
|
421
|
-
)
|
|
422
|
-
)}
|
|
423
|
-
|
|
424
|
-
{data && viewMode === 'dirs' && (
|
|
425
|
-
filteredDirs.length > 0 ? (
|
|
426
|
-
<DirTable
|
|
427
|
-
hotspots={filteredDirs.slice(0, 50)}
|
|
428
|
-
sortField={sortField}
|
|
429
|
-
sortDirection={sortDirection}
|
|
430
|
-
onSort={handleSort}
|
|
431
|
-
/>
|
|
432
|
-
) : (
|
|
433
|
-
<div className="text-center py-12 text-[var(--text-muted)]">No directory hotspots found</div>
|
|
434
|
-
)
|
|
435
|
-
)}
|
|
436
|
-
</div>
|
|
437
|
-
</TooltipProvider>
|
|
438
|
-
);
|
|
439
|
-
};
|
|
440
|
-
|
|
441
|
-
return (
|
|
442
|
-
<ToolDialog
|
|
443
|
-
open={open}
|
|
444
|
-
onOpenChange={onOpenChange}
|
|
445
|
-
title="Hotspots"
|
|
446
|
-
description="Files and directories ranked by change frequency and complexity"
|
|
447
|
-
>
|
|
448
|
-
{renderContent()}
|
|
449
|
-
</ToolDialog>
|
|
450
|
-
);
|
|
451
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
Dialog,
|
|
4
|
-
DialogContent,
|
|
5
|
-
DialogHeader,
|
|
6
|
-
DialogFooter,
|
|
7
|
-
DialogTitle,
|
|
8
|
-
DialogDescription,
|
|
9
|
-
} from '@/components/ui/dialog';
|
|
10
|
-
import { cn } from '@/lib/utils';
|
|
11
|
-
|
|
12
|
-
export interface ToolDialogProps {
|
|
13
|
-
open: boolean;
|
|
14
|
-
onOpenChange: (open: boolean) => void;
|
|
15
|
-
title: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
footer?: React.ReactNode;
|
|
18
|
-
className?: string;
|
|
19
|
-
children: React.ReactNode;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function ToolDialog({
|
|
23
|
-
open,
|
|
24
|
-
onOpenChange,
|
|
25
|
-
title,
|
|
26
|
-
description,
|
|
27
|
-
footer,
|
|
28
|
-
className,
|
|
29
|
-
children,
|
|
30
|
-
}: ToolDialogProps): React.ReactElement {
|
|
31
|
-
return (
|
|
32
|
-
<Dialog open={open} onOpenChange={onOpenChange}>
|
|
33
|
-
<DialogContent className={cn('max-w-5xl max-h-[80vh] overflow-y-auto', className)}>
|
|
34
|
-
<DialogHeader>
|
|
35
|
-
<DialogTitle>{title}</DialogTitle>
|
|
36
|
-
{description && <DialogDescription>{description}</DialogDescription>}
|
|
37
|
-
</DialogHeader>
|
|
38
|
-
{children}
|
|
39
|
-
{footer && <DialogFooter>{footer}</DialogFooter>}
|
|
40
|
-
</DialogContent>
|
|
41
|
-
</Dialog>
|
|
42
|
-
);
|
|
43
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared panel component registry
|
|
3
|
-
*
|
|
4
|
-
* Used by both DockviewWorkspace and BikeRackWorkspace to look up
|
|
5
|
-
* registered panel components by ID. Extracted to avoid importing
|
|
6
|
-
* DockviewWorkspace (which has shadcn/ui deps) from BikeRackWorkspace.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
import type { ComponentType } from 'react';
|
|
10
|
-
|
|
11
|
-
export const panelRegistry: Map<string, ComponentType> = new Map();
|