Commit Graph
588 Commits
Author SHA1 Message Date
Jannis Braun e16cedded7 feat(web): add confirmation dialog for unfriend action 2026-04-03 00:48:28 +02:00
Jannis Braun fbd69b09cf fix(web): use title case for all Friends page headers 2026-04-03 00:47:19 +02:00
Jannis Braun 33f5edb419 fix(web): use divide-y for flat friend row separators 2026-04-03 00:46:03 +02:00
Jannis Braun c5eddff084 fix(web): friends page header, button visibility, and status casing 2026-04-03 00:44:48 +02:00
Jannis Braun 1236744c46 refactor(web): remove unused isSameCounterpart and deduplicateDmChannels from spaceStore
These functions were superseded by the DM deduplication fix in
32d9647. Clean up the dead code and unused identity imports.
2026-04-03 00:04:50 +02:00
Jannis Braun c7eab559d5 fix(web): respect user-disconnected federation instances on reload
Add third group for instances the user explicitly disconnected via
the registry. These get a disconnected placeholder with preserved
token for instant reconnect, but no auto-connect on page load.
2026-04-03 00:04:46 +02:00
Jannis Braun d7f82d5496 refactor(web): use DmListItem in ChannelSidebar, align nav item geometry
Replace ~105 lines of inline DM rendering with <DmListItem>.
Update Friends and Coming Soon nav items to rounded-[6px].
2026-04-02 23:50:48 +02:00
Jannis Braun f7b8770cab feat(web): extract DmListItem component with visual refinements
Extracts the inline DM list item rendering (~105 lines) from
ChannelSidebar.tsx into a standalone component. Applies cohesive
hover states, 6px border radius, 44px row height, and a selected-
state accent bar matching ChannelItem's pattern.
2026-04-02 23:44:03 +02:00
Jannis Braun 32d9647ed1 fix(web): deduplicate DM sidebar entries for federated users
When the same person registers on multiple federated instances, separate
DM channels are created for each identity, causing duplicate sidebar
entries (e.g., "Nova" appearing twice — once for local, once for
federated account).

