Repository navigation
Recipe/main - #39
Merged
Merged
Recipe/main#39
Conversation
… users Mentions previously rendered any "@word" typed in a message as a styled mention tag, with no click behavior — so arbitrary text could look like a mention, and real mentions weren't clickable. Centralize the logic in useMentions.ts: only tokens that resolve to a real org member (or the new special "everyone"/"here" tokens) get highlighted, clicking a user mention opens their profile, and "you were mentioned" detection now matches pseudo or name consistently with what the composer actually inserts. @here highlights for a mentioned user only while they're online. Also escapes message text before it's reinjected as innerHTML during mention rendering, closing a latent HTML-injection path in the previous implementation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Selecting a mention (Enter or click) closed the dropdown, but a reactive watcher on modelValue immediately reopened it: that watcher re-ran the mention regex using textareaRef.selectionStart, which is stale until the DOM patches the textarea's new value — so it matched mid-mention and flipped showMentions back to true right after insertMention set it false. Move mention detection into the native input handler, where event.target.selectionStart is always in sync with the text that triggered it, and drop the prop watcher entirely. Programmatic updates (inserting a mention) no longer re-trigger detection, so the overlay stays closed. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Extends UserSettings so users manage their own account entirely inside Synco instead of being redirected to the Keycloak hosted UI: - Account tab: single "name" field replaced by separate first/last name inputs, saved via PATCH /api/users/me/name (Keycloak-backed). - Security tab: the "manage via Keycloak" redirect is replaced by an in-app password change form and a danger zone to delete the account, using the shared ConfirmDelete component instead of native dialogs. - OrgSelection's account-deletion entry point now opens UserSettings on the security tab instead of its own inconsistent delete flow. - The password form surfaces why the submit button is disabled instead of just graying it out. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
… on logout OrgLayout's onBeforeUnmount fully disconnected and nulled the shared socket singleton (useWSocket) on every unmount — including ordinary in-app navigation away from an org, not just logout. Since the socket is shared app-wide (DMs, notifications, calls), that tore down connectivity for unrelated features any time the user left an org view. Now only the listeners OrgLayout itself registered are removed on unmount; the connection is left alone. Explicit logout is now the only thing that closes it, via the already existing disconnectSocket() (UserSettings password change/account deletion, UserDropDown and OrgSelection logout buttons). Also adds useAppPresence: on native platforms, flips presence to idle after the app sits in the background for a minute and back to foreground on return, without touching a manual dnd/idle/offline preference (enforced server-side).
TS flagged match[1] as possibly undefined in extractMentionTokens, blocking the build. The capture group in MENTION_TOKEN_REGEX is non-optional so it always matches whenever the overall pattern does, but TS can't infer that — skip the (impossible in practice) undefined case explicitly instead of asserting past it. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.