Skip to content

Commit

Permalink
Merge branch 'master' into feat/feature-flags-ui
Browse files Browse the repository at this point in the history
  • Loading branch information
nickoferrall committed Nov 6, 2024
2 parents 7d2fe73 + 0878401 commit 89fd195
Show file tree
Hide file tree
Showing 83 changed files with 1,034 additions and 264 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ REDIS_URL='redis://localhost:6379'
# STRIPE_PUBLISHABLE_KEY=''
# STRIPE_WEBHOOK_SECRET=''
# MATTERMOST_DISABLED='false'
# MATTERMOST_SECRET=''
# MSTEAMS_DISABLED='false'

# MAIL
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dist/
dump.rdb
node_modules/
package-lock.json
packages/server/postgres/pg.d.ts
packages/server/postgres/types/pg.d.ts
packages/server/postgres/queries/generated
packages/server/types/githubTypes.ts
packages/server/types/gitlabTypes.ts
Expand Down
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "8.0.1"
".": "8.3.1"
}
69 changes: 69 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,75 @@ This project adheres to [Semantic Versioning](http://semver.org/).

This CHANGELOG follows conventions [outlined here](http://keepachangelog.com/).

## [8.3.1](https://github.com/ParabolInc/parabol/compare/v8.3.0...v8.3.1) (2024-11-04)


### Fixed

* teamMember is nullable in generate insight ([#10450](https://github.com/ParabolInc/parabol/issues/10450)) ([fb67345](https://github.com/ParabolInc/parabol/commit/fb673457d6223eb00ebb66fa43368b3efb437e0f))


### Changed

* Add Mattermost webhook handler ([#10237](https://github.com/ParabolInc/parabol/issues/10237)) ([f50e32f](https://github.com/ParabolInc/parabol/commit/f50e32f5f740c42b722d2581c02c7467dfa9ff2e))

## [8.3.0](https://github.com/ParabolInc/parabol/compare/v8.2.0...v8.3.0) (2024-10-31)


### Added

* **orgAdmins:** show total user & team counts ([#10396](https://github.com/ParabolInc/parabol/issues/10396)) ([4f515ea](https://github.com/ParabolInc/parabol/commit/4f515eaa9f32d2dc038923a58f43216de583188a))


### Fixed

* latestMeeting query ([#10429](https://github.com/ParabolInc/parabol/issues/10429)) ([1b36b18](https://github.com/ParabolInc/parabol/commit/1b36b181874d56dd59b531c100d3b56e102699ae))
* reset retro group safely ([#10431](https://github.com/ParabolInc/parabol/issues/10431)) ([f10b58e](https://github.com/ParabolInc/parabol/commit/f10b58e661a5bc04a67d36c78ade68fde472bf47))
* throw on migration error ([#10439](https://github.com/ParabolInc/parabol/issues/10439)) ([90403c6](https://github.com/ParabolInc/parabol/commit/90403c63a962b560cfe76ba864859abb25613b21))


### Changed

* **metrics:** add metrics to identify who attempte to upgrade organization ([#10432](https://github.com/ParabolInc/parabol/issues/10432)) ([62b610a](https://github.com/ParabolInc/parabol/commit/62b610a63e05fb5004473c0cbef0ddda8d42b471))

## [8.2.0](https://github.com/ParabolInc/parabol/compare/v8.1.1...v8.2.0) (2024-10-28)


### Added

* add featureFlags migration ([#10375](https://github.com/ParabolInc/parabol/issues/10375)) ([96a827b](https://github.com/ParabolInc/parabol/commit/96a827b20e0fb7a29b6858a3dc651d5e612526e6))


### Fixed

* TeamMemberIntegrationAuth single fetch ([#10426](https://github.com/ParabolInc/parabol/issues/10426)) ([88fec61](https://github.com/ParabolInc/parabol/commit/88fec61c90412745ffee4c6d565d9d0cf9296550))

## [8.1.1](https://github.com/ParabolInc/parabol/compare/v8.1.0...v8.1.1) (2024-10-28)


### Fixed

* increase URL col length for IntegrationProvider ([2c49dce](https://github.com/ParabolInc/parabol/commit/2c49dce82d0b9a8f7b20762bcc2cd903fcc966b0))
* index on discussionTopicId ([#10423](https://github.com/ParabolInc/parabol/issues/10423)) ([c101e30](https://github.com/ParabolInc/parabol/commit/c101e30350a70056d470d293de9c88cdb18e8f88))
* support pg tracing in dd-trace-js ([#10424](https://github.com/ParabolInc/parabol/issues/10424)) ([e963369](https://github.com/ParabolInc/parabol/commit/e96336930c4852af0bcdfd70707bd4a8a57ce75e))

## [8.1.0](https://github.com/ParabolInc/parabol/compare/v8.0.1...v8.1.0) (2024-10-24)


### Added

* show insights by default ([#10405](https://github.com/ParabolInc/parabol/issues/10405)) ([f67328f](https://github.com/ParabolInc/parabol/commit/f67328fe06dc936dd24ad32d8101712807f175c5))


### Fixed

* small bugs found in datadog logs ([#10414](https://github.com/ParabolInc/parabol/issues/10414)) ([a60106f](https://github.com/ParabolInc/parabol/commit/a60106ff24c7aa4e1e02b536a88beff43afd4df6))


### Changed

* Add Mattermost Plugin IntegrationProvider ([#10361](https://github.com/ParabolInc/parabol/issues/10361)) ([b5bd2b4](https://github.com/ParabolInc/parabol/commit/b5bd2b46d88df1e13d5a12a925642b9e47b1b5a1))

## [8.0.1](https://github.com/ParabolInc/parabol/compare/v8.0.0...v8.0.1) (2024-10-23)


Expand Down
3 changes: 3 additions & 0 deletions codegen.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,9 @@
"NotifyResponseReplied": "../../postgres/types/Notification.d#ResponseRepliedNotification as ResponseRepliedNotificationDB",
"NotifyTaskInvolves": "../../postgres/types/Notification.d#TaskInvolvesNotification as TaskInvolvesNotificationDB",
"NotifyTeamArchived": "../../postgres/types/Notification.d#TeamArchivedNotification as TeamArchivedNotificationDB",
"NotifyTeamsLimitReminder": "../../postgres/types/Notification.d#TeamsLimitReminderNotification as TeamsLimitReminderNotificationDB",
"NotifyTeamsLimitExceeded": "../../postgres/types/Notification.d#TeamsLimitExceededNotification as TeamsLimitExceededNotificationDB",
"NotifyPromptToJoinOrg": "../../postgres/types/Notification.d#PromptToJoinOrgNotification as PromptToJoinOrgNotificationDB",
"Organization": "../../postgres/types/index#Organization as OrganizationDB",
"TemplateScaleValue": "./types/TemplateScaleValue#TemplateScaleValueSource as TemplateScaleValueSourceDB",
"SuggestedAction": "../../postgres/types/index#SuggestedAction as SuggestedActionDB",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "An open-source app for building smarter, more agile teams.",
"author": "Parabol Inc. <love@parabol.co> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "8.0.1",
"version": "8.3.1",
"repository": {
"type": "git",
"url": "https://github.com/ParabolInc/parabol"
Expand All @@ -27,7 +27,7 @@
"clean": "git clean -fdx -e .env",
"codegen": "node scripts/codegenGraphQL.js",
"pg:build": "pgtyped -c ./packages/server/postgres/pgtypedConfig.js",
"pg:generate": "export $(grep ^POSTGRES_ .env | tr -d \"'\"); yarn kysely-codegen --exclude-pattern \"(PgMigrations|StripeQuantityMismatchLogging)\" --out-file ./packages/server/postgres/pg.d.ts --dialect postgres --url postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB && prettier --write ./packages/server/postgres/pg.d.ts",
"pg:generate": "export $(grep ^POSTGRES_ .env | tr -d \"'\"); yarn kysely-codegen --exclude-pattern \"(PgMigrations|StripeQuantityMismatchLogging)\" --out-file ./packages/server/postgres/types/pg.d.ts --dialect postgres --url postgresql://$POSTGRES_USER:$POSTGRES_PASSWORD@$POSTGRES_HOST:$POSTGRES_PORT/$POSTGRES_DB && prettier --write ./packages/server/postgres/types/pg.d.ts",
"pg:restore": "node ./scripts/toolbox/pgRestore.js",
"db:start": "docker compose -f docker/stacks/development/docker-compose.yml up -d",
"db:stop": "docker compose -f docker/stacks/development/docker-compose.yml down",
Expand Down
4 changes: 2 additions & 2 deletions packages/chronos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chronos",
"version": "8.0.1",
"version": "8.3.1",
"description": "A cron job scheduler",
"author": "Matt Krick <matt.krick@gmail.com>",
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/chronos#readme",
Expand All @@ -25,6 +25,6 @@
},
"dependencies": {
"cron": "^2.3.1",
"parabol-server": "8.0.1"
"parabol-server": "8.3.1"
}
}
7 changes: 7 additions & 0 deletions packages/client/components/NotificationPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ const typePicker: Record<NotificationEnum, LazyExoticPreload<any>> = {
/* webpackChunkName: 'TeamsLimitReminderNotification' */ './TeamsLimitReminderNotification'
)
),
TEAMS_LIMIT_EXCEEDED: lazyPreload(
() =>
import(
/* webpackChunkName: 'TeamsLimitExceededNotification' */ './TeamsLimitExceededNotification'
)
),
PROMPT_TO_JOIN_ORG: lazyPreload(
() =>
import(/* webpackChunkName: 'PromptToJoinOrgNotification' */ './PromptToJoinOrgNotification')
Expand Down Expand Up @@ -74,6 +80,7 @@ const NotificationPicker = (props: Props) => {
...Mentioned_notification
...ResponseReplied_notification
...TeamsLimitReminderNotification_notification
...TeamsLimitExceededNotification_notification
...PromptToJoinOrgNotification_notification
...RequestToJoinOrgNotification_notification
}
Expand Down
59 changes: 59 additions & 0 deletions packages/client/components/TeamsLimitExceededNotification.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import graphql from 'babel-plugin-relay/macro'
import React, {useEffect} from 'react'
import {useFragment} from 'react-relay'
import {TeamsLimitExceededNotification_notification$key} from '~/__generated__/TeamsLimitExceededNotification_notification.graphql'
import useRouter from '~/hooks/useRouter'
import defaultOrgAvatar from '~/styles/theme/images/avatar-organization.svg'
import useAtmosphere from '../hooks/useAtmosphere'
import {Threshold} from '../types/constEnums'
import SendClientSideEvent from '../utils/SendClientSideEvent'
import NotificationAction from './NotificationAction'
import NotificationTemplate from './NotificationTemplate'

interface Props {
notification: TeamsLimitExceededNotification_notification$key
}

const TeamsLimitExceededNotification = (props: Props) => {
const {notification: notificationRef} = props
const atmosphere = useAtmosphere()
const notification = useFragment(
graphql`
fragment TeamsLimitExceededNotification_notification on NotifyTeamsLimitExceeded {
...NotificationTemplate_notification
id
orgId
orgName
orgPicture
}
`,
notificationRef
)
const {history} = useRouter()
const {orgId, orgName, orgPicture} = notification

useEffect(() => {
SendClientSideEvent(atmosphere, 'Upgrade CTA Viewed', {
upgradeCTALocation: 'teamsLimitExceededNotification',
orgId
})
}, [])

const onActionClick = () => {
SendClientSideEvent(atmosphere, 'Upgrade CTA Clicked', {
upgradeCTALocation: 'teamsLimitExceededNotification'
})
history.push(`/me/organizations/${orgId}`)
}

return (
<NotificationTemplate
avatar={orgPicture || defaultOrgAvatar}
message={`"${orgName}" is over the limit of ${Threshold.MAX_STARTER_TIER_TEAMS} free teams.`}
action={<NotificationAction label={'Upgrade'} onClick={onActionClick} />}
notification={notification}
/>
)
}

export default TeamsLimitExceededNotification
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import OrgBillingInvoices from './OrgBillingInvoices'
import OrgPlanDrawer from './OrgPlanDrawer'
import OrgPlans from './OrgPlans'
import OrgPlansAndBillingHeading from './OrgPlansAndBillingHeading'
import OrgUsage from './OrgUsage'
import PaymentDetails from './PaymentDetails'

type Props = {
Expand Down Expand Up @@ -50,6 +51,7 @@ const OrgPlansAndBilling = (props: Props) => {
...BillingLeaders_organization
...PaymentDetails_organization
...OrgPlanDrawer_organization
...OrgUsage_organization
id
billingTier
isBillingLeader
Expand Down Expand Up @@ -92,6 +94,7 @@ const OrgPlansAndBilling = (props: Props) => {
<Suspense fallback={''}>
<div className='pb-20'>
<OrgPlansAndBillingHeading organizationRef={organization} />
{billingTier === 'enterprise' && <OrgUsage organizationRef={organization} />}
{isBillingLeader && billingTier === 'team' && (
<>
<OrgBillingInvoices queryRef={queryData} isWide />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import graphql from 'babel-plugin-relay/macro'
import React from 'react'
import {useFragment} from 'react-relay'
import {OrgUsage_organization$key} from '../../../../__generated__/OrgUsage_organization.graphql'
import Panel from '../../../../components/Panel/Panel'
import useRouter from '../../../../hooks/useRouter'

interface Props {
organizationRef: OrgUsage_organization$key
}

const OrgUsage = (props: Props) => {
const {organizationRef} = props
const organization = useFragment(
graphql`
fragment OrgUsage_organization on Organization {
id
allTeamsCount
orgUserCount {
activeUserCount
inactiveUserCount
}
}
`,
organizationRef
)

const {id: orgId, allTeamsCount, orgUserCount} = organization
const totalUserCount = orgUserCount.activeUserCount + orgUserCount.inactiveUserCount
const {history} = useRouter()

return (
<Panel className='mb-4 max-w-[976px]' label='Usage'>
<div className='flex items-center justify-around border-t border-solid border-slate-300 p-4 '>
<a
onClick={(e) => {
e.preventDefault()
history.push(`/me/organizations/${orgId}/teams`)
}}
className='cursor-pointer text-center text-sky-500 hover:text-sky-600'
>
<div className='mb-1 text-3xl font-bold'>{allTeamsCount}</div>
<div className='flex items-center justify-center text-base text-slate-600'>
Total teams
</div>
</a>
<a
onClick={(e) => {
e.preventDefault()
history.push(`/me/organizations/${orgId}/members`)
}}
className='cursor-pointer text-center text-sky-500 hover:text-sky-600'
>
<div className='mb-1 text-3xl font-bold'>{totalUserCount}</div>
<div className='flex items-center justify-center text-base text-slate-600'>
Total members
</div>
</a>
</div>
</Panel>
)
}

export default OrgUsage
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ const OrganizationRow = (props: Props) => {
)}
</RowInfoHeader>
<StyledRowInfoCopy>
{`${totalUsers} ${plural(totalUsers, 'User')} (${activeUserCount} Active)`}
{`${totalUsers} ${plural(totalUsers, 'User')}`}
{billingTier !== 'enterprise' && ` (${activeUserCount} Active)`}
</StyledRowInfoCopy>
</StyledRowInfo>
<RowActions>
Expand Down
4 changes: 2 additions & 2 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "An open-source app for building smarter, more agile teams.",
"author": "Parabol Inc. <love@parabol.co> (http://github.com/ParabolInc)",
"license": "AGPL-3.0",
"version": "8.0.1",
"version": "8.3.1",
"repository": {
"type": "git",
"url": "https://github.com/ParabolInc/parabol"
Expand Down Expand Up @@ -73,7 +73,7 @@
"@mui/icons-material": "^5.8.4",
"@mui/material": "^5.9.2",
"@mui/x-date-pickers": "^6.3.1",
"@radix-ui/react-alert-dialog": "1.1.1",
"@radix-ui/react-alert-dialog": "1.1.2",
"@radix-ui/react-avatar": "^1.0.4",
"@radix-ui/react-collapsible": "^1.0.3",
"@radix-ui/react-dialog": "^1.0.4",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ExpressionOrFactory, SqlBool, sql} from 'kysely'
import {DB} from 'parabol-server/postgres/pg'
import {DB} from 'parabol-server/postgres/types/pg'
import {Logger} from 'parabol-server/utils/Logger'
import getKysely from '../server/postgres/getKysely'
import {AddEmbeddingsMetadataParams} from './addEmbeddingsMetadata'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {ExpressionOrFactory, SqlBool, sql} from 'kysely'
import {DB} from 'parabol-server/postgres/pg'
import {DB} from 'parabol-server/postgres/types/pg'
import {Logger} from 'parabol-server/utils/Logger'
import getKysely from '../server/postgres/getKysely'
import {AddEmbeddingsMetadataParams} from './addEmbeddingsMetadata'
Expand Down
2 changes: 1 addition & 1 deletion packages/embedder/ai_models/AbstractEmbeddingsModel.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import {sql} from 'kysely'
import getKysely from 'parabol-server/postgres/getKysely'
import {DB} from 'parabol-server/postgres/pg'
import {DB} from 'parabol-server/postgres/types/pg'
import isValid from '../../server/graphql/isValid'
import {Logger} from '../../server/utils/Logger'
import {getEmbedderPriority} from '../getEmbedderPriority'
Expand Down
2 changes: 1 addition & 1 deletion packages/embedder/custom.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {DataLoaderInstance} from '../server/dataloader/RootDataLoader'
import type {DB} from '../server/postgres/pg'
import type {DB} from '../server/postgres/types/pg'
import {JobQueueError} from './JobQueueError'

export type EmbeddingObjectType = DB['EmbeddingsMetadata']['objectType']
Expand Down
3 changes: 2 additions & 1 deletion packages/embedder/embedder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ tracer.init({
plugins: false,
version: process.env.npm_package_version
})
tracer.use('pg')
// The embedder queue is in PG & gets hits non-stop, which dirties up the logs. Ignore the polling query before enabling pg
// tracer.use('pg')

const run = async () => {
const SERVER_ID = process.env.SERVER_ID
Expand Down
2 changes: 1 addition & 1 deletion packages/embedder/indexing/createEmbeddingTextFrom.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Selectable} from 'kysely'
import {DB} from 'parabol-server/postgres/pg'
import {DB} from 'parabol-server/postgres/types/pg'

import {DataLoaderInstance} from '../../server/dataloader/RootDataLoader'
import {createTextFromMeetingTemplate} from './meetingTemplate'
Expand Down
2 changes: 1 addition & 1 deletion packages/embedder/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "parabol-embedder",
"version": "8.0.1",
"version": "8.3.1",
"description": "A service that computes embedding vectors from Parabol objects",
"author": "Jordan Husney <jordan.husney@gmail.com>",
"homepage": "https://github.com/ParabolInc/parabol/tree/master/packages/embedder#readme",
Expand Down
Loading

0 comments on commit 89fd195

Please sign in to comment.