Skip to content

Conversation

@bokelley
Copy link
Contributor

@bokelley bokelley commented Jan 6, 2026

Summary

Fixes the company profile modal getting stuck on "Saving..." when users select "Data & Measurement" or "AI & Tech Platforms" company types.

Root Cause: The frontend modal offered 7 company type options but the backend only validated 5, rejecting 'data' and 'ai'.

Changes

  • Update billing-public.ts and organizations.ts to use centralized COMPANY_TYPE_VALUES instead of hardcoded arrays
  • Add migration (142) to update database CHECK constraint to accept all 7 types
  • Update admin-tools.ts MCP schema enums to use centralized values

Test plan

  • Verify modal saves successfully when selecting "Data & Measurement"
  • Verify modal saves successfully when selecting "AI & Tech Platforms"
  • Verify existing company types still work (brand, publisher, agency, adtech, other)
  • Verify migration runs without error on deployment

🤖 Generated with Claude Code

@bokelley bokelley force-pushed the bokelley/fix-company-modal-save branch 2 times, most recently from 47cccc8 to cc68bcf Compare January 6, 2026 00:22
The company profile modal on the dashboard was getting stuck on "Saving..."
when users selected "Data & Measurement" or "AI & Tech Platforms" because
the backend validation only accepted 5 company types (brand, publisher,
agency, adtech, other) while the frontend offered 7.

Changes:
- Update billing-public.ts and organizations.ts to use centralized
  COMPANY_TYPE_VALUES instead of hardcoded arrays
- Add migration to update database CHECK constraint to accept all types
- Update admin-tools.ts MCP schema enums to use centralized values

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@bokelley bokelley force-pushed the bokelley/fix-company-modal-save branch from cc68bcf to 66dfb47 Compare January 6, 2026 00:23
@bokelley bokelley merged commit 89ee2e0 into main Jan 6, 2026
6 checks passed
bokelley added a commit that referenced this pull request Jan 6, 2026
…642)

The company profile modal on the dashboard was getting stuck on "Saving..."
when users selected "Data & Measurement" or "AI & Tech Platforms" because
the backend validation only accepted 5 company types (brand, publisher,
agency, adtech, other) while the frontend offered 7.

Changes:
- Update billing-public.ts and organizations.ts to use centralized
  COMPANY_TYPE_VALUES instead of hardcoded arrays
- Add migration to update database CHECK constraint to accept all types
- Update admin-tools.ts MCP schema enums to use centralized values

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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