Skip to content

feat(foc-pr-report): triage-first ordering and table action hints#33

Merged
BigLep merged 4 commits into
masterfrom
codex/tweaks-2026-05-03
May 3, 2026
Merged

feat(foc-pr-report): triage-first ordering and table action hints#33
BigLep merged 4 commits into
masterfrom
codex/tweaks-2026-05-03

Conversation

@BigLep
Copy link
Copy Markdown
Contributor

@BigLep BigLep commented May 3, 2026

Summary

Improves the FOC PR report output to make triage/review follow-up clearer, and adds a reusable README prompt for generating Slack review/merge nudges.

Changes

  • Triage first: 📌 Triage is listed before In Progress, Awaiting review, and Approved by reviewer in both the per-person table and the repository × status matrix.
  • Empty reviewer links: Synthetic empty reviewer drill-down links now use no:reviewers (instead of review:none) to match board filtering.
  • Action hints in table: For named users only, append 👀 after non-zero reviewer counts in Awaiting review, and 🏁 after non-zero assignee counts in Approved by reviewer (emoji outside links), plus a legend under the person table.
  • README updates:
    • Documents the no:reviewers empty-reviewer link behavior.
    • Documents 👀/🏁 marker semantics in the PR count by individual section.
    • Adds a reusable “Slack review/merge nudge” prompt template (without Slack user-ID mapping) for turning report output into a concise Slack message.
  • Refactor cleanup: Uses EMPTY_ROW_LOGIN constant for the synthetic row label in rendering.

Test plan

  • cd foc-pr-report && GITHUB_TOKEN=$(gh auth token) uv run foc-pr-report
  • Spot-check output:
    • Status order puts 📌 Triage first.
    • Empty reviewer links use no:reviewers.
    • 👀/🏁 markers render outside links and legend appears under person table.
    • README text matches generated output semantics.

- List 📌 Triage before other primary lanes in person and repo tables
- Use no:reviewers for empty-reviewer drill-down links (board-aligned)
- Mark awaiting-review reviewer counts with 👀 and approved assignee counts with 🏁; add legend

Co-authored-by: Cursor <cursoragent@cursor.com>
@FilOzzy FilOzzy added this to FOC May 3, 2026
@github-project-automation github-project-automation Bot moved this to 📌 Triage in FOC May 3, 2026
@BigLep BigLep self-assigned this May 3, 2026
@BigLep BigLep requested a review from rjan90 May 3, 2026 16:15
@BigLep BigLep moved this from 📌 Triage to 🔎 Awaiting review in FOC May 3, 2026
@BigLep BigLep requested a review from Copilot May 3, 2026 16:15
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the FOC Project 14 PR report Markdown output to make triage more prominent and to add small “what to do next” hints in the per-person table.

Changes:

  • Reorders status lane sorting to put 📌 Triage first (affects both per-person rows and the repo×status matrix column ordering).
  • Updates “empty reviewer” drill-down links to use no:reviewers instead of review:none.
  • Adds per-cell action hints (👀 / 🏁) for named users and prints a legend below the per-person table.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
foc-pr-report/foc_pr_report/report.py Adds triage-first status ordering, updates empty-reviewer filter qualifier, and adds emoji hints + legend in the per-person table rendering.
foc-pr-report/README.md Updates docs to reflect the new empty-reviewer link qualifier (no:reviewers).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread foc-pr-report/foc_pr_report/report.py Outdated
Comment thread foc-pr-report/README.md Outdated
BigLep and others added 2 commits May 3, 2026 09:30
Reusable prompt template to turn report output into a short Slack message
(Awaiting your review / Approved by your reviewers wording); no Slack user-ID mapping.

Co-authored-by: Cursor <cursoragent@cursor.com>
- Use EMPTY_ROW_LOGIN for synthetic row label in render_markdown
- Document 👀/🏁 suffixes and legend in README output tables

Co-authored-by: Cursor <cursoragent@cursor.com>
@BigLep
Copy link
Copy Markdown
Contributor Author

BigLep commented May 3, 2026

Copy link
Copy Markdown
Contributor

@rjan90 rjan90 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, looks good to me.

@github-project-automation github-project-automation Bot moved this from 🔎 Awaiting review to ✔️ Approved by reviewer in FOC May 3, 2026
- Treat requested non-user reviewers and non-user submitted reviews as non-empty
- Keep named-user reviewer counts user-centric while aligning empty row semantics
- Update README to document board-aligned no:reviewers behavior

Co-authored-by: Cursor <cursoragent@cursor.com>
@BigLep
Copy link
Copy Markdown
Contributor Author

BigLep commented May 3, 2026

Implemented Option A in b5cda1c to align the empty reviewer row with board no:reviewers semantics.

