Auto workspace access from GitHub repo permissions + routing fix#74
Merged
khaliqgant merged 6 commits intomainfrom Jan 6, 2026
Merged
Conversation
Moved OnlineUsersIndicator outside the fixed header wrapper on mobile. The indicator was causing variable header height (52px + indicator height) but the spacer was only 52px, cutting off content. Fixes: - LogViewer can now scroll to previous logs on mobile - ThreadPanel close button no longer hidden behind presence bar 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…elay-462) Added automatic workspace access for users with GitHub repo permissions: ## New Features 1. `checkWorkspaceAccess()` function: - Checks access via: ownership → membership → GitHub repo access - Uses in-memory cache (5 min TTL) for performance - Returns access type and permission level 2. `requireWorkspaceAccess` middleware: - Drop-in replacement for manual auth checks - Attaches workspaceAccess info to request 3. `GET /api/workspaces/accessible` endpoint: - Lists all workspaces user can access - Categories: owned, member, contributor - Includes permission level for each 4. `findByGithubFullName()` db query: - Returns all repos matching a GitHub full name - Used to find workspaces containing user's repos ## Access Flow Dashboard load → Fetch accessible repos via Nango → Match to workspaces → Show all 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The gitRouter was mounted after teamsRouter, which is mounted at /api with requireAuth middleware. This caused all /api/git/* requests to be intercepted by teamsRouter's requireAuth, returning SESSION_EXPIRED instead of reaching gitRouter's workspace token verification. Fixed by moving gitRouter mount before teamsRouter. Added comments explaining the routing order dependency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…elay-324 agent-relay-323: gh CLI auth blocked by router mount order bug - teamsRouter at /api was intercepting /api/git/token - FIXED in commit 58e6686 (pending deployment) agent-relay-324: Memory metrics 0 B because ps command not installed - Workspace containers don't have ps binary - Fix: Use /proc/{pid}/status instead 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Keep meaningful summary for traj_avqeghu6pz5a from local branch - Merge all trajectory entries from both branches 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
/api/git/tokenwas intercepted by teamsRouterChanges
Auto Workspace Access (agent-relay-462)
checkWorkspaceAccess()with 5-minute cacherequireWorkspaceAccessmiddlewareGET /api/workspaces/accessibleendpointfindByGithubFullName()db queryGit Credential Routing Fix
/apiwith requireAuth intercepted all/api/*requestsMobile UI Fixes
Investigation Findings
Test plan
🤖 Generated with Claude Code