@pennyfarthing/core 11.3.8 → 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 +4 -1
- 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/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/lib/find-root.sh +1 -1
- package/pennyfarthing-dist/scripts/misc/migrate_bmad_workflow.py +0 -1
- package/pennyfarthing-dist/scripts/portraits/generate-portraits.py +13 -13
- package/pennyfarthing-dist/scripts/workflow/check.py +4 -6
- package/pennyfarthing-dist/scripts/workflow/complete-step.py +2 -2
- package/pennyfarthing-dist/skills/skill-registry.yaml +19 -0
- 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
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StatsStrip Component
|
|
3
|
+
*
|
|
4
|
+
* Displays context percentage, model badge, PWD, and identity info.
|
|
5
|
+
* Story MSSCI-12699 - StatsStrip Component
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - Context percentage with color thresholds (safe < 70%, warning 70-85%, danger >= 85%)
|
|
9
|
+
* - Model badge showing current model name
|
|
10
|
+
* - PWD showing current working directory (folder name)
|
|
11
|
+
* - Identity section showing Jira email and GitHub username
|
|
12
|
+
* - Real-time updates via IPC subscriptions
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import React from 'react';
|
|
16
|
+
import { Badge } from '@/components/ui/badge';
|
|
17
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
|
|
18
|
+
import { useStatsStrip } from '../hooks/useStatsStrip';
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Extract short model name from full model ID
|
|
22
|
+
* e.g., 'claude-opus-4-5-20251101' -> 'opus'
|
|
23
|
+
* 'claude-3-5-sonnet-20241022' -> 'sonnet'
|
|
24
|
+
*/
|
|
25
|
+
function formatModelName(model: string | null): string {
|
|
26
|
+
if (!model) return '\u2014'; // em dash placeholder
|
|
27
|
+
|
|
28
|
+
// Extract model family name
|
|
29
|
+
const lowerModel = model.toLowerCase();
|
|
30
|
+
if (lowerModel.includes('opus')) return 'opus';
|
|
31
|
+
if (lowerModel.includes('sonnet')) return 'sonnet';
|
|
32
|
+
if (lowerModel.includes('haiku')) return 'haiku';
|
|
33
|
+
|
|
34
|
+
// Fallback: return last segment before date
|
|
35
|
+
const parts = model.split('-');
|
|
36
|
+
if (parts.length >= 2) {
|
|
37
|
+
// Find the part that's not a date (YYYYMMDD)
|
|
38
|
+
for (let i = parts.length - 2; i >= 0; i--) {
|
|
39
|
+
if (!/^\d{8}$/.test(parts[i])) {
|
|
40
|
+
return parts[i];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return model;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Determine context level class based on percentage
|
|
50
|
+
*/
|
|
51
|
+
function getContextLevel(percent: number): string {
|
|
52
|
+
if (percent >= 85) return 'level-danger';
|
|
53
|
+
if (percent >= 70) return 'level-warning';
|
|
54
|
+
return 'level-safe';
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Extract folder name from full path
|
|
59
|
+
*/
|
|
60
|
+
function getFolderName(pwd: string): string {
|
|
61
|
+
if (!pwd) return '';
|
|
62
|
+
const parts = pwd.split('/');
|
|
63
|
+
return parts[parts.length - 1] || parts[parts.length - 2] || pwd;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export default function StatsStrip(): React.ReactElement {
|
|
67
|
+
const { context, stats, projectInfo } = useStatsStrip();
|
|
68
|
+
|
|
69
|
+
const percent = context?.percent ?? 0;
|
|
70
|
+
const model = stats?.model ?? null;
|
|
71
|
+
const pwd = projectInfo?.pwd ?? '';
|
|
72
|
+
const jiraEmail = projectInfo?.jiraEmail ?? null;
|
|
73
|
+
const githubUsername = projectInfo?.githubUsername ?? null;
|
|
74
|
+
|
|
75
|
+
const contextLevel = getContextLevel(percent);
|
|
76
|
+
const folderName = getFolderName(pwd);
|
|
77
|
+
|
|
78
|
+
return (
|
|
79
|
+
<TooltipProvider delayDuration={300}>
|
|
80
|
+
<div className="stats-strip" data-testid="stats-strip">
|
|
81
|
+
{/* Left side: identity info */}
|
|
82
|
+
<div className="stats-left" data-testid="stats-left">
|
|
83
|
+
{/* PWD */}
|
|
84
|
+
<Tooltip>
|
|
85
|
+
<TooltipTrigger asChild>
|
|
86
|
+
<span
|
|
87
|
+
className="stats-pwd"
|
|
88
|
+
data-testid="stats-pwd"
|
|
89
|
+
data-full-path={pwd}
|
|
90
|
+
>
|
|
91
|
+
{folderName}
|
|
92
|
+
</span>
|
|
93
|
+
</TooltipTrigger>
|
|
94
|
+
<TooltipContent>{pwd}</TooltipContent>
|
|
95
|
+
</Tooltip>
|
|
96
|
+
|
|
97
|
+
{/* Jira email - only show if configured */}
|
|
98
|
+
{jiraEmail && (
|
|
99
|
+
<Tooltip>
|
|
100
|
+
<TooltipTrigger asChild>
|
|
101
|
+
<span
|
|
102
|
+
className="stats-jira-email"
|
|
103
|
+
data-testid="jira-email"
|
|
104
|
+
>
|
|
105
|
+
{jiraEmail}
|
|
106
|
+
</span>
|
|
107
|
+
</TooltipTrigger>
|
|
108
|
+
<TooltipContent>{`Jira: ${jiraEmail}`}</TooltipContent>
|
|
109
|
+
</Tooltip>
|
|
110
|
+
)}
|
|
111
|
+
|
|
112
|
+
{/* GitHub user - only show if configured */}
|
|
113
|
+
{githubUsername && (
|
|
114
|
+
<Tooltip>
|
|
115
|
+
<TooltipTrigger asChild>
|
|
116
|
+
<span
|
|
117
|
+
className="stats-github-user"
|
|
118
|
+
data-testid="github-user"
|
|
119
|
+
>
|
|
120
|
+
@{githubUsername}
|
|
121
|
+
</span>
|
|
122
|
+
</TooltipTrigger>
|
|
123
|
+
<TooltipContent>{`GitHub: ${githubUsername}`}</TooltipContent>
|
|
124
|
+
</Tooltip>
|
|
125
|
+
)}
|
|
126
|
+
</div>
|
|
127
|
+
|
|
128
|
+
{/* Right side: metrics */}
|
|
129
|
+
<div className="stats-right" data-testid="stats-right">
|
|
130
|
+
{/* Model badge */}
|
|
131
|
+
<Tooltip>
|
|
132
|
+
<TooltipTrigger asChild>
|
|
133
|
+
<Badge
|
|
134
|
+
variant="secondary"
|
|
135
|
+
className="stats-model-badge"
|
|
136
|
+
data-testid="model-badge"
|
|
137
|
+
>
|
|
138
|
+
{formatModelName(model)}
|
|
139
|
+
</Badge>
|
|
140
|
+
</TooltipTrigger>
|
|
141
|
+
{model && <TooltipContent>{model}</TooltipContent>}
|
|
142
|
+
</Tooltip>
|
|
143
|
+
|
|
144
|
+
{/* Context meter */}
|
|
145
|
+
<div
|
|
146
|
+
className={`stats-context-meter ${contextLevel}`}
|
|
147
|
+
data-testid="context-meter"
|
|
148
|
+
>
|
|
149
|
+
<span className="context-percent" data-testid="context-percent">
|
|
150
|
+
{percent}%
|
|
151
|
+
</span>
|
|
152
|
+
<div
|
|
153
|
+
className="context-fill"
|
|
154
|
+
data-testid="context-fill"
|
|
155
|
+
style={{ width: `${percent}%` }}
|
|
156
|
+
/>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
</div>
|
|
160
|
+
</TooltipProvider>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StreamingContent Component
|
|
3
|
+
*
|
|
4
|
+
* Displays progressively streaming text with cursor indicator.
|
|
5
|
+
* Story MSSCI-12698 - MessageView Component with Streaming
|
|
6
|
+
* Story MSSCI-12771 - Accessibility Compliance (screen reader announcements)
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
10
|
+
import { parseMarkdown } from '../utils/markdown';
|
|
11
|
+
|
|
12
|
+
interface StreamingContentProps {
|
|
13
|
+
content: string;
|
|
14
|
+
isStreaming: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export default function StreamingContent({ content, isStreaming }: StreamingContentProps): React.ReactElement {
|
|
18
|
+
const html = parseMarkdown(content);
|
|
19
|
+
const [statusMessage, setStatusMessage] = useState<string>('');
|
|
20
|
+
const lastAnnouncedLength = useRef(0);
|
|
21
|
+
const announceThrottleRef = useRef<NodeJS.Timeout | null>(null);
|
|
22
|
+
|
|
23
|
+
// Announce streaming state changes
|
|
24
|
+
useEffect(() => {
|
|
25
|
+
if (isStreaming) {
|
|
26
|
+
setStatusMessage('Claude is thinking...');
|
|
27
|
+
} else if (content && lastAnnouncedLength.current > 0) {
|
|
28
|
+
setStatusMessage('Response complete');
|
|
29
|
+
}
|
|
30
|
+
}, [isStreaming, content]);
|
|
31
|
+
|
|
32
|
+
// Throttled content announcements during streaming
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (!isStreaming) {
|
|
35
|
+
lastAnnouncedLength.current = content.length;
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Clear any pending announcement
|
|
40
|
+
if (announceThrottleRef.current) {
|
|
41
|
+
clearTimeout(announceThrottleRef.current);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// Throttle announcements to every 2 seconds to avoid screen reader overload
|
|
45
|
+
announceThrottleRef.current = setTimeout(() => {
|
|
46
|
+
if (content.length > lastAnnouncedLength.current) {
|
|
47
|
+
lastAnnouncedLength.current = content.length;
|
|
48
|
+
}
|
|
49
|
+
}, 2000);
|
|
50
|
+
|
|
51
|
+
return () => {
|
|
52
|
+
if (announceThrottleRef.current) {
|
|
53
|
+
clearTimeout(announceThrottleRef.current);
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
}, [content, isStreaming]);
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<>
|
|
60
|
+
{/* Status region for streaming state changes */}
|
|
61
|
+
<div role="status" aria-live="polite" className="visually-hidden">
|
|
62
|
+
{statusMessage}
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
{/* Main streaming content */}
|
|
66
|
+
<div
|
|
67
|
+
data-testid="streaming-content"
|
|
68
|
+
className="streaming-content"
|
|
69
|
+
aria-busy={isStreaming}
|
|
70
|
+
aria-atomic="false"
|
|
71
|
+
aria-live="polite"
|
|
72
|
+
>
|
|
73
|
+
<div dangerouslySetInnerHTML={{ __html: html }} />
|
|
74
|
+
</div>
|
|
75
|
+
</>
|
|
76
|
+
);
|
|
77
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SubagentSpan Component
|
|
3
|
+
*
|
|
4
|
+
* Collapsible container for subagent message groups.
|
|
5
|
+
* Story MSSCI-12698 - MessageView Component with Streaming
|
|
6
|
+
* Story MSSCI-12776 - Theme-Aware Subagent Display Messages
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import React, { useState, useMemo } from 'react';
|
|
10
|
+
import { Badge } from '@/components/ui/badge';
|
|
11
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from '@/components/ui/tooltip';
|
|
12
|
+
import Message from './Message';
|
|
13
|
+
import ToolCallBlock from './ToolCallBlock';
|
|
14
|
+
import { useSubagentHelper } from '../hooks/useSubagentHelper';
|
|
15
|
+
import { generateFriendlyMessage } from '../utils/subagent-display';
|
|
16
|
+
import type { SubagentMessage } from '../types/message';
|
|
17
|
+
|
|
18
|
+
interface SubagentSpanProps {
|
|
19
|
+
type: string;
|
|
20
|
+
name: string;
|
|
21
|
+
messages: SubagentMessage[];
|
|
22
|
+
defaultCollapsed?: boolean;
|
|
23
|
+
onCollapseChange?: (collapsed: boolean) => void;
|
|
24
|
+
// MSSCI-12776: Theme-aware helper display (optional - can be overridden by props for testing)
|
|
25
|
+
helperName?: string | null;
|
|
26
|
+
helperStyle?: string | null;
|
|
27
|
+
friendlyMessage?: string | null;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export default function SubagentSpan({
|
|
31
|
+
type,
|
|
32
|
+
name,
|
|
33
|
+
messages,
|
|
34
|
+
defaultCollapsed = true,
|
|
35
|
+
onCollapseChange,
|
|
36
|
+
helperName: propHelperName,
|
|
37
|
+
helperStyle: propHelperStyle,
|
|
38
|
+
friendlyMessage: propFriendlyMessage,
|
|
39
|
+
}: SubagentSpanProps): React.ReactElement {
|
|
40
|
+
const [isCollapsed, setIsCollapsed] = useState(defaultCollapsed);
|
|
41
|
+
|
|
42
|
+
// MSSCI-12776: Fetch themed helper from current persona (AC2)
|
|
43
|
+
const { helper } = useSubagentHelper();
|
|
44
|
+
|
|
45
|
+
// Generate friendly message from subagent context (AC3)
|
|
46
|
+
const generatedFriendlyMessage = useMemo(() => {
|
|
47
|
+
return generateFriendlyMessage({ subagent_type: type, description: name }, { plural: helper?.plural });
|
|
48
|
+
}, [type, name, helper?.plural]);
|
|
49
|
+
|
|
50
|
+
// Use truthy props if provided (for testing), otherwise use hook/generated values (AC4, AC5)
|
|
51
|
+
// Treating null same as undefined - both mean "use fallback"
|
|
52
|
+
const helperName = propHelperName ?? helper?.name;
|
|
53
|
+
const helperStyle = propHelperStyle ?? helper?.style;
|
|
54
|
+
const friendlyMessage = propFriendlyMessage ?? generatedFriendlyMessage;
|
|
55
|
+
|
|
56
|
+
// Determine display values with fallbacks (AC5)
|
|
57
|
+
const displayName = helperName || type;
|
|
58
|
+
const displayMessage = friendlyMessage || name;
|
|
59
|
+
|
|
60
|
+
// Count non-result messages for the collapsed summary
|
|
61
|
+
const messageCount = messages.filter(m => m.type !== 'tool_result').length;
|
|
62
|
+
|
|
63
|
+
// Group tool_use and tool_result by tool_id
|
|
64
|
+
const toolResults = new Map<string, SubagentMessage>();
|
|
65
|
+
messages.forEach(msg => {
|
|
66
|
+
if (msg.type === 'tool_result' && msg.tool_id) {
|
|
67
|
+
toolResults.set(msg.tool_id, msg);
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
const renderMessage = (msg: SubagentMessage, index: number) => {
|
|
72
|
+
if (msg.type === 'tool_use' && msg.tool_name && msg.tool_id) {
|
|
73
|
+
const result = toolResults.get(msg.tool_id);
|
|
74
|
+
return (
|
|
75
|
+
<div key={`tool-wrapper-${msg.tool_id}`} data-testid="message-tool_use" className="message message-tool_use">
|
|
76
|
+
<ToolCallBlock
|
|
77
|
+
toolUse={{
|
|
78
|
+
type: 'tool_use',
|
|
79
|
+
tool_name: msg.tool_name,
|
|
80
|
+
tool_id: msg.tool_id,
|
|
81
|
+
input: msg.input || {},
|
|
82
|
+
timestamp: msg.timestamp,
|
|
83
|
+
}}
|
|
84
|
+
result={result ? {
|
|
85
|
+
type: 'tool_result',
|
|
86
|
+
tool_id: result.tool_id!,
|
|
87
|
+
content: result.content || '',
|
|
88
|
+
timestamp: result.timestamp,
|
|
89
|
+
} : undefined}
|
|
90
|
+
/>
|
|
91
|
+
</div>
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
if (msg.type === 'tool_result') {
|
|
96
|
+
// Skip tool_result - it's rendered with tool_use
|
|
97
|
+
return null;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
// Subagent prompts (user messages within subagent) — truncated single line
|
|
101
|
+
if (msg.type === 'user') {
|
|
102
|
+
const truncated = (msg.content || '').slice(0, 120).replace(/\n/g, ' ');
|
|
103
|
+
return (
|
|
104
|
+
<div
|
|
105
|
+
key={`subagent-prompt-${index}`}
|
|
106
|
+
data-testid="subagent-prompt"
|
|
107
|
+
className="message message-subagent-prompt"
|
|
108
|
+
>
|
|
109
|
+
<div className="message-content">{truncated}{(msg.content || '').length > 120 ? '...' : ''}</div>
|
|
110
|
+
</div>
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
return (
|
|
115
|
+
<Message
|
|
116
|
+
key={`msg-${index}`}
|
|
117
|
+
message={{
|
|
118
|
+
type: msg.type,
|
|
119
|
+
content: msg.content,
|
|
120
|
+
timestamp: msg.timestamp,
|
|
121
|
+
}}
|
|
122
|
+
/>
|
|
123
|
+
);
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<div
|
|
128
|
+
data-testid="subagent-span"
|
|
129
|
+
data-collapsible="true"
|
|
130
|
+
className={`subagent-span subagent-${type} ${isCollapsed ? 'collapsed' : ''}`}
|
|
131
|
+
>
|
|
132
|
+
<div
|
|
133
|
+
data-testid="subagent-span-header"
|
|
134
|
+
className="subagent-header"
|
|
135
|
+
onClick={() => {
|
|
136
|
+
const next = !isCollapsed;
|
|
137
|
+
setIsCollapsed(next);
|
|
138
|
+
onCollapseChange?.(next);
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
<span className="subagent-toggle">{isCollapsed ? '▶' : '▼'}</span>
|
|
142
|
+
|
|
143
|
+
{/* Helper name or fallback to type (AC4, AC5) */}
|
|
144
|
+
<TooltipProvider delayDuration={300}>
|
|
145
|
+
{helperStyle ? (
|
|
146
|
+
<Tooltip>
|
|
147
|
+
<TooltipTrigger asChild>
|
|
148
|
+
<span className="subagent-helper-name">
|
|
149
|
+
{displayName}
|
|
150
|
+
</span>
|
|
151
|
+
</TooltipTrigger>
|
|
152
|
+
<TooltipContent>{helperStyle}</TooltipContent>
|
|
153
|
+
</Tooltip>
|
|
154
|
+
) : (
|
|
155
|
+
<span className="subagent-helper-name">
|
|
156
|
+
{displayName}
|
|
157
|
+
</span>
|
|
158
|
+
)}
|
|
159
|
+
</TooltipProvider>
|
|
160
|
+
|
|
161
|
+
{/* Friendly message or fallback to name (AC4, AC5) */}
|
|
162
|
+
<span className="subagent-friendly-message">
|
|
163
|
+
{displayMessage}
|
|
164
|
+
</span>
|
|
165
|
+
|
|
166
|
+
{/* Type badge for debugging context (AC4) */}
|
|
167
|
+
<Badge variant="outline" data-testid="subagent-type-badge" className="subagent-type-badge">
|
|
168
|
+
{type}
|
|
169
|
+
</Badge>
|
|
170
|
+
|
|
171
|
+
<span className="subagent-count">{messageCount}</span>
|
|
172
|
+
</div>
|
|
173
|
+
{!isCollapsed && (
|
|
174
|
+
<div className="subagent-content">
|
|
175
|
+
{messages.map((msg, index) => renderMessage(msg, index))}
|
|
176
|
+
</div>
|
|
177
|
+
)}
|
|
178
|
+
</div>
|
|
179
|
+
);
|
|
180
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TandemPortrait Component
|
|
3
|
+
*
|
|
4
|
+
* Renders backseat agent portrait below primary in PersonaHeader.
|
|
5
|
+
* Story: MSSCI-14674 (96-1) - TandemPortrait Component
|
|
6
|
+
* Epic: MSSCI-14673 (Cyclist Tandem UI)
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import React, { useState } from 'react';
|
|
10
|
+
|
|
11
|
+
export interface TandemPortraitProps {
|
|
12
|
+
character: string;
|
|
13
|
+
role: string;
|
|
14
|
+
slug: string;
|
|
15
|
+
theme: string;
|
|
16
|
+
isActive: boolean;
|
|
17
|
+
isThinking: boolean;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const AGENT_ABBREV: Record<string, string> = {
|
|
21
|
+
pm: 'PM',
|
|
22
|
+
sm: 'SM',
|
|
23
|
+
dev: 'DEV',
|
|
24
|
+
tea: 'TEA',
|
|
25
|
+
reviewer: 'REV',
|
|
26
|
+
architect: 'ARC',
|
|
27
|
+
devops: 'OPS',
|
|
28
|
+
'ux-designer': 'UX',
|
|
29
|
+
'tech-writer': 'TW',
|
|
30
|
+
orchestrator: 'ORC',
|
|
31
|
+
ba: 'BA',
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export default function TandemPortrait({
|
|
35
|
+
character,
|
|
36
|
+
role,
|
|
37
|
+
slug,
|
|
38
|
+
theme,
|
|
39
|
+
isActive,
|
|
40
|
+
isThinking,
|
|
41
|
+
}: TandemPortraitProps): React.ReactElement | null {
|
|
42
|
+
const [portraitError, setPortraitError] = useState(false);
|
|
43
|
+
|
|
44
|
+
if (!isActive) return null;
|
|
45
|
+
|
|
46
|
+
const abbrev = AGENT_ABBREV[role] || role.toUpperCase();
|
|
47
|
+
|
|
48
|
+
return (
|
|
49
|
+
<div
|
|
50
|
+
className={`persona-tandem-portrait${isThinking ? ' avatar-tandem-thinking' : ''}`}
|
|
51
|
+
data-testid="tandem-portrait"
|
|
52
|
+
role="img"
|
|
53
|
+
aria-label={`${character} (${role}) - observing`}
|
|
54
|
+
tabIndex={-1}
|
|
55
|
+
>
|
|
56
|
+
{!portraitError ? (
|
|
57
|
+
<img
|
|
58
|
+
src={`/portraits/${theme}/medium/${slug}.png`}
|
|
59
|
+
alt=""
|
|
60
|
+
aria-hidden="true"
|
|
61
|
+
className="tandem-portrait-image"
|
|
62
|
+
onError={() => setPortraitError(true)}
|
|
63
|
+
/>
|
|
64
|
+
) : (
|
|
65
|
+
<span className="tandem-portrait-fallback" aria-hidden="true">🤖</span>
|
|
66
|
+
)}
|
|
67
|
+
<span className="tandem-role-badge" data-testid="tandem-role-badge" aria-hidden="true">
|
|
68
|
+
{abbrev}
|
|
69
|
+
</span>
|
|
70
|
+
</div>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ThemePalette Component Styles
|
|
3
|
+
* Story MSSCI-12768 - Color Palette System
|
|
4
|
+
*
|
|
5
|
+
* The React component uses shadcn Popover + Command primitives for the
|
|
6
|
+
* dropdown, search, keyboard nav, and click-outside handling.
|
|
7
|
+
* These styles cover the trigger button, swatch rendering, and the
|
|
8
|
+
* vanilla JS renderThemePalette() fallback which still uses custom DOM.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
/* ==========================================================================
|
|
12
|
+
Trigger button (shared between React + vanilla)
|
|
13
|
+
========================================================================== */
|
|
14
|
+
|
|
15
|
+
.theme-palette-button {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: center;
|
|
18
|
+
gap: 8px;
|
|
19
|
+
padding: 6px 12px;
|
|
20
|
+
background: var(--bg-secondary);
|
|
21
|
+
border: 1px solid var(--border);
|
|
22
|
+
border-radius: 4px;
|
|
23
|
+
color: var(--text-primary);
|
|
24
|
+
font-size: 13px;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
transition: border-color 0.15s ease, background-color 0.15s ease;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.theme-palette-button:hover {
|
|
30
|
+
border-color: var(--border-focus);
|
|
31
|
+
background: var(--bg-tertiary);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.theme-palette-button:focus {
|
|
35
|
+
outline: none;
|
|
36
|
+
border-color: var(--accent);
|
|
37
|
+
box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.theme-palette-current {
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
gap: 6px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.theme-palette-name {
|
|
47
|
+
font-weight: 500;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.theme-palette-chevron {
|
|
51
|
+
width: 14px;
|
|
52
|
+
height: 14px;
|
|
53
|
+
opacity: 0.6;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* ==========================================================================
|
|
57
|
+
Popover content (React component)
|
|
58
|
+
========================================================================== */
|
|
59
|
+
|
|
60
|
+
.theme-palette-popover {
|
|
61
|
+
width: 260px;
|
|
62
|
+
background: var(--bg-secondary);
|
|
63
|
+
border: 1px solid var(--border);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* ==========================================================================
|
|
67
|
+
Swatches (shared between React + vanilla)
|
|
68
|
+
========================================================================== */
|
|
69
|
+
|
|
70
|
+
.preset-swatches {
|
|
71
|
+
display: flex;
|
|
72
|
+
gap: 2px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.preset-swatch {
|
|
76
|
+
width: 14px;
|
|
77
|
+
height: 14px;
|
|
78
|
+
border-radius: 3px;
|
|
79
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
80
|
+
flex-shrink: 0;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.preset-name {
|
|
84
|
+
flex: 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.preset-check-icon {
|
|
88
|
+
width: 16px;
|
|
89
|
+
height: 16px;
|
|
90
|
+
flex-shrink: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* ==========================================================================
|
|
94
|
+
Vanilla JS fallback (renderThemePalette)
|
|
95
|
+
These styles are only used by the imperative DOM-based renderer.
|
|
96
|
+
========================================================================== */
|
|
97
|
+
|
|
98
|
+
.theme-palette {
|
|
99
|
+
position: relative;
|
|
100
|
+
display: inline-block;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
.theme-palette-menu {
|
|
104
|
+
position: absolute;
|
|
105
|
+
top: 100%;
|
|
106
|
+
left: 0;
|
|
107
|
+
z-index: 100;
|
|
108
|
+
min-width: 220px;
|
|
109
|
+
max-height: 360px;
|
|
110
|
+
overflow-y: auto;
|
|
111
|
+
margin-top: 4px;
|
|
112
|
+
padding: 4px;
|
|
113
|
+
background: var(--bg-secondary);
|
|
114
|
+
border: 1px solid var(--border);
|
|
115
|
+
border-radius: 6px;
|
|
116
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
117
|
+
opacity: 0;
|
|
118
|
+
visibility: hidden;
|
|
119
|
+
transform: translateY(-8px);
|
|
120
|
+
transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
.theme-palette-menu.open {
|
|
124
|
+
opacity: 1;
|
|
125
|
+
visibility: visible;
|
|
126
|
+
transform: translateY(0);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.theme-palette-option {
|
|
130
|
+
display: flex;
|
|
131
|
+
align-items: center;
|
|
132
|
+
gap: 10px;
|
|
133
|
+
width: 100%;
|
|
134
|
+
padding: 8px 10px;
|
|
135
|
+
background: transparent;
|
|
136
|
+
border: none;
|
|
137
|
+
border-radius: 4px;
|
|
138
|
+
color: var(--text-primary);
|
|
139
|
+
font-size: 13px;
|
|
140
|
+
text-align: left;
|
|
141
|
+
cursor: pointer;
|
|
142
|
+
transition: background-color 0.1s ease;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.theme-palette-option:hover,
|
|
146
|
+
.theme-palette-option.focused {
|
|
147
|
+
background: var(--bg-tertiary);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
.theme-palette-option.active {
|
|
151
|
+
background: rgba(79, 70, 229, 0.15);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.theme-palette-option:focus {
|
|
155
|
+
outline: none;
|
|
156
|
+
background: var(--bg-tertiary);
|
|
157
|
+
box-shadow: inset 0 0 0 1px var(--accent);
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.preset-check {
|
|
161
|
+
color: var(--accent);
|
|
162
|
+
font-size: 12px;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.preset-group-header {
|
|
166
|
+
padding: 6px 10px 4px;
|
|
167
|
+
font-size: 10px;
|
|
168
|
+
font-weight: 600;
|
|
169
|
+
text-transform: uppercase;
|
|
170
|
+
letter-spacing: 0.05em;
|
|
171
|
+
color: var(--text-muted);
|
|
172
|
+
user-select: none;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.preset-group-header:not(:first-child) {
|
|
176
|
+
margin-top: 4px;
|
|
177
|
+
border-top: 1px solid var(--border);
|
|
178
|
+
padding-top: 8px;
|
|
179
|
+
}
|