Skip to content

fix(ui): Change modal field to be company size#3801

Merged
TheodoreSpeaks merged 3 commits intostagingfrom
feat/adjust-demo-modal
Mar 27, 2026
Merged

fix(ui): Change modal field to be company size#3801
TheodoreSpeaks merged 3 commits intostagingfrom
feat/adjust-demo-modal

Conversation

@TheodoreSpeaks
Copy link
Copy Markdown
Collaborator

Summary

Rename user count to company size

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

Validated modal shows company size

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

@vercel
Copy link
Copy Markdown

vercel bot commented Mar 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Skipped Skipped Mar 27, 2026 2:36am

Request Review

@TheodoreSpeaks
Copy link
Copy Markdown
Collaborator Author

@cursor review

@TheodoreSpeaks
Copy link
Copy Markdown
Collaborator Author

@greptile review

@cursor
Copy link
Copy Markdown

cursor bot commented Mar 27, 2026

PR Summary

Medium Risk
Renames a submitted/demo-request payload field (userCount -> companySize) across UI validation and the API handler, which can break any external callers still sending the old field. Otherwise changes are limited to form options/labels and email/log output.

Overview
Updates the demo request flow to collect company size instead of number of users.

This renames the field throughout the UI schema/form state and the /api/demo-requests handler (userCount -> companySize), updates the selectable ranges (including new 1001_10000 and 10000_plus buckets), and adjusts validation messages plus the email/log formatting to reflect the new field.

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

Copy link
Copy Markdown

@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.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 27, 2026

Greptile Summary

This PR renames the "Number of users" field in the demo-request modal to "Company size" and updates all related constants, types, and the API route consistently. It also refines the size buckets by splitting the old 1000_plus value into 1001_10000 and 10000_plus, and replaces hyphens with en-dashes in the option labels.

  • consts.ts: Renames DEMO_REQUEST_USER_COUNT_*DEMO_REQUEST_COMPANY_SIZE_*, adds new 1001_10000 / 10000_plus enum values, updates the Zod schema field (userCountcompanySize), and renames the label helper function.
  • demo-request-modal.tsx: Updates all form state, combobox bindings, and the visible FormField label.
  • route.ts: Updates destructuring, logger metadata, and the email template line from "Users:" to "Company size:".

The rename is thorough and consistent — no stale references to the old userCount field were found in the demo-request feature code.

Confidence Score: 5/5

Safe to merge — small, well-scoped rename with no logic changes or regressions.

All three touched files are updated consistently; no database persistence of the old enum values was found, so the bucket rename (1000_plus → 1001_10000 + 10000_plus) carries no backward-compatibility risk. No unrelated code is affected.

No files require special attention.

Important Files Changed

Filename Overview
apps/sim/app/(home)/components/demo-request/consts.ts Renames USER_COUNT → COMPANY_SIZE constants, adds a new 1001_10000 bucket (splitting the old 1000_plus), updates labels to en-dashes, and renames the Zod field and helper function.
apps/sim/app/(home)/components/demo-request/demo-request-modal.tsx Updates all userCount form state, combobox options, and FormField references to companySize; label changed from "Number of users" to "Company size".
apps/sim/app/api/demo-requests/route.ts Replaces userCount destructure and getDemoRequestUserCountLabel with companySize / getDemoRequestCompanySizeLabel; updates email template label from "Users:" to "Company size:".

Sequence Diagram

sequenceDiagram
    actor User
    participant Modal as DemoRequestModal
    participant API as /api/demo-requests
    participant Email as Email Service

    User->>Modal: Fills form (including Company size)
    Modal->>Modal: Validates with demoRequestSchema (companySize enum)
    Modal->>API: POST { ..., companySize, ... }
    API->>API: safeParse with demoRequestSchema
    API->>Email: Send email with getDemoRequestCompanySizeLabel(companySize)
    Email-->>API: Sent
    API-->>Modal: 200 OK
    Modal-->>User: "We'll be in touch soon!"
Loading

Reviews (2): Last reviewed commit: "Fix lint" | Re-trigger Greptile

@TheodoreSpeaks TheodoreSpeaks marked this pull request as ready for review March 27, 2026 02:44
@TheodoreSpeaks TheodoreSpeaks merged commit 50e42c2 into staging Mar 27, 2026
12 checks passed
@waleedlatif1 waleedlatif1 deleted the feat/adjust-demo-modal branch March 27, 2026 22:33
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.

1 participant