diff --git a/README.md b/README.md index 03dfecc..efb6140 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,9 @@ Chromium Manifest V3 **browser extension** for **FOC TPMs and team members** wor ## Features -1. **Make FOC's project board "global" (i.e., support cross-org issues and PRs)** — Manage the board (add items, edit fields where the API allows) from GitHub issues and pull requests on configured repos, with a native-style sidebar and **autosave** for supported field types (single select, number, text, iteration). +1. **Make FOC’s project board "global" (i.e., support cross-org issues and PRs)** — Manage the board (add items, edit fields where the API allows) from GitHub issues and pull requests on configured repos, with a native-style sidebar and **autosave** for supported field types (single select, number, text, iteration). 2. **Global auto-expand for project panels** — Optional setting so GitHub’s right-hand **Project** panel **auto-expands** for issues and PRs (works across projects, not only FOC). +3. **OR filter for project boards** — Enter OR queries in the project board filter bar (e.g. `cycle:202605-2 biglep (-status:"🎉 Done") OR (-last-updated:1days)`) to see merged results from multiple filter branches in a single view. The extension splits the query, fetches each branch separately, deduplicates, and renders the combined results through GitHub’s native UI. This is particularly useful during standups where you want to see all your active and recently completed work in a single view. Configure which boards support this in **Options → OR filter for project boards** (defaults to all FilOzone projects). ### 🎥 2026-03-29 Demo diff --git a/docs/canonical-test-urls.md b/docs/canonical-test-urls.md index e68e708..5fc4a53 100644 --- a/docs/canonical-test-urls.md +++ b/docs/canonical-test-urls.md @@ -60,6 +60,27 @@ Use this when validating **Options → expand Project panel** (and related conte **Expectation**: With auto-expand on, native **Projects** sections **expand** as implemented for this feature ([spec 003](../specs/003-auto-expand-panels/spec.md)); the **inline FOC** card from scenarios 3–6 still follows global-board / target-repo rules and is unrelated to this check. +## Project Board OR Filter (spec 007) + +Use these URLs when verifying the **OR query filter** on project board views ([spec 007](../specs/007-project-board-or-filter/spec.md)). + +| View | URL | Notes | +|------|-----|-------| +| Current by Status | [FilOzone/projects/14/views/20](https://github.com/orgs/FilOzone/projects/14/views/20) | Grouped by Status, filtered by cycle. Primary test view. | +| All | [FilOzone/projects/14/views/2](https://github.com/orgs/FilOzone/projects/14/views/2) | Large item set (~360 items), exercises pagination. | +| Recently Updated | [FilOzone/projects/14/views/33](https://github.com/orgs/FilOzone/projects/14/views/33) | Different sort/filter configuration. | + +### Test queries + +| Query | Expected | +|-------|----------| +| `cycle:202605-2 biglep (-status:"🎉 Done") OR (-last-updated:1days)` | Merged results from both branches, no duplicates | +| `(-status:"🎉 Done") OR (-last-updated:1days)` | Two branches with no shared prefix | +| `cycle:202605-2 -status:"🎉 Done"` | Non-OR query — native pass-through, unchanged behavior | +| `((nested))` | Invalid OR — native pass-through, console warning | +| `(a) OR (b) trailing` | Invalid OR — native pass-through, console warning | +| `(a OR b)` | Invalid OR — native pass-through, console warning | + ## Related docs - [Global boards picker status](global-boards-picker-status.md) — picker vs sidebar scope. diff --git a/extension/manifest.json b/extension/manifest.json index 6f2d592..15ae5ba 100644 --- a/extension/manifest.json +++ b/extension/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 3, "name": "FOC GH", - "version": "0.2.0", + "version": "0.3.0", "description": "Utilities for FOC team members working in GitHub.", "icons": { "16": "icons/icon16.png", @@ -36,11 +36,18 @@ ], "js": ["content.js"], "run_at": "document_idle" + }, + { + "matches": [ + "https://github.com/orgs/*/projects/*/views/*" + ], + "js": ["board-filter.js"], + "run_at": "document_start" } ], "web_accessible_resources": [ { - "resources": ["sidebar.css", "pr-expand-main-world.js"], + "resources": ["sidebar.css", "pr-expand-main-world.js", "board-data-injector.js"], "matches": ["https://github.com/*"] } ] diff --git a/extension/src/content/board-filter/board-data-injector.ts b/extension/src/content/board-filter/board-data-injector.ts new file mode 100644 index 0000000..fdc67d0 --- /dev/null +++ b/extension/src/content/board-filter/board-data-injector.ts @@ -0,0 +1,267 @@ +/** + * Main-world fetch interceptor for project board OR queries. + * + * Runs in the PAGE's main world (injected via