Skip to content

Unify suggestions and PRs views with mode-aware labels #65

Description

@JohnRDOrazio

Context

Suggestions and PRs are the same underlying object — submitting a suggestion creates a PR. Currently they are presented as separate views:

  • "My Suggestions" → /projects/{id}/suggestions
  • "PRs" → /projects/{id}/pull-requests

This separation is confusing. The two views should be unified into one, with labels adapting to the editor mode.

Desired behavior

Navigation (editor toolbar)

  • Standard mode: Single "My Suggestions" button (replaces both current buttons)
  • Developer mode: Single "My Pull Requests" button

Both link to the same unified page (e.g., /projects/{id}/pull-requests or a new unified route).

Unified list view

Standard mode:

Tab Maps to Description
Open PR state: open Suggestions pending review
Accepted PR state: merged Approved and merged suggestions
Rejected PR state: closed Rejected suggestions
All All states Everything
  • Page title: "My Suggestions"
  • Items show user-friendly language ("accepted", "rejected", "pending review")

Developer mode:

Tab Maps to Description
Open PR state: open Open pull requests
Merged PR state: merged Merged pull requests
Closed PR state: closed Closed pull requests
All All states Everything
  • Page title: "My Pull Requests"
  • Items show developer language ("merged", "closed", "open")

Admin/owner view

Project admins and owners see all users' suggestions/PRs (not just their own):

  • Standard mode: Title: "Suggestions" (no "My"), shows submitter name on each item
    • Actions: "Accept" (merge), "Reject" (close without merging), "Request Changes"
  • Developer mode: Title: "Pull Requests", shows author name on each item
    • Actions: "Merge", "Close", "Request Changes"

Action labels by mode

Action Standard mode Developer mode
Merge PR Accept Merge
Close without merging Reject Close
Request changes Request Changes Request Changes

Implementation notes

  • Consider unifying /suggestions and /pull-requests routes into one page that reads editorMode from the store
  • The existing PRList, PRDetail, PRActions components need mode-aware label props
  • The existing /suggestions/review page may be consolidated into the unified view
  • Filter logic stays the same (open/merged/closed) — only labels change

Files likely affected

  • app/projects/[id]/pull-requests/page.tsx — mode-aware labels
  • app/projects/[id]/suggestions/page.tsx — may merge into pull-requests page
  • app/projects/[id]/suggestions/review/page.tsx — may merge into pull-requests page
  • app/projects/[id]/editor/page.tsx — single button instead of two
  • components/pr/PRList.tsx — mode-aware tab labels
  • components/pr/PRActions.tsx — mode-aware action labels
  • components/pr/PRDetail.tsx — mode-aware status labels

Metadata

Metadata

Assignees

No one assigned

    Labels

    UXUser experience improvementsenhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions