Bug Description
The GitHub integration in Settings > Integrations is completely broken and non-functional. Users cannot connect their GitHub account (clicking the "+" button does nothing), and users who are already connected cannot properly disconnect (the logout doesn't actually work).
This issue consists of two related problems:
- Connect button shows nothing: Clicking the "+" button starts authentication in the background but no modal appears to show the device code to the user
- Disconnect button doesn't logout: Clicking the "✓" checkmark only clears the keychain but doesn't logout of GitHub CLI, so the user remains connected
Both problems must be fixed together to restore GitHub integration functionality.
Steps to Reproduce
To reproduce Problem 1 (Connect button):
- Open Emdash application
- Open Settings (
⚙️ icon or Cmd+,)
- Navigate to the Integrations tab
- Locate the "GitHub - Connect your repositories" card
- Click the "+" button (add/connect button)
- Observe the result
To reproduce Problem 2 (Disconnect button):
- Ensure you are already connected to GitHub (card shows "✓" checkmark button)
- Click the "✓" checkmark button to disconnect
- Wait a few seconds
- Observe the GitHub card status
- (Optional) Run
gh api user in terminal to verify GitHub CLI is still authenticated
Actual vs Expected Behavior
Actual
Connecting:
- User clicks the "+" button to connect GitHub
- Nothing happens - no modal, no feedback, no error
- User is stuck and confused
Disconnecting:
- User clicks the "✓" checkmark to disconnect
- App appears to process the request
- Refresh the page
- User remains connected (still shows ✓)
- GitHub CLI is still authenticated in the background
emdash Version
latest
Operating System
macOS
Additional Context
Problem 1: Connect Button
Expected Behavior:
- A modal should appear showing a device code
- The GitHub card should update to show a "✓" checkmark indicating connected state
Actual Behavior:
- Nothing visible happens when clicking the "+" button
- No modal appears
- No device code is displayed
- No error message is shown
- User is left without any feedback or way to proceed
- Authentication starts silently in the background but user cannot see the device code
Root Cause:
- File:
src/renderer/components/IntegrationsCard.tsx
- The
handleGithubConnect function calls login() which initiates the OAuth device flow
- However, the
GithubDeviceFlowModal component is never imported or rendered
- The modal component exists at
src/renderer/components/GithubDeviceFlowModal.tsx but is unused
Problem 2: Disconnect Button
Expected Behavior:
- User clicks the "✓" checkmark button
- App runs
gh auth logout to logout of GitHub CLI
- App clears the keychain token
- Status check returns
authenticated: false
- UI updates to show the "+" button again (disconnected state)
Actual Behavior:
- User clicks the "✓" checkmark button
- App only clears the keychain token
- GitHub CLI (
gh) remains logged in
- Status check runs
gh api user which still succeeds
- Status still returns
authenticated: true
- UI continues to show the "✓" checkmark (connected state)
- User believes they are logged out, but they are not (security/privacy concern)
Bug Description
The GitHub integration in Settings > Integrations is completely broken and non-functional. Users cannot connect their GitHub account (clicking the "+" button does nothing), and users who are already connected cannot properly disconnect (the logout doesn't actually work).
This issue consists of two related problems:
Both problems must be fixed together to restore GitHub integration functionality.
Steps to Reproduce
To reproduce Problem 1 (Connect button):
⚙️icon orCmd+,)To reproduce Problem 2 (Disconnect button):
gh api userin terminal to verify GitHub CLI is still authenticatedActual vs Expected Behavior
Actual
Connecting:
Disconnecting:
emdash Version
latest
Operating System
macOS
Additional Context
Problem 1: Connect Button
Expected Behavior:
Actual Behavior:
Root Cause:
src/renderer/components/IntegrationsCard.tsxhandleGithubConnectfunction callslogin()which initiates the OAuth device flowGithubDeviceFlowModalcomponent is never imported or renderedsrc/renderer/components/GithubDeviceFlowModal.tsxbut is unusedProblem 2: Disconnect Button
Expected Behavior:
gh auth logoutto logout of GitHub CLIauthenticated: falseActual Behavior:
gh) remains logged ingh api userwhich still succeedsauthenticated: true