Skip to content

Add Limit node to pframe QuerySpec/QueryData - #1761

Open
vadimpiven wants to merge 3 commits into
mainfrom
feat/pframes_limit
Open

Add Limit node to pframe QuerySpec/QueryData#1761
vadimpiven wants to merge 3 commits into
mainfrom
feat/pframes_limit

Conversation

@vadimpiven

@vadimpiven vadimpiven commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Mirrors the QueryLimit node added in pframes-rs 1.1.57.

Changes

  • QueryLimit<Q> interface in query_common.ts (type: "limit", input, fetch)
  • SpecQueryLimit / DataQueryLimit aliases + union members
  • limit handled in traverseQuerySpec (input passthrough) and cmpQuerySpec (compares input, then fetch)
  • Bump pframes-rs catalog to 1.1.57

spec_override_collapse.ts needs no change — its default branch already rejects limit as unsupported, matching sort/filter.

Greptile Summary

This PR mirrors the QueryLimit node introduced in pframes-rs 1.1.57 by adding the corresponding TypeScript types and plumbing across the query layer. The implementation is clean and consistent with how existing wrapper nodes (filter, sort, sliceAxes) are handled.

  • New typesQueryLimit<Q> generic interface in query_common.ts, with DataQueryLimit and SpecQueryLimit<C> aliases added to the respective union types.
  • traverseQuerySpec"limit" falls into the existing input-passthrough group; cmpQuerySpec gains a proper limit case that compares input first and then fetch.
  • Catalog bumppframes-rs-node, pframes-rs-wasip2, and pframes-rs-wasm updated from 1.1.56 to 1.1.57; REQUIRES_PFRAMES_VERSION is intentionally left unchanged per the workspace convention (updated later to give desktop time to catch up).

Confidence Score: 4/5

Safe to merge — the change is a straightforward type-layer addition with correct traversal and comparison logic.

The new limit node is wired up correctly in both traverseQuerySpec (input passthrough, identical to filter/sort) and cmpQuerySpec (compares input then fetch). The only gap is that utils.test.ts has no test exercising the limit path in traverseQuerySpec, so a future accidental breakage in that branch would go undetected.

utils.ts and utils.test.ts — the new limit case in traverseQuerySpec lacks a matching test.

Important Files Changed

Filename Overview
lib/model/common/src/drivers/pframe/query/query_common.ts Adds QueryLimit generic interface (type: 'limit', input, fetch) — well-documented, mirrors pframes-rs structure.
lib/model/common/src/drivers/pframe/query/query_data.ts Adds DataQueryLimit alias and adds it to the DataQuery union — straightforward, consistent with other node aliases.
lib/model/common/src/drivers/pframe/query/query_spec.ts Adds SpecQueryLimit alias and adds it to the SpecQuery union — correct and consistent.
lib/model/common/src/drivers/pframe/query/utils.ts Adds 'limit' to traverseQuerySpec input-passthrough group and adds a cmpQuerySpec case comparing input then fetch; no new tests added for the limit case.
pnpm-workspace.yaml Bumps pframes-rs-node, pframes-rs-wasip2, and pframes-rs-wasm from 1.1.56 to 1.1.57 in the catalog.
.changeset/three-pants-mix.md Patch changeset for pl-model-common, pf-spec-driver, and pf-driver with 'PFrames update' description.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["SpecQuery / DataQuery Union"] -->|new member| B["SpecQueryLimit / DataQueryLimit"]
    B --> C["QueryLimit (query_common.ts)"]
    C --> D["type: 'limit'"]
    C --> E["input: Q"]
    C --> F["fetch: number"]

    G["traverseQuerySpec"] -->|fall-through group| H["'filter' | 'sort' | 'limit' | 'sliceAxes' | .."]
    H --> I["result = { ...query, input: traverseQuerySpec(query.input, visitor) }"]

    J["cmpQuerySpec"] -->|case 'limit'| K["cmpQuerySpec(lhs.input, rhs.input)"]
    K -->|cmp !== 0| L["return cmp"]
    K -->|cmp === 0| M["return lhs.fetch - rhs.fetch"]

    N["pframes-rs catalog"] -->|bump 1.1.56 to 1.1.57| O["node / wasip2 / wasm"]
Loading

Reviews (1): Last reviewed commit: "Add Limit node to pframe QuerySpec/Query..." | Re-trigger Greptile

Mirror the QueryLimit node from pframes-rs 1.1.57 in the TS query types
(QueryLimit interface, spec/data aliases, traversal and comparison).
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@changeset-bot

changeset-bot Bot commented Jul 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a11c745

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 22 packages
Name Type
@platforma-sdk/block-tools Patch
@milaboratories/pl-model-common Patch
@milaboratories/pf-spec-driver Patch
@milaboratories/pf-driver Patch
@platforma-sdk/model Patch
@milaboratories/pl-middle-layer Patch
@milaboratories/pl-model-middle-layer Patch
@milaboratories/columns-collection-driver Patch
@milaboratories/pl-client Patch
@milaboratories/pl-drivers Patch
@milaboratories/pl-deployments Patch
@platforma-open/milaboratories.software-ptabler.schema Patch
@platforma-sdk/ui-vue Patch
@milaboratories/uikit Patch
@platforma-sdk/test Patch
@platforma-sdk/pl-cli Patch
@milaboratories/pl-model-backend Patch
@milaboratories/pl-errors Patch
@milaboratories/pl-tree Patch
@platforma-sdk/bootstrap Patch
@milaboratories/ptabler-expression-js Patch
@platforma-sdk/tengo-builder Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Add the pFrameQueryLimitSupport runtime feature flag and cap data-table
queries at 50k rows via the new limit query node when the desktop's
pframe engine supports it (older runtimes fall back to no limit).
Every per-package software build calls ensureEcrLogin unconditionally, and
turbo fans those out as separate processes. N concurrent 'docker login' to the
same registry race on the shared credential store (macOS keychain: -25299).
Serialize the login across processes with a cross-process file lock (fd-lock)
keyed by host; builds and pushes stay parallel.
@codecov

codecov Bot commented Jul 22, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 57.14286% with 6 lines in your changes missing coverage. Please review.
✅ Project coverage is 53.43%. Comparing base (edf2f7d) to head (a11c745).
⚠️ Report is 5 commits behind head on main.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
lib/model/common/src/drivers/pframe/query/utils.ts 0.00% 4 Missing ⚠️
sdk/model/src/render/api.ts 0.00% 1 Missing ⚠️
tools/block-tools/src/cmd/software/ecr-login.ts 88.88% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1761      +/-   ##
==========================================
+ Coverage   49.57%   53.43%   +3.86%     
==========================================
  Files          70      366     +296     
  Lines        3786    19679   +15893     
  Branches      969     4338    +3369     
==========================================
+ Hits         1877    10516    +8639     
- Misses       1640     7862    +6222     
- Partials      269     1301    +1032     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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