feat: OR filter for project board views#9
Open
BigLep wants to merge 5 commits into
Open
Conversation
…n project boards Adds feature 007-project-board-or-filter targeting GitHub issue #8. Includes spec, research (DOM/API analysis of GitHub memex internals), implementation plan, data model, contracts, quickstart, and task breakdown. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add fetch interception on project board pages that detects OR syntax in the filter bar, splits into per-branch API calls, merges/deduplicates results, and returns them to GitHub's React app transparently. Non-OR queries pass through unchanged. Invalid OR syntax falls back to native filtering with a console warning. Bump version to 0.3.0. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add an Options setting (OR filter for project boards) where users specify glob-style URL patterns for boards that get OR query support. Defaults to https://github.com/orgs/FilOzone/projects/*. The content script checks the config before injecting the fetch interceptor. Update README to document the OR filter as feature #3. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Adds OR-condition filtering support on GitHub Project board views by injecting a main-world fetch interceptor that fans out /memexes/{id}/paginated_items requests per OR-branch, then merges/dedupes results so GitHub’s native React UI renders the combined set. It also introduces an Options setting to gate the feature by board URL patterns and bumps the extension version to 0.3.0.
Changes:
- Add new project-board content script + injected main-world
fetchinterceptor for OR-query fanout/merge. - Add configurable “OR filter for project boards” URL patterns in Options + config loader helpers.
- Add/refresh spec docs, build pipeline entries, and version bumps.
Reviewed changes
Copilot reviewed 23 out of 24 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
specs/007-project-board-or-filter/tasks.md |
Task breakdown for spec 007 (needs alignment with implemented approach). |
specs/007-project-board-or-filter/spec.md |
Feature spec for OR filtering on project boards. |
specs/007-project-board-or-filter/research.md |
Reverse-engineering notes for memex board data and APIs. |
specs/007-project-board-or-filter/quickstart.md |
Dev quickstart for building/testing the feature. |
specs/007-project-board-or-filter/plan.md |
Implementation plan and architecture writeup. |
specs/007-project-board-or-filter/data-model.md |
Data model definitions for OR parsing and memex responses. |
specs/007-project-board-or-filter/contracts/*.ts |
Contracts for parser/merger/memex API expectations. |
specs/007-project-board-or-filter/checklists/requirements.md |
Spec quality checklist for spec 007. |
scripts/build.mjs |
Adds esbuild entry points for new content/injected scripts. |
README.md |
Documents new OR filter feature in the feature list. |
package.json |
Bumps version to 0.3.0. |
package-lock.json |
Updates lockfile version metadata to 0.3.0. |
extension/src/options/options.ts |
Loads/saves new OR-filter board URL patterns setting (currently prevents disabling via empty list). |
extension/src/options/options.html |
Adds UI for OR-filter board URL patterns. |
extension/src/lib/project-config.ts |
Adds storage key/defaults + isOrFilterBoard() glob matching (currently prevents disabling via empty list). |
extension/src/content/board-filter/board-filter-main.ts |
Content script that gates by config and injects main-world interceptor. |
extension/src/content/board-filter/board-data-injector.ts |
Main-world fetch monkey-patch that detects OR syntax and performs multi-branch fetch+merge. |
extension/src/content/board-filter/or-query-parser.ts |
OR query parser with invalid-syntax detection + branch limit. |
extension/src/content/board-filter/result-merger.ts |
Dedupes/merges multi-branch responses (slice totals likely inconsistent). |
extension/src/content/board-filter/memex-api.ts |
Memex API response type defs (shape conflicts with spec/contracts in this PR). |
extension/manifest.json |
Registers new project-board content script + exposes injector as web accessible resource. |
docs/canonical-test-urls.md |
Adds manual test URLs/queries for spec 007. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
When navigating directly to a board URL with an OR filterQuery, GitHub server-renders 0 results. The extension now detects this and toggles a trailing space in the filter bar via execCommand (which creates trusted InputEvents that React recognizes). This makes React see a new query not in its cache, triggering a fresh paginated_items fetch through the normal pipeline — which our interceptor catches and returns merged data. The content script now runs at document_start so the fetch interceptor is installed before the React app initializes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Fix group pagination index misalignment: find matching group by groupId instead of assuming array index alignment when API scopes pagination to a single group - Add 'too_many_branches' error type to OR parser (was reusing 'single_branch' for max-branches-exceeded case) - Allow empty orFilterBoardPatterns array to persist in config/options so users can disable OR filter by clearing the textarea - Update contract docs and data-model to reflect actual API response format (arrays, not Records; groups includes pageInfo) - Update task descriptions to match shipped implementation Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Not blocking on your review @rjan90 , but just an FYI that added this to help with standup:
|
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
cycle:202605-2 biglep (-status:"🎉 Done") OR (-last-updated:1days)in the filter bar to see merged results from multiple branches in a single view — no more switching between views during standup.https://github.com/orgs/FilOzone/projects/*).How it works
The extension injects a main-world script that monkey-patches
window.fetchon matching project board pages. When the filter bar contains OR syntax, it intercepts GitHub's internalpaginated_itemsAPI call, splits the query into per-branch fetches, deduplicates items by ID, merges the results, and returns them to GitHub's React app — which renders them natively with no custom UI.Files
extension/src/content/board-filter/board-filter-main.tsextension/src/content/board-filter/board-data-injector.tsextension/src/content/board-filter/or-query-parser.tsextension/src/content/board-filter/result-merger.tsextension/src/content/board-filter/memex-api.tsTest plan
cycle:202605-2 biglep (-status:"🎉 Done") OR (-last-updated:1days)— verify merged results, no duplicatesbiglep) — verify native filtering unchanged((nested))) — verify native fallback, no errors/views/2) with large item set — verify pagination works🤖 Generated with Claude Code