Skip to content

Recipe/main - #39

Merged
MisterPapaye merged 5 commits into
mainfrom
recipe/main
Sep 14, 2026
Merged

MisterPapaye merged 5 commits into
mainfrom
recipe/main

Conversation

@MisterPapaye

Copy link
Copy Markdown
Member

No description provided.

MisterPapaye and others added 5 commits September 14, 2026 18:58
… 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>
@MisterPapaye
MisterPapaye merged commit 5dc935a into main Sep 14, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant