project-switching

Featured

Project switching implementation in sidecar: project discovery, state management, UI flow, modal rendering, filtering, theme preview, and plugin reinitialization. Use when working on the project switcher feature, project management, worktree switching, or the project configuration system.

AI & Automation 1,069 stars 81 forks Updated 2 days ago MIT

Install

View on GitHub

Quality Score: 96/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Project Switching Switch between git repositories without restarting sidecar. Press `@` to open the project switcher modal. ## Architecture Overview The project switcher uses the app's declarative modal library (`internal/modal/`) for rendering and mouse handling. ### Key Files | File | Contents | |------|----------| | `internal/app/model.go` | State, init, reset, filter, switch, theme preview | | `internal/app/update.go` | Keyboard and mouse handlers | | `internal/app/view.go` | Modal building and section rendering | | `internal/modal/` | Modal library (builder, sections, layout) | | `internal/config/types.go` | ProjectConfig struct | | `internal/config/loader.go` | Config loading with path validation | ### Model State ```go // internal/app/model.go showProjectSwitcher bool projectSwitcherCursor int projectSwitcherScroll int projectSwitcherInput textinput.Model projectSwitcherFiltered []config.ProjectConfig projectSwitcherModal *modal.Modal // Cached modal instance projectSwitcherModalWidth int // Width for cache invalidation projectSwitcherMouseHandler *mouse.Handler ``` ## Project vs Worktree Switching - **Project Switching** (`@`): Switch between configured projects from `config.json` (arbitrary repos) - **Worktree Switching** (`W`): Switch between git worktrees within the current repository ## Configuration Projects are configured in `~/.config/sidecar/config.json`: ```json { "projects":...

Details

Author
marcus
Repository
marcus/sidecar
Created
8 months ago
Last Updated
2 days ago
Language
Go
License
MIT

Similar Skills

Semantically similar based on skill content — not just same category