fix(web): pass onMerge to AttentionZone in kanban view#2114
Open
0xGermain wants to merge 1 commit into
Open
Conversation
The merge button on kanban session cards was silently no-op because onMerge was not forwarded to the AttentionZone component. The optional chain onMerge?.() resolved to undefined, so clicking the button produced no fetch, no error, and no user feedback. Also parse the JSON error response from /api/prs/:id/merge so the toast shows human-readable blocker reasons (e.g. "Merge blocked: CI is failing") instead of raw JSON. Co-Authored-By: Claude Opus 4.6 (1M context) <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
onMerge={handleMerge}toAttentionZonein the kanban layout — the prop was missing, making the merge button a silent no-op/api/prs/:id/mergeso the toast shows human-readable blocker reasons instead of raw JSONWhat happened
The
handleMergecallback was wired toBottomSheet(mobile preview) but never forwarded toAttentionZonein the desktop kanban grid. SinceSessionCarddeclaresonMergeas optional (onMerge?.()), clicking the merge button silently did nothing — no fetch, no error, no toast.Additionally, when a merge does fail (e.g. CI blockers), the error toast dumped raw JSON like
{"error":"PR is not mergeable","blockers":["CI is failing"]}. Now it showsMerge blocked: CI is failing.Changes
packages/web/src/components/Dashboard.tsxonMerge={handleMerge}to theAttentionZonecomponent in the kanbanmap()(line ~723)blockersorerrorfor the toast messageHow to test
Closes #TBD