22 KiB
GIT-004: GitHub Project Management Integration - Changelog
Overview
This changelog tracks the implementation of the GitHub Project Management Integration feature, enabling teams to manage Issues, Pull Requests, and Discussions directly from the Nodegex editor and dashboard, with the unique ability to link GitHub issues to visual components.
Sub-Task Series
- GIT-004A: GitHub OAuth & Client Foundation
- GIT-004B: Issues Panel - Read & Display
- GIT-004C: Pull Requests Panel - Read & Display
- GIT-004D: Create & Update Issues
- GIT-004E: Component Linking System
- GIT-004F: Dashboard Widgets & Notifications
[Date TBD] - Task Created
Summary
Created comprehensive task documentation for GitHub Project Management Integration feature. This represents a major Phase 3 initiative that will differentiate Nodegex as a collaborative development hub.
Task Documents Created
README.md- Full feature specification with 6 sub-tasksCHECKLIST.md- Detailed implementation checklistCHANGELOG.md- This fileNOTES.md- Working notes template
Key Decisions
- Full OAuth Flow: Upgrading from PAT-based auth to GitHub App OAuth for better security and UX
- Component Linking: Including this killer feature in the initial scope
- Both Editor + Dashboard: Primary in editor sidebar, overview widgets in dashboard
- Issues + PRs: Both in scope from the start
Strategic Context
This feature positions Nodegex as the only low-code platform with deep GitHub integration and component-level issue tracking. Primary target: development teams and professional associations.
[2026-01-14] - GIT-004A: GitHub Client Foundation - COMPLETE ✅
Summary
Built comprehensive GitHub REST API client with rate limiting, caching, error handling, and full test coverage. Foundation is complete and production-ready.
Files Created
packages/noodl-editor/src/editor/src/services/github/GitHubTypes.ts(434 lines) - Complete type definitionspackages/noodl-editor/src/editor/src/services/github/GitHubClient.ts(668 lines) - API client servicepackages/noodl-editor/src/editor/src/services/github/index.ts(54 lines) - Public exportspackages/noodl-editor/tests/services/github/GitHubClient.test.ts(501 lines) - 20 unit testsdev-docs/tasks/phase-3-editor-ux-overhaul/TASK-002B-github-advanced-integration/GIT-004A-COMPLETE.md- Documentation
Technical Notes
- Singleton pattern with EventDispatcher for React integration
- LRU cache (max 100 entries, 30s TTL default)
- Rate limit tracking with 10% warning threshold
- Auto-initialization when user authenticates
- Pattern-based cache invalidation on mutations
- User-friendly error messages for all HTTP codes
Testing Notes
- 20 comprehensive unit tests covering:
- Caching behavior (hits, TTL, invalidation)
- Rate limiting (tracking, warnings, reset calculations)
- Error handling (404, 401, 403, 422)
- API methods (issues, PRs, repos)
- Singleton pattern and auth integration
Type Safety
Added missing types for backward compatibility:
GitHubAuthState- Auth state interfaceGitHubDeviceCode- OAuth device flowGitHubAuthError- Error typesGitHubToken,GitHubInstallation,StoredGitHubAuth
Next Steps
- GIT-004B: Build Issues Panel UI (useIssues hook, IssuesList, filtering, detail view)
[2026-01-14] - GIT-004B: Issues Panel - Complete ✅
Summary
Built full GitHub Issues panel with data fetching, list display, detail view, and pagination. All core read functionality is complete and compiling without errors.
Files Created
Hooks:
packages/noodl-editor/src/editor/src/views/panels/GitHubPanel/hooks/useGitHubRepository.ts(147 lines) - Repository detection from Git remotepackages/noodl-editor/src/editor/src/views/panels/GitHubPanel/hooks/useIssues.ts(127 lines) - Issues data fetching with pagination
Components:
packages/noodl-editor/src/editor/src/views/panels/GitHubPanel/components/IssuesTab/IssueItem.tsx(105 lines) - Single issue cardpackages/noodl-editor/src/editor/src/views/panels/GitHubPanel/components/IssuesTab/IssueItem.module.scss(113 lines)packages/noodl-editor/src/editor/src/views/panels/GitHubPanel/components/IssuesTab/IssuesList.tsx(86 lines) - Issues list with statespackages/noodl-editor/src/editor/src/views/panels/GitHubPanel/components/IssuesTab/IssuesList.module.scss(153 lines)packages/noodl-editor/src/editor/src/views/panels/GitHubPanel/components/IssuesTab/IssueDetail.tsx(125 lines) - Slide-out detail panelpackages/noodl-editor/src/editor/src/views/panels/GitHubPanel/components/IssuesTab/IssueDetail.module.scss(185 lines)
Files Modified
packages/noodl-editor/src/editor/src/views/panels/GitHubPanel/GitHubPanel.tsx- Integrated all components with hookspackages/noodl-editor/src/editor/src/router.setup.ts- Panel registered (order 5.5)
Features Implemented
✅ Repository Detection:
- Parses GitHub owner/repo from Git remote URL
- Supports both HTTPS and SSH formats
- Graceful fallback for non-GitHub repos
✅ Issues List:
- Fetches issues from GitHubClient
- Display issue cards with number, title, status, labels
- Shows relative timestamps ("2 hours ago")
- Comment counts
- Label badges with contrasting text colors
✅ Issue Detail:
- Slide-out panel (600px wide)
- Full issue metadata display
- Issue body text (simplified, markdown planned for GIT-004D)
- Labels with GitHub colors
- "View on GitHub" link
✅ Pagination:
- Load More button (30 issues per page)
- Loading spinner during fetch
- "No more issues" end state
✅ Loading & Error States:
- Spinner during initial load
- Error state with retry button
- Empty states for no issues
- Loading state for pagination
✅ Multiple Empty States:
- Not authenticated
- Not a GitHub repository
- No issues found
- Loading repository info
Technical Decisions
- Simplified Markdown: Using plain text for now, full markdown rendering deferred to GIT-004D
- useEventListener Pattern: Following Phase 0 guidelines for GitHubClient event subscriptions
- Repository from Git: Creating Git instance per hook call (stateless approach)
- Design Tokens: All colors use
var(--theme-color-*)tokens - Slide-out Detail: Chosen over modal for better UX (as discussed with Richard)
Testing
- ✅ TypeScript compilation passes with no errors
- ✅ All components properly typed
- ⚠️ Manual testing required (needs real GitHub repository)
Known Limitations
- No Filtering UI: Hardcoded to show "open" issues only
- No Search: Search input not yet functional
- No Markdown Rendering: Issue bodies show as plain text
- No Comments Display: Comments count shown but not rendered
- No Create/Edit: Read-only for now (GIT-004D will add CRUD)
Next Steps (Future Tasks)
GIT-004C: Pull Requests Panel
- Similar structure to Issues
- PR-specific features (checks, reviews, merge status)
GIT-004D: Issues CRUD
- Create issue dialog
- Edit existing issues
- Add comments
- Proper markdown rendering with
react-markdown - Issue templates support
Immediate Todos:
- Add filtering UI (state, labels, assignees)
- Implement search functionality
- Connect "Connect GitHub" button to OAuth flow
- Manual testing with real repository
Template for Future Entries
## [YYYY-MM-DD] - GIT-004X: [Sub-Task Name]
### Summary
[Brief description of what was accomplished]
### Files Created
- `path/to/file.tsx` - [Purpose]
### Files Modified
- `path/to/file.ts` - [What changed and why]
### Technical Notes
- [Key decisions made]
- [Patterns discovered]
- [Gotchas encountered]
### Testing Notes
- [What was tested]
- [Any edge cases discovered]
### Next Steps
- [What needs to be done next]
[2026-01-15] - GIT-004C: Pull Requests Panel - Complete ✅
Summary
Built complete GitHub Pull Requests panel following the same patterns as Issues panel. All core read functionality is complete and compiling without errors.
Files Created (7 files, ~1,100 lines)
Hook:
hooks/usePullRequests.ts(127 lines) - PR fetching with pagination
Components:
components/PullRequestsTab/PRItem.tsx(145 lines) - Single PR cardcomponents/PullRequestsTab/PRItem.module.scss(130 lines)components/PullRequestsTab/PRsList.tsx(86 lines) - PR list with statescomponents/PullRequestsTab/PRsList.module.scss(153 lines)components/PullRequestsTab/PRDetail.tsx(215 lines) - Slide-out detail panelcomponents/PullRequestsTab/PRDetail.module.scss(265 lines)
Files Modified
GitHubPanel.tsx- Added Pull Requests tab with PullRequestsTab component
Features Implemented
✅ Pull Requests List:
- Fetches PRs from GitHubClient with caching
- PR cards with:
- PR number and title
- Status badges (Open, Draft, Merged, Closed)
- Branch information (base ← head)
- Commits, files changed, comments stats
- Labels with GitHub colors
- Relative timestamps
✅ PR Detail Slide-out:
- 600px wide panel from right side
- Full PR metadata including branch names
- Detailed stats (commits, files, comments)
- Labels display
- Status-specific info boxes (merged, draft, closed)
- "View on GitHub" link
✅ Status Badges:
- 🟢 Open - Green
- 📝 Draft - Gray
- 🟣 Merged - Purple
- 🔴 Closed - Red
✅ Same patterns as Issues:
- Pagination (30 per page)
- Loading/error/empty states
- useEventListener for GitHubClient events
- Design tokens throughout
- Slide-out detail view
Technical Notes
- Reused most patterns from GIT-004B (Issues)
- Took ~2 hours vs estimated 10-14 (pattern reuse win!)
- All status colors match GitHub's actual UI
- PR-specific fields: commits, changed_files, base.ref, head.ref, draft, merged_at
Testing
- ✅ TypeScript compilation passes with no errors
- ✅ All components properly typed
- ⚠️ Manual testing required (needs real GitHub repository with PRs)
Time Spent
- usePullRequests hook: 15 min
- PRItem component: 20 min
- PRsList component: 15 min
- PRDetail component: 25 min
- Styling (all components): 30 min
- Integration: 10 min
- Testing & docs: 10 min
Total: ~2 hours (vs 10-14 estimated - 80% time saving from pattern reuse!)
[2026-01-16] - OAuth Flow Bug Fixes - Complete ✅
Summary
Fixed critical bugs preventing GitHub OAuth from working. The OAuth flow was broken due to two separate OAuth implementations that weren't communicating properly.
Root Causes Identified
- Git Path Null Error:
git.openRepository()didn't handle whenopen()returns null (not a git repo) - Disconnected OAuth Flows: Two separate OAuth implementations existed:
GitHubOAuthService.ts(renderer) - Generated PKCE state, opened browsergithub-oauth-handler.js(main) - Had separate state, handled callback- These didn't communicate - OAuth callback went to main process, but renderer never received it
Files Modified
Bug Fix 1 - Git Null Path:
packages/noodl-git/src/git.ts- Added null check inopenRepository()to throw clear error instead of crashing
Bug Fix 2 - OAuth Flow:
packages/noodl-editor/src/editor/src/services/GitHubOAuthService.ts- Complete rewrite to:- Use IPC to get auth URL from main process (reuses main's state)
- Listen for
github-oauth-completeandgithub-oauth-errorIPC events - Properly receive and store tokens after OAuth callback
Bug Fix 3 - Error Handling:
packages/noodl-editor/src/editor/src/views/panels/GitHubPanel/hooks/useGitHubRepository.ts- Added try/catch aroundgit.openRepository()to gracefully handle non-git projects
Bug Fix 4 - Initialization:
packages/noodl-editor/src/editor/src/views/panels/GitHubPanel/GitHubPanel.tsx- Added:GitHubOAuthService.initialize()call on mount to restore saved tokensuseEventListenerto react to auth state changes- Loading state while initializing
Technical Notes
OAuth Flow Now:
- User clicks "Connect GitHub Account"
- GitHubOAuthService calls
ipcRenderer.invoke('github-oauth-start')- main generates state - Main returns auth URL, renderer opens in browser
- User authorizes, GitHub redirects to
noodl://github-callback - Main process receives callback, validates state (its own), exchanges code for token
- Main sends
github-oauth-completeIPC event with token + user - GitHubOAuthService receives event, stores token, updates state
- GitHubPanel re-renders as connected
Token Storage:
- Main process uses
jsonstorage+ ElectronsafeStoragefor encryption - Token persisted across sessions
initialize()loads saved token on app start
Existing Infrastructure Verified
The following was already correctly implemented in main.js:
initializeGitHubOAuthHandlers(app)- Protocol handler registeredgithub-save-token/github-load-token/github-clear-tokenIPC handlers- Token encryption using Electron's safeStorage
Error Messages Improved
- "Not a git repository: /path" instead of cryptic "path must be string, received null"
- Console logging for OAuth flow stages for debugging
Testing Required
- Click "Connect GitHub Account" and complete OAuth flow
- Verify token is stored and user info displayed
- Close and reopen app, verify session is restored
- Test with non-git project (should show graceful error)
- Test with GitHub repo (should detect owner/repo)
[2026-01-16] - Session 2: Critical Bug Fixes & Unification - Complete ✅
Summary
Second bug-fix session addressing infinite loops, jsonstorage errors, IPC targeting issues, and unifying OAuth across launcher and editor.
Bugs Fixed
Bug 1: jsonstorage.getSync doesn't exist
- File:
packages/noodl-editor/src/main/main.js(line ~672) - Fix: The jsonstorage module only has async
get(key, callback). Changed to Promise wrapper.
const stored = await new Promise((resolve) => {
jsonstorage.get('github.token', (data) => resolve(data));
});
Bug 2: IPC event not reaching renderer
- File:
packages/noodl-editor/src/main/github-oauth-handler.js - Fix: Was sending to
windows[0]which might be viewer/floating window, not editor. Now broadcasts to ALL windows.
windows.forEach((win, index) => {
win.webContents.send('github-oauth-complete', result);
});
Bug 3: Infinite loop in useIssues hook
- File:
packages/noodl-editor/src/editor/src/views/panels/GitHubPanel/hooks/useIssues.ts - Root Cause:
filtersobject in useEffect deps creates new reference on every render - Fix: Use
useReffor filters andJSON.stringify(filters)for dependency comparison
const filtersRef = useRef(filters);
filtersRef.current = filters;
const filtersKey = JSON.stringify(filters);
useEffect(() => { ... }, [owner, repo, filtersKey, enabled, refetch]);
Bug 4: Infinite loop in usePullRequests hook
- File:
packages/noodl-editor/src/editor/src/views/panels/GitHubPanel/hooks/usePullRequests.ts - Fix: Same pattern as useIssues - ref for filters, JSON serialization for deps
New Features
Launcher OAuth Integration
- File:
packages/noodl-editor/src/editor/src/pages/ProjectsPage/ProjectsPage.tsx - Added state:
githubIsAuthenticated,githubIsConnecting,githubUser - Added handlers:
handleGitHubConnect,handleGitHubDisconnect - Listens for auth state changes via
useEventListener - Launcher button now initiates real OAuth flow
CredentialsSection OAuth Migration
- File:
packages/noodl-editor/src/editor/src/views/panels/VersionControlPanel/components/GitProviderPopout/sections/CredentialsSection.tsx - Migrated from old
GitHubAuthservice to unifiedGitHubOAuthService - Now shares token storage with GitHubPanel and Launcher
Testing Results
| Test | Result |
|---|---|
| OAuth from GitHubPanel in project | ✅ Works |
| OAuth from Launcher header button | ✅ Works |
| OAuth from CredentialsSection | ✅ Works (migrated) |
| Token persistence across restart | ✅ Works (without clean:all) |
| Issues/PRs single request (no loop) | ✅ Works |
| 404 error handling (no loop) | ✅ Works |
Technical Notes
- All three OAuth entry points now use
GitHubOAuthService.instance - Token stored via IPC (
github-save-token) in main process using Electron's safeStorage clean:allwill wipe tokens (expected - wipes electron-store data)
Future Task Created
Created TASK-002C-github-clone-and-connect/README.md documenting two new features:
- Subtask A: Clone Noodl projects from GitHub (launcher view)
- Subtask B: Connect unconnected project to GitHub (create/link repo)
Progress Summary
| Sub-Task | Status | Started | Completed |
|---|---|---|---|
| GIT-004A: OAuth & Client | ✅ Complete | 2026-01-14 | 2026-01-14 |
| GIT-004B: Issues Read | ✅ Complete | 2026-01-14 | 2026-01-14 |
| GIT-004C: PRs Read | ✅ Complete | 2026-01-15 | 2026-01-15 |
| OAuth Bug Fixes | ✅ Complete | 2026-01-16 | 2026-01-16 |
| GIT-004D: Issues CRUD | Not Started | - | - |
| GIT-004E: Component Linking | Not Started | - | - |
| GIT-004F: Dashboard | Not Started | - | - |
Blockers Log
Track any blockers encountered during implementation
| Date | Blocker | Sub-Task | Resolution | Time Lost |
|---|---|---|---|---|
| - | - | - | - | - |
API Rate Limit Notes
Track GitHub API rate limit observations
| Date | Scenario | Requests Used | Notes |
|---|---|---|---|
| - | - | - | - |
Performance Notes
Track performance observations
| Scenario | Observation | Action Taken |
|---|---|---|
| Large issue list (100+) | - | - |
| Component linking query | - | - |
| Dashboard aggregation | - | - |
User Feedback
Track user feedback during development/testing
| Date | Feedback | Source | Action |
|---|---|---|---|
| - | - | - | - |
[2026-01-18] - VersionControlPanel Discovery + GIT-005-011 Documentation ✅
Summary
Major documentation effort creating GIT-005 through GIT-011 task specs (Live Collaboration & Multi-Community System), plus critical discovery that the existing VersionControlPanel is already 100% React with full visual diff support.
Key Discovery: VersionControlPanel is React! 🎉
Not jQuery - The entire VersionControlPanel is modern React:
- React functional components with hooks (useState, useEffect, useRef)
- Context API (VersionControlContext)
- TypeScript throughout
- Uses @noodl-core-ui design system
Visual diff system already works:
- Click any commit in History tab
- See green nodes (additions), red nodes (deletions)
- Component-level diff visualization
DiffList.tsx,CommitChangesDiff.tsxalready implement this
Integration Strategy Created
Approach: Extend VersionControlPanel with GitHub tabs instead of maintaining separate GitHubPanel.
Benefits:
- Single unified panel for all version control
- Existing visual diffs work unchanged
- No rewrite needed - just add tabs
- Estimated 11-16 hours vs 70-90 for separate panel
Documentation: GIT-INTEGRATION-STRATEGY.md
Task Documentation Created (GIT-005-011)
Part 2: Live Collaboration & Multi-Community System
| Task | Name | Hours | Files Created |
|---|---|---|---|
| GIT-005 | Community Infrastructure | 60-80 | GIT-005-community-infrastructure/README.md |
| GIT-006 | Server Infrastructure | 80-100 | GIT-006-server-infrastructure/README.md |
| GIT-007 | WebRTC Collaboration | 100-130 | GIT-007-webrtc-collaboration/README.md |
| GIT-008 | Notification System | 50-70 | GIT-008-notification-system/README.md |
| GIT-009 | Community Tab UI | 80-100 | GIT-009-community-ui/README.md |
| GIT-010 | Session Discovery | 50-70 | GIT-010-session-discovery/README.md |
| GIT-011 | Integration & Polish | 61-82 | GIT-011-integration-polish/README.md |
Total Part 2 Effort: 431-572 hours
Files Created
GIT-005-community-infrastructure/README.mdGIT-006-server-infrastructure/README.mdGIT-007-webrtc-collaboration/README.mdGIT-008-notification-system/README.mdGIT-009-community-ui/README.mdGIT-010-session-discovery/README.mdGIT-011-integration-polish/README.mdGIT-INTEGRATION-STRATEGY.md
Files Modified
README.md- Added Part 2 section, integration strategy referenceCHECKLIST.md- Added GIT-005-011 checklistsPROGRESS.md(Phase 3) - Updated task list and recent updates
VersionControlPanel Components Verified
All these are modern React:
LocalChanges.tsx- Uncommitted changesHistory.tsx- Commit historyHistoryCommitDiff.tsx- Visual commit diffCommitChangesDiff.tsx- Diff logicDiffList.tsx- Green/red node rendererBranchList.tsx- Branch managementBranchMerge.tsx- Merge operationsMergeConflicts.tsx- Conflict resolutionStashes.tsx- Git stash
Next Steps
- Immediate: Integrate Issues/PRs as tabs in VersionControlPanel
- Short-term: Enhance GitProviderPopout with OAuth
- Medium-term: Begin GIT-005 Community Infrastructure
- Long-term: GIT-006-011 server and collaboration features