Skip to content

feat: project insights updates#3925

Open
gaspergrom wants to merge 1 commit intomainfrom
feat/project-insights-pagination
Open

feat: project insights updates#3925
gaspergrom wants to merge 1 commit intomainfrom
feat/project-insights-pagination

Conversation

@gaspergrom
Copy link
Contributor

@gaspergrom gaspergrom commented Mar 18, 2026

Note

Medium Risk
Changes query semantics for project_insights.pipe by adding optional LFX filtering plus dynamic sorting/pagination, which can affect API result ordering and returned subsets. Risk is moderate since it’s read-only analytics SQL but touches a shared endpoint used by widgets/insights.

Overview
Extends project_insights.pipe to support optional filtering by LFX status via a new isLfx parameter.

Adds configurable ORDER BY (field + direction) plus LIMIT/OFFSET pagination parameters (pageSize, page), defaulting to name-ascending ordering with a secondary name ASC tie-breaker.

Written by Cursor Bugbot for commit bcdef17. This will update automatically on new commits. Configure here.

Signed-off-by: Gašper Grom <gasper.grom@gmail.com>
Copilot AI review requested due to automatic review settings March 18, 2026 08:27
@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

@github-actions
Copy link
Contributor

⚠️ Jira Issue Key Missing

Your PR title doesn't contain a Jira issue key. Consider adding it for better traceability.

Example:

  • feat: add user authentication (CM-123)
  • feat: add user authentication (IN-123)

Projects:

  • CM: Community Data Platform
  • IN: Insights

Please add a Jira issue key to your PR title.

Copy link
Contributor

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

This PR updates the project_insights Tinybird pipe to support additional filtering and list-style query behaviors (sorting + pagination), expanding how project insights can be retrieved and presented in the application.

Changes:

  • Adds an isLfx filter parameter intended to filter projects by LFX/LF status.
  • Adds ordering support via orderByField + orderByDirection.
  • Adds pagination via pageSize + page (LIMIT/OFFSET).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +9 to +13
- `isLfx`: Optional integer (1 = LFX, 0 = non-LFX) to filter by LFX project status
- `orderByField`: Optional string specifying sort field, defaults to 'name'
- `orderByDirection`: Optional string ('asc' or 'desc'), defaults to 'asc'
- `pageSize`: Optional integer for result limit, defaults to 10
- `page`: Optional integer for pagination offset calculation, defaults to 0
Comment on lines +70 to +72
ORDER BY
{{ column(String(orderByField, "name", description="Order by field.", required=False)) }}
{% if String(
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.

{% end %},
name ASC
LIMIT {{ Int32(pageSize, 10) }}
OFFSET {{ Int32(page, 0) * Int32(pageSize, 10) }}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default LIMIT silently truncates previously unlimited query results

High Severity

Adding LIMIT 10 (default) and OFFSET 0 to a query that previously returned all matching rows is a silent breaking change. Any existing caller passing more than 10 values in slugs or ids will now receive only the first 10 results without any indication of truncation. Since this is a Tinybird API endpoint (_endpoint node), external consumers won't be aware they need to start paginating to get complete results.

Fix in Cursor Fix in Web

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.

3 participants