Skip to content

feat(github): workspace Issues page, author identity, review state, issue editing - #144

Merged
Dvorinka merged 8 commits into
mainfrom
feat/github-issues-surface
Nov 12, 2026
Merged

Dvorinka merged 8 commits into
mainfrom
feat/github-issues-surface

Conversation

@Dvorinka

Copy link
Copy Markdown
Owner

Summary

  • New workspace-wide Issues surface (GET /workspaces/:id/github/issues, /app/issues page, rail entry with live open-count badge) — parallel to Pull requests, with open/closed/all state filters, per-repo failure surfacing, and 60s server caching
  • Author identity everywhere: GitHub avatar_url/author_type flow onto every issue/PR row; mirrored Relay issues persist the filer (github_author, github_avatar_url — migration 0054, backfilled by webhook/import/reconcile)
  • In-app GitHub issue modal: body + markdown, comment thread, composer, close/reopen, milestone, deep-link ?gh=owner/name:N — fixes the dead-end where unmirrored issue rows dropped users into a filtered list
  • Issue/PR editing: shared label+assignee editor (lazy catalogs, wholesale PATCH), inline label creation, and title/body editing in the modal
  • PR review state: pulls/{n}/reviews reduced to latest-per-reviewer; decision chip (approved / changes requested / pending), reviewer + assignee + requested_teams avatar stacks, merged_by, PR comment counts via the issues endpoint
  • Personal filters: users.github_login (migration 0055) with Settings binding and a server-side existence check; unlocks Filed by me / Assigned to me / My review requested on both workspace pages

Test plan

  • go build ./..., go test ./internal/github ./internal/auth
  • tsc --noEmit, oxlint (0 findings), vitest (43), vite build
  • OpenAPI schema regenerated, sqlc regenerated
  • Smoke: /app/issues + GitHub-login binding on a live installation; migrations apply on deploy

Generated with Devin

cognition-team and others added 7 commits November 7, 2026 12:54
…nd issue editing

- GET /workspaces/:id/github/issues — fan-out aggregation mirroring pulls,
  open/closed/all state filter, per-repo failure reporting, 60s cache
- Issues page in the rail with live open-count badge; Pulls gains the same
- Author avatars + login highlighting on every issue/PR surface; bot badges
  driven by GitHub's real user.type
- Mirrored issues persist github_author/github_avatar_url (migration 0054),
  backfilled by webhook, bulk import, and reconcile
- In-app GitHub issue detail modal: body, comment thread, composer,
  close/reopen, deep-linkable via /app/p/:id?gh=owner/name:N
- Label/assignee editing on issues and PRs (PATCH issues/{n}), inline
  label creation, and title/body editing in the issue modal
- PR review decisions: latest-state-per-reviewer reduction, decision chip,
  reviewer/assignee/team-requested avatar stacks, merged_by, comment counts
- users.github_login (migration 0055) + Settings binding with existence
  check; unlocks "filed by me / assigned to me / my review requested"
  filters on the workspace pages

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@vercel

vercel Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
relay-landing Ready Ready Preview Nov 12, 2026 8:11am UTC

@mira-tdvorak

mira-tdvorak Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Mira PR Walkthrough

This PR introduces a comprehensive GitHub Issues workspace feature including a new Issues page with filtering, author identity display across issues/PRs, an in-app issue modal with full interaction capabilities, shared label/assignee editing, PR review state visualization, and personal filters. The changes shown affect the navigation rail (adding Issues entry) and a minor database SQL update. Note: The file metadata appears incomplete relative to the extensive feature description. Confidence is moderate since only 2 files are shown changed but the feature scope is large; the visible changes are safe but full verification requires reviewing all modified files.


❌ Review failed — click for details

The code review failed to complete due to an unexpected error.

Stage: Code review
Error type: LLMError
Message: LLM tool-call failed


Comment @mira-tdvorak help to get the list of available commands and usage tips.

