Repository navigation
Show GitHub labels on Issues cards and filter the board by label - #567
Merged
Merged
Conversation
The open-issue list and the linked-issue query now ask GitHub for each issue's labels in the same call, so every task carries its labels in the snapshot without a per-issue read. A colour that is not six hex digits is dropped, Local issues carry none, and an empty list stays off the wire. The saved GitHub answer keeps the labels and still restores a file saved before them.
A card and a List row draw at most two of the task's own labels, so a card no read has opened shows them too; in a narrow List row the labels shorten and then drop before the title gives way. The Issues filter offers every label the board's cards carry with a count, keeps a card carrying any picked label, keeps a picked label offered after its last card goes, and clears labels with the words. With no label on any card the choice is not drawn.
# Conflicts: # web/src/ProjectOverview.tsx
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
Issues 카드에는 GitHub 라벨이 이슈를 한 번 읽은 뒤에만 보였고, 보드를 라벨로 거를 방법도 없었습니다.
이제 열린 이슈 목록을 읽는 같은
gh issue list호출과 같은 GraphQL 쿼리가 라벨을 함께 가져오고, 라벨은 task에 실려 snapshot으로 갑니다. Local 이슈의 라벨은 비어 있습니다.카드와 List 행에는 GitHub 색으로 라벨이 최대 두 개 보입니다.
Issues 필터에는
라벨선택이 추가됐습니다: 여러 개를 고를 수 있고, 고른 라벨 중 하나라도 가진 카드가 남으며,필터 지우기를 누르면 라벨도 함께 지워집니다.보드의 어느 카드에도 라벨이 없으면 라벨 선택은 그려지지 않습니다.
Review
헤더는
overview-roomy-tabs에서 다시 그리는 중이라 이 PR에서는 건드리지 않았습니다.pen-screens.mjs의 카드는 이미card.labels를 최대 두 개 그립니다.필터 팝오버는 Pen에 그려진 적이 없고, 헤더는 병행 작업 영역이라 이번에 새로 그리지 않았습니다.
herdr-core/src/tasks.rs,web/src/snapshot.ts: snapshot wire가 바뀝니다. task에labels가 추가되고, 비어 있으면 생략됩니다.herdr-core/src/issues.rs:home_issues.issues가 같은IssueSnapshot을 쓰기 때문에 라벨도 함께 실립니다. 웹은 이 값을 읽지 않습니다.herdr-core/src/github.rs: Herdr 밖의gh호출입니다.issue list --json에labels가 추가되고, linked-issue 쿼리에labels(first:100)가 추가됩니다. 호출 수와 프로세스 수는 그대로입니다.herdr-core/src/github_store.rs: 저장 파일github-snapshot.json이 이제 라벨을 저장합니다. 라벨이 없던 시절의 파일도 그대로 복원됩니다.web/src/ProjectOverview.tsx,web/src/MainScreen.tsx: 병행 PR이 고치는 파일입니다. 여기서는 import 하나와labelsprop 한 줄씩만 바꿨습니다.rest섹션의 라벨 이름과 색뿐이고, 이슈당 100개가 상한입니다.Evidence
verify-cargo.sh test전체와lint(fmt, clippy)가 통과했습니다.verify-web.sh가 통과했습니다(web vitest 1036, desktop 154).overview.spec.ts가 통과했습니다. fakegh가 실제 gh 2.76.2 모양으로 라벨을 줍니다.ui가 보입니다.ui를 고르면 카드가 2장 남고, 단어와 함께 걸면 AND로 줄어듭니다.필터 지우기를 누르면 3장으로 돌아옵니다.gh issue list --json labels와 GraphQL을 직접 실행해 확인했고, 그 모양을 fixture에 썼습니다.boardLabels가[])으로만 확인했습니다. e2e에는 없습니다.filterBoard와 컴포넌트를 거치지만, 따로 캡처하지 않았습니다.cargo test첫 실행에서hide-platformwatch burst 테스트가 web 레인과 동시에 돌다가 한 번 실패했습니다. 단독으로 다시 돌리니 통과했고, 이 diff가 건드리지 않은 크레이트입니다.추가 증거
List 1600px: 라벨이 제목 뒤에 두 개까지 붙습니다.

List 900px: #4의 긴 라벨이 먼저 줄어들고, 제목은 그대로입니다.

List 720px: 라벨이 사라진 뒤에 제목이 잘립니다.

Board 900px, #2 hover: 버튼은 id 줄의 빈자리를 채우고, 카드 높이는 그대로입니다.