What changed:

  • Empty-row counting now treats non-user reviewer activity as non-empty (requested non-user reviewers like teams, and non-user submitted reviews like bots).
  • Named-user reviewer counts remain user-centric.
  • README updated to document this distinction and alignment.

I also reran the mismatch repro check from the thread and now get MATCH_OK (no displayed-vs-linked mismatches for empty reviewer rows in current data).

@BigLep BigLep merged commit e7647f2 into master May 3, 2026
@github-project-automation github-project-automation Bot moved this from ✔️ Approved by reviewer to 🎉 Done in FOC May 3, 2026
BigLep added a commit that referenced this pull request May 4, 2026
- Port fetch_pull_request_review_activity (renamed from
  fetch_pull_request_review_logins) with has_non_user_review return
  value into pr_enrichment.py, matching master's PR #33 changes
- Update enrich_pull_items_with_submitted_reviewers to set
  _has_non_user_submitted_review on each PR item
- Add backward-compat alias for old function name
- Export fetch_pull_request_review_activity from shim
- Fix test_lookup_by_short_ref: filter to org items since short refs
  expand using the default org

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
BigLep added a commit that referenced this pull request May 4, 2026
…oard (#31)

* docs: add spec for generalizing MCP project board client

Defines the feature spec for extracting a shared, board-agnostic client
library from filozzy-mcp and foc_project14_client.py. Covers:
- Three-layer responsibility boundaries (shared client / MCP adapter / external tools)
- Current boundary violations to fix during refactor
- First-class tool vs. external tool decisions
- Board alias configuration for LLM routing
- Cross-package test infrastructure requirements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add implementation plan for generalizing MCP project board client

Phase 0 research (package structure, naming, extraction boundaries,
test runner, config approach, migration strategy) and Phase 1 design
(data model, shared client API contract, MCP tools contract, quickstart).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add task breakdown for generalizing MCP project board client

46 tasks across 6 phases: setup, shared client extraction, MCP server
generalization (MVP), cross-package test runner, foc-pr-report migration,
and polish. Uses git mv to preserve file history where possible.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: scaffold ghprojects-client package

Create the shared client library package with pyproject.toml,
hatchling build, and pytest config. No code yet — populated in
the next phase.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: extract ghprojects-client and generalize MCP server

Extract shared GitHub Projects v2 board logic from foc_project14_client.py
and filozzy-mcp into a new ghprojects-client package. All functions are
parameterized by org/project_number with no hardcoded defaults.

- ghprojects-client: api.py, fields.py, items.py, views.py, mutations.py
  with 21 integration tests
- filozzy-mcp server.py: reads GITHUB_ORG, GITHUB_PROJECT_NUMBER,
  BOARD_NAMES from env; imports from ghprojects_client; audit logging
  stays in MCP layer
- foc-pr-report: PR-specific functions moved to pr_enrichment.py;
  foc_project14_client.py is now a thin backward-compat shim
- github-project-export: imports directly from ghprojects_client
- scripts/test-all.sh: cross-package test runner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: consolidate integration tests, remove redundancy

Move shared-client tests that only existed in filozzy-mcp into
ghprojects-client (6 tests). Strip filozzy-mcp down to 2 MCP-layer-
specific tests (docstring query validation). Zero overlap between
the two test suites.

Before: 21 + 29 = 50 tests (heavy duplication)
After:  27 +  2 = 29 tests (no duplication)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update READMEs, add foc-pr-report test infrastructure

- Add FilOzzy MCP Server and ghprojects-client sections to root README
- Update filozzy-mcp README with env var docs and architecture section
- Rewrite ghprojects-client README with full public API table
- Add foc-pr-report integration test and pytest dev dependency
- Mark all remaining spec tasks as complete

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* refactor: rename ghprojects-client to github-projects-client

Rename package directory, Python module, and all references for
consistency with existing github-milestone-creator and
github-project-export naming conventions.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address PR #31 review feedback

- Parse GITHUB_PROJECT_NUMBER defensively with clear error on invalid input
- Document default values for GITHUB_ORG, GITHUB_PROJECT_NUMBER, BOARD_NAMES
  in mcp-tools.md contract
- Remove verbose param from shared-client-api.md (MCP-layer concern only)
- Fix corrupted box-drawing characters in quickstart.md and plan.md
- Update audit log JSON example to match actual implementation schema

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: port PR #33 review activity changes and fix short-ref test

- Port fetch_pull_request_review_activity (renamed from
  fetch_pull_request_review_logins) with has_non_user_review return
  value into pr_enrichment.py, matching master's PR #33 changes
- Update enrich_pull_items_with_submitted_reviewers to set
  _has_non_user_submitted_review on each PR item
- Add backward-compat alias for old function name
- Export fetch_pull_request_review_activity from shim
- Fix test_lookup_by_short_ref: filter to org items since short refs
  expand using the default org

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🎉 Done

Development

Successfully merging this pull request may close these issues.

4 participants