@pennyfarthing/core 11.3.7 → 11.4.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 +1 -1
- package/package.json +17 -16
- package/packages/core/dist/public/css/react.css +1 -1
- package/packages/core/dist/public/js/react/react.js +24 -24
- package/packages/core/src/public/App.tsx +356 -0
- package/packages/core/src/public/components/AgentLoadDialog.tsx +202 -0
- package/packages/core/src/public/components/AgentPopup.tsx +308 -0
- package/packages/core/src/public/components/ApprovalModal/ApprovalModal.css +35 -0
- package/packages/core/src/public/components/ApprovalModal/index.tsx +632 -0
- package/packages/core/src/public/components/BikeRackIndex.tsx +53 -0
- package/packages/core/src/public/components/BikeRackWorkspace.tsx +217 -0
- package/packages/core/src/public/components/CommandPalette.tsx +554 -0
- package/packages/core/src/public/components/ConfirmDialog.tsx +168 -0
- package/packages/core/src/public/components/ContextIndicator/ContextIndicator.css +85 -0
- package/packages/core/src/public/components/ContextIndicator/index.tsx +330 -0
- package/packages/core/src/public/components/ContextSparkline.tsx +56 -0
- package/packages/core/src/public/components/ControlBar.tsx +636 -0
- package/packages/core/src/public/components/DeadCodeDialog.tsx +169 -0
- package/packages/core/src/public/components/DiffViewer.tsx +585 -0
- package/packages/core/src/public/components/DockviewWorkspace.tsx +749 -0
- package/packages/core/src/public/components/Editor.tsx +630 -0
- package/packages/core/src/public/components/ErrorBoundary.tsx +67 -0
- package/packages/core/src/public/components/FileTree.tsx +379 -0
- package/packages/core/src/public/components/FontPicker/FontPicker.css +276 -0
- package/packages/core/src/public/components/FontPicker/index.tsx +430 -0
- package/packages/core/src/public/components/FullFileTree.tsx +237 -0
- package/packages/core/src/public/components/HealthGauge.tsx +181 -0
- package/packages/core/src/public/components/Message.tsx +225 -0
- package/packages/core/src/public/components/MessageList.tsx +98 -0
- package/packages/core/src/public/components/MessageView.tsx +400 -0
- package/packages/core/src/public/components/ModeSwitch/ModeSwitch.css +165 -0
- package/packages/core/src/public/components/ModeSwitch/index.tsx +372 -0
- package/packages/core/src/public/components/PersonaHeader.tsx +242 -0
- package/packages/core/src/public/components/ProjectInfoBar.tsx +45 -0
- package/packages/core/src/public/components/QuickActions.tsx +267 -0
- package/packages/core/src/public/components/SpanTimeline.tsx +352 -0
- package/packages/core/src/public/components/StandalonePanel.tsx +82 -0
- package/packages/core/src/public/components/StatsStrip.tsx +162 -0
- package/packages/core/src/public/components/StreamingContent.tsx +77 -0
- package/packages/core/src/public/components/SubagentSpan.tsx +180 -0
- package/packages/core/src/public/components/TandemPortrait.tsx +72 -0
- package/packages/core/src/public/components/ThemePalette/ThemePalette.css +179 -0
- package/packages/core/src/public/components/ThemePalette/index.tsx +326 -0
- package/packages/core/src/public/components/ToolCallBlock.tsx +252 -0
- package/packages/core/src/public/components/ToolStack.tsx +209 -0
- package/packages/core/src/public/components/ToolStatus.tsx +57 -0
- package/packages/core/src/public/components/dialogs/CodeMarkersDialog.tsx +169 -0
- package/packages/core/src/public/components/dialogs/ComplexityDialog.tsx +163 -0
- package/packages/core/src/public/components/dialogs/DependenciesDialog.tsx +120 -0
- package/packages/core/src/public/components/dialogs/HotspotsDialog.tsx +451 -0
- package/packages/core/src/public/components/dialogs/ToolDialog.tsx +43 -0
- package/packages/core/src/public/components/panel-registry.ts +13 -0
- package/packages/core/src/public/components/panels/ACPanel.tsx +93 -0
- package/packages/core/src/public/components/panels/AcceptanceCriteriaPanel.tsx +104 -0
- package/packages/core/src/public/components/panels/AuditLogPanel.tsx +489 -0
- package/packages/core/src/public/components/panels/BackgroundPanel.tsx +115 -0
- package/packages/core/src/public/components/panels/BikeLanePanel.tsx +214 -0
- package/packages/core/src/public/components/panels/DebugPanel.tsx +344 -0
- package/packages/core/src/public/components/panels/DiffView.tsx +109 -0
- package/packages/core/src/public/components/panels/DiffsPanel.tsx +56 -0
- package/packages/core/src/public/components/panels/GitPanel.tsx +260 -0
- package/packages/core/src/public/components/panels/HotspotsPanel.tsx +365 -0
- package/packages/core/src/public/components/panels/MessageFeed.tsx +39 -0
- package/packages/core/src/public/components/panels/MessagePanel.tsx +497 -0
- package/packages/core/src/public/components/panels/ProgressPanel.tsx +189 -0
- package/packages/core/src/public/components/panels/SettingsPanel.tsx +361 -0
- package/packages/core/src/public/components/panels/SprintPanel.tsx +723 -0
- package/packages/core/src/public/components/panels/TandemPanel.tsx +104 -0
- package/packages/core/src/public/components/panels/TaskTracker.tsx +48 -0
- package/packages/core/src/public/components/panels/TeamPanel.tsx +64 -0
- package/packages/core/src/public/components/panels/TeamRoster.tsx +67 -0
- package/packages/core/src/public/components/panels/TodoPanel.tsx +142 -0
- package/packages/core/src/public/components/panels/WorkflowPanel.tsx +224 -0
- package/packages/core/src/public/components/panels/index.ts +24 -0
- package/packages/core/src/public/components/ui/alert-dialog.tsx +139 -0
- package/packages/core/src/public/components/ui/badge.tsx +36 -0
- package/packages/core/src/public/components/ui/button.tsx +57 -0
- package/packages/core/src/public/components/ui/checkbox.tsx +28 -0
- package/packages/core/src/public/components/ui/collapsible.tsx +9 -0
- package/packages/core/src/public/components/ui/command.tsx +151 -0
- package/packages/core/src/public/components/ui/dialog.tsx +120 -0
- package/packages/core/src/public/components/ui/popover.tsx +31 -0
- package/packages/core/src/public/components/ui/progress.tsx +28 -0
- package/packages/core/src/public/components/ui/scroll-area.tsx +46 -0
- package/packages/core/src/public/components/ui/select.tsx +157 -0
- package/packages/core/src/public/components/ui/separator.tsx +29 -0
- package/packages/core/src/public/components/ui/skeleton.tsx +15 -0
- package/packages/core/src/public/components/ui/switch.tsx +27 -0
- package/packages/core/src/public/components/ui/toggle-group.tsx +59 -0
- package/packages/core/src/public/components/ui/toggle.tsx +43 -0
- package/packages/core/src/public/components/ui/tooltip.tsx +30 -0
- package/packages/core/src/public/contexts/ClaudeContext.tsx +311 -0
- package/packages/core/src/public/contexts/MessageQueueContext.tsx +143 -0
- package/packages/core/src/public/css/theme-browser.css +550 -0
- package/packages/core/src/public/css/theme-system.css +630 -0
- package/packages/core/src/public/hooks/index.ts +49 -0
- package/packages/core/src/public/hooks/useAgentLoad.ts +105 -0
- package/packages/core/src/public/hooks/useBackgroundTasks.ts +131 -0
- package/packages/core/src/public/hooks/useClaude.ts +234 -0
- package/packages/core/src/public/hooks/useCodeMarkers.ts +101 -0
- package/packages/core/src/public/hooks/useColorScheme.ts +42 -0
- package/packages/core/src/public/hooks/useCommandHistory.ts +99 -0
- package/packages/core/src/public/hooks/useComplexity.ts +80 -0
- package/packages/core/src/public/hooks/useDeadCode.ts +99 -0
- package/packages/core/src/public/hooks/useDependencies.ts +82 -0
- package/packages/core/src/public/hooks/useDiffs.ts +143 -0
- package/packages/core/src/public/hooks/useFileBrowser.ts +73 -0
- package/packages/core/src/public/hooks/useFocusPanel.ts +137 -0
- package/packages/core/src/public/hooks/useGitStatus.ts +233 -0
- package/packages/core/src/public/hooks/useHealthScore.ts +71 -0
- package/packages/core/src/public/hooks/useHotspots.ts +123 -0
- package/packages/core/src/public/hooks/useLayoutPersistence.ts +141 -0
- package/packages/core/src/public/hooks/useMarkdownParser.ts +36 -0
- package/packages/core/src/public/hooks/useMarkerActions.ts +234 -0
- package/packages/core/src/public/hooks/useMessageQueue.ts +380 -0
- package/packages/core/src/public/hooks/useMessageStream.ts +131 -0
- package/packages/core/src/public/hooks/usePersona.ts +112 -0
- package/packages/core/src/public/hooks/usePlanModeExit.ts +105 -0
- package/packages/core/src/public/hooks/useResponsiveLayout.ts +173 -0
- package/packages/core/src/public/hooks/useSprint.ts +157 -0
- package/packages/core/src/public/hooks/useStatsStrip.ts +204 -0
- package/packages/core/src/public/hooks/useStory.ts +135 -0
- package/packages/core/src/public/hooks/useSubagentHelper.ts +64 -0
- package/packages/core/src/public/hooks/useSyntaxHighlighter.ts +52 -0
- package/packages/core/src/public/hooks/useTabCompletion.ts +124 -0
- package/packages/core/src/public/hooks/useTandemObservations.ts +165 -0
- package/packages/core/src/public/hooks/useTeamMembers.ts +273 -0
- package/packages/core/src/public/hooks/useTodos.ts +93 -0
- package/packages/core/src/public/hooks/useUserAvatar.ts +54 -0
- package/packages/core/src/public/images/cyclist-dark.png +0 -0
- package/packages/core/src/public/images/cyclist-light.png +0 -0
- package/packages/core/src/public/index.html +14 -0
- package/packages/core/src/public/index.tsx +10 -0
- package/packages/core/src/public/lib/utils.ts +6 -0
- package/packages/core/src/public/styles/dockview-theme.css +376 -0
- package/packages/core/src/public/styles/tailwind.css +4454 -0
- package/packages/core/src/public/types/message.ts +51 -0
- package/packages/core/src/public/utils/avatar-service.ts +73 -0
- package/packages/core/src/public/utils/color-presets.ts +940 -0
- package/packages/core/src/public/utils/font-presets.ts +362 -0
- package/packages/core/src/public/utils/formatDuration.ts +14 -0
- package/packages/core/src/public/utils/markdown.ts +249 -0
- package/packages/core/src/public/utils/messageFilters.ts +128 -0
- package/packages/core/src/public/utils/slash-commands.ts +341 -0
- package/packages/core/src/public/utils/subagent-display.ts +146 -0
- package/packages/core/src/public/utils/syntax.ts +219 -0
- package/packages/core/src/public/utils/toolIntentSummarizer.ts +199 -0
- package/packages/core/src/public/utils/toolStackGrouper.ts +106 -0
- package/packages/core/src/public/utils/toolTypeColors.ts +45 -0
- package/pennyfarthing-dist/pf/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/__pycache__/context.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bc/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bc/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bc/__pycache__/focus.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bc/__pycache__/split.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bc/cli.py +0 -1
- package/pennyfarthing-dist/pf/bc/focus.py +0 -1
- package/pennyfarthing-dist/pf/bikerack/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bikerack/__pycache__/base_panel.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bikerack/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bikerack/__pycache__/git_panel.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bikerack/__pycache__/launcher.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bikerack/__pycache__/portrait_resolver.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bikerack/__pycache__/sprint_panel.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bikerack/__pycache__/story_detail_data.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bikerack/__pycache__/story_detail_screen.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bikerack/__pycache__/tui.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bikerack/base_panel.py +0 -1
- package/pennyfarthing-dist/pf/bikerack/events.py +1 -7
- package/pennyfarthing-dist/pf/bikerack/git_panel.py +273 -10
- package/pennyfarthing-dist/pf/bikerack/portrait_resolver.py +21 -0
- package/pennyfarthing-dist/pf/bikerack/sprint_panel.py +58 -1
- package/pennyfarthing-dist/pf/bikerack/tui.py +5 -20
- package/pennyfarthing-dist/pf/bmad/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bmad/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bmad/__pycache__/parser.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/bmad/parser.py +15 -9
- package/pennyfarthing-dist/pf/codemarkers/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/codemarkers/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/codemarkers/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/common/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/common/__pycache__/config.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/common/__pycache__/output.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/common/__pycache__/pr_config.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/common/__pycache__/themes.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/common/pr_config.py +27 -2
- package/pennyfarthing-dist/pf/complexity/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/complexity/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/complexity/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/consultation/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/consultation/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/deadcode/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/deadcode/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/deadcode/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/deadcode/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/dependencies/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/dependencies/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/dependencies/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/epic/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/epic/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/git_group/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/git_group/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/handoff/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/handoff/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/handoff/__pycache__/complete_phase.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/handoff/__pycache__/marker.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/handoff/__pycache__/phase_check.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/handoff/__pycache__/resolve_gate.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/healthscore/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/healthscore/__pycache__/__main__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/healthscore/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/healthscore/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/healthscore/__pycache__/formatters.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/healthscore/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/bell_mode.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/context_breaker.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/context_warning.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/cyclist_pretooluse.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/pre_edit_check.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/reflector_check.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/schema_validation.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/session_start.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/session_stop.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/sprint_yaml_validation.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/__pycache__/statusline.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hooks/cyclist-pretooluse-hook.sh +0 -0
- package/pennyfarthing-dist/pf/hotspots/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hotspots/__pycache__/analyze.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hotspots/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/hotspots/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/bidirectional.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/claim.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/client.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/create.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/epic.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/operations.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/reconcile.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/story.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/jira/__pycache__/sync.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/launch/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/launch/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/prime/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/prime/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/prime/__pycache__/loader.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/prime/__pycache__/models.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/prime/__pycache__/persona.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/prime/__pycache__/session.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/prime/__pycache__/tiers.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/prime/__pycache__/workflow.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/session/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/session/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/settings/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/settings/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/settings/__pycache__/settings.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/settings/settings.py +44 -8
- package/pennyfarthing-dist/pf/sprint/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/archive.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/archive_epic.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/epic_add.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/epic_update.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/loader.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/status.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/story_add.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/story_finish.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/story_update.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/validate_cmd.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/validator.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/work.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/__pycache__/yaml_io.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/sprint/story_finish.py +14 -2
- package/pennyfarthing-dist/pf/sprint/validator.py +7 -7
- package/pennyfarthing-dist/pf/tests/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/tests/__pycache__/conftest.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing-dist/pf/tests/__pycache__/test_sprint_validator.cpython-314-pytest-9.0.2.pyc +0 -0
- package/pennyfarthing-dist/pf/tests/test_sprint_validator.py +44 -0
- package/pennyfarthing-dist/pf/theme/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/theme/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/validate/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/validate/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/workflow/__pycache__/__init__.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/workflow/__pycache__/cli.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/workflow/__pycache__/helpers.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/workflow/__pycache__/scale.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/pf/workflow/__pycache__/state.cpython-314.pyc +0 -0
- package/pennyfarthing-dist/scripts/core/agent-session.sh +0 -0
- package/pennyfarthing-dist/scripts/core/check-context.sh +0 -0
- package/pennyfarthing-dist/scripts/core/dialogue-manager.sh +0 -0
- package/pennyfarthing-dist/scripts/core/pf.sh +0 -0
- package/pennyfarthing-dist/scripts/core/phase-check-start.sh +0 -0
- package/pennyfarthing-dist/scripts/core/prime.sh +0 -0
- package/pennyfarthing-dist/scripts/cyclist/is-cyclist.sh +0 -0
- package/pennyfarthing-dist/scripts/git/create-feature-branches.sh +0 -0
- package/pennyfarthing-dist/scripts/git/git-status-all.sh +0 -0
- package/pennyfarthing-dist/scripts/git/install-git-hooks.sh +0 -0
- package/pennyfarthing-dist/scripts/git/release.sh +0 -0
- package/pennyfarthing-dist/scripts/git/worktree-manager.sh +0 -0
- package/pennyfarthing-dist/scripts/health/drift-detection.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/bell-mode-hook.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/context-circuit-breaker.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/context-warning.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/cyclist-pretooluse-hook.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/dispatcher-template.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/otel-auto-config.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/post-merge.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/pre-commit.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/pre-edit-check.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/pre-push.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/question-reflector-check.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/question_reflector_check.py +0 -0
- package/pennyfarthing-dist/scripts/hooks/schema-validation.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/session-start.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/session-stop.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/sprint-yaml-validation.sh +0 -0
- package/pennyfarthing-dist/scripts/hooks/welcome-hook.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/create-jira-epic.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/create-jira-story.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/jira-claim-story.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/jira-reconcile.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/jira-sync-story.sh +0 -0
- package/pennyfarthing-dist/scripts/jira/sync-epic-jira.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/background-tasks.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/checkpoint.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/common.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/env.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/file-lock.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/find-root.sh +1 -1
- package/pennyfarthing-dist/scripts/lib/logging.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/retry.sh +0 -0
- package/pennyfarthing-dist/scripts/lib/run-pf.sh +0 -0
- package/pennyfarthing-dist/scripts/maintenance/migrate-theme-schema.mjs +0 -0
- package/pennyfarthing-dist/scripts/maintenance/sidecar-health.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/add-short-names.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/add_short_names.py +0 -0
- package/pennyfarthing-dist/scripts/misc/backlog.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/check-status.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/find-related-work.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/generate-skill-docs.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/log-skill-usage.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/migrate-bmad-workflow.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/migrate_bmad_workflow.py +0 -1
- package/pennyfarthing-dist/scripts/misc/repo-scan.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/repo-utils.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/run-ci.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/run-timestamp.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/session-cleanup.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/skill-usage-report.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/statusline.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/uninstall.sh +0 -0
- package/pennyfarthing-dist/scripts/misc/validate-subagent-frontmatter.sh +0 -0
- package/pennyfarthing-dist/scripts/portraits/generate-portraits.py +13 -13
- package/pennyfarthing-dist/scripts/portraits/generate-portraits.sh +0 -0
- package/pennyfarthing-dist/scripts/portraits/generate-tandem-portraits.sh +0 -0
- package/pennyfarthing-dist/scripts/story/create-story.sh +0 -0
- package/pennyfarthing-dist/scripts/story/size-story.sh +0 -0
- package/pennyfarthing-dist/scripts/story/story-template.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/check.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/dev-story-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/epics-and-stories-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/handoff-phase-update.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/implementation-readiness-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/migrate-bmad-workflow.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/prd-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/project-context-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-character-voice.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-drift-detection.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-post-merge-hook.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-session-checkpoint.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/test-solo-command.sh +0 -0
- package/pennyfarthing-dist/scripts/tests/ux-design-workflow-import.test.sh +0 -0
- package/pennyfarthing-dist/scripts/theme/list-themes.sh +0 -0
- package/pennyfarthing-dist/scripts/validation/validate-agent-schema.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/check.py +4 -6
- package/pennyfarthing-dist/scripts/workflow/check.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/complete-step.py +2 -2
- package/pennyfarthing-dist/scripts/workflow/finish-story.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/fix-session-phase.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/get-workflow-type.py +0 -0
- package/pennyfarthing-dist/scripts/workflow/get-workflow-type.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/list-workflows.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/phase-owner.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/resume-workflow.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/show-workflow.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/start-workflow.sh +0 -0
- package/pennyfarthing-dist/scripts/workflow/workflow-status.sh +0 -0
- package/pennyfarthing-dist/skills/pf-story/scripts/create-story.sh +0 -0
- package/pennyfarthing-dist/skills/pf-story/scripts/size-story.sh +0 -0
- package/pennyfarthing-dist/skills/pf-story/scripts/story-template.sh +0 -0
- package/pennyfarthing-dist/skills/skill-registry.yaml +19 -0
- package/pennyfarthing-dist/workflows/release/steps/step-10-publish.md +41 -9
- package/pennyfarthing-dist/workflows/tdd-tandem.yaml +15 -2
- package/packages/core/dist/workflow/__test_context_watch__/.session/.tandem-turn-counter +0 -1
- package/packages/core/dist/workflow/__test_context_watch__/.session/95-6-session.md +0 -3
- package/packages/core/dist/workflow/__test_context_watch__/.session/95-6-tandem-architect.md +0 -6
- package/packages/core/dist/workflow/__test_file_watch__/.session/95-4-tandem-architect.md +0 -6
- package/packages/core/dist/workflow/__test_file_watch__/workdir/trigger.ts +0 -1
- package/packages/core/dist/workflow/__test_tool_watch__/.session/95-5-tandem-architect.md +0 -6
- package/packages/core/dist/workflow/__test_tool_watch__/.session/95-5-tandem-toolcalls.jsonl +0 -1
- package/pennyfarthing-dist/pf/bikerack/changed_panel.py +0 -201
- package/scripts/README.md +0 -41
|
@@ -0,0 +1,379 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FileTree - Display modified files in a tree structure
|
|
3
|
+
*
|
|
4
|
+
* Story MSSCI-12710 - FileTree Component
|
|
5
|
+
*
|
|
6
|
+
* Features:
|
|
7
|
+
* - Display modified files with paths and status indicators
|
|
8
|
+
* - Group files by directory with collapsible sections
|
|
9
|
+
* - Click to open file in DiffViewer
|
|
10
|
+
* - Badge showing count of modified files
|
|
11
|
+
* - Real-time updates as files change
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
import React, { useState, useCallback, useMemo, useRef, useEffect, KeyboardEvent } from 'react';
|
|
15
|
+
import { Button } from '@/components/ui/button';
|
|
16
|
+
import { Badge } from '@/components/ui/badge';
|
|
17
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
|
|
18
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "@/components/ui/collapsible";
|
|
19
|
+
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// Types
|
|
22
|
+
// =============================================================================
|
|
23
|
+
|
|
24
|
+
export type FileStatus = 'created' | 'modified' | 'deleted';
|
|
25
|
+
|
|
26
|
+
export interface FileChange {
|
|
27
|
+
path: string;
|
|
28
|
+
status: FileStatus;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface FileTreeProps {
|
|
32
|
+
files: FileChange[];
|
|
33
|
+
onFileClick?: (file: FileChange) => void;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
// =============================================================================
|
|
37
|
+
// Utility Functions
|
|
38
|
+
// =============================================================================
|
|
39
|
+
|
|
40
|
+
function getDirectory(path: string): string {
|
|
41
|
+
const lastSlash = path.lastIndexOf('/');
|
|
42
|
+
if (lastSlash === -1) return 'root';
|
|
43
|
+
return path.substring(0, lastSlash);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function getFileName(path: string): string {
|
|
47
|
+
const lastSlash = path.lastIndexOf('/');
|
|
48
|
+
if (lastSlash === -1) return path;
|
|
49
|
+
return path.substring(lastSlash + 1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function groupFilesByDirectory(files: FileChange[]): Map<string, FileChange[]> {
|
|
53
|
+
const groups = new Map<string, FileChange[]>();
|
|
54
|
+
|
|
55
|
+
for (const file of files) {
|
|
56
|
+
const dir = getDirectory(file.path);
|
|
57
|
+
const existing = groups.get(dir) || [];
|
|
58
|
+
existing.push(file);
|
|
59
|
+
groups.set(dir, existing);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
return groups;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
function countByStatus(files: FileChange[]): { created: number; modified: number; deleted: number } {
|
|
66
|
+
return files.reduce(
|
|
67
|
+
(acc, file) => {
|
|
68
|
+
const status = file.status || 'modified';
|
|
69
|
+
acc[status] = (acc[status] || 0) + 1;
|
|
70
|
+
return acc;
|
|
71
|
+
},
|
|
72
|
+
{ created: 0, modified: 0, deleted: 0 }
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function formatStatusBreakdown(counts: { created: number; modified: number; deleted: number }): string {
|
|
77
|
+
const parts: string[] = [];
|
|
78
|
+
if (counts.created > 0) parts.push(`${counts.created} created`);
|
|
79
|
+
if (counts.modified > 0) parts.push(`${counts.modified} modified`);
|
|
80
|
+
if (counts.deleted > 0) parts.push(`${counts.deleted} deleted`);
|
|
81
|
+
return parts.join(', ');
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// =============================================================================
|
|
85
|
+
// Status Icon Component
|
|
86
|
+
// =============================================================================
|
|
87
|
+
|
|
88
|
+
interface StatusIconProps {
|
|
89
|
+
status: FileStatus | undefined;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function StatusIcon({ status }: StatusIconProps): React.ReactElement {
|
|
93
|
+
const safeStatus = status || 'modified';
|
|
94
|
+
|
|
95
|
+
return (
|
|
96
|
+
<span
|
|
97
|
+
data-testid={`status-${safeStatus}`}
|
|
98
|
+
className={`status-icon status-${safeStatus}`}
|
|
99
|
+
aria-hidden="true"
|
|
100
|
+
>
|
|
101
|
+
{safeStatus === 'created' && '+'}
|
|
102
|
+
{safeStatus === 'modified' && '~'}
|
|
103
|
+
{safeStatus === 'deleted' && '-'}
|
|
104
|
+
</span>
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// =============================================================================
|
|
109
|
+
// File Item Component
|
|
110
|
+
// =============================================================================
|
|
111
|
+
|
|
112
|
+
interface FileItemProps {
|
|
113
|
+
file: FileChange;
|
|
114
|
+
onFileClick?: (file: FileChange) => void;
|
|
115
|
+
isFocused: boolean;
|
|
116
|
+
onFocus: () => void;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function FileItem({ file, onFileClick, isFocused, onFocus }: FileItemProps): React.ReactElement {
|
|
120
|
+
const status = file.status || 'modified';
|
|
121
|
+
const fileName = getFileName(file.path);
|
|
122
|
+
const [hasFocus, setHasFocus] = useState(false);
|
|
123
|
+
|
|
124
|
+
const handleClick = useCallback(() => {
|
|
125
|
+
onFileClick?.(file);
|
|
126
|
+
}, [file, onFileClick]);
|
|
127
|
+
|
|
128
|
+
const handleKeyDown = useCallback(
|
|
129
|
+
(e: KeyboardEvent<HTMLDivElement>) => {
|
|
130
|
+
if (e.key === 'Enter' || e.key === ' ') {
|
|
131
|
+
e.preventDefault();
|
|
132
|
+
onFileClick?.(file);
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
[file, onFileClick]
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
const handleFocus = useCallback(() => {
|
|
139
|
+
setHasFocus(true);
|
|
140
|
+
onFocus();
|
|
141
|
+
}, [onFocus]);
|
|
142
|
+
|
|
143
|
+
const handleBlur = useCallback(() => {
|
|
144
|
+
setHasFocus(false);
|
|
145
|
+
}, []);
|
|
146
|
+
|
|
147
|
+
return (
|
|
148
|
+
<Tooltip>
|
|
149
|
+
<TooltipTrigger asChild>
|
|
150
|
+
<div
|
|
151
|
+
role="treeitem"
|
|
152
|
+
data-testid="file-item"
|
|
153
|
+
className={`file-item file-${status}${isFocused || hasFocus ? ' focused' : ''}`}
|
|
154
|
+
tabIndex={0}
|
|
155
|
+
aria-label={`${fileName}, ${status}`}
|
|
156
|
+
onClick={handleClick}
|
|
157
|
+
onKeyDown={handleKeyDown}
|
|
158
|
+
onFocus={handleFocus}
|
|
159
|
+
onBlur={handleBlur}
|
|
160
|
+
>
|
|
161
|
+
<StatusIcon status={file.status} />
|
|
162
|
+
<span className="file-name">{fileName}</span>
|
|
163
|
+
</div>
|
|
164
|
+
</TooltipTrigger>
|
|
165
|
+
<TooltipContent>{file.path}</TooltipContent>
|
|
166
|
+
</Tooltip>
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
// =============================================================================
|
|
171
|
+
// Directory Section Component
|
|
172
|
+
// =============================================================================
|
|
173
|
+
|
|
174
|
+
interface DirectorySectionProps {
|
|
175
|
+
directory: string;
|
|
176
|
+
files: FileChange[];
|
|
177
|
+
isExpanded: boolean;
|
|
178
|
+
onToggle: () => void;
|
|
179
|
+
onFileClick?: (file: FileChange) => void;
|
|
180
|
+
focusedPath: string | null;
|
|
181
|
+
onFileFocus: (path: string) => void;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function DirectorySection({
|
|
185
|
+
directory,
|
|
186
|
+
files,
|
|
187
|
+
isExpanded,
|
|
188
|
+
onToggle,
|
|
189
|
+
onFileClick,
|
|
190
|
+
focusedPath,
|
|
191
|
+
onFileFocus,
|
|
192
|
+
}: DirectorySectionProps): React.ReactElement {
|
|
193
|
+
return (
|
|
194
|
+
<Collapsible
|
|
195
|
+
open={isExpanded}
|
|
196
|
+
onOpenChange={() => onToggle()}
|
|
197
|
+
asChild
|
|
198
|
+
>
|
|
199
|
+
<div
|
|
200
|
+
role="group"
|
|
201
|
+
data-testid={`directory-${directory}`}
|
|
202
|
+
className="directory-section"
|
|
203
|
+
>
|
|
204
|
+
<CollapsibleTrigger asChild>
|
|
205
|
+
<div className="directory-header">
|
|
206
|
+
<span
|
|
207
|
+
className="directory-toggle"
|
|
208
|
+
aria-expanded={isExpanded}
|
|
209
|
+
aria-label={isExpanded ? 'Collapse' : 'Expand'}
|
|
210
|
+
>
|
|
211
|
+
<span className="toggle-icon">{isExpanded ? '▼' : '▶'}</span>
|
|
212
|
+
</span>
|
|
213
|
+
<span className="directory-name">{directory === 'root' ? '/' : directory}</span>
|
|
214
|
+
<span className="directory-count">{files.length}</span>
|
|
215
|
+
</div>
|
|
216
|
+
</CollapsibleTrigger>
|
|
217
|
+
<CollapsibleContent>
|
|
218
|
+
<div className="directory-files">
|
|
219
|
+
{files.map((file, index) => (
|
|
220
|
+
<FileItem
|
|
221
|
+
key={`${file.path}-${index}`}
|
|
222
|
+
file={file}
|
|
223
|
+
onFileClick={onFileClick}
|
|
224
|
+
isFocused={focusedPath === file.path}
|
|
225
|
+
onFocus={() => onFileFocus(file.path)}
|
|
226
|
+
/>
|
|
227
|
+
))}
|
|
228
|
+
</div>
|
|
229
|
+
</CollapsibleContent>
|
|
230
|
+
</div>
|
|
231
|
+
</Collapsible>
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
// =============================================================================
|
|
236
|
+
// FileTree Component
|
|
237
|
+
// =============================================================================
|
|
238
|
+
|
|
239
|
+
export function FileTree({ files, onFileClick }: FileTreeProps): React.ReactElement {
|
|
240
|
+
const [collapsedDirs, setCollapsedDirs] = useState<Set<string>>(new Set());
|
|
241
|
+
const [focusedPath, setFocusedPath] = useState<string | null>(null);
|
|
242
|
+
const previousFocusedRef = useRef<string | null>(null);
|
|
243
|
+
const treeRef = useRef<HTMLDivElement>(null);
|
|
244
|
+
|
|
245
|
+
// Group files by directory
|
|
246
|
+
const groupedFiles = useMemo(() => groupFilesByDirectory(files), [files]);
|
|
247
|
+
|
|
248
|
+
// Calculate status counts
|
|
249
|
+
const statusCounts = useMemo(() => countByStatus(files), [files]);
|
|
250
|
+
const statusTooltip = useMemo(() => formatStatusBreakdown(statusCounts), [statusCounts]);
|
|
251
|
+
|
|
252
|
+
// Get sorted directory names
|
|
253
|
+
const directories = useMemo(() => {
|
|
254
|
+
const dirs = Array.from(groupedFiles.keys()).sort();
|
|
255
|
+
// Move 'root' to the end for display
|
|
256
|
+
const rootIndex = dirs.indexOf('root');
|
|
257
|
+
if (rootIndex > -1) {
|
|
258
|
+
dirs.splice(rootIndex, 1);
|
|
259
|
+
dirs.push('root');
|
|
260
|
+
}
|
|
261
|
+
return dirs;
|
|
262
|
+
}, [groupedFiles]);
|
|
263
|
+
|
|
264
|
+
// Preserve focus when files update
|
|
265
|
+
useEffect(() => {
|
|
266
|
+
if (focusedPath) {
|
|
267
|
+
previousFocusedRef.current = focusedPath;
|
|
268
|
+
}
|
|
269
|
+
}, [focusedPath]);
|
|
270
|
+
|
|
271
|
+
useEffect(() => {
|
|
272
|
+
// If the previously focused file still exists, try to refocus it
|
|
273
|
+
if (previousFocusedRef.current) {
|
|
274
|
+
const stillExists = files.some((f) => f.path === previousFocusedRef.current);
|
|
275
|
+
if (stillExists) {
|
|
276
|
+
// The focus will be maintained by the DOM if the element still exists
|
|
277
|
+
setFocusedPath(previousFocusedRef.current);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}, [files]);
|
|
281
|
+
|
|
282
|
+
const handleToggle = useCallback((dir: string) => {
|
|
283
|
+
setCollapsedDirs((prev) => {
|
|
284
|
+
const next = new Set(prev);
|
|
285
|
+
if (next.has(dir)) {
|
|
286
|
+
next.delete(dir);
|
|
287
|
+
} else {
|
|
288
|
+
next.add(dir);
|
|
289
|
+
}
|
|
290
|
+
return next;
|
|
291
|
+
});
|
|
292
|
+
}, []);
|
|
293
|
+
|
|
294
|
+
const handleFileFocus = useCallback((path: string) => {
|
|
295
|
+
setFocusedPath(path);
|
|
296
|
+
}, []);
|
|
297
|
+
|
|
298
|
+
// Handle keyboard navigation
|
|
299
|
+
const handleKeyDown = useCallback((e: KeyboardEvent) => {
|
|
300
|
+
if (e.key !== 'ArrowDown' && e.key !== 'ArrowUp') return;
|
|
301
|
+
|
|
302
|
+
e.preventDefault();
|
|
303
|
+
|
|
304
|
+
// Get all visible tree items
|
|
305
|
+
const treeItems = treeRef.current?.querySelectorAll('[role="treeitem"]');
|
|
306
|
+
if (!treeItems || treeItems.length === 0) return;
|
|
307
|
+
|
|
308
|
+
const items = Array.from(treeItems) as HTMLElement[];
|
|
309
|
+
const currentIndex = items.findIndex(item => document.activeElement === item);
|
|
310
|
+
|
|
311
|
+
let nextIndex: number;
|
|
312
|
+
if (e.key === 'ArrowDown') {
|
|
313
|
+
nextIndex = currentIndex < items.length - 1 ? currentIndex + 1 : 0;
|
|
314
|
+
} else {
|
|
315
|
+
nextIndex = currentIndex > 0 ? currentIndex - 1 : items.length - 1;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
items[nextIndex]?.focus();
|
|
319
|
+
}, []);
|
|
320
|
+
|
|
321
|
+
// Empty state
|
|
322
|
+
if (files.length === 0) {
|
|
323
|
+
return (
|
|
324
|
+
<TooltipProvider delayDuration={300}>
|
|
325
|
+
<div role="tree" aria-label="Changed files" className="filetree">
|
|
326
|
+
<Badge
|
|
327
|
+
variant="secondary"
|
|
328
|
+
data-testid="file-count-badge"
|
|
329
|
+
className="file-count-badge"
|
|
330
|
+
aria-label="0 files changed"
|
|
331
|
+
>
|
|
332
|
+
0
|
|
333
|
+
</Badge>
|
|
334
|
+
<div className="empty-state">No files changed</div>
|
|
335
|
+
</div>
|
|
336
|
+
</TooltipProvider>
|
|
337
|
+
);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
return (
|
|
341
|
+
<TooltipProvider delayDuration={300}>
|
|
342
|
+
<div
|
|
343
|
+
ref={treeRef}
|
|
344
|
+
role="tree"
|
|
345
|
+
aria-label="Changed files"
|
|
346
|
+
className="filetree"
|
|
347
|
+
onKeyDown={handleKeyDown}
|
|
348
|
+
>
|
|
349
|
+
<Tooltip>
|
|
350
|
+
<TooltipTrigger asChild>
|
|
351
|
+
<Badge
|
|
352
|
+
variant="secondary"
|
|
353
|
+
data-testid="file-count-badge"
|
|
354
|
+
className="file-count-badge"
|
|
355
|
+
aria-label={`${files.length} files changed`}
|
|
356
|
+
>
|
|
357
|
+
{files.length}
|
|
358
|
+
</Badge>
|
|
359
|
+
</TooltipTrigger>
|
|
360
|
+
<TooltipContent>{statusTooltip}</TooltipContent>
|
|
361
|
+
</Tooltip>
|
|
362
|
+
{directories.map((dir) => (
|
|
363
|
+
<DirectorySection
|
|
364
|
+
key={dir}
|
|
365
|
+
directory={dir}
|
|
366
|
+
files={groupedFiles.get(dir) || []}
|
|
367
|
+
isExpanded={!collapsedDirs.has(dir)}
|
|
368
|
+
onToggle={() => handleToggle(dir)}
|
|
369
|
+
onFileClick={onFileClick}
|
|
370
|
+
focusedPath={focusedPath}
|
|
371
|
+
onFileFocus={handleFileFocus}
|
|
372
|
+
/>
|
|
373
|
+
))}
|
|
374
|
+
</div>
|
|
375
|
+
</TooltipProvider>
|
|
376
|
+
);
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
export default FileTree;
|
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FontPicker Component Styles
|
|
3
|
+
*
|
|
4
|
+
* Story MSSCI-12769 - Font Customization
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* =============================================================================
|
|
8
|
+
Font Picker Container
|
|
9
|
+
============================================================================= */
|
|
10
|
+
|
|
11
|
+
.font-picker {
|
|
12
|
+
position: relative;
|
|
13
|
+
display: flex;
|
|
14
|
+
flex-direction: column;
|
|
15
|
+
gap: 0.5rem;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* =============================================================================
|
|
19
|
+
Font Picker Button
|
|
20
|
+
============================================================================= */
|
|
21
|
+
|
|
22
|
+
.font-picker-button {
|
|
23
|
+
display: flex;
|
|
24
|
+
align-items: center;
|
|
25
|
+
justify-content: space-between;
|
|
26
|
+
gap: 0.5rem;
|
|
27
|
+
padding: 0.5rem 0.75rem;
|
|
28
|
+
background: var(--bg-tertiary, #0f0f1a);
|
|
29
|
+
border: 1px solid var(--border, #27272a);
|
|
30
|
+
border-radius: 0.375rem;
|
|
31
|
+
color: var(--text-primary, #e4e4e7);
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
min-width: 150px;
|
|
34
|
+
transition: border-color 0.15s ease, background-color 0.15s ease;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.font-picker-button:hover {
|
|
38
|
+
border-color: var(--border-focus);
|
|
39
|
+
background: var(--bg-secondary);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.font-picker-button:focus {
|
|
43
|
+
outline: none;
|
|
44
|
+
border-color: var(--accent);
|
|
45
|
+
box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 79, 70, 229), 0.2);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.font-picker-current {
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
gap: 0.5rem;
|
|
52
|
+
overflow: hidden;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.font-picker-name {
|
|
56
|
+
white-space: nowrap;
|
|
57
|
+
overflow: hidden;
|
|
58
|
+
text-overflow: ellipsis;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.font-picker-chevron {
|
|
62
|
+
font-size: 0.625rem;
|
|
63
|
+
color: var(--text-muted);
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* =============================================================================
|
|
68
|
+
Font Picker Menu
|
|
69
|
+
============================================================================= */
|
|
70
|
+
|
|
71
|
+
.font-picker-menu {
|
|
72
|
+
position: absolute;
|
|
73
|
+
top: 100%;
|
|
74
|
+
left: 0;
|
|
75
|
+
right: 0;
|
|
76
|
+
z-index: 50;
|
|
77
|
+
margin-top: 0.25rem;
|
|
78
|
+
padding: 0.25rem;
|
|
79
|
+
background: var(--bg-secondary, #16213e);
|
|
80
|
+
border: 1px solid var(--border, #27272a);
|
|
81
|
+
border-radius: 0.375rem;
|
|
82
|
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
|
|
83
|
+
display: none;
|
|
84
|
+
max-height: 320px;
|
|
85
|
+
overflow-y: auto;
|
|
86
|
+
min-width: 220px;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.font-picker-menu.open {
|
|
90
|
+
display: block;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* =============================================================================
|
|
94
|
+
Font Picker Options
|
|
95
|
+
============================================================================= */
|
|
96
|
+
|
|
97
|
+
.font-picker-option {
|
|
98
|
+
display: flex;
|
|
99
|
+
align-items: center;
|
|
100
|
+
justify-content: space-between;
|
|
101
|
+
width: 100%;
|
|
102
|
+
padding: 0.5rem 0.75rem;
|
|
103
|
+
background: var(--bg-secondary, #16213e);
|
|
104
|
+
border: none;
|
|
105
|
+
border-radius: 0.25rem;
|
|
106
|
+
color: var(--text-primary, #e4e4e7);
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
text-align: left;
|
|
109
|
+
transition: background-color 0.15s ease;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.font-picker-option:hover,
|
|
113
|
+
.font-picker-option.focused {
|
|
114
|
+
background: var(--bg-tertiary, #0f0f1a);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.font-picker-option.active {
|
|
118
|
+
background: var(--accent);
|
|
119
|
+
color: white;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.font-picker-option.active:hover {
|
|
123
|
+
background: var(--accent-hover);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.font-name {
|
|
127
|
+
flex: 1;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.font-preview {
|
|
131
|
+
font-size: 1rem;
|
|
132
|
+
color: var(--text-muted);
|
|
133
|
+
margin-left: 0.5rem;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.font-picker-option.active .font-preview {
|
|
137
|
+
color: rgba(255, 255, 255, 0.8);
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.font-check {
|
|
141
|
+
margin-left: 0.5rem;
|
|
142
|
+
font-size: 0.75rem;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* =============================================================================
|
|
146
|
+
Custom Font Input
|
|
147
|
+
============================================================================= */
|
|
148
|
+
|
|
149
|
+
.font-picker-custom-input {
|
|
150
|
+
margin-top: 0.25rem;
|
|
151
|
+
padding: 0.5rem 0.75rem;
|
|
152
|
+
background: var(--bg-tertiary);
|
|
153
|
+
border: 1px solid var(--border);
|
|
154
|
+
border-radius: 0.375rem;
|
|
155
|
+
color: var(--text-primary);
|
|
156
|
+
font-size: 0.875rem;
|
|
157
|
+
width: 100%;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.font-picker-custom-input:focus {
|
|
161
|
+
outline: none;
|
|
162
|
+
border-color: var(--accent);
|
|
163
|
+
box-shadow: 0 0 0 2px rgba(var(--accent-rgb, 79, 70, 229), 0.2);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.font-picker-custom-input::placeholder {
|
|
167
|
+
color: var(--text-muted);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* =============================================================================
|
|
171
|
+
Font Size Picker
|
|
172
|
+
============================================================================= */
|
|
173
|
+
|
|
174
|
+
.font-size-picker {
|
|
175
|
+
display: flex;
|
|
176
|
+
gap: 0;
|
|
177
|
+
border: 1px solid var(--border);
|
|
178
|
+
border-radius: 0.375rem;
|
|
179
|
+
overflow: hidden;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
.font-size-option {
|
|
183
|
+
padding: 0.375rem 0.625rem;
|
|
184
|
+
background: var(--bg-tertiary, #0f0f1a);
|
|
185
|
+
border: none;
|
|
186
|
+
border-right: 1px solid var(--border, #27272a);
|
|
187
|
+
color: var(--text-secondary, #a1a1aa);
|
|
188
|
+
font-size: 0.75rem;
|
|
189
|
+
font-weight: 500;
|
|
190
|
+
cursor: pointer;
|
|
191
|
+
transition: background-color 0.15s ease, color 0.15s ease;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.font-size-option:last-child {
|
|
195
|
+
border-right: none;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.font-size-option:hover {
|
|
199
|
+
background: var(--bg-secondary);
|
|
200
|
+
color: var(--text-primary);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.font-size-option.active {
|
|
204
|
+
background: var(--accent);
|
|
205
|
+
color: white;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.font-size-option:focus {
|
|
209
|
+
outline: none;
|
|
210
|
+
box-shadow: inset 0 0 0 2px rgba(var(--accent-rgb, 79, 70, 229), 0.4);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/* =============================================================================
|
|
214
|
+
Search Input
|
|
215
|
+
============================================================================= */
|
|
216
|
+
|
|
217
|
+
.font-picker-search {
|
|
218
|
+
padding: 0.25rem;
|
|
219
|
+
border-bottom: 1px solid var(--border, #27272a);
|
|
220
|
+
position: sticky;
|
|
221
|
+
top: 0;
|
|
222
|
+
background: var(--bg-secondary, #16213e);
|
|
223
|
+
z-index: 1;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
.font-picker-search-input {
|
|
227
|
+
width: 100%;
|
|
228
|
+
padding: 0.375rem 0.5rem;
|
|
229
|
+
background: var(--bg-tertiary, #0f0f1a);
|
|
230
|
+
border: 1px solid var(--border, #27272a);
|
|
231
|
+
border-radius: 0.25rem;
|
|
232
|
+
color: var(--text-primary, #e4e4e7);
|
|
233
|
+
font-size: 0.8125rem;
|
|
234
|
+
box-sizing: border-box;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.font-picker-search-input:focus {
|
|
238
|
+
outline: none;
|
|
239
|
+
border-color: var(--accent);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.font-picker-search-input::placeholder {
|
|
243
|
+
color: var(--text-muted, #71717a);
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
/* =============================================================================
|
|
247
|
+
Group Headers
|
|
248
|
+
============================================================================= */
|
|
249
|
+
|
|
250
|
+
.font-picker-group-header {
|
|
251
|
+
padding: 0.375rem 0.75rem 0.25rem;
|
|
252
|
+
font-size: 0.625rem;
|
|
253
|
+
font-weight: 600;
|
|
254
|
+
text-transform: uppercase;
|
|
255
|
+
letter-spacing: 0.05em;
|
|
256
|
+
color: var(--text-muted, #71717a);
|
|
257
|
+
user-select: none;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.font-picker-group-header:not(:first-child) {
|
|
261
|
+
margin-top: 0.25rem;
|
|
262
|
+
border-top: 1px solid var(--border, #27272a);
|
|
263
|
+
padding-top: 0.5rem;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/* =============================================================================
|
|
267
|
+
Empty State
|
|
268
|
+
============================================================================= */
|
|
269
|
+
|
|
270
|
+
.font-picker-empty {
|
|
271
|
+
padding: 0.75rem;
|
|
272
|
+
text-align: center;
|
|
273
|
+
color: var(--text-muted, #71717a);
|
|
274
|
+
font-size: 0.8125rem;
|
|
275
|
+
font-style: italic;
|
|
276
|
+
}
|