@colmbus72/yeehaw 0.3.0 → 0.4.1
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/claude-plugin/.claude-plugin/plugin.json +7 -0
- package/claude-plugin/skills/yeehaw-project-setup/SKILL.md +129 -0
- package/claude-plugin/skills/yeehaw-project-setup/references/color-discovery.md +170 -0
- package/claude-plugin/skills/yeehaw-project-setup/references/wiki-templates.md +266 -0
- package/dist/app.js +54 -11
- package/dist/components/Header.d.ts +4 -1
- package/dist/components/Header.js +48 -23
- package/dist/components/LivestockHeader.js +6 -6
- package/dist/components/SplashScreen.d.ts +5 -0
- package/dist/components/SplashScreen.js +178 -0
- package/dist/index.js +2 -5
- package/dist/lib/tmux.js +7 -2
- package/dist/mcp-server.js +57 -4
- package/dist/types.d.ts +2 -0
- package/dist/views/GlobalDashboard.d.ts +2 -1
- package/dist/views/GlobalDashboard.js +23 -18
- package/dist/views/LivestockDetailView.d.ts +1 -1
- package/dist/views/LivestockDetailView.js +27 -45
- package/dist/views/NightSkyView.js +66 -63
- package/dist/views/ProjectContext.js +138 -18
- package/dist/views/WikiView.js +2 -9
- package/package.json +2 -1
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: yeehaw-project-setup
|
|
3
|
+
description: Configure a Yeehaw project with an auto-generated summary, brand color, and wiki sections. Use when a user has created a Yeehaw project with livestock configured and wants to populate the project metadata and wiki. Triggers on requests like "set up this project in yeehaw", "configure yeehaw for this project", "populate my yeehaw wiki", or "initialize yeehaw project settings".
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Yeehaw Project Setup
|
|
7
|
+
|
|
8
|
+
Autonomously configure a Yeehaw project by exploring the codebase to generate a summary, discover a brand color, and create structured wiki sections that guide both humans and AI agents.
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
Before running this skill:
|
|
13
|
+
- Project must exist in Yeehaw (verify with `mcp__yeehaw__get_project`)
|
|
14
|
+
- Local livestock should be configured with the project path
|
|
15
|
+
- Be in the project's working directory or know its path
|
|
16
|
+
|
|
17
|
+
## Workflow
|
|
18
|
+
|
|
19
|
+
Execute these steps in order without user confirmation between steps.
|
|
20
|
+
|
|
21
|
+
### 1. Verify Project State
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
mcp__yeehaw__get_project(name: "<project-name>")
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Confirm the project exists and note:
|
|
28
|
+
- Current summary (if any)
|
|
29
|
+
- Current color (if any)
|
|
30
|
+
- Configured livestock and their paths
|
|
31
|
+
|
|
32
|
+
If project doesn't exist, stop and inform the user to create it first via the Yeehaw app.
|
|
33
|
+
|
|
34
|
+
### 2. Deep Codebase Exploration
|
|
35
|
+
|
|
36
|
+
Use the Task tool with `subagent_type: "Explore"` for thorough analysis. Gather:
|
|
37
|
+
|
|
38
|
+
**Structure & Architecture:**
|
|
39
|
+
- Directory structure and organization
|
|
40
|
+
- Key entry points and main files
|
|
41
|
+
- Architectural patterns (MVC, microservices, etc.)
|
|
42
|
+
- External integrations and dependencies
|
|
43
|
+
|
|
44
|
+
**Conventions & Patterns:**
|
|
45
|
+
- Code style (check for prettier, eslint, editorconfig)
|
|
46
|
+
- Naming conventions
|
|
47
|
+
- Testing patterns and locations
|
|
48
|
+
- Import organization
|
|
49
|
+
|
|
50
|
+
**Commands:**
|
|
51
|
+
- Package manager (package.json, requirements.txt, Cargo.toml, etc.)
|
|
52
|
+
- Available scripts/commands
|
|
53
|
+
- Build and test commands
|
|
54
|
+
|
|
55
|
+
**Domain:**
|
|
56
|
+
- README and documentation
|
|
57
|
+
- Key models/entities
|
|
58
|
+
- Business logic patterns
|
|
59
|
+
|
|
60
|
+
**Take detailed notes** - this information populates the wiki sections.
|
|
61
|
+
|
|
62
|
+
### 3. Color Discovery
|
|
63
|
+
|
|
64
|
+
Find a brand color following priority order (see `references/color-discovery.md` for details):
|
|
65
|
+
|
|
66
|
+
1. **Explicit brand colors** - Check tailwind.config, CSS variables, theme files
|
|
67
|
+
2. **UI framework colors** - MUI theme, Chakra theme, etc.
|
|
68
|
+
3. **Logo/asset colors** - Extract from SVG logos if present
|
|
69
|
+
4. **Technology association** - Use framework's brand color (React blue, Vue green, etc.)
|
|
70
|
+
5. **Domain association** - Finance->navy, healthcare->teal, etc.
|
|
71
|
+
|
|
72
|
+
Return a 6-character hex code with `#` prefix (e.g., `#FF6B6B`).
|
|
73
|
+
|
|
74
|
+
### 4. Generate Summary
|
|
75
|
+
|
|
76
|
+
Write a 1-2 sentence summary that captures:
|
|
77
|
+
- What the project does (purpose)
|
|
78
|
+
- Key technologies used
|
|
79
|
+
- Primary domain/audience
|
|
80
|
+
|
|
81
|
+
Keep it concise - this appears in project listings.
|
|
82
|
+
|
|
83
|
+
### 5. Update Project
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
mcp__yeehaw__update_project(
|
|
87
|
+
name: "<project-name>",
|
|
88
|
+
summary: "<generated-summary>",
|
|
89
|
+
color: "<discovered-color>"
|
|
90
|
+
)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 6. Create Wiki Sections
|
|
94
|
+
|
|
95
|
+
Use `references/wiki-templates.md` as a guide for structure. Create each section with `mcp__yeehaw__add_wiki_section`.
|
|
96
|
+
|
|
97
|
+
**Required sections:**
|
|
98
|
+
|
|
99
|
+
| Section | Content Focus |
|
|
100
|
+
|---------|---------------|
|
|
101
|
+
| Architecture | Directory structure, key components, data flow, integrations |
|
|
102
|
+
| Conventions | Code style, naming, patterns, testing approach |
|
|
103
|
+
| Commands | Dev, test, build, deploy commands in table format |
|
|
104
|
+
| Domain Context | Business purpose, key entities, terminology, rules |
|
|
105
|
+
| Common Tasks | Step-by-step guides for adding features, debugging |
|
|
106
|
+
| Gotchas | Known issues, environment quirks, common mistakes |
|
|
107
|
+
|
|
108
|
+
For each section:
|
|
109
|
+
```
|
|
110
|
+
mcp__yeehaw__add_wiki_section(
|
|
111
|
+
project: "<project-name>",
|
|
112
|
+
title: "<section-title>",
|
|
113
|
+
content: "<markdown-content>"
|
|
114
|
+
)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Content quality guidelines:**
|
|
118
|
+
- Be specific to THIS codebase, not generic advice
|
|
119
|
+
- Include actual file paths and command examples
|
|
120
|
+
- Reference real patterns found during exploration
|
|
121
|
+
- Keep each section focused and scannable
|
|
122
|
+
|
|
123
|
+
## Completion
|
|
124
|
+
|
|
125
|
+
After all sections are created, summarize what was configured:
|
|
126
|
+
- Project summary
|
|
127
|
+
- Selected color (and why)
|
|
128
|
+
- Wiki sections created
|
|
129
|
+
- Any areas that need user refinement (e.g., business rules only the user knows)
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
# Color Discovery Guide
|
|
2
|
+
|
|
3
|
+
Strategies for finding or deriving an appropriate brand color for a project.
|
|
4
|
+
|
|
5
|
+
## Priority Order
|
|
6
|
+
|
|
7
|
+
1. **Explicit brand colors** - Defined brand/theme colors in config
|
|
8
|
+
2. **Primary UI colors** - Main colors used in the interface
|
|
9
|
+
3. **Framework/tech association** - Colors associated with the primary technology
|
|
10
|
+
4. **Derived aesthetically** - Based on project type/domain
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 1. Explicit Brand Colors
|
|
15
|
+
|
|
16
|
+
### Tailwind Config
|
|
17
|
+
```
|
|
18
|
+
tailwind.config.js
|
|
19
|
+
tailwind.config.ts
|
|
20
|
+
```
|
|
21
|
+
Look for:
|
|
22
|
+
- `theme.extend.colors.primary`
|
|
23
|
+
- `theme.extend.colors.brand`
|
|
24
|
+
- Custom color definitions
|
|
25
|
+
|
|
26
|
+
### CSS Variables
|
|
27
|
+
```
|
|
28
|
+
src/styles/variables.css
|
|
29
|
+
src/styles/globals.css
|
|
30
|
+
src/index.css
|
|
31
|
+
app/globals.css
|
|
32
|
+
styles/theme.css
|
|
33
|
+
```
|
|
34
|
+
Look for:
|
|
35
|
+
- `--primary-color`
|
|
36
|
+
- `--brand-color`
|
|
37
|
+
- `--color-primary`
|
|
38
|
+
- `--accent-color`
|
|
39
|
+
|
|
40
|
+
### Theme Configuration
|
|
41
|
+
```
|
|
42
|
+
theme.json
|
|
43
|
+
theme.config.js
|
|
44
|
+
src/theme/*
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Design Tokens
|
|
48
|
+
```
|
|
49
|
+
tokens.json
|
|
50
|
+
design-tokens.json
|
|
51
|
+
src/tokens/*
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Package.json
|
|
55
|
+
Some projects define theme colors:
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"theme": {
|
|
59
|
+
"primaryColor": "#..."
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## 2. UI Framework Colors
|
|
67
|
+
|
|
68
|
+
### Material UI / MUI
|
|
69
|
+
```
|
|
70
|
+
src/theme.ts
|
|
71
|
+
src/theme/index.ts
|
|
72
|
+
```
|
|
73
|
+
Look for `palette.primary.main`
|
|
74
|
+
|
|
75
|
+
### Chakra UI
|
|
76
|
+
```
|
|
77
|
+
src/theme/index.ts
|
|
78
|
+
theme.ts
|
|
79
|
+
```
|
|
80
|
+
Look for `colors.brand` or `colors.primary`
|
|
81
|
+
|
|
82
|
+
### Ant Design
|
|
83
|
+
```
|
|
84
|
+
.antd-theme.json
|
|
85
|
+
config-overrides.js
|
|
86
|
+
```
|
|
87
|
+
Look for `@primary-color`
|
|
88
|
+
|
|
89
|
+
### Bootstrap
|
|
90
|
+
```
|
|
91
|
+
scss/_variables.scss
|
|
92
|
+
src/styles/variables.scss
|
|
93
|
+
```
|
|
94
|
+
Look for `$primary`
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 3. Asset-Based Discovery
|
|
99
|
+
|
|
100
|
+
### Logos and Icons
|
|
101
|
+
```
|
|
102
|
+
public/logo.*
|
|
103
|
+
public/favicon.*
|
|
104
|
+
src/assets/logo.*
|
|
105
|
+
assets/brand/*
|
|
106
|
+
static/logo.*
|
|
107
|
+
```
|
|
108
|
+
If an SVG logo exists, extract dominant color from fill/stroke attributes.
|
|
109
|
+
|
|
110
|
+
### App Icons (Mobile)
|
|
111
|
+
```
|
|
112
|
+
ios/*/Images.xcassets/AppIcon.appiconset
|
|
113
|
+
android/app/src/main/res/mipmap-*/ic_launcher.png
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
## 4. Framework/Technology Colors
|
|
119
|
+
|
|
120
|
+
When no brand color is found, consider the primary technology:
|
|
121
|
+
|
|
122
|
+
| Technology | Suggested Color | Hex |
|
|
123
|
+
|------------|----------------|-----|
|
|
124
|
+
| React | React Blue | #61DAFB |
|
|
125
|
+
| Vue | Vue Green | #42B883 |
|
|
126
|
+
| Angular | Angular Red | #DD0031 |
|
|
127
|
+
| Svelte | Svelte Orange | #FF3E00 |
|
|
128
|
+
| Next.js | Black | #000000 |
|
|
129
|
+
| Node.js | Node Green | #339933 |
|
|
130
|
+
| Python | Python Blue | #3776AB |
|
|
131
|
+
| Ruby/Rails | Ruby Red | #CC342D |
|
|
132
|
+
| Go | Go Blue | #00ADD8 |
|
|
133
|
+
| Rust | Rust Orange | #DEA584 |
|
|
134
|
+
| Laravel | Laravel Red | #FF2D20 |
|
|
135
|
+
| Django | Django Green | #092E20 |
|
|
136
|
+
| Spring | Spring Green | #6DB33F |
|
|
137
|
+
| .NET | .NET Purple | #512BD4 |
|
|
138
|
+
| PHP | PHP Purple | #777BB4 |
|
|
139
|
+
| Elixir | Elixir Purple | #4B275F |
|
|
140
|
+
|
|
141
|
+
---
|
|
142
|
+
|
|
143
|
+
## 5. Domain-Based Colors
|
|
144
|
+
|
|
145
|
+
When technology doesn't suggest a color, consider the domain:
|
|
146
|
+
|
|
147
|
+
| Domain | Color Family | Example Hex |
|
|
148
|
+
|--------|--------------|-------------|
|
|
149
|
+
| Finance/Banking | Blue, Navy | #1A365D |
|
|
150
|
+
| Healthcare | Blue, Teal | #0D9488 |
|
|
151
|
+
| E-commerce | Orange, Purple | #F97316 |
|
|
152
|
+
| Education | Blue, Green | #2563EB |
|
|
153
|
+
| Social | Blue, Pink | #3B82F6 |
|
|
154
|
+
| Entertainment | Purple, Red | #7C3AED |
|
|
155
|
+
| Productivity | Blue, Gray | #475569 |
|
|
156
|
+
| Developer Tools | Dark, Purple | #6366F1 |
|
|
157
|
+
| Food/Restaurant | Orange, Red | #EA580C |
|
|
158
|
+
| Travel | Blue, Teal | #0891B2 |
|
|
159
|
+
| Real Estate | Blue, Green | #059669 |
|
|
160
|
+
| Sports/Fitness | Orange, Red | #DC2626 |
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Color Format
|
|
165
|
+
|
|
166
|
+
Return colors as 6-character hex codes with leading `#`:
|
|
167
|
+
- Correct: `#FF6B6B`
|
|
168
|
+
- Incorrect: `FF6B6B`, `#F66`, `rgb(255, 107, 107)`
|
|
169
|
+
|
|
170
|
+
Ensure sufficient contrast - avoid colors that are too light (hard to see) or too dark (looks black). Ideal lightness range: 30-70% in HSL.
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
# Wiki Section Templates
|
|
2
|
+
|
|
3
|
+
Templates and guidance for creating effective wiki sections that serve both humans and AI agents.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
**Purpose:** Help Claude understand codebase structure, key directories, and how pieces connect.
|
|
8
|
+
|
|
9
|
+
**Template:**
|
|
10
|
+
```markdown
|
|
11
|
+
## Project Structure
|
|
12
|
+
|
|
13
|
+
- `src/` - [Main source code, organized by...]
|
|
14
|
+
- `tests/` - [Test files, organized by...]
|
|
15
|
+
- `config/` - [Configuration files for...]
|
|
16
|
+
|
|
17
|
+
## Key Components
|
|
18
|
+
|
|
19
|
+
### [Component Name]
|
|
20
|
+
- **Location:** `path/to/component`
|
|
21
|
+
- **Purpose:** [What it does]
|
|
22
|
+
- **Dependencies:** [What it relies on]
|
|
23
|
+
- **Used by:** [What uses it]
|
|
24
|
+
|
|
25
|
+
### [Component Name]
|
|
26
|
+
...
|
|
27
|
+
|
|
28
|
+
## Data Flow
|
|
29
|
+
|
|
30
|
+
[Describe how data moves through the system: entry points -> processing -> storage -> output]
|
|
31
|
+
|
|
32
|
+
## External Integrations
|
|
33
|
+
|
|
34
|
+
- **[Service Name]:** [What it's used for, where it's configured]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**What to capture:**
|
|
38
|
+
- Directory structure with purpose of each major folder
|
|
39
|
+
- Key architectural patterns (MVC, microservices, monolith, etc.)
|
|
40
|
+
- Entry points (main files, index files, routers)
|
|
41
|
+
- How modules/packages are organized
|
|
42
|
+
- Database/storage layer structure
|
|
43
|
+
- External service integrations
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Conventions
|
|
48
|
+
|
|
49
|
+
**Purpose:** Ensure Claude follows established patterns when writing code.
|
|
50
|
+
|
|
51
|
+
**Template:**
|
|
52
|
+
```markdown
|
|
53
|
+
## Code Style
|
|
54
|
+
|
|
55
|
+
- **Formatting:** [Prettier/ESLint/Black with config at...]
|
|
56
|
+
- **Naming:** [camelCase/snake_case for variables, PascalCase for classes, etc.]
|
|
57
|
+
- **File naming:** [kebab-case.ts, PascalCase.tsx, etc.]
|
|
58
|
+
|
|
59
|
+
## Patterns
|
|
60
|
+
|
|
61
|
+
### [Pattern Name]
|
|
62
|
+
- **When to use:** [Scenario]
|
|
63
|
+
- **Example:** [File path or code snippet]
|
|
64
|
+
|
|
65
|
+
### Error Handling
|
|
66
|
+
[How errors are handled in this codebase]
|
|
67
|
+
|
|
68
|
+
### State Management
|
|
69
|
+
[How state is managed, what patterns are used]
|
|
70
|
+
|
|
71
|
+
## Import Organization
|
|
72
|
+
|
|
73
|
+
[How imports should be ordered/grouped]
|
|
74
|
+
|
|
75
|
+
## Testing Conventions
|
|
76
|
+
|
|
77
|
+
- **Test file location:** [Same directory/__tests__/separate tests folder]
|
|
78
|
+
- **Naming:** [*.test.ts, *.spec.ts, test_*.py]
|
|
79
|
+
- **Patterns:** [Describe testing patterns used]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**What to capture:**
|
|
83
|
+
- Formatting tools and their config locations
|
|
84
|
+
- Naming conventions for files, functions, classes, variables
|
|
85
|
+
- Common patterns used (factories, repositories, services, etc.)
|
|
86
|
+
- Error handling approach
|
|
87
|
+
- Import organization style
|
|
88
|
+
- Testing patterns
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Commands
|
|
93
|
+
|
|
94
|
+
**Purpose:** Know how to build, test, lint, deploy without guessing.
|
|
95
|
+
|
|
96
|
+
**Template:**
|
|
97
|
+
```markdown
|
|
98
|
+
## Development
|
|
99
|
+
|
|
100
|
+
| Command | Description |
|
|
101
|
+
|---------|-------------|
|
|
102
|
+
| `[command]` | Start development server |
|
|
103
|
+
| `[command]` | Run in watch mode |
|
|
104
|
+
|
|
105
|
+
## Testing
|
|
106
|
+
|
|
107
|
+
| Command | Description |
|
|
108
|
+
|---------|-------------|
|
|
109
|
+
| `[command]` | Run all tests |
|
|
110
|
+
| `[command]` | Run tests in watch mode |
|
|
111
|
+
| `[command]` | Run specific test file |
|
|
112
|
+
| `[command]` | Run with coverage |
|
|
113
|
+
|
|
114
|
+
## Build & Deploy
|
|
115
|
+
|
|
116
|
+
| Command | Description |
|
|
117
|
+
|---------|-------------|
|
|
118
|
+
| `[command]` | Build for production |
|
|
119
|
+
| `[command]` | Deploy to [environment] |
|
|
120
|
+
|
|
121
|
+
## Utilities
|
|
122
|
+
|
|
123
|
+
| Command | Description |
|
|
124
|
+
|---------|-------------|
|
|
125
|
+
| `[command]` | Lint code |
|
|
126
|
+
| `[command]` | Format code |
|
|
127
|
+
| `[command]` | Generate types/migrations/etc. |
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
**What to capture:**
|
|
131
|
+
- Package manager used (npm, yarn, pnpm, pip, cargo, etc.)
|
|
132
|
+
- Dev server commands
|
|
133
|
+
- Test commands (all, watch, coverage, specific)
|
|
134
|
+
- Build commands
|
|
135
|
+
- Deployment commands
|
|
136
|
+
- Database migration commands
|
|
137
|
+
- Code generation commands
|
|
138
|
+
- Linting and formatting commands
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Domain Context
|
|
143
|
+
|
|
144
|
+
**Purpose:** Help Claude understand business terms, entities, and relationships.
|
|
145
|
+
|
|
146
|
+
**Template:**
|
|
147
|
+
```markdown
|
|
148
|
+
## Business Domain
|
|
149
|
+
|
|
150
|
+
[1-2 sentences describing what this application does in business terms]
|
|
151
|
+
|
|
152
|
+
## Key Entities
|
|
153
|
+
|
|
154
|
+
### [Entity Name]
|
|
155
|
+
- **What it is:** [Business definition]
|
|
156
|
+
- **Represented as:** [How it appears in code - model/table/type name]
|
|
157
|
+
- **Key attributes:** [Important fields]
|
|
158
|
+
- **Relationships:** [How it relates to other entities]
|
|
159
|
+
|
|
160
|
+
### [Entity Name]
|
|
161
|
+
...
|
|
162
|
+
|
|
163
|
+
## Terminology
|
|
164
|
+
|
|
165
|
+
| Term | Meaning |
|
|
166
|
+
|------|---------|
|
|
167
|
+
| [Domain term] | [What it means in this context] |
|
|
168
|
+
|
|
169
|
+
## Business Rules
|
|
170
|
+
|
|
171
|
+
- [Important rule about how the system should behave]
|
|
172
|
+
- [Another rule]
|
|
173
|
+
|
|
174
|
+
## User Roles
|
|
175
|
+
|
|
176
|
+
- **[Role]:** [What they can do, their perspective]
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**What to capture:**
|
|
180
|
+
- What the application does (business purpose)
|
|
181
|
+
- Key domain entities and their relationships
|
|
182
|
+
- Domain-specific terminology
|
|
183
|
+
- Important business rules or constraints
|
|
184
|
+
- User types and their permissions/perspectives
|
|
185
|
+
|
|
186
|
+
---
|
|
187
|
+
|
|
188
|
+
## Common Tasks
|
|
189
|
+
|
|
190
|
+
**Purpose:** Provide step-by-step guides for frequent operations.
|
|
191
|
+
|
|
192
|
+
**Template:**
|
|
193
|
+
```markdown
|
|
194
|
+
## Adding a New [Feature Type]
|
|
195
|
+
|
|
196
|
+
1. Create [file] at `path/`
|
|
197
|
+
2. Register in `path/to/registry`
|
|
198
|
+
3. Add tests at `path/to/tests`
|
|
199
|
+
4. Update [related config/documentation]
|
|
200
|
+
|
|
201
|
+
## Modifying [Component Type]
|
|
202
|
+
|
|
203
|
+
1. [Step]
|
|
204
|
+
2. [Step]
|
|
205
|
+
3. [Step]
|
|
206
|
+
|
|
207
|
+
## Debugging [Common Issue Type]
|
|
208
|
+
|
|
209
|
+
1. Check [location/log]
|
|
210
|
+
2. Verify [configuration]
|
|
211
|
+
3. Common causes: [list]
|
|
212
|
+
|
|
213
|
+
## Database Changes
|
|
214
|
+
|
|
215
|
+
1. [How to create migrations]
|
|
216
|
+
2. [How to run migrations]
|
|
217
|
+
3. [How to rollback]
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
**What to capture:**
|
|
221
|
+
- Adding new features/components/endpoints
|
|
222
|
+
- Modifying existing patterns
|
|
223
|
+
- Common debugging workflows
|
|
224
|
+
- Database/schema changes
|
|
225
|
+
- Environment setup steps
|
|
226
|
+
- Deployment procedures
|
|
227
|
+
|
|
228
|
+
---
|
|
229
|
+
|
|
230
|
+
## Gotchas
|
|
231
|
+
|
|
232
|
+
**Purpose:** Help Claude avoid known pitfalls and edge cases.
|
|
233
|
+
|
|
234
|
+
**Template:**
|
|
235
|
+
```markdown
|
|
236
|
+
## Known Issues
|
|
237
|
+
|
|
238
|
+
### [Issue Title]
|
|
239
|
+
- **Symptom:** [What happens]
|
|
240
|
+
- **Cause:** [Why it happens]
|
|
241
|
+
- **Solution:** [How to fix/avoid]
|
|
242
|
+
|
|
243
|
+
## Things to Watch Out For
|
|
244
|
+
|
|
245
|
+
- **[Area]:** [What to be careful about]
|
|
246
|
+
- **[Area]:** [What to be careful about]
|
|
247
|
+
|
|
248
|
+
## Environment-Specific
|
|
249
|
+
|
|
250
|
+
- **Local:** [Things specific to local development]
|
|
251
|
+
- **Staging:** [Things specific to staging]
|
|
252
|
+
- **Production:** [Things specific to production]
|
|
253
|
+
|
|
254
|
+
## Common Mistakes
|
|
255
|
+
|
|
256
|
+
- [Mistake]: [Correct approach]
|
|
257
|
+
- [Mistake]: [Correct approach]
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
**What to capture:**
|
|
261
|
+
- Known bugs or quirks
|
|
262
|
+
- Environment-specific considerations
|
|
263
|
+
- Common mistakes and how to avoid them
|
|
264
|
+
- Performance considerations
|
|
265
|
+
- Security considerations
|
|
266
|
+
- Things that look wrong but are intentional
|
package/dist/app.js
CHANGED
|
@@ -5,6 +5,7 @@ import { homedir } from 'os';
|
|
|
5
5
|
import { join } from 'path';
|
|
6
6
|
import { HelpOverlay } from './components/HelpOverlay.js';
|
|
7
7
|
import { BottomBar } from './components/BottomBar.js';
|
|
8
|
+
import { SplashScreen } from './components/SplashScreen.js';
|
|
8
9
|
import { GlobalDashboard } from './views/GlobalDashboard.js';
|
|
9
10
|
import { ProjectContext } from './views/ProjectContext.js';
|
|
10
11
|
import { BarnContext } from './views/BarnContext.js';
|
|
@@ -76,11 +77,13 @@ export function App() {
|
|
|
76
77
|
const { windows, createClaude, attachToWindow } = useSessions();
|
|
77
78
|
const { stdout } = useStdout();
|
|
78
79
|
const { environments, isDetecting } = useRemoteYeehaw(barns);
|
|
80
|
+
const [showSplash, setShowSplash] = useState(true);
|
|
79
81
|
const [view, setView] = useState({ type: 'global' });
|
|
80
82
|
const [previousView, setPreviousView] = useState(null);
|
|
81
83
|
const [showHelp, setShowHelp] = useState(false);
|
|
82
84
|
const [error, setError] = useState(null);
|
|
83
85
|
const [pendingGo, setPendingGo] = useState(false); // For g+number sequence
|
|
86
|
+
const [isChildInputMode, setIsChildInputMode] = useState(false); // Track when child views have text input active
|
|
84
87
|
// Get terminal height for full-height layout
|
|
85
88
|
const terminalHeight = stdout?.rows || 24;
|
|
86
89
|
// Check tmux availability
|
|
@@ -93,6 +96,36 @@ export function App() {
|
|
|
93
96
|
ensureCorrectStatusBar();
|
|
94
97
|
}
|
|
95
98
|
}, [view.type]);
|
|
99
|
+
// Hot-reload: sync view state when projects/barns change (e.g., from MCP server updates)
|
|
100
|
+
useEffect(() => {
|
|
101
|
+
setView((currentView) => {
|
|
102
|
+
// Update project data in views that contain a project
|
|
103
|
+
if (currentView.type === 'project' || currentView.type === 'wiki' || currentView.type === 'issues') {
|
|
104
|
+
const freshProject = projects.find((p) => p.name === currentView.project.name);
|
|
105
|
+
if (freshProject && freshProject !== currentView.project) {
|
|
106
|
+
return { ...currentView, project: freshProject };
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
// Update livestock detail view
|
|
110
|
+
if (currentView.type === 'livestock' || currentView.type === 'logs') {
|
|
111
|
+
const freshProject = projects.find((p) => p.name === currentView.project.name);
|
|
112
|
+
if (freshProject && freshProject !== currentView.project) {
|
|
113
|
+
const freshLivestock = (freshProject.livestock || []).find((l) => l.name === currentView.livestock.name);
|
|
114
|
+
if (freshLivestock) {
|
|
115
|
+
return { ...currentView, project: freshProject, livestock: freshLivestock };
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
// Update barn data in barn view
|
|
120
|
+
if (currentView.type === 'barn') {
|
|
121
|
+
const freshBarn = barns.find((b) => b.name === currentView.barn.name);
|
|
122
|
+
if (freshBarn && freshBarn !== currentView.barn) {
|
|
123
|
+
return { ...currentView, barn: freshBarn };
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return currentView;
|
|
127
|
+
});
|
|
128
|
+
}, [projects, barns]);
|
|
96
129
|
const handleSelectProject = useCallback((project) => {
|
|
97
130
|
setView({ type: 'project', project });
|
|
98
131
|
updateStatusBar(project.name);
|
|
@@ -113,11 +146,17 @@ export function App() {
|
|
|
113
146
|
setError('tmux is not installed');
|
|
114
147
|
return;
|
|
115
148
|
}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
149
|
+
try {
|
|
150
|
+
const projectName = view.type === 'project' ? view.project.name : 'yeehaw';
|
|
151
|
+
const workingDir = view.type === 'project' ? expandPath(view.project.path) : process.cwd();
|
|
152
|
+
const windowName = `${projectName}-claude`;
|
|
153
|
+
const windowIndex = createClaude(workingDir, windowName);
|
|
154
|
+
switchToWindow(windowIndex);
|
|
155
|
+
}
|
|
156
|
+
catch (err) {
|
|
157
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
158
|
+
setError(`Failed to create Claude session: ${message}`);
|
|
159
|
+
}
|
|
121
160
|
}, [tmuxAvailable, view, createClaude]);
|
|
122
161
|
const handleOpenLivestockSession = useCallback((livestock, barn, projectName) => {
|
|
123
162
|
if (!tmuxAvailable) {
|
|
@@ -191,10 +230,10 @@ export function App() {
|
|
|
191
230
|
updateStatusBar(project.name);
|
|
192
231
|
}
|
|
193
232
|
}, []);
|
|
194
|
-
const handleUpdateLivestock = useCallback((project, updatedLivestock, source, sourceBarn) => {
|
|
233
|
+
const handleUpdateLivestock = useCallback((project, originalLivestock, updatedLivestock, source, sourceBarn) => {
|
|
195
234
|
const updatedProject = {
|
|
196
235
|
...project,
|
|
197
|
-
livestock: (project.livestock || []).map((l) => l.name ===
|
|
236
|
+
livestock: (project.livestock || []).map((l) => l.name === originalLivestock.name ? updatedLivestock : l),
|
|
198
237
|
};
|
|
199
238
|
saveProject(updatedProject);
|
|
200
239
|
reload();
|
|
@@ -349,8 +388,8 @@ export function App() {
|
|
|
349
388
|
setPendingGo(true);
|
|
350
389
|
return;
|
|
351
390
|
}
|
|
352
|
-
// v: Enter night sky visualizer (only from global dashboard
|
|
353
|
-
if (input === 'v' && view.type === 'global') {
|
|
391
|
+
// v: Enter night sky visualizer (only from global dashboard when not in text input mode)
|
|
392
|
+
if (input === 'v' && view.type === 'global' && !isChildInputMode) {
|
|
354
393
|
handleEnterNightSky();
|
|
355
394
|
return;
|
|
356
395
|
}
|
|
@@ -362,7 +401,7 @@ export function App() {
|
|
|
362
401
|
}
|
|
363
402
|
switch (view.type) {
|
|
364
403
|
case 'global':
|
|
365
|
-
return (_jsx(GlobalDashboard, { projects: projects, barns: barns, windows: windows, versionInfo: versionInfo, onSelectProject: handleSelectProject, onSelectBarn: handleSelectBarn, onSelectWindow: handleSelectWindow, onNewClaude: handleNewClaude, onCreateProject: handleCreateProject, onCreateBarn: handleCreateBarn, onSshToBarn: handleSshToBarn }));
|
|
404
|
+
return (_jsx(GlobalDashboard, { projects: projects, barns: barns, windows: windows, versionInfo: versionInfo, onSelectProject: handleSelectProject, onSelectBarn: handleSelectBarn, onSelectWindow: handleSelectWindow, onNewClaude: handleNewClaude, onCreateProject: handleCreateProject, onCreateBarn: handleCreateBarn, onSshToBarn: handleSshToBarn, onInputModeChange: setIsChildInputMode }));
|
|
366
405
|
case 'project':
|
|
367
406
|
return (_jsx(ProjectContext, { project: view.project, barns: barns, windows: windows, onBack: handleBack, onNewClaude: handleNewClaude, onSelectWindow: handleSelectWindow, onSelectLivestock: (livestock, barn) => handleOpenLivestockDetail(view.project, livestock, 'project'), onOpenLivestockSession: (livestock, barn) => handleOpenLivestockSession(livestock, barn, view.project.name), onUpdateProject: handleUpdateProject, onDeleteProject: handleDeleteProject, onOpenWiki: () => handleOpenWiki(view.project), onOpenIssues: () => handleOpenIssues(view.project) }));
|
|
368
407
|
case 'barn':
|
|
@@ -398,7 +437,7 @@ export function App() {
|
|
|
398
437
|
return (_jsx(LivestockDetailView, { project: view.project, livestock: view.livestock, source: view.source, sourceBarn: view.sourceBarn, windows: windows, onBack: () => handleBackFromLivestock(view.source, view.project, view.sourceBarn), onOpenLogs: () => handleOpenLogs(view.project, view.livestock, view.source, view.sourceBarn), onOpenSession: () => {
|
|
399
438
|
const barn = barns.find((b) => b.name === view.livestock.barn) || null;
|
|
400
439
|
handleOpenLivestockSession(view.livestock, barn, view.project.name);
|
|
401
|
-
}, onSelectWindow: handleSelectWindow, onUpdateLivestock: (updatedLivestock) => handleUpdateLivestock(view.project, updatedLivestock, view.source, view.sourceBarn) }));
|
|
440
|
+
}, onSelectWindow: handleSelectWindow, onUpdateLivestock: (originalLivestock, updatedLivestock) => handleUpdateLivestock(view.project, originalLivestock, updatedLivestock, view.source, view.sourceBarn) }));
|
|
402
441
|
case 'logs':
|
|
403
442
|
return (_jsx(LogsView, { project: view.project, livestock: view.livestock, onBack: () => {
|
|
404
443
|
setView({ type: 'livestock', project: view.project, livestock: view.livestock, source: view.source, sourceBarn: view.sourceBarn });
|
|
@@ -408,5 +447,9 @@ export function App() {
|
|
|
408
447
|
return (_jsx(NightSkyView, { onExit: handleExitNightSky }));
|
|
409
448
|
}
|
|
410
449
|
};
|
|
450
|
+
// Show splash screen on first load
|
|
451
|
+
if (showSplash) {
|
|
452
|
+
return _jsx(SplashScreen, { onComplete: () => setShowSplash(false) });
|
|
453
|
+
}
|
|
411
454
|
return (_jsxs(Box, { flexDirection: "column", height: terminalHeight, children: [error && (_jsx(Box, { paddingX: 1, children: _jsxs(Text, { color: "red", children: ["Error: ", error] }) })), _jsx(Box, { flexDirection: "column", flexGrow: 1, children: renderView() }), !showHelp && (_jsx(BottomBar, { items: getBottomBarItems(view.type), environments: environments, isDetecting: isDetecting }))] }));
|
|
412
455
|
}
|