Skip to content

fix: show username in profile card from Logto claims - #8

Merged
rekabytes merged 1 commit into
mainfrom
dev
Dec 25, 2025
Merged

fix: show username in profile card from Logto claims#8
rekabytes merged 1 commit into
mainfrom
dev

Conversation

@rekabytes

@rekabytes rekabytes commented Dec 25, 2025

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced how user display names are derived with improved fallback logic when name information is unavailable.
    • Dashboard profile name display now correctly prioritizes available name data from multiple sources.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Dec 25, 2025

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

The changes implement a fallback mechanism for deriving and displaying user display names. The backend now derives display names from email local-parts when name and username are absent, and conditionally updates the name field during database upserts. The frontend passes name data through dashboard component hierarchy with fallback logic.

Changes

Cohort / File(s) Summary
Backend display name derivation
packages/kal-backend/src/lib/context.ts
Display name logic now falls back to email's local-part (before @) if name and username are absent, defaulting to empty string if all missing. During upsert, name field is updated only when non-empty displayName is available; otherwise unchanged. Inline documentation added.
Frontend component prop threading
packages/kal-frontend/src/app/dashboard/client.tsx
Added nameProp parameter to DashboardContentWrapper and DashboardContent components. DashboardClient now passes name as nameProp to the wrapper. Display name logic computes from userInfo.name, then nameProp, with "Developer" fallback.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 A name without form, the backend now weaves,
From email's foundation, a fallback it cleaves.
Through props the frontend threads its display,
With "Developer" waiting at end of day.
Names cascade like carrots, so fine and so free! 🥕

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between eea89f1 and 115f8c8.

📒 Files selected for processing (2)
  • packages/kal-backend/src/lib/context.ts
  • packages/kal-frontend/src/app/dashboard/client.tsx

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@rekabytes
rekabytes merged commit bcbbbc5 into main Dec 25, 2025
1 check was pending
@coderabbitai coderabbitai Bot mentioned this pull request Dec 30, 2025
Merged
13 tasks
@coderabbitai coderabbitai Bot mentioned this pull request Mar 15, 2026
Merged
13 tasks
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