mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-14 11:17:44 +00:00
* plan: UI improvements to improve LLM usage via SimpleX * core, ui: types for chat layout * core, ui: settings for alternative terminal-like chat layout for managing LLMs or other service bots * plan: message priority * fixes * query plan * update plans * remove silent messages plan * rename migrations * implement layout * amend * fix * fix * fix * improve * time on the right, sender name in blue * no avatar in direct chats * better previews * update, fixes * update * time gap * changes * ui: terminal layout line heights, gaps and time placement * ui: simplify terminal meta layout, correct its docs and tests * ui: right-to-left emoji edge in terminal rows, time placement tests * android, desktop: raise Kotlin compiler memory to 4 GB * ui: terminal captions as follow-up text, classic event separators * ui: terminal media edge and overlay time, plan decisions * ui: simplify terminal row separation, correct doc line references * ui: keep the media time inside terminal rows, restore caption conditions * ui: terminal heading capitals at large font scales, idle live message time * ui: rename the classic voice-with-text flag, correct the meta copy docs * ui: smaller terminal layout diff, sender gap and meta names * ui: terminal row as tall as the media time * docs: remove the chat layout section from the bots readme * docs: shorten the terminal layout section of the chat view * core: address settings API as on master, /auto_accept reads the stored layout * ui: smaller terminal headings * ui: classic sender rows and avatar rule as on master * ui: classic reply quote text colour as on master * ios: keep the chat layout setting with other UI settings * ui: go-to button at the end of terminal rows, no gutter in direct chats * ui: forwarded arrow on the header line of terminal rows, above the time * ui: forwarded arrow centred above the time line of terminal rows * ios: terminal chat layout, chosen per app, profile and chat * ios: event time reserve of three spaces, app layout picker as Kotlin * ios: spec and plan of the terminal chat layout * ios: classic message text at 87% in dark themes, as terminal rows * ios: terminal gaps scaled by the body size, 17/16 of Kotlin values * ios: terminal quote sender at 13.5pt, thumbnail at the item end * ios: product docs of the terminal layout, plans updated for iOS * ios: chat scenes rendered to PNG by a unit test in the simulator CI * ios: snapshots rendered by the smoke test script, workflow unchanged * ios: terminal names at 13.5 x 17/16 pt, as the gaps * ios: Markdown views at the 87% message colour in dark themes * ios: terminal quote thumbnail 12pt after the quote text or the bar * ios: terminal rule-only message widened by a wider quote or header * ios: member avatars scaled with the text size, as in the chat list * ios: snapshot rows at their own height, as list cells, so text wraps * ios: member avatars back at 34pt, for the snapshot before scaling * ios: member avatars scaled with the text size, as in the chat list * ui: terminal quote thumbnail 12dp after the quote text or the bar * ios: classic group bubble width follows the scaled member avatar * ci: ios-sim README describes the snapshots rendered after the smoke test * ios: scratch, padding variants for the I7 and I8 renders, to revert * ios: revert the scratch padding variants after their renders * ui: contrast of the voice message button in terminal rows * ios: scratch, spacing variants and list margins to render, to revert * ios: revert the scratch spacing variants after their renders * ios: snapshots at a fixed date, in UTC and the en_US locale * ios: snapshots drawn as 8-bit sRGB without alpha * ci: compare iOS snapshots with the references in the repository * ci: record and check iOS snapshot references on GitHub's runner * ios: scratch, list margins on the remaining screens, to revert * ios: revert the scratch list margins after their measurement * ci: snapshot scripts executable, as the other CI scripts * ios: scratch, voice circle variants in light themes, to revert * ios: revert the scratch voice circle variants * ios: one 12pt padding at the edges and after avatars in terminal rows * ios: classic group sender name on the bubble edge * ui: one 12dp padding at the edges and after avatars in terminal rows * ios: one heading scale in both chat layouts * ios: snapshot references of the chat scenes * docs: leave the headings and classic lines of the plan to ep/classic-bubbles * ios: declare terminal layout functions inside types * ios: keep layout constants at file scope * ios: keep file-scope functions, move only extension members into types * ios: snapshot tests record row heights at first layout and the appearance layout switch * ios: appearance preview follows the chat layout setting at once * ios: snapshot test measures first-layout rows by SwiftUI and by cells * ios: chat rows measured at the chat width when they first appear * ios: snapshot test checks that chat rows keep their first height after a reload * ios, ci: references of terminal and classic chat scenes, dark message text * ios: message text at 95% in dark themes * ios, ci: references with message text at 95% in dark themes * ios: media in terminal rows end at the time's right inset * ios, ci: references with terminal media at the time's right inset --------- Co-authored-by: Evgeny Poberezkin <evgeny@poberezkin.com>
14 KiB
14 KiB
SimpleX Chat iOS -- Concept Index
SimpleX Chat iOS concept index. Maps every product concept to its documentation and source code with bidirectional links.
Related spec: spec/api.md | spec/state.md | spec/architecture.md
Table of Contents
Executive Summary
This document provides a structured mapping between product-level concepts, their documentation, and their implementation in both the Swift iOS layer and the Haskell core library. All source paths are relative to apps/ios/ for Swift and use ../../src/ prefix for Haskell files (relative to apps/ios/).
Section 1: Feature Concepts
| # | Concept | Product Docs | Spec Docs | Source Files (Swift) | Source Files (Haskell) |
|---|---|---|---|---|---|
| 1 | Chat List | views/chat-list.md, views/onboarding.md | spec/client/chat-list.md | Shared/Views/ChatList/ChatListView.swift, Shared/Views/ChatList/GetStakeBanner.swift |
Controller.hs (APIGetChats) |
| 2 | Direct Chat | views/chat.md, flows/messaging.md | spec/client/chat-view.md | Shared/Views/Chat/ChatView.swift, ChatInfoView.swift |
Types.hs (Contact), Messages.hs |
| 3 | Group Chat | views/chat.md, views/group-info.md | spec/client/chat-view.md | Shared/Views/Chat/ChatView.swift, Group/GroupChatInfoView.swift |
Types.hs (GroupInfo, GroupMember) |
| 4 | Message Composition | views/chat.md | spec/client/compose.md | ComposeMessage/ComposeView.swift, SendMessageView.swift |
Controller.hs (APISendMessages) |
| 5 | Message Reactions | views/chat.md | spec/api.md | ChatItem/EmojiItemView.swift |
Controller.hs (APIChatItemReaction) |
| 6 | Message Editing | views/chat.md | spec/client/compose.md | ComposeMessage/ComposeView.swift, ChatItemInfoView.swift |
Controller.hs (APIUpdateChatItem) |
| 7 | Message Deletion | views/chat.md | spec/api.md | ChatItem/MarkedDeletedItemView.swift, DeletedItemView.swift |
Controller.hs (APIDeleteChatItem) |
| 8 | Timed Messages | views/chat.md | spec/api.md | ChatItem/CIChatFeatureView.swift |
Types/Preferences.hs (TimedMessagesPreference) |
| 9 | Voice Messages | views/chat.md | spec/client/compose.md | ChatItem/CIVoiceView.swift, ComposeVoiceView.swift |
Protocol.hs (MCVoice) |
| 10 | File Transfer | flows/file-transfer.md | spec/services/files.md | ChatItem/CIFileView.swift, SimpleXChat/FileUtils.swift |
Files.hs, Store/Files.hs |
| 11 | Link Previews | views/chat.md | spec/client/chat-view.md | ChatItem/CILinkView.swift, ComposeLinkView.swift |
Protocol.hs (MCLink) |
| 12 | Contact Connection | flows/connection.md, views/new-chat.md | spec/api.md | NewChat/NewChatView.swift, QRCode.swift |
Controller.hs (APIConnect, APIAddContact) |
| 13 | Contact Verification | views/contact-info.md | spec/api.md | Shared/Views/Chat/VerifyCodeView.swift |
Controller.hs (APIVerifyContact) |
| 14 | Group Management | flows/group-lifecycle.md | spec/api.md, spec/database.md | NewChat/AddGroupView.swift, Group/GroupChatInfoView.swift |
Controller.hs (APINewGroup), Store/Groups.hs |
| 15 | Group Links | views/group-info.md | spec/api.md | Group/GroupLinkView.swift |
Controller.hs (APICreateGroupLink) |
| 16 | Member Roles | views/group-info.md | spec/api.md | SimpleXChat/ChatTypes.swift, Group/GroupMemberInfoView.swift |
Types/Shared.hs (GroupMemberRole) |
| 17 | Audio/Video Calls | views/call.md, flows/calling.md | spec/services/calls.md | Call/ActiveCallView.swift, CallController.swift, WebRTCClient.swift |
Call.hs (RcvCallInvitation, CallType) |
| 18 | Push Notifications | views/settings.md | spec/services/notifications.md | Model/NtfManager.swift, SimpleX NSE/NotificationService.swift |
Controller.hs |
| 19 | User Profiles | views/user-profiles.md | spec/state.md, spec/client/navigation.md | UserSettings/UserProfilesView.swift, ChatList/UserPicker.swift |
Types.hs (User), Store/Profiles.hs |
| 20 | Incognito Mode | views/contact-info.md | spec/api.md | UserSettings/IncognitoHelp.swift |
ProfileGenerator.hs, Types.hs |
| 21 | Hidden Profiles | views/user-profiles.md | spec/api.md | UserSettings/HiddenProfileView.swift |
Controller.hs (APIHideUser, APIUnhideUser) |
| 22 | Local Authentication | views/settings.md | spec/architecture.md | LocalAuth/LocalAuthView.swift, PasscodeView.swift |
N/A (iOS-only) |
| 23 | Database Encryption | views/settings.md | spec/database.md | Database/DatabaseEncryptionView.swift, DatabaseView.swift |
Controller.hs (APIExportArchive) |
| 24 | Theme System | views/settings.md | spec/services/theme.md | Theme/ThemeManager.swift, SimpleXChat/Theme/ThemeTypes.swift |
Types/UITheme.hs |
| 25 | Network Configuration | views/settings.md | spec/architecture.md | NetworkAndServers/NetworkAndServers.swift, ProtocolServersView.swift |
Controller.hs (APISetNetworkConfig) |
| 26 | Device Migration | flows/onboarding.md | spec/database.md | Migration/MigrateFromDevice.swift, MigrateToDevice.swift |
Archive.hs |
| 27 | Remote Desktop | views/settings.md | spec/architecture.md | RemoteAccess/ConnectDesktopView.swift |
Remote.hs, Remote/Types.hs |
| 28 | Chat Tags | views/chat-list.md | spec/state.md | ChatList/TagListView.swift, ChatListView.swift |
Types.hs (ChatTag), Controller.hs |
| 29 | User Address | views/settings.md | spec/api.md | UserSettings/UserAddressView.swift, Onboarding/AddressCreationCard.swift |
Controller.hs (APICreateMyAddress) |
| 30 | Member Support Chat | views/group-info.md | spec/api.md | Group/MemberSupportView.swift, MemberAdmissionView.swift |
Messages.hs (GroupChatScope), Controller.hs |
| 31 | Channels (Relays) | glossary.md, views/chat.md, views/group-info.md | spec/api.md, spec/state.md, spec/client/chat-view.md, spec/client/compose.md | SimpleXChat/ChatTypes.swift (RelayStatus incl. .rsRejected, RelayStatus.text, GroupRelay, GroupMemberRole.relay, GroupMemberStatus.memRejected, CIDirection.channelRcv, GroupInfo.chatIconName, userCantSendReason), Shared/Views/Chat/ChatView.swift (channel message rendering), Shared/Views/Chat/ComposeMessage/ComposeView.swift (sendAsGroup, Broadcast placeholder), Shared/Views/Chat/Group/GroupChatInfoView.swift (channel info adaptations), Shared/Views/Chat/Group/GroupMemberInfoView.swift (rejected-status row), Shared/Views/Chat/Group/ChannelMembersView.swift, Shared/Views/Chat/Group/ChannelRelaysView.swift, Shared/Views/NewChat/AddChannelView.swift (relayStatusIndicator rejected branch), Shared/Model/AppAPITypes.swift (GroupShortLinkInfo, UserChatRelay), Shared/Model/SimpleXAPI.swift (apiNewPublicGroup), SimpleX SE/ShareAPI.swift (channel sendAsGroup) |
Controller.hs (APINewPublicGroup, APIAllowRelayGroup, XGrpRelayReject CONF handler) |
| 32 | Terminal Chat Layout | views/chat.md (Terminal Layout) | spec/client/chat-view.md, spec/services/theme.md (Chat Layout) | Shared/Views/Chat/ChatItem/TerminalItemView.swift (terminalLayout environment value, gaps, terminalLineBox, ItemWithMeta, ChatEventWithMeta, TerminalChatItemRow), Shared/Views/Chat/ChatView.swift (terminal, terminalItemRow, chatItemSender), Shared/Views/Chat/ChatItemView.swift (endButton, event items), ChatItem/FramedItemView.swift (text edge, quote, media, meta), ChatItem/MsgContentView.swift (copy of the meta, line boxes, MarkdownBlocksView gaps), ChatItem/CIMetaView.swift (ciMetaText(unbreakable:)), Shared/Model/ChatModel.swift (profileChatLayout), SimpleXChat/ChatTypes.swift (ChatLayout, Contact.chatLayout, ChatInfo.activeChatLayout), SimpleXChat/Theme/ThemeTypes.swift (ThemeModeOverrides.chatLayout, withChatLayout), Shared/Views/UserSettings/AppearanceSettings.swift (ChatLayoutPicker, theme preview), Shared/Views/Helpers/ThemeModeEditor.swift (ChatLayoutSection), Shared/Views/Chat/ChatInfoView.swift (setChatLayout) |
Types/UITheme.hs (ChatLayout, UIThemeEntityOverrides), Types.hs (GroupProfile), Controller.hs (SetGroupChatLayout, SetAddressSettings) |
Section 2: Entity Index
Core data entities, their storage, and the operations that manage their lifecycle.
| Entity | DB Table (Haskell) | Created By | Read By | Mutated By | Deleted By |
|---|---|---|---|---|---|
| User | users |
CreateActiveUser in Controller.hs |
ListUsers, APISetActiveUser in Controller.hs |
APISetActiveUser, APIHideUser, APIUnhideUser, APIMuteUser, APIUpdateProfile in Controller.hs |
APIDeleteUser in Controller.hs; Store/Profiles.hs |
| Contact | contacts, contact_profiles |
APIAddContact, APIConnect in Controller.hs |
APIGetChat in Controller.hs; Store/Direct.hs (getContact) |
APISetContactAlias, APISetConnectionAlias in Controller.hs; Store/Direct.hs |
APIDeleteChat in Controller.hs; Store/Direct.hs (deleteContact) |
| GroupInfo | groups, group_profiles |
APINewGroup in Controller.hs; Store/Groups.hs (createNewGroup) |
APIGetChat, APIGroupInfo in Controller.hs; Store/Groups.hs |
APIUpdateGroupProfile in Controller.hs; Store/Groups.hs (updateGroupProfile) |
APIDeleteChat in Controller.hs; Store/Groups.hs (deleteGroup) |
| GroupMember | group_members, contact_profiles |
APIAddMember, APIJoinGroup in Controller.hs; Store/Groups.hs (createNewGroupMember) |
APIListMembers in Controller.hs; Store/Groups.hs (getGroupMembers) |
APIMembersRole in Controller.hs; Store/Groups.hs (updateGroupMemberRole) |
APIRemoveMembers in Controller.hs; Store/Groups.hs (deleteGroupMember) |
| ChatItem | chat_items, chat_item_versions |
APISendMessages in Controller.hs; Store/Messages.hs (createNewChatItem) |
APIGetChat, APIGetChatItems in Controller.hs; Store/Messages.hs (getChatItems) |
APIUpdateChatItem, APIChatItemReaction in Controller.hs; Store/Messages.hs (updateChatItem) |
APIDeleteChatItem in Controller.hs; Store/Messages.hs (deleteChatItem) |
| Connection | connections |
createConnection via SMP agent; Store/Connections.hs |
Store/Connections.hs (getConnectionEntity) |
Store/Connections.hs (updateConnectionStatus) |
Store/Connections.hs (deleteConnection) |
| FileTransfer | files, snd_files, rcv_files, xftp_file_descriptions |
APISendMessages (with file), ReceiveFile in Controller.hs; Store/Files.hs |
Store/Files.hs (getFileTransfer) |
Store/Files.hs (updateFileStatus, updateFileProgress) |
Store/Files.hs (deleteFileTransfer) |
| GroupLink | user_contact_links |
APICreateGroupLink in Controller.hs; Store/Groups.hs |
APIGetGroupLink in Controller.hs; Store/Groups.hs |
N/A (recreated on change) | APIDeleteGroupLink in Controller.hs; Store/Groups.hs |
| ChatTag | chat_tags, chat_tags_chats |
APICreateChatTag in Controller.hs |
APIGetChats in Controller.hs |
APIUpdateChatTag, APISetChatTags in Controller.hs |
APIDeleteChatTag in Controller.hs |
| RcvCallInvitation | In-memory (not persisted) | Received via XCallInv message in Library/Subscriber.hs; stored in ChatModel.callInvitations |
CallController.swift, IncomingCallView.swift |
Updated on call accept/reject in CallManager.swift |
Removed on call end/reject; Controller.hs |
Cross-References
- Product overview: README.md
- Glossary: glossary.md
- Haskell core controller:
../../src/Simplex/Chat/Controller.hs - Haskell core types:
../../src/Simplex/Chat/Types.hs - Haskell store layer:
../../src/Simplex/Chat/Store/(Direct.hs, Groups.hs, Messages.hs, Files.hs, Profiles.hs, Connections.hs) - Swift model:
Shared/Model/ChatModel.swift - Swift API types:
SimpleXChat/APITypes.swift,SimpleXChat/ChatTypes.swift - Swift API bridge:
SimpleXChat/API.swift,Shared/Model/SimpleXAPI.swift