Repository navigation
refactor(views): centralize indexed row paging - #14878
Conversation
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryCentralizes indexed row paging in
No actionable correctness, security, or repository-rule issues were found. Tests were inspected but not run. Whether another PR supersedes this one could not be checked because GitHub access required authentication. Diagram%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Report view] --> B[selectViewRows]
B --> C{Candidate indices supplied?}
C -->|Yes, including an empty set| D[Sort valid indices and apply filters]
C -->|No| E{Predicate supplied?}
E -->|Yes| F[Scan and count matching rows]
E -->|No| G[Read requested page directly]
D --> H[Project page with original indices and return total]
F --> H
G --> H
Reviews (1) · Last reviewed commit: "refactor(views): centralize indexed row ..." · Reviewed by Greptile |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
…pgp-633-20261127 * commit '3097263763611eb0c32c502d5a222060cf02f468': fix(cli): describe universal Mach-O slice selection without a single-dash flag (#14912) fix(iso9660): read Joliet trees whose .. records name their own directory (#14817) feat(gpu)!: add per-call object, work, report, metadata, structure, and parser budgets to inspect_gpu_code_objects (#14882) fix(macho)!: select arm64e.x1 slices of universal Mach-O files by exact subtype (#14881) refactor(views): share bounded parent and report limitations (#14902) refactor(desktop): share XML parent pointers in task drafts (#14905) feat(ghidra): define function-pointer members and typedefs (#14889) refactor(setup): share publication destination checks (#14904) perf(ci): skip unused test runtime uploads (#14903) fix(nuget): preserve explicitly spaced publisher metadata (#14906) fix(artifacts): keep uImage coverage unknown when bytes follow the declared payload (#14896) fix(artifacts): report incomplete Android sparse coverage (#14883) fix(tar): require both end-of-archive blocks for complete coverage (#14884) refactor(views): centralize indexed row paging (#14878) refactor(views): reuse optional filters in report projections (#14877)
Summary
Ten report views now call one paging function for indexed and unindexed requests. This removes 82 production lines net and updates the contributor guide. It follows #14850.
Problem and expected behavior
Fifteen call sites selected between the same two paging functions based on whether indices were supplied. Omitted indices allow all rows, and an empty set selects none. Explicit indices must stay in source order. The total includes all matching rows even when the requested page is empty.
Change and scope
selectViewRowsaccepts an optional set of candidate indices and delegates explicit selections to the existing indexed implementation. The filtered scan and direct unfiltered page keep their existing paths. The Erlang and Python views also use the shared unfiltered path for pages they previously sliced themselves. Twenty-three direct filter conversions usefilterSet.Contract and verification
Compared 1,200 combinations against the prior paging functions, checking output, totals, predicate visits, and projected source indices. Compared 1,440 before-and-after Erlang and Python projections with combinations of fields, filters, and paging. All matched. Scoped formatting and
git diff --checkpassed. Hosted CI passed on3c9147d1d. All 105 selected tests passed across 4 files.Author readiness
Human owner: @vincentkoc
Author checklist (completed by the PR author before requesting review)
type(scope): outcome.REA_runtime setting with a default, floor, and maximum, unless a fixed ceiling has a stated reason. See Adding a runtime setting.