Skip to content

Conversation

mariusandra
Copy link
Collaborator

Problem

The persons and cohorts pages were missing on the new tab page.

Changes

2025-09-13 10 16 31

I kept it as "Persons" for now, as that's the name of the menu entry, however we probably should talk if we want to rename it.

How did you test this code?

👀

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Bot Settings | Greptile

Comment on lines +114 to +122
const products = [...getDefaultTreeProducts(), ...getDefaultTreePersons()]
.map((fs) => ({
href: fs.href,
name: fs.path,
icon: getIconForFileSystemItem(fs),
flag: fs.flag,
}))
.filter(({ flag }) => !flag || featureFlags[flag as keyof typeof featureFlags])
.toSorted((a, b) => a.name.localeCompare(b.name))
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: inconsistent property definitions in cohorts data

In the getDefaultTreePersons function, the Cohorts object uses type: 'cohort' while the Persons object uses iconType: 'person'. This inconsistency could cause issues with icon rendering.

Suggested change
const products = [...getDefaultTreeProducts(), ...getDefaultTreePersons()]
.map((fs) => ({
href: fs.href,
name: fs.path,
icon: getIconForFileSystemItem(fs),
flag: fs.flag,
}))
.filter(({ flag }) => !flag || featureFlags[flag as keyof typeof featureFlags])
.toSorted((a, b) => a.name.localeCompare(b.name))
const products = [...getDefaultTreeProducts(), ...getDefaultTreePersons()]
.map((fs) => ({
href: fs.href,
name: fs.path,
icon: getIconForFileSystemItem(fs),
flag: fs.flag,
}))
.filter(({ flag }) => !flag || featureFlags[flag as keyof typeof featureFlags])
.toSorted((a, b) => a.name.localeCompare(b.name))

Context Used: Context - When using HogQL, ensure that property definitions are explicitly typed to avoid errors related to type strictness. (link)

Copy link
Contributor

Size Change: 0 B

Total Size: 2.73 MB

ℹ️ View Unchanged
Filename Size
frontend/dist/toolbar.js 2.73 MB

compressed-size-action

@mariusandra mariusandra merged commit 32ba0f1 into master Sep 13, 2025
181 checks passed
@mariusandra mariusandra deleted the add-people-cohorts branch September 13, 2025 08:38
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