Skip to content

Commit ba4fdba

Browse files
authored
Add files via upload
1 parent 63c5d9f commit ba4fdba

7 files changed

Lines changed: 5198 additions & 158 deletions

File tree

CHANGELOG.md

Lines changed: 83 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,90 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88
## [Unreleased]
99

1010
### Planned
11-
- Light theme option
11+
- Branch management (create, switch, merge)
12+
- Diff viewer for file changes
13+
- Conflict resolution UI
14+
- Commit history viewer
15+
- Pull request integration
16+
- Favorite files with persistence
17+
- Default open files on startup
1218
- Configurable editor settings
13-
- File diff viewer
14-
- Git integration
1519
- Search across all files
1620
- Code snippets and templates
1721

22+
## [1.2.0] - 2026-01-18
23+
24+
### 🌟 Added - GitHub Integration & Advanced Features
25+
26+
- **Automatic Git Status Refresh** - Git panel updates automatically without manual refresh ⚡
27+
- Auto-refresh after file save operations
28+
- Auto-refresh after file create operations
29+
- Auto-refresh after file delete operations
30+
- Auto-refresh after file rename operations
31+
- Auto-refresh after file copy operations
32+
- Auto-refresh after file upload operations
33+
- Auto-refresh after folder upload operations
34+
- Git Changes panel appears/disappears automatically based on changes
35+
- **Periodic Git Polling** - Detects changes made outside Blueprint Studio 🔄
36+
- Polls git status every 30 seconds automatically
37+
- Catches changes from terminal, other editors, or Home Assistant
38+
- Only runs when Git features are enabled
39+
- Silent background operation with no UI interruption
40+
- **Pin Favorites** - Quick access to frequently used files 📌
41+
- Pin any file to the top of the sidebar for instant access
42+
- Click the pin icon next to any file to add/remove from favorites
43+
- Favorites persist across restarts in localStorage
44+
- Visual indicator with orange pin icon for pinned files
45+
- Dedicated favorites panel at the top of the file tree
46+
- **Smart .gitignore Template** - Prevents large files from being committed 🛡️
47+
- Automatically excludes `piper/` directory (TTS model files)
48+
- Automatically excludes `*.onnx` files (large ML models)
49+
- Automatically excludes `.ha_run.lock` (runtime lock file)
50+
- Prevents GitHub file size limit errors (100 MB limit)
51+
- Applied when initializing new git repositories
52+
- **Create GitHub Repository** - One-click repository creation directly from Blueprint Studio
53+
- New "Create New GitHub Repository" button in Git Settings modal
54+
- Modal dialog for entering repository name, description, and visibility
55+
- Automatic repository creation on GitHub via API
56+
- Auto-initialization of local git repository
57+
- Auto-configuration of remote origin
58+
- Input validation for repository names
59+
- Error handling for existing repositories
60+
- **Smart Sidebar Resize** - Automatic sidebar width adjustment for Git integration
61+
- Sidebar auto-resizes to 360px when Git panel becomes visible (if currently < 340px)
62+
- Ensures stage buttons ("Stage Selected", "Stage All", "Unstage All", "Commit") fit cleanly
63+
- Increased default sidebar width from 280px to 320px for better content display
64+
- Only applies on desktop (respects mobile responsive behavior)
65+
- Respects user's manual resize preferences (no auto-resize if already ≥ 340px)
66+
- **GitHub Logo Integration** - Professional GitHub branding in UI 🎨
67+
- GitHub logo in Git Settings modal header
68+
- GitHub logo on OAuth login button
69+
- Consistent GitHub branding throughout Git features
70+
- **New API endpoint:** `github_create_repo` for repository creation
71+
- **New API endpoint:** `git_push_only` for pushing without committing
72+
- **Complete GitHub Integration** - Full push/pull/commit/stage workflow
73+
- GitHub OAuth device flow authentication
74+
- Personal Access Token (PAT) support
75+
- Stage/unstage individual files or all changes
76+
- Commit with custom messages
77+
- Push to remote repositories
78+
- Detailed error messages from GitHub API
79+
- Real-time git status updates
80+
81+
### 📚 Documentation
82+
83+
- Updated README with Git Integration and Pin Favorites features
84+
- Updated CHANGELOG with comprehensive v1.2.0 release notes
85+
- Added details about periodic polling and smart .gitignore
86+
- Added comprehensive release notes (`RELEASE_NOTES_v1.2.0.md`)
87+
88+
### Community Requests
89+
90+
- ✅ GitHub integration for push/pull (Most requested feature)
91+
- ✅ Lightweight alternative to VSCode
92+
- ✅ Mobile-friendly interface
93+
- ✅ Pin frequently used files for quick access
94+
1895
## [1.0.0] - 2024-12-05
1996

