@@ -143,22 +182,36 @@ export default function SegmentResults() {
(like it happened to Mixpanel).
-
-
-
-
Main Benefit Summary (AI-powered)
+
+ {form.id === "demo-pmf" && (
+
+ {loadingMainBenefit ? (
+
+ ) : (
+ <>
+
+
+
Main Benefit Summary (AI-powered)
+
+
+ The main benefit that can be extracted from the list is "Efficiently track
+ and manage expenses in one place for better financial control."
+
+
+
+
+ >
+ )}
-
- The best is that I can get a quick overview of all my transactions. The best is that I
- can get a quick overview of all my transactions. The best is that I can get a quick
- overview of all my transactions.
-
-
-
-
-
+ )}
@@ -226,25 +279,40 @@ export default function SegmentResults() {
disappointed' when they could no longer use your product. This helps you craft a
product for a wider audience.
-
-
-
-
Next Action Steps (AI-powered)
+
+ {form.id === "demo-pmf" && (
+
+ {loadingNextSteps ? (
+
+ ) : (
+ <>
+
+
+
Next Action Steps (AI-powered)
+
+
+ The top three improvements requested are to provide a mobile app, enable
+ archiving of old transactions, and allow notes to be added to transactions.
+ Other requested improvements include customization options, dark mode, credit
+ score tracking, analytics, educational resources, performance optimization, and
+ improved security and accessibility features.
+
+
+
+
+ >
+ )}
-
- Based on the submissions below, we suggest targeting these three aspects first:
-
-
Fix this quick and easy
-
Fix this quick and easy
-
Fix this quick and easy
-
-
-
-
-
-
+ )}
+
How can we improve our service for you?
diff --git a/apps/web/src/lib/superhumanPmf.ts b/apps/web/src/lib/superhumanPmf.ts
index e8f7568013..c882ff095f 100644
--- a/apps/web/src/lib/superhumanPmf.ts
+++ b/apps/web/src/lib/superhumanPmf.ts
@@ -10,10 +10,7 @@ interface RoleCounts {
[role: string]: number;
}
-export function findRolesWithHighestVeryDisappointedPercentage(
- submissions: FormSubmission[],
- n: number
-): string[] {
+export function findRolesWithHighestVeryDisappointedPercentage(submissions: FormSubmission[], n: number) {
const roleCounts: RoleCounts = {};
const submissionCounts: RoleCounts = {};
@@ -57,7 +54,7 @@ export function findRolesWithHighestVeryDisappointedPercentage(
});
}
- return bestRoleCombination;
+ return { bestRoleCombination, bestPercentage };
}
function generateCombinations(elements: T[], combinationLength: number): T[][] {
diff --git a/apps/web/src/lib/utils.ts b/apps/web/src/lib/utils.ts
index 88fcee06ba..3d70a249cc 100644
--- a/apps/web/src/lib/utils.ts
+++ b/apps/web/src/lib/utils.ts
@@ -110,6 +110,7 @@ export const capitalizeFirstLetter = (string) => {
// camel case to title case
export const camelToTitle = (string) => {
+ if (!string) return "";
return string
.replace(/([A-Z])/g, " $1")
.replace(/^./, function (str) {