Skip to content

Conversation

@brymut
Copy link
Contributor

@brymut brymut commented Sep 30, 2025

Description

Changing nym should still point to the user mentioned instead of losing link.

fixes #2232

Screenshots

Screen.Recording.2025-09-30.at.16.55.04.mov

Checklist

Are your changes backward compatible? Please answer below:
Y

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:
8

For frontend changes: Tested on mobile, light and dark mode? Please answer below:
Y

Did you introduce any new environment variables? If so, call them out explicitly here:
N

Did you use AI for this? If so, how much did it assist you?
Y? but the AI suggestions required DB changes even though all we needed was already in the DB. Maybe more premium models would've come up with something better. So I just worked out this solution.


Note

Resolve mentions to the correct user even after username changes by adding userByMention GraphQL query and wiring frontend mention/popover to use it with itemId.

  • GraphQL/API:
    • Add Query.userByMention(name: String!, itemId: ID): User with resolver that resolves a user from Mention records for a given itemId, falling back to user(name).
  • Frontend:
    • components/text.js: Pass itemId into mention renderer and UserPopover; dynamically link mentions to /${user.name} when resolved. Update useMemo deps to include itemId.
    • components/user-popover.js: Query USER_BY_MENTION (when itemId provided) and fall back to USER; expose resolved user to children; refine loading and display logic.
  • GQL Fragments:
    • Add USER_BY_MENTION query in fragments/users.js.

Written by Cursor Bugbot for commit 0f58cd2. This will update automatically on new commits. Configure here.

@brymut brymut force-pushed the fix/maintain-mention-nym-change branch from 86071e6 to 4639417 Compare September 30, 2025 14:08
@brymut brymut marked this pull request as ready for review September 30, 2025 14:16
cursor[bot]

This comment was marked as outdated.

@brymut brymut force-pushed the fix/maintain-mention-nym-change branch from 4639417 to 95745c5 Compare September 30, 2025 21:59
cursor[bot]

This comment was marked as outdated.

@brymut brymut force-pushed the fix/maintain-mention-nym-change branch from 95745c5 to 363af8e Compare September 30, 2025 22:18
cursor[bot]

This comment was marked as outdated.

@brymut brymut force-pushed the fix/maintain-mention-nym-change branch from 363af8e to ea13f2e Compare September 30, 2025 22:51
cursor[bot]

This comment was marked as outdated.

@brymut brymut force-pushed the fix/maintain-mention-nym-change branch from ea13f2e to 44e4154 Compare September 30, 2025 23:05
cursor[bot]

This comment was marked as outdated.

@brymut brymut force-pushed the fix/maintain-mention-nym-change branch from 44e4154 to 0f58cd2 Compare September 30, 2025 23:29
@ekzyis ekzyis added the bug label Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Changing nym does not update earlier tags

2 participants