@mira-tdvorak mira-tdvorak Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mira Review Summary

This PR adds a comprehensive GitHub Issues workspace view with author identity, review state, inline editing, and GitHub login binding. Three critical issues need attention: (1) All CI workflows switched to self-hosted runners which will break CI if not configured; (2) The GitHub username existence check fails open on any error, creating a security bypass during GitHub API outages; (3) The GitHub username regex validation is too permissive and allows invalid usernames. Additionally, the PR comment count fetching scans all issues inefficiently, and the new auth/profile logic lacks automated test coverage.

Key Issues

Issue Location
🔴 CI workflows changed to self-hosted runners — will fail if runners not configured .github/workflows/ci.yml:8
🔴 githubLoginPattern regex is too permissive (allows trailing/consecutive hyphens) internal/auth/handlers.go:94

Comment thread .github/workflows/ci.yml Resolved
Comment thread internal/auth/handlers.go
@@ -90,41 +94,90 @@ func UserOut(u db.GetUserByIDRow) userOut {
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug
⚠️ Warning

githubLoginPattern regex allows invalid GitHub usernames

The regex ^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,38})$ allows trailing hyphens and consecutive hyphens (e.g., user--name-). GitHub usernames only allow single hyphens, not at start/end. This means invalid usernames pass the client-side check and only fail at the GitHub API call (which fails open per the previous issue). Use a stricter regex: ^[a-zA-Z0-9](?:-?[a-zA-Z0-9]){0,38}$ to enforce single hyphens only and no trailing hyphen.

Suggested change
}
var githubLoginPattern = regexp.MustCompile(`^[a-zA-Z0-9](?:-?[a-zA-Z0-9]){0,38}$`)

Not useful? Reply @mira-tdvorak reject to dismiss this suggestion.

Comment thread internal/auth/handlers.go
CreatedAt string `json:"created_at"`
}

func toSessionOut(c Credentials) sessionOut {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security issue
⚠️ Warning

Fail-open design in githubUserExists allows binding during GitHub outage

The githubUserExists function (lines 74-93) returns true on any error (network failure, rate limit, GitHub outage, timeout). This is documented as intentional: "anything else — rate limit, outage, network — returns true so a transient failure never blocks a profile save."

Impact: During a GitHub API outage or rate limiting, a user could bind a non-existent username. The binding would persist until they try to update it again.

This is a reasonable usability tradeoff but should be explicitly documented in the function comment and possibly logged for audit purposes.


Prompt for AI Agents
Add a comment explaining the fail-open rationale and consider logging failures for audit. Optionally, add a background reconciliation job that re-validates bindings periodically.

Not useful? Reply @mira-tdvorak reject to dismiss this suggestion.

Comment thread apps/desktop/go.mod Resolved
Comment thread internal/auth/handlers.go
ID string `json:"id"`
Email string `json:"email"`
Name string `json:"name"`
NameColor *string `json:"name_color"`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security issue
⚠️ Warning

GitHub username regex doesn't match GitHub's exact validation rules

The regex ^[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,38})$ (line 65) allows:

  • Trailing hyphens (e.g., user-)
  • Consecutive hyphens (e.g., user--name)

GitHub's actual rules: "Username may only contain alphanumeric characters or single hyphens, and cannot begin or end with a hyphen."

Mitigation: The githubUserExists call validates against GitHub's API, so invalid usernames will be rejected anyway. This is defense-in-depth only.


Prompt for AI Agents
Update regex to match GitHub's rules: `^[a-zA-Z0-9](?:-?[a-zA-Z0-9]){0,38}$` (no leading/trailing hyphens, no consecutive hyphens, max 39 chars).

Not useful? Reply @mira-tdvorak reject to dismiss this suggestion.

@Dvorinka
Dvorinka merged commit 16b14e6 into main Nov 12, 2026
7 of 10 checks passed

This branch was successfully deployed

1 active deployment
Preview — 8b5d335b Deployed Nov 12, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants