Skip to content

refactor(views): share optional filter set construction - #14850

Merged
vincentkoc merged 1 commit into
mainfrom
refactor-analysis-view-filter-sets
Nov 27, 2026
Merged

vincentkoc merged 1 commit into
mainfrom
refactor-analysis-view-filter-sets

Conversation

@vincentkoc

@vincentkoc vincentkoc commented Nov 27, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Eleven analysis views now use the same helper to turn an optional selection into a set. Removing the local copies saves 15 production lines net.

Problem and expected behavior

An omitted selection leaves the collection unfiltered. An explicitly empty selection matches no rows. Repeated selections do not duplicate output rows, and paging preserves the order and count of matching rows.

Change and scope

Put filterSet beside the row-selection functions. Replace the eleven local constructors and reuse it for the Android JNI view's inline field and index selections. Each view still owns its matching, output projection, and pagination decisions.

Contract and verification

Compared all eleven former functions against the shared implementation with omitted, empty, duplicate, string, and numeric selections. Compared the syntax trees of all eleven callers, including the arguments of 83 existing calls and both inline selectors. Checked row order and totals through the row-selection function. Scoped formatting and git diff --check passed. Hosted CI passed on 3d9838896. The portable suite selected 16 tests and passed all 16.

Author readiness

Human owner: @vincentkoc

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

Author checklist (completed by the PR author before requesting review)

  • This PR addresses a concrete problem or an agreed enhancement.
  • Material scope and authority questions are resolved, and any required maintainer scope decision covers the final diff.
  • The PR has one focused outcome and the title follows type(scope): outcome.
  • Related issue is linked, or the reason for not linking one is stated above.
  • Tests cover changed observable behavior and meaningful failure paths.
  • Owning docs, contracts, and generated metadata are updated where needed.
  • User-visible CLI/MCP changes include representative output.
  • I checked the final diff for secrets, unrelated cleanup, and unsupported claims.
  • I ran every test, build, or measurement needed to validate this change, reported a browser, GPU, or environment gap only when that runtime or hardware is unavailable, and reported the checks I ran and their results without presenting inferred correctness or speedups as measured.
  • Comments explain constraints or non-obvious decisions; task history and conversations stay out of code and docs.
  • Documentation is concise and factual, without punchy slogans or promotional language.
  • This change fixes the root cause and follows the engineering rules in AGENTS.md.
  • Formatted input is interpreted once at the owning boundary, and consumers use the owner's parsed facts. See Interpret boundary facts once.
  • Combined failures preserve partial observations, remaining resources, and cleanup facts. See Own the lifecycle.
  • A hardcoded limit is an REA_ runtime setting with a default, floor, and maximum, unless a fixed ceiling has a stated reason. See Adding a runtime setting.

@greptile-apps

greptile-apps Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

Confidence Score: 5/5 · The PR appears safe to merge; the shared helper preserves the existing selection behavior.RetriggerView in GreptileConfidence Score: 5/5

[Low impact] The PR appears safe to merge; the shared helper preserves the existing selection behavior.

Summary

Eleven analysis views now share filterSet instead of defining their own optional-set constructors.

  • Eleven analysis views now build filter sets through one shared helper.

Reviews (1) · Last reviewed commit: "refactor(views): share optional filter s..." · Reviewed by Greptile

@vincentkoc
vincentkoc marked this pull request as ready for review November 27, 2026 09:34
@vincentkoc
vincentkoc merged commit 3fc508d into main Nov 27, 2026
42 checks passed
@vincentkoc
vincentkoc deleted the refactor-analysis-view-filter-sets branch November 27, 2026 09:34
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 27, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-27T09:35:31.757123Z 3d98388 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

1 participant