feat(profile): pronouns, links & local time on profiles (LC-533) #510
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/LC-533-profile-extras"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
LC-533: richer public profiles. Adds three optional fields a user sets in Settings and that show on their hovercard: pronouns, links, and a timezone that drives a live "local time" line.
Why
The profile card was name + username + bio + status only. Pronouns, a personal link or two, and "what time is it for them right now" are the standard next tier of profile info and cost nothing to add on top of the existing hovercard + settings-profile plumbing.
How
Four commits, each compiles and tests green on its own:
Columns + model plumbing. New migration
0036_profile_extras.sqladds NULLablepronouns,profile_links,timezonetousers. BothUserRecordandUsercarry them, every userSELECT+row_to_user_recordmap them, andupdate_user_profiletakes them. Model helpers land with lib unit tests (CI-covered):validate_profile_links(per-line http(s) + length + 5-link caps,javascript:/data:rejected before they can reach an href),profile_link_list(defensive render-time re-filter),local_time_in(chrono-tz "3:45 PM EDT", None for unset/unknown tz).Settings edit.
post_profileparses + validates each field (bad value returns the same inlinesettings_errorfragment as the existing display-name/bio checks). The profile section grows a pronouns input, a links textarea (one URL per line), and a timezone<select>reusing the DND picker's IANA list. en + es strings.Hovercard display. Pronouns render next to the name, the timezone becomes a "Local time: 3:45 PM EDT" line computed at request time, links render as
target=_blank rel=noopener noreferrer nofollowanchors. All three sit behind the same privacy gate as bio (public profile, or self, or admin) since the timezone leaks rough location.Integration tests.
update_user_profileround-trip (persists then nulls the extras) and the hovercard privacy gate (public profile shows all three; a stranger on a private profile sees none).Notes
ADD COLUMN); no operator action.Testing
just check,just test,just test-saasall green.🤖 Generated with Claude Code
https://claude.ai/code/session_01Q1pu1NZoT3Uxb7AcxVyTgu