Add username + profile link to sidebar#1138
Conversation
Greptile SummaryThis PR adds the current user's username to the sidebar's
Confidence Score: 5/5Safe to merge — the change is additive, null-safe on the frontend, and consistent with existing patterns throughout the codebase. The username field is optional in both the Ruby hash and the TypeScript type, and the Svelte component gracefully falls back to the original plain-text span when no username is present. The profile path uses the same profiles route helper already used elsewhere, and the hover animation is purely cosmetic with no data-flow risk. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Rails as InertiaController
participant Inertia as Inertia Props
participant Svelte as UserSummary.svelte
participant Router as profiles.show.path
Rails->>Inertia: "inertia_nav_current_user {display_name, username, avatar_url, …}"
Inertia->>Svelte: user prop (NavCurrentUser)
Svelte->>Router: "profiles.show.path({ username })"
Router-->>Svelte: "profilePath (e.g. /@alice)"
Svelte-->>Svelte: if profilePath → render Link else → render plain span
Reviews (2): Last reviewed commit: "Merge branch 'main' into profile-links" | Re-trigger Greptile |
Co-authored-by: Copilot <copilot@github.com>
skyfallwastaken
left a comment
There was a problem hiding this comment.
Thanks for the PR! Two things:
- Please fix the merge conflicts
- It would be nice if you could see the username by hovering over the display name, rather than it always being there
Co-authored-by: Copilot <copilot@github.com>
|
@skyfallwastaken switched to a transition between the displayname and username based on mouse hover. all merge conflicts + pr checks also look good now! |
|
@greptileai review |
Before:
After:
transitions between
and
depending on hover state