Skip to content

fix(ui): keep the sections board after assigning reviewers - #167

Merged
noamsto merged 1 commit into
mainfrom
feat/165-fix-ui-keep-the-sections-board-after-ass
Oct 7, 2026
Merged

noamsto merged 1 commit into
mainfrom
feat/165-fix-ui-keep-the-sections-board-after-ass

Conversation

@noamsto

@noamsto noamsto commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Closes #165

Summary

Assigning reviewers with Shift+R on the default open PR board (sections: Review requested / Mine / Others) replaced the sections view with author-grouped rows until the next normal refresh. The root cause was that assignReviewersCmd always used fetchCmd(m.filter, false) (flat list) regardless of the board state, while the rest of the app uses sectionsFetchCmd on the sections board and fetchCmd on any other board.

Extracted a listFetchCmd helper (PR-mode only) that picks between the two fetches the same way refreshCmd does, and wired it into assignReviewersCmd so the two paths cannot drift again.

Testing

  • go test ./... — passes
  • go test -race -short ./... — passes
  • New test TestAssignReviewersOnSectionedBoardKeepsSections confirms the sections board stays sections after a reviewer change, and would fail on the old code.
  • golangci-lint, nilaway — clean

assignReviewersCmd always fetched through fetchCmd(m.filter, false),
which paints the flat PR board — even on the sections default (open
board with no server qualifier), where it would replace the Review
requested / Mine / Others categories with author grouping until the
next normal refresh.

Extract a listFetchCmd helper that chooses between sectionsFetchCmd
and fetchCmd the same way refreshCmd does, and use it in
assignReviewersCmd. The helper ensures both paths stay in sync.

Fixes #165.
@noamsto
noamsto merged commit 868c08e into main Oct 7, 2026
1 check passed
@noamsto
noamsto deleted the feat/165-fix-ui-keep-the-sections-board-after-ass branch October 7, 2026 12:33
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.

fix(ui): keep the sections board after assigning reviewers

1 participant