-
-
Notifications
You must be signed in to change notification settings - Fork 254
Fix gap for profile repeaters (api keys, ssh keys, activity logs) #1613
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
Conversation
📝 WalkthroughWalkthroughUpdated Filament form configuration in EditProfile.php: added inlineLabel(false) to api_keys and ssh_keys repeaters alongside hiddenLabel(); changed activity repeater to use hiddenLabel() and inlineLabel(false); renamed inner Placeholder from “activity!” (blank label) to “log” with hidden label. No public signatures changed. Changes
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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)
app/Filament/Pages/Auth/EditProfile.php (1)
458-460: Confirm safety of rendering raw HTML from ActivityLog::htmlable()Passing HtmlString($log->htmlable()) renders raw HTML. If any portion of the returned HTML contains unescaped user input (e.g., username), this can introduce XSS. The provided ActivityLog::htmlable() sample appears to interpolate dynamic values directly into HTML.
Consider escaping dynamic values inside htmlable(), or rendering via a Blade view (which escapes by default) and only mark as HtmlString after escaping.
Here’s a safer pattern for ActivityLog::htmlable() you can adapt outside this file:
public function htmlable(): string { $user = $this->actor instanceof User ? $this->actor : new User([ 'email' => 'system@pelican.dev', 'username' => 'system', ]); $avatarUrl = e(Filament::getUserAvatarUrl($user)); $username = e($user->username); $event = e($this->event); $label = e($this->getLabel()); $ip = e($this->ip); $titleTs = e($this->timestamp->format('M j, Y g:ia')); $humanTs = e($this->timestamp->diffForHumans()); return " <div style='display: flex; align-items: center;'> <img width='50' height='50' src='{$avatarUrl}' style='margin-right: 15px' /> <div> <p>{$username} — {$event}</p> <p>{$label}</p> <p>{$ip} — <span title='{$titleTs}'>{$humanTs}</span></p> </div> </div> "; }Alternatively, render a Blade view for the log item and return new HtmlString(view(...)->render()) after ensuring all dynamic values are escaped within the template.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
app/Filament/Pages/Auth/EditProfile.php(3 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
app/Filament/Pages/Auth/EditProfile.php (1)
app/Models/ActivityLog.php (2)
ActivityLog(54-257)htmlable(166-189)
🔇 Additional comments (3)
app/Filament/Pages/Auth/EditProfile.php (3)
325-325: Good call: disabling inline labels on the API keys repeater removes the label gutter.Combining hiddenLabel() with inlineLabel(false) will eliminate the left gutter reserved for inline labels and fix the visual gap in this section.
410-410: Consistent fix applied to SSH keys repeater.Same rationale as for API keys — this removes the unnecessary label gutter and aligns the list items cleanly.
450-452: Activity repeater: hiding the label and disabling inline labels resolves the spacing gap.This change aligns the activity list with the other repeaters and removes the extra column space from inline labels.
Before:

After:
