Skip to content

feat: OR filter for project board views#9

Open
BigLep wants to merge 5 commits into
mainfrom
007-project-board-or-filter
Open

feat: OR filter for project board views#9
BigLep wants to merge 5 commits into
mainfrom
007-project-board-or-filter

Conversation

@BigLep
Copy link
Copy Markdown
Contributor

@BigLep BigLep commented May 27, 2026

Summary

  • OR query support on project boards: Enter queries like 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.
  • Configurable board patterns: New Options setting lets users specify which project boards get OR filter support via glob-style URL patterns (defaults to https://github.com/orgs/FilOzone/projects/*).
  • Version bump to 0.3.0

How it works

The extension injects a main-world script that monkey-patches window.fetch on matching project board pages. When the filter bar contains OR syntax, it intercepts GitHub's internal paginated_items API 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

New files Purpose
extension/src/content/board-filter/board-filter-main.ts Content script entry point, config gate
extension/src/content/board-filter/board-data-injector.ts Main-world fetch interceptor, branch fetching, merge
extension/src/content/board-filter/or-query-parser.ts Parse OR syntax into prefix + branches
extension/src/content/board-filter/result-merger.ts Deduplicate and merge multi-branch responses
extension/src/content/board-filter/memex-api.ts Type definitions for GitHub's internal memex API

Test plan

  • Load extension, navigate to FilOzone/projects/14/views/20
  • Enter OR query: cycle:202605-2 biglep (-status:"🎉 Done") OR (-last-updated:1days) — verify merged results, no duplicates
  • Enter non-OR query (e.g. biglep) — verify native filtering unchanged
  • Enter invalid OR syntax (e.g. ((nested))) — verify native fallback, no errors
  • Test on "All" view (/views/2) with large item set — verify pagination works
  • Verify existing issue/PR sidebar features still work
  • Check Options page shows "OR filter for project boards" textarea with default pattern

🤖 Generated with Claude Code

BigLep and others added 3 commits May 27, 2026 11:51
…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>
@BigLep BigLep requested a review from Copilot May 27, 2026 19:21
@BigLep BigLep self-assigned this May 27, 2026
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

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 fetch interceptor 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.

Comment thread extension/src/content/board-filter/board-data-injector.ts
Comment thread extension/src/content/board-filter/memex-api.ts
Comment thread extension/src/content/board-filter/result-merger.ts
Comment thread extension/src/content/board-filter/or-query-parser.ts
Comment thread extension/src/content/board-filter/or-query-parser.ts
Comment thread specs/007-project-board-or-filter/tasks.md Outdated
Comment thread specs/007-project-board-or-filter/tasks.md Outdated
Comment thread extension/src/options/options.ts
Comment thread extension/src/options/options.ts
Comment thread extension/src/lib/project-config.ts
BigLep and others added 2 commits May 27, 2026 12:38
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>
@BigLep BigLep requested a review from rjan90 May 27, 2026 19:45
@BigLep
Copy link
Copy Markdown
Contributor Author

BigLep commented May 27, 2026

Not blocking on your review @rjan90 , but just an FYI that added this to help with standup:

FOC (view)

image

@BigLep BigLep marked this pull request as ready for review May 27, 2026 19:46
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.

2 participants