Add deduplicateDmChannels() safety net that detects matching counterparts
using two layers: canonicalUserMatch (same ID/homeUserId/username) and
replicatedInstances cross-check (local user has a replicated account on
the federated user's home instance with the same base username). Keeps
the DM with the most recent activity, applied in both setDmChannels and
populateFromReady.

Investigation: queried both live instances (nova.ddns.net, orbit)
and confirmed root cause is same-person-two-accounts, not a server-side
creation bug or identity resolution gap.
2026-04-02 18:11:18 +02:00
Jannis Braun c7c86007c4 feat(web): render smart timestamps and attachment-aware previews in DM sidebar 2026-04-02 18:00:02 +02:00
Jannis Braun 1260f69ed0 fix(web): fix type errors in dmFormatters PreviewAttachment handling 2026-04-02 17:57:44 +02:00
Jannis Braun b77aad61eb refactor(web): unify DM sorting with sortDmChannels across all triggers 2026-04-02 17:56:26 +02:00
Jannis Braun b82733868b feat(web): add formatDmPreview utility with attachment-aware previews
Supports text-only, attachment-only (with type-specific icons), and
mixed messages. PreviewAttachment accepts both type/filename (ready
payload) and mimetype/originalName (Attachment type) field shapes.
2026-04-02 17:48:28 +02:00
Jannis Braun 68fe04ef58 feat(web): add sortDmChannels utility with unread-first sorting 2026-04-02 17:48:24 +02:00
Jannis Braun 03667947aa feat(web): add formatDmTimestamp utility with smart date formatting 2026-04-02 17:47:18 +02:00
Jannis Braun cc90b5fa65 fix(web): reauthenticateInstance works without existing live instance (stale disconnected entries) 2026-04-02 08:50:35 +02:00
Jannis Braun 7a3945e2f1 fix(web): disconnect keeps token alive — reconnect without re-auth 2026-04-02 08:44:05 +02:00
Jannis Braun 839197d4b8 fix(web): add re-authenticate flow, safe URL parsing, and minor UI fixes 2026-04-01 18:23:27 +02:00
Jannis Braun 7135990340 fix(web): critical fixes — preserve tokens on disconnect, clean up forceRemoveEntry, update registry on reconnect failure
- disconnectInstance: save cached tokens BEFORE filtering the instance out, so
  reconnectInstance can restore disconnected entries from localStorage
- reconnectInstance: if instance is not in active instances array, attempt to
  restore it from cached localStorage token before proceeding with reconnect
- reconnectInstance: update registry to unreachable/auth_expired on failure
- forceRemoveEntry: now tears down WS, removes from instances array, purges
  token from localStorage, and cleans up space store (was registry-only before)
2026-04-01 18:20:53 +02:00
Jannis Braun 95e4dd9fa8 feat(web): overhaul ConnectedInstances with persistent registry list, filters, expandable rows, and delete identity dialog 2026-04-01 18:08:14 +02:00
Jannis Braun 05d8285f9d feat(web): hydrate federation registry from server in autoConnectAll with localStorage migration 2026-04-01 18:03:59 +02:00
Jannis Braun c22d568605 feat(web): wire federation registry into connectToRemote, loginToRemote, and reconnectInstance flows 2026-04-01 18:01:48 +02:00
Jannis Braun d7e2f25c31 refactor(web): rename removeInstance to disconnectInstance, wire up registry on disconnect 2026-04-01 18:00:08 +02:00
Jannis Braun ce5c164958 feat(web): add federation registry state, syncRegistry, and helper actions to instanceStore 2026-04-01 17:58:17 +02:00
Jannis Braun b89dcb9f2c feat(web): add federation registry API client methods 2026-04-01 17:56:02 +02:00
Jannis Braun 6de56edba0 fix(web): clear hasMore when removing channel states on DM close
removeChannelStates cleared messages and readStates but not hasMore.
When a closed DM was reopened with the same channel ID, loadMessages
saw the stale hasMore entry and skipped loading — showing an empty
chat. Now clears hasMore so messages reload on reopen.
2026-04-01 13:19:41 +02:00
Jannis Braun 187f71e68e feat: add dm_typing_stop event to clear typing indicator on message send
Broadcasts dm_typing_stop to DM members before dm_message_created,
so the typing indicator clears immediately when a message arrives
instead of lingering for up to 3 seconds after delivery.
2026-04-01 12:50:03 +02:00
Jannis Braun 3464e9d991 feat(web): filter remote DMs from populateFromReady, remove dedup and dead code
DMs now come exclusively from the home instance's ready payload.
Remote origins' DM channels are ignored. The deduplication logic
that preferred home copies over remote copies is no longer needed.
Removed dead loadDmChannels() (zero call sites).
2026-04-01 12:47:12 +02:00
Jannis Braun 7f3ca4e6d1 feat(web): route DM creation to home instance with federated identity
All DM creation and add-member call sites now use the home api client
and pass homeUserId/homeInstance instead of routing to the remote instance.
Also updates addMember in the API client to accept AddDmMemberRequest.
2026-04-01 12:45:13 +02:00
Jannis Braun f55238f8e5 feat(web): wire up confirm dialogs and action handlers for peer management 2026-04-01 01:53:32 +02:00
Jannis Braun a91f7b5df1 feat(web): implement expandable peer details with stats, rotation, and actions 2026-04-01 01:41:11 +02:00
Jannis Braun 72dba1c03e feat(web): add peer list with filtering, sorting, and compact rows 2026-04-01 01:39:19 +02:00
Jannis Braun 74ed5c44ce feat(web): implement FederationPanel global settings section 2026-04-01 01:26:18 +02:00
Jannis Braun 5ca5db7122 refactor(web): extract federation section from GeneralPanel 2026-04-01 01:25:26 +02:00
Jannis Braun f94b3b93f7 feat(web): add federation API client methods for rotation, peer update, and permanent delete 2026-04-01 01:24:15 +02:00
Jannis Braun f49c2b5488 feat(web): register Federation tab in instance settings 2026-04-01 01:23:56 +02:00
Jannis Braun 626fbfdba8 fix(federation): address code review findings for FED-009
- Resolve homeUserId from DB in sendFederatedCallStart/End (not raw userId)
- Clear existing timeout in createFederatedCall before overwriting
- Clear federatedCallToken/Url in leaveVoice and handleForceDisconnect
- Remove unnecessary `as any` cast in relay processor
2026-03-31 23:58:27 +02:00
Jannis Braun 2f211e0588 feat(federation): useLiveKit connects to remote LiveKit for federated calls (FED-009) 2026-03-31 23:41:50 +02:00
Jannis Braun 24571edc34 feat(federation): client voice store handles federated call data (FED-009) 2026-03-31 23:40:11 +02:00
Jannis Braun a3a7527c9e chore: add system docs, specs, and misc updates from other sessions
- Add complete docs/systems/ reference (18 system docs)
- Add federation relay status doc and prior spec/plan docs
- Remove superseded docs/federation-dm-s2s.md (replaced by docs/systems/federation.md)
- CLAUDE.md updates
- Minor fixes in social.ts, types.ts, AddDmMemberModal, NewDmModal, UserSettings
2026-03-31 03:40:34 +02:00
Jannis Braun 41658ec2ef fix: repair corrupted group DMs, prevent ownerId nulling, show empty groups
Three fixes for group DM data integrity and display:

1. processOwnershipTransferEvent: use resolveOrCreateReplicatedUser instead
   of resolveLocalUser to guarantee a valid ownerId. The previous ?? null
   fallback converted group DMs into 1-on-1s when resolution failed.

2. Self-healing migration: detect group DMs with UUID-format federated_id
   but NULL owner_id (corrupted by the old fallback) and restore owner from
   the first remaining member. Found and repaired 7 across both instances.

3. Sidebar: group DMs with 0 other members (last person standing) now show
   as "Empty Group" instead of being hidden. 1-on-1 DMs with 0 others are
   still correctly filtered out.
2026-03-27 17:38:09 +01:00
Jannis Braun 04c665e0f7 fix: three code review issues — leaveGroup duplicate, as any casts, federation ownership fallback
- Remove redundant `leaveGroup` API method from client.ts (duplicated `leave`); update MessageList.tsx WelcomeHeader to call `api.dm.leave` directly
- Add optional `type` field to shared `Message` interface so `MessageWithUser` carries it; remove `(msg as any).type` casts in `isSameGroup` and the render branch in MessageList.tsx
- Fix `processOwnershipTransferEvent` in federation.ts: replace `channel.ownerId` fallbacks (pre-update, old owner) with `event.ownership.newOwner.homeUserId` in the db update, dm_owner_updated broadcast, and both system message content payloads
2026-03-27 05:50:38 +01:00
Jannis Braun c3191be4e7 feat: system messages, group DM welcome header, and dm_owner_updated event
- Render system messages (member_added, member_removed, owner_changed) inline
  in MessageList with icon + human-readable text; system messages never group
  with adjacent user messages
- Rewrite WelcomeHeader to branch on ownerId: group DMs show overlapping avatars,
  group name, creator attribution, federated privacy note, and a Leave Group button
- Add dm_owner_updated ServerEvent; broadcast from dm.ts leave handler and
  federation processOwnershipTransferEvent so all clients update ownerId in real-time
- Add updateDmOwner action to spaceStore and handle dm_owner_updated in useWebSocket
- Add leaveGroup alias to API client dm namespace
2026-03-27 05:43:30 +01:00
Jannis Braun c5c7ab571a fix(federation): use inline badge for all attachment types
Overlay badges inside overflow-hidden containers (images, video)
were invisible. Use inline badges below the media for all types.
2026-03-27 05:20:58 +01:00
Jannis Braun dd3ddd9cc2 fix(federation): fix badge positioning and tooltip text for file attachments
- Use inline badges for file/audio attachments (next to file size)
  instead of absolute positioning which overflowed the container
- Keep overlay badges for images/video (overflow-hidden containers)
- Match tooltip text to toast notification text for consistency
2026-03-27 05:07:55 +01:00
Jannis Braun ceb0c9812d fix(federation): resolve code review issues in upload size mismatch
- Fix critical: outbox worker now copies file_rejected payload fields
  (attachmentId, sourceFilename, rejectionReason, rejectionLimit,
  affectedUserIds) so the reverse relay actually delivers them
- Fix: add sourceFilename to file_rejected event for reliable
  multi-attachment matching on the sender side
- Fix: change text-accent-warning to text-accent-amber (valid class)
- Add Array.isArray guard on federationMeta parse
2026-03-27 04:51:30 +01:00
Jannis Braun 589af25b45 feat(federation): show toast on file_rejected federation event 2026-03-27 04:43:23 +01:00
Jannis Braun 4686ec6594 feat(federation): add federation status badges to attachment renderer 2026-03-27 04:42:15 +01:00
Jannis Braun c9c0acf2c4 refactor: remove dead ConfirmDialog copy from space view branch
The leave-group-DM ConfirmDialog in the space/channel sidebar return
path was unreachable — group DMs only render in the DM view branch,
so setLeaveGroupDmId is never called from the space view.
2026-03-27 04:01:50 +01:00
Jannis Braun 6a4dd46729 fix: use ownerId for group DM detection in MobileChatScreen 2026-03-27 03:56:51 +01:00