8000 fix: display username instead of first name last name by harshsbhat · Pull Request #3268 · unkeyed/unkey · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: display username instead of first name last name #3268

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 28, 2025

Conversation

harshsbhat
Copy link
Contributor
@harshsbhat harshsbhat commented May 17, 2025

What does this PR do?

This PR does 2 things:

  1. It fixes the uppercased titles for Audit logs as shown in the screenshot
  2. Instead of a username, it displays the first + last name, which is not ideal for people who log in with email

Fixes #3221 and #3222

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Chore (refactoring code, technical debt, workflow improvements)
  • Enhancement (small improvements)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How should this be tested?

Screenshot 2025-05-17 at 10 23 38 AM
  • Test A:
    Do any action that will be displayed in the audit logs. Check audit logs, they should be in lowercase.
  • Test B
    Similarly, check the actor details, it should display the username instead of the first and last name with avatar

Checklist

Required

  • Filled out the "How to test" section in this PR
  • Read Contributing Guide
  • Self-reviewed my own code
  • Commented on my code in hard-to-understand areas
  • Ran pnpm build
  • Ran pnpm fmt
  • Checked for warnings, there are none
  • Removed all console.logs
  • Merged the latest changes from main onto my branch with git pull origin main
  • My changes don't cause any responsiveness issues

Appreciated

    < 8000 li class="task-list-item"> If a UI change was made: Added a screen recording or screenshots to this PR
  • Updated the Unkey Docs if changes were necessary

Summary by CodeRabbit

  • Style
    • Updated the display in "Actor Details" to show the user's username instead of first and last name.
    • Modified event label styling in the log header to no longer display text in uppercase.

Copy link
changeset-bot bot commented May 17, 2025

⚠️ No Changeset found

Latest commit: c74892c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
vercel bot commented May 17, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dashboard ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 10:48am
engineering ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2025 10:48am

Copy link
vercel bot commented May 17, 2025

@harshsbhat is attempting to deploy a commit to the Unkey Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor
coderabbitai bot commented May 17, 2025
📝 Walkthrough

Walkthrough

This change updates the display of user information in the audit log details by showing the username instead of the concatenated first and last names. Additionally, it removes the "uppercase" CSS class from the event label in the log header, ensuring event names are displayed in their original case.

Changes

Files Change Summary
apps/dashboard/app/(app)/audit/components/table/log-details/components/log-footer.tsx Changed user display from first and last name to username in the "Actor Details" section.
apps/dashboard/app/(app)/audit/components/table/log-details/components/log-header.tsx Removed "uppercase" CSS class from the event label in the LogHeader component.

Assessment against linked issues

Objective Addressed Explanation
Event names must not be uppercased or changed in any other way (#3221)

Suggested labels

Bug, 🕹️ oss.gg, :joystick: 150 points

Suggested reviewers

  • perkinsjr
  • chronark
  • mcstepp

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired locatio 8000 n with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor
github-actions bot commented May 17, 2025

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Contributor
@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
apps/dashboard/app/(app)/audit/components/table/log-details/components/log-footer.tsx (1)

44-44: Username display properly implemented

The change correctly implements showing only the username instead of the concatenated first and last names in the actor details section, addressing issue #3222 mentioned in the PR objectives.

Minor suggestion: Since you're only using a single variable, the template literal syntax could be simplified:

-<span className=
8000
"text-sm text-content whitespace-nowrap">{`${user.username}`}</span>
+<span className="text-sm text-content whitespace-nowrap">{user.username}</span>
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 996c9a9 and 161820f.

📒 Files selected for processing (2)
  • apps/dashboard/app/(app)/audit/components/table/log-details/components/log-footer.tsx (1 hunks)
  • apps/dashboard/app/(app)/audit/components/table/log-details/components/log-header.tsx (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
apps/dashboard/app/(app)/audit/components/table/log-details/components/log-header.tsx (1)
apps/dashboard/lib/utils.ts (1)
  • cn (5-7)
🔇 Additional comments (1)
apps/dashboard/app/(app)/audit/components/table/log-details/components/log-header.tsx (1)

20-20: Badge styling adjustment fixes event case display

Removing the "uppercase" class from the Badge component ensures that audit log event names display in their original case rather than being forced to uppercase. This change correctly addresses issue #3221 mentioned in the PR objectives.

@ogzhanolguncu ogzhanolguncu added this pull request to the merge queue May 28, 2025
Merged via the queue into unkeyed:main with commit a2d5fe4 May 28, 2025
26 checks passed
@harshsbhat harshsbhat deleted the fix/name-error branch May 28, 2025 11:08
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.

Audit Log details show uppercased event name
2 participants
0