Add nested condition groups to saved segments - #4457
lucy-the-marketer wants to merge 1 commit into
Conversation
|
@lucy-the-marketer is attempting to deploy a commit to the Umami Software Team on Vercel. A member of the Team first needs to authorize it. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
Greptile SummaryThe PR adds recursively nested all/any condition groups to saved segments and carries them through editing, validation, request resolution, and both analytics backends.
Confidence Score: 4/5The PR appears safe to merge, with the non-blocking issue that its new group controls are not localized outside English. Nested groups are propagated through the editor, API, request pipeline, and both database builders, but the two newly rendered labels are absent from every non-English locale catalog. Files Needing Attention: public/intl/messages/en-US.json and the other public/intl/messages locale catalogs
|
| Filename | Overview |
|---|---|
| src/app/(main)/websites/[websiteId]/segments/SegmentGroupFields.tsx | Adds the recursive editor for nested condition groups and exposes add/remove controls. |
| src/lib/schema.ts | Adds recursive validation for persisted child groups while retaining flat segment compatibility. |
| src/lib/request.ts | Loads nested saved-group definitions into report query filters. |
| src/lib/params.ts | Resolves nested filter columns and unique parameter names and flattens trees for parameter binding. |
| src/lib/prisma.ts | Adds PostgreSQL compilation and parameter binding for recursive groups. |
| src/lib/clickhouse.ts | Mirrors recursive group compilation and binding for ClickHouse. |
| public/intl/messages/en-US.json | Adds the two editor labels only to en-US, leaving other supported locale catalogs without them. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
UI[Segment editor] --> API[Segment API validation]
API --> Store[(Saved segment parameters)]
Store --> Request[getQueryFilters]
Request --> Tree[Resolve nested filter groups]
Tree --> PG[PostgreSQL predicate builder]
Tree --> CH[ClickHouse predicate builder]
PG --> Reports[Analytics reports]
CH --> Reports
Reviews (1): Last reviewed commit: "Add nested condition groups to saved seg..." | Re-trigger Greptile
| "actions": "Actions", | ||
| "activity": "Activity", | ||
| "add": "Add", | ||
| "add-group": "Add group", |
There was a problem hiding this comment.
Group labels lack translations
The new add-group and delete-group keys exist only in the English catalog, so users of every other supported locale see missing-key fallback text on the nested-group controls. Add these keys to the other locale catalogs.
Knowledge Base Used: Frontend App Shell
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Summary
Validation
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.