Skip to content

Commit e332772

Browse files
julianknutsenclaude
andcommitted
fix: hide orphaned accept/reject/close buttons when submissions section is shown
Filter accept/reject/close from the bottom action bar when the submissions section is rendering, since those actions are already available per-submission inline. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cdaa508 commit e332772

1 file changed

Lines changed: 21 additions & 10 deletions

File tree

web/src/components/DetailView.tsx

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -472,16 +472,27 @@ export function DetailView() {
472472
</Section>
473473
)}
474474

475-
{(actions.length > 0 || branchActions.length > 0) && (
476-
<div className={styles.actions}>
477-
{actions.map((action) => (
478-
<ActionButton key={action} action={action} onAction={async () => onActionClick(action)} />
479-
))}
480-
{branchActions.map((action) => (
481-
<ActionButton key={action} action={action.replace("_", " ")} onAction={async () => onActionClick(action)} />
482-
))}
483-
</div>
484-
)}
475+
{(() => {
476+
const submissionActions = new Set(["accept", "reject", "close"]);
477+
const hasSubmissions = upstream_prs && upstream_prs.length > 0;
478+
const filteredActions = hasSubmissions ? actions.filter((a) => !submissionActions.has(a)) : actions;
479+
return (
480+
(filteredActions.length > 0 || branchActions.length > 0) && (
481+
<div className={styles.actions}>
482+
{filteredActions.map((action) => (
483+
<ActionButton key={action} action={action} onAction={async () => onActionClick(action)} />
484+
))}
485+
{branchActions.map((action) => (
486+
<ActionButton
487+
key={action}
488+
action={action.replace("_", " ")}
489+
onAction={async () => onActionClick(action)}
490+
/>
491+
))}
492+
</div>
493+
)
494+
);
495+
})()}
485496

486497
{showEditForm && (
487498
<WantedForm

0 commit comments

Comments
 (0)