Chat on repository#777
Open
toddmitchell wants to merge 12 commits into
Open
Conversation
…ntry projection Additive foundation for migrating the contact book onto ContactRepository: - ContactName.resolveDisplayName/initials (homebase-api), shared by all consumers. - Contact.toContactBookEntry() projection in core (server-shaped Contact -> flat UI model), display name via the shared resolver, image fields from ContactImageRef. No consumers rewired yet; nothing removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rewire the contact book onto the single source of truth and delete the core-side read/write wrappers: - ContactBookViewModel + ContactDetailViewModel inject ContactRepository instead of ContactBookStream + ContactBookService. They project repo.contacts (List<Contact>) -> ContactBookEntry via the new projection; reads use repo.isLoaded/ensureLoaded; writes use repo.save/delete/sync/setImage with the optimistic update owned by the repo (no more stream insert/remove dance). - ContactSaveHelper saves through ContactRepository; ContactSaveResult.Success no longer carries an optimistic entry. - Delete ContactBookStream + ContactBookService; AppModule registers neither and the post-auth bootstrap starts ContactRepository. - ContactDetailViewModel now ensureLoaded()s on deep-link. Main-parity (the §7/#6 fixes and shared helpers are re-applied next). Core + Konsist + api jvmTest suites pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rser - §7: contact detail "Contact details" section lists the Homebase ID, so an identity-only contact no longer reads "None". - #6: no-clear merge mitigation on the repository path — saveContactDraft now coalesces the saved content (keeps the old value for a blanked field, matching the server's no-clear merge, so the optimistic entry doesn't flash empty then reappear) and reports clearedFieldsIgnored; both the list and detail screens surface a "Clearing a contact field isn't supported yet…" snackbar. - Remove the now-dead HomebaseFile.toContactBookEntry (the repo path parses to Contact via toContact(); the UI projects Contact.toContactBookEntry) and its now-unused imports; refresh the ContactBookEntry KDoc. Core + Konsist + api jvmTest suites pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ry; delete DriveContactService Migrates the chat contact read+write path onto the single ContactRepository source of truth and removes the duplicate chat contact stack: - ContactUiModel gains a Contact.toContactUiModel() projection (server-shaped Contact -> connection-oriented chat model), via the shared resolveDisplayName/ initials helpers. - ContactService now sources raw contacts from ContactRepository.contacts and layers connection state on top (unchanged enrichment); it no longer starts a drive reader (the repo is started by the post-auth bootstrap). - ConnectionRequestService writes contacts on connection accept/finalize via contactRepository.sync(odinId) instead of DriveContactService.saveContactForOdinId. - Delete DriveContactService and the entire chat duplicate model family (ContactServerFile, ContactName/Phone/Email/Location/Birthday, ContactImage, ContactProtocol, ContactSizer); drop its DI registration. Now both chat and the contact book read/write through one ContactRepository: one drive query, one event observer, one writer. Chat + core + Konsist + api jvmTest suites pass. NOT yet device-validated — the chat people-pickers (new conversation, select/add members, conversation list) read through ContactService and need a smoke test. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…t/last name - Danger zone is now set off by a HorizontalDivider (clearer separation). - "Contact details" lists labeled rows (overline label + value): First name, Last name, Homebase ID, Phone, Email, Location, Birthday — name parts first so an identity contact shows real details, not just the Homebase ID; the rest tuck behind the existing "More" toggle. Reuses the edit-form label strings + a new contactbook_detail_location. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ew screen The minimal ContactInfoScreen (avatar + name + odinId) shown for a 1:1 conversation / group-member tap is a strict subset of the contact-detail screen, which already loads the 1:1 conversation overview (recent media, groups-in-common, circles) plus the full contact fields, message/connect, and danger zone. Converge on one screen: - Both nav sites (1:1 conversation info, group-member tap) now navigate to Route.ContactBookDetail(uniqueId = md5(odinId), odinId) instead of Route.ContactInfo. - Delete ContactInfoScreen/ViewModel/UiState/UiAction, Route.ContactInfo, and the DI registration. The chat-side ShowContactInfo actions/events are unchanged — they just deliver an odinId to the screen callback, which now opens the contact detail. Core + chat + Konsist jvmTest suites pass. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The bug: opening a 1:1 chat and tapping the header (or the overflow "Conversation info", or long-pressing it in the list) fired ShowConversationSettings, which opened the conversation-overview/settings screen — not the contact detail. The earlier ContactInfo rewire only covered reaction taps / group members, missing this main path. handleShowConversationSettings now routes a 1:1 (non-group, non-self) to NavigateToContactInfo(peerOdinId) -> the full contact-detail screen. Groups still open group settings; note-to-self keeps the conversation-settings screen (no contact). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… settings) RecentMediaSection now shows "See all" whenever the 1:1 has ANY shared content (media, files, audio, dice rolls, or locations) — not just media — so non-media items are reachable even with no media to strip; the empty state shows only when there's truly nothing. "See all" already routes to the same ConversationMedia screen the conversation-settings overview used, so the contact detail now fully subsumes that overview with nothing lost. Co-Authored-By: Claude Opus 4.8 (1M context) <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.