Skip to content

fix: add company greeting fallback for blank names#128

Open
aagear wants to merge 2 commits into
Ghbounty:mainfrom
aagear:fix/company-greeting-fallback
Open

fix: add company greeting fallback for blank names#128
aagear wants to merge 2 commits into
Ghbounty:mainfrom
aagear:fix/company-greeting-fallback

Conversation

@aagear

@aagear aagear commented Jun 9, 2026

Copy link
Copy Markdown

Adds a centralized getCompanyGreeting() helper that handles missing or blank company names gracefully, falling back to "Welcome back, there" instead of rendering a broken heading.

Changes

  • frontend/lib/company-greeting.ts: new helper — trims the name, falls back to "there" for null/undefined/blank
  • frontend/lib/company-greeting.test.ts: 6 regression tests covering valid names, null, undefined, empty, and whitespace
  • frontend/app/app/company/page.tsx: switched to use getCompanyGreeting()

Fixes charles-openclaw/charles-microbounties#748

aagear added 2 commits June 9, 2026 13:41
Centralizes dashboard heading into getCompanyGreeting() helper
that trims the name and falls back to 'Welcome back, there' when
the company name is null, undefined, or whitespace-only.

- frontend/lib/company-greeting.ts — helper function
- frontend/lib/company-greeting.test.ts — 6 regression tests
- frontend/app/app/company/page.tsx — use the helper

References charles-openclaw/charles-microbounties#748
@aagear aagear requested a review from tomazzi14 as a code owner June 9, 2026 13:43
@vercel

vercel Bot commented Jun 9, 2026

Copy link
Copy Markdown

@aagear is attempting to deploy a commit to the weareghbounty-6269's projects Team on Vercel.

A member of the Team first needs to authorize it.

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