Skip to content

Fix comment action parity across discussions and reviews#318

Open
justjxke wants to merge 4 commits intobetter-auth:mainfrom
justjxke:fix/comment-actions
Open

Fix comment action parity across discussions and reviews#318
justjxke wants to merge 4 commits intobetter-auth:mainfrom
justjxke:fix/comment-actions

Conversation

@justjxke
Copy link
Contributor

Why

Comment action behavior had drifted across issue, pull request, review, and discussion surfaces.

Discussion starter posts, discussion comments, and PR review comments were missing action menus that GitHub exposes, and top-level review bodies were treated differently from the nested review comments beneath them. That inconsistency meant users could edit, report, or reference some comment-like surfaces but not others, even when the underlying GitHub object supported the same workflow.

The follow-up problem was that the menu model itself was incomplete. Better Hub had no report-content handoff, no reference-in-new-issue flow, and several top-level author surfaces still used bespoke controls instead of the shared action menu. That made the UI harder to reason about and easier to regress whenever a new comment surface was added or updated.

How

This change makes comment actions capability-driven and applies the same shared menu system across the missing surfaces.

The first part of the branch:

  • adds the shared action trigger to discussion starter posts, discussion comments and replies, PR review comments, PR review bodies, and issue bodies
  • wires native edit and delete support for the GitHub objects that support those mutations
  • fixes permission gating so destructive actions are only shown when the current viewer can actually use them
  • keeps action placement and ordering consistent across the previously divergent renderers

The second part of the branch expands the shared action model:

  • adds Report content as a confirmed handoff to GitHub's report-content flow
  • adds Reference in new issue with a native Better Hub dialog seeded from the source body and permalink
  • adds repository selection to that reference dialog, with the current repository pinned first and support for typing an exact owner/repo
  • tightens surface labels so top-level bodies read as Issue body actions, Discussion actions, and Review actions, with matching edit labels like Edit discussion and Edit review

Result

After this branch:

  • issue bodies, issue comments, discussion starters, discussion comments, discussion replies, PR comments, PR review bodies, and PR review comments all expose a coherent action menu surface
  • missing GitHub-style moderation/workflow actions are available where they make sense
  • reference creation can target another repository without leaving the dialog or manually reworking the issue after creation
  • the highest-risk action-menu parity gaps that were repeatedly surfacing in review are closed

Validation

I validated the branch with targeted automated checks:

  • bun test apps/web/src/lib/comment-actions.test.ts
  • bun x oxlint apps/web/src/lib/comment-actions.ts apps/web/src/lib/comment-actions.test.ts apps/web/src/components/shared/comment-action-dialogs.tsx apps/web/src/components/pr/message-actions-menu.tsx apps/web/src/components/pr/collapsible-review-card.tsx apps/web/src/components/discussion/discussion-conversation.tsx
  • bun x oxfmt --check apps/web/src/lib/comment-actions.ts apps/web/src/lib/comment-actions.test.ts apps/web/src/components/shared/comment-action-dialogs.tsx apps/web/src/components/pr/message-actions-menu.tsx apps/web/src/components/pr/collapsible-review-card.tsx apps/web/src/components/discussion/discussion-conversation.tsx
  • targeted TypeScript check for the touched app files

I also smoke-tested the UI in the local app with Playwright against an authenticated session:

  • verified Issue body actions on issue #314
  • verified Discussion actions on discussion #277
  • verified Review actions on PR #130
  • verified the reference dialog opens from discussion actions, pins the current repo first, and updates the target repo when typing an exact owner/repo

No real report submission or issue creation was completed during the browser checks.

@vercel
Copy link

vercel bot commented Mar 11, 2026

@justjxke is attempting to deploy a commit to the better-auth Team on Vercel.

A member of the Team first needs to authorize it.

@justjxke justjxke force-pushed the fix/comment-actions branch from 66fcf85 to 1bc6cc9 Compare March 11, 2026 21:36
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.

1 participant