2097
### Added
@@ -63,9 +140,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
63140

64141
## Version History
65142

143+
- **1.2.0** - GitHub Integration, Pin Favorites & Auto-Refresh
66144
- **1.0.0** - First stable release
67145
- **0.1.0** - Beta version
68146

69-
[Unreleased]: https://github.com/soulripper13/blueprint-studio/compare/v1.0.0...HEAD
147+
[Unreleased]: https://github.com/soulripper13/blueprint-studio/compare/v1.2.0...HEAD
148+
[1.2.0]: https://github.com/soulripper13/blueprint-studio/releases/tag/v1.2.0
70149
[1.0.0]: https://github.com/soulripper13/blueprint-studio/releases/tag/v1.0.0
71150
[0.1.0]: https://github.com/soulripper13/blueprint-studio/releases/tag/v0.1.0

GITHUB_AUTH_QUICKSTART.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Quick Start: GitHub Authentication
2+
3+
## ⚡ Fastest Way (30 seconds)
4+
5+
**OAuth is pre-configured - no setup needed!**
6+
7+
1. Click **Git Settings** button (GitHub icon)
8+
2. Click **"Login with GitHub OAuth"**
9+
3. Visit the URL shown
10+
4. Enter the code displayed
11+
5. Click "Authorize"
12+
6. Done! ✅
13+
14+
You're now logged in and will stay logged in across restarts.
15+
16+
**No OAuth app creation needed** - Blueprint Studio provides a shared OAuth app for all users!
17+
18+
---
19+
20+
## 🔄 Alternative: Manual PAT Token
21+
22+
If you prefer the traditional method:
23+
24+
1. Go to: https://github.com/settings/tokens
25+
2. Click "Generate new token (classic)"
26+
3. Give it a name (e.g., "Blueprint Studio")
27+
4. Select scope: `repo`
28+
5. Generate and copy the token
29+
6. In Blueprint Studio:
30+
- Click Git Settings
31+
- Scroll to "Manual PAT Configuration"
32+
- Enter username and token
33+
- Click "Save Credentials"
34+
35+
---
36+
37+
## 📖 Full Documentation
38+
39+
See [GITHUB_OAUTH_SETUP.md](./GITHUB_OAUTH_SETUP.md) for complete details, troubleshooting, and advanced configuration.
40+
41+
---
42+
43+
## ✨ Features
44+
45+
- ✅ Stay logged in forever (credentials persist)
46+
- ✅ Easy OAuth Device Flow
47+
- ✅ Traditional PAT support
48+
- ✅ Works with 2FA
49+
- ✅ Switch between methods anytime

GITHUB_OAUTH_SETUP.md

