|
| 1 | +# CLAUDE.md |
| 2 | + |
| 3 | +This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository. |
| 4 | + |
| 5 | +## Critical Rules |
| 6 | + |
| 7 | +These rules override all other instructions: |
| 8 | +1. **NEVER commit directly to main** - Always create a feature branch and submit a pull request |
| 9 | +2. **Conventional commits** - Format: `type(scope): description` |
| 10 | +3. **GitHub Issues for TODOs** - Use `gh` CLI to manage issues, no local TODO files. Use conventional commit format for issue titles |
| 11 | +4. **Pull Request titles** - Use conventional commit format (same as commits) |
| 12 | +5. **Branch naming** - Use format: `type/scope/short-description` (e.g., `feat/ui/add-context-menu`) |
| 13 | +6. **Working an issue** - Always create a new branch from an updated main branch |
| 14 | +7. **Check branch status before pushing** - Verify the remote tracking branch still exists. If a PR was merged/deleted, create a new branch from main instead |
| 15 | +8. **No co-authors** - Do not add co-author information on commits or pull requests |
| 16 | +9. **No "generated by" statements** - Do not add generated-by statements on pull requests |
| 17 | + |
| 18 | +## Overview |
| 19 | + |
| 20 | +VS-LaunchyBar is a Visual Studio 2022/2026 extension that provides a narrow icon launcher bar similar to VS Code's Activity Bar or JetBrains' side bars. |
| 21 | + |
| 22 | +## Technology Stack |
| 23 | + |
| 24 | +- **Framework**: .NET Framework 4.8 |
| 25 | +- **SDK**: CodingWithCalvin.VsixSdk 0.4.0 |
| 26 | +- **Toolkit**: Community.VisualStudio.Toolkit.17 |
| 27 | +- **Telemetry**: CodingWithCalvin.Otel4Vsix |
| 28 | +- **UI**: WPF with VS theme integration |
| 29 | +- **Configuration**: JSON (System.Text.Json) |
| 30 | + |
| 31 | +## Project Structure |
| 32 | + |
| 33 | +``` |
| 34 | +VS-LaunchyBar/ |
| 35 | +├── .github/workflows/ # CI/CD pipeline |
| 36 | +├── resources/ # Icons and images (linked into project) |
| 37 | +├── src/ |
| 38 | +│ └── CodingWithCalvin.LaunchyBar/ |
| 39 | +│ ├── Commands/ # VS command handlers |
| 40 | +│ ├── Models/ # Data models (LaunchItem, Configuration) |
| 41 | +│ ├── Options/ # Tools > Options page |
| 42 | +│ ├── Services/ # Configuration and Launch services |
| 43 | +│ ├── ToolWindow/ # Tool window UI (XAML + code-behind) |
| 44 | +│ ├── ViewModels/ # MVVM ViewModels |
| 45 | +│ └── Themes/ # WPF styles for VS integration |
| 46 | +└── README.md |
| 47 | +``` |
| 48 | + |
| 49 | +## Build Commands |
| 50 | + |
| 51 | +```powershell |
| 52 | +# Build |
| 53 | +dotnet build src/CodingWithCalvin.LaunchyBar.slnx |
| 54 | +
|
| 55 | +# Build Release |
| 56 | +dotnet build src/CodingWithCalvin.LaunchyBar.slnx --configuration Release |
| 57 | +
|
| 58 | +# Restore packages |
| 59 | +dotnet restore src/CodingWithCalvin.LaunchyBar.slnx |
| 60 | +``` |
| 61 | + |
| 62 | +## Key Components |
| 63 | + |
| 64 | +### LaunchyBarPackage.cs |
| 65 | +Main VS package entry point. Registers tool window, commands, and options page. |
| 66 | + |
| 67 | +### LaunchItem.cs |
| 68 | +Represents a single item in the bar with properties for: |
| 69 | +- `Type`: ExternalProgram, ToolWindow, VsCommand, CustomAction |
| 70 | +- `Target`: Path, command ID, or GUID depending on type |
| 71 | +- `Position`: Top or Bottom of bar |
| 72 | + |
| 73 | +### ConfigurationService.cs |
| 74 | +Persists configuration to `%LOCALAPPDATA%\CodingWithCalvin\LaunchyBar\config.json` |
| 75 | + |
| 76 | +### LaunchService.cs |
| 77 | +Executes actions: launches external programs, toggles tool windows, or executes VS commands. |
| 78 | + |
| 79 | +## VS Integration |
| 80 | + |
| 81 | +- Tool window docks to left side, linked to Solution Explorer |
| 82 | +- Auto-loads on VS startup (no solution required) |
| 83 | +- Uses VS theme brushes for native appearance |
| 84 | +- Uses KnownMonikers for icons |
| 85 | + |
| 86 | +## Testing |
| 87 | + |
| 88 | +Debug by pressing F5 in Visual Studio to launch experimental instance. |
| 89 | + |
| 90 | +## Resources |
| 91 | + |
| 92 | +Resources are stored in root `/resources/` folder and linked into the project via csproj `<Content>` items with `Link` attribute. |
0 commit comments