Lines changed: 238 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,238 @@
1+
# GitHub OAuth Device Flow Setup
2+
3+
Blueprint Studio supports **OAuth Device Flow** for easy GitHub authentication! No manual token creation needed.
4+
5+
## 🎉 Pre-Configured OAuth App (Recommended)
6+
7+
**Good news!** Blueprint Studio comes with a **pre-configured shared OAuth app** that all users can use immediately.
8+
9+
### ⚡ Just Click and Go!
10+
11+
1. Click **"Login with GitHub OAuth"** in Git Settings
12+
2. Visit the URL and enter the code shown
13+
3. Authorize Blueprint Studio
14+
4. Done! You're logged in
15+
16+
**No setup required** - the OAuth app is already configured for you!
17+
18+
### 🔒 Is This Safe?
19+
20+
Yes! This is the standard approach used by:
21+
- ✅ GitHub CLI (`gh`)
22+
- ✅ VSCode
23+
- ✅ Git Credential Manager
24+
- ✅ Many other tools
25+
26+
The OAuth Client ID is **public and meant to be shared**. Each user still:
27+
- Authenticates with their own GitHub account
28+
- Gets their own private access token
29+
- Controls their own authorization
30+
31+
---
32+
33+
## 🔧 Advanced: Using Your Own OAuth App (Optional)
34+
35+
If you prefer to use your own GitHub OAuth app for privacy/security reasons, you can create one:
36+
37+
### Step 1: Create a GitHub OAuth App
38+
39+
1. Go to: https://github.com/settings/developers
40+
2. Click **"New OAuth App"**
41+
3. Fill in the details:
42+
- **Application name:** Blueprint Studio (or any name)
43+
- **Homepage URL:** `https://github.com/yourusername/repo` (or any URL)
44+
- **Authorization callback URL:** Leave blank or use `http://localhost` (not used by Device Flow)
45+
- **Application description:** (optional)
46+
47+
4. Click **"Register application"**
48+
49+
5. You'll see your **Client ID** - copy this (it looks like: `Ov23liXXXXXXXXXXXXXX`)
50+
51+
6. **Important:** You do NOT need to generate a client secret for Device Flow!
52+
53+
### Step 2: Configure Your Custom Client ID
54+
55+
To use your own OAuth Client ID, you can set it via browser console:
56+
57+
**Open Browser Console** (F12 or right-click → Inspect → Console):
58+
```javascript
59+
localStorage.setItem("githubOAuthClientId", "YOUR_CLIENT_ID_HERE");
60+
```
61+
62+
Replace `YOUR_CLIENT_ID_HERE` with your actual Client ID.
63+
64+
**That's it!** Next time you click "Login with GitHub OAuth", it will use your custom Client ID instead of the shared one.
65+
66+
### Step 3: Use Your OAuth App
67+
68+
After configuring your Client ID:
69+
1. Refresh Blueprint Studio
70+
2. Click "Login with GitHub OAuth"
71+
3. Authorize using your OAuth app
72+
4. Done!
73+
74+
---
75+
76+
## 🔐 Security & Privacy
77+
78+
### Default OAuth App
79+
80+
- **Client ID is public** - This is normal and safe for OAuth Device Flow
81+
- **No client secret** - Device Flow doesn't use secrets
82+
- **Used by all Blueprint Studio users** - Shared OAuth app (like VSCode, GitHub CLI)
83+
- **Your credentials stay local** - Only stored on your Home Assistant instance
84+
- **No data sent to third parties** - Direct GitHub API communication only
85+
86+
### Your Own OAuth App
87+
88+
- **Full control** - You own and manage the OAuth app
89+
- **Private** - Only you use this OAuth app
90+
- **Same security** - OAuth Device Flow is equally secure
91+
92+
---
93+
94+
## 📝 How OAuth Device Flow Works
95+
96+
1. **Request Code:** Blueprint Studio asks GitHub for a device code and user code
97+
2. **Show Code:** You see a code like `ABCD-1234`
98+
3. **Authorize:** Visit GitHub and enter the code
99+
4. **Poll for Token:** Blueprint Studio polls GitHub for authorization
100+
5. **Get Token:** Once authorized, GitHub provides an access token
101+
6. **Save Token:** Token is saved persistently (same as PAT method)
102+
7. **Done:** You're logged in!
103+
104+
**Technical Details:**
105+
- Uses GitHub's standard Device Flow API
106+
- No redirect URLs needed (perfect for local Home Assistant)
107+
- Works on any network (local, VPN, remote)
108+
- Token is saved with base64 encoding (same as PAT)
109+
110+
---
111+
112+
## 🆚 PAT vs OAuth Device Flow Comparison
113+
114+
| Feature | PAT Method | OAuth Device Flow |
115+
|---------|------------|-------------------|
116+
| **Setup Complexity** | Manual token creation | Click and authorize |
117+
| **User Experience** | Copy/paste token | Click and type code |
118+
| **Security** | Long-lived token | OAuth token (refreshable) |
119+
| **2FA Support** | Manual | Automatic |
120+
| **Token Visibility** | You see it | Hidden from user |
121+
| **Persistence** | ✅ Yes | ✅ Yes |
122+
| **OAuth App Required** | ❌ No | ⚠️ Yes (provided by default) |
123+
124+
---
125+
126+
## 🐛 Troubleshooting
127+
128+
### "Failed to start device flow"
129+
130+
**Cause:** Cannot reach GitHub's OAuth API
131+
132+
**Solutions:**
133+
- Check your internet connection
134+
- Verify Home Assistant can reach github.com
135+
- Check firewall settings
136+
137+
### "Login expired"
138+
139+
**Cause:** Took too long to authorize (usually 15 minutes)
140+
141+
**Solutions:**
142+
- Click "Login with GitHub" again
143+
- Authorize faster (code expires in 15 min)
144+
145+
### "Access denied"
146+
147+
**Cause:** You clicked "Cancel" or denied authorization on GitHub
148+
149+
**Solutions:**
150+
- Click "Login with GitHub" again
151+
- Accept the authorization on GitHub
152+
153+
### "Invalid client_id"
154+
155+
**Cause:** Using a custom OAuth app with wrong Client ID
156+
157+
**Solutions:**
158+
- Verify your Client ID is correct
159+
- Make sure you copied the full ID from GitHub
160+
- Try using the default OAuth app first
161+
162+
---
163+
164+
## 🔄 Switching Between Methods
165+
166+
You can switch between OAuth and PAT at any time:
167+
168+
**From PAT to OAuth:**
169+
1. Open Git Settings
170+
2. Click "Login with GitHub"
171+
3. Authorize
172+
4. Your new OAuth token replaces the PAT
173+
174+
**From OAuth to PAT:**
175+
1. Open Git Settings
176+
2. Scroll to "Manual PAT Configuration"
177+
3. Enter username and PAT token
178+
4. Click "Save Credentials"
179+
5. Your new PAT replaces the OAuth token
180+
181+
**Note:** Only one set of credentials is stored at a time.
182+
183+
---
184+
185+
## 📚 Additional Resources
186+
187+
- **GitHub Device Flow Docs:** https://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps#device-flow
188+
- **Creating PAT Tokens:** https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
189+
- **OAuth Best Practices:** https://docs.github.com/en/developers/apps/building-oauth-apps/best-practices-for-oauth-apps
190+
191+
---
192+
193+
## ✨ Benefits Over PAT
194+
195+
1. **Easier for new users** - No need to navigate GitHub settings
196+
2. **Better UX** - Click, code, done
197+
3. **More secure** - No manual token handling
198+
4. **Works with 2FA** - No special setup needed
199+
5. **Standard OAuth** - Same flow as VSCode, GitHub CLI, etc.
200+
201+
---
202+
203+
## 💡 FAQ
204+
205+
**Q: Do I need to create an OAuth app?**
206+
A: No! Blueprint Studio provides a pre-configured shared OAuth app for all users.
207+
208+
**Q: Can I use my own OAuth app?**
209+
A: Yes! Use browser console to set your custom Client ID (instructions above).
210+
211+
**Q: Is the shared OAuth app safe?**
212+
A: Yes! This is the standard approach used by GitHub CLI, VSCode, and many other tools. Your credentials stay private on your Home Assistant instance.
213+
214+
**Q: Is OAuth more secure than PAT?**
215+
A: Both are secure. OAuth has better UX and works better with 2FA.
216+
217+
**Q: Will my credentials persist after restart?**
218+
A: Yes! Both PAT and OAuth tokens are saved persistently.
219+
220+
**Q: Can I switch between PAT and OAuth?**
221+
A: Yes! You can switch at any time in Git Settings.
222+
223+
**Q: What happens to the old token when I switch?**
224+
A: It's replaced with the new one. Old token is deleted.
225+
226+
**Q: Where are credentials stored?**
227+
A: In `.storage/blueprint_studio.credentials` on your Home Assistant instance (encrypted by Home Assistant).
228+
229+
**Q: Can I revoke access?**
230+
A: Yes! Go to GitHub Settings → Applications → Blueprint Studio → Revoke
231+
232+
---
233+
234+
## 🎉 Enjoy Easy GitHub Authentication!
235+
236+
No more manually creating PAT tokens! Just click "Login with GitHub" and you're done.
237+
238+
Happy coding! 🚀

0 commit comments

Comments
 (0)