Repository navigation
Contacts MVP #3844
Description
Initial Checklist
- I understand this is a user story and questions should be posted in the Community Discussions
- I searched issues and couldn’t find anything (or linked relevant results below)
Related: #2004
User Story
As a user of the OpenCloud contacts app, I want to view, create, edit, delete and find my contacts with all their common fields, and pick them as recipients when writing an email, so that I can use OpenCloud as my everyday address book instead of a separate client.
User Value
Today the contacts app can list and create contacts with four fields only. Contacts cannot be edited or deleted, and data synced via CardDAV or imported elsewhere (multiple emails/phones, addresses, organization, labels) is partly invisible. This makes the app a viewer rather than a tool.
The groupware API already provides create, update, delete, filtering and address books, so this MVP is almost entirely web work and closes the gap to a usable address book with little backend effort. Recipient suggestions in the mail app add the biggest everyday value and connect both apps.
Acceptance Criteria
Sub-issues (MVP): (PRs: #3853 → #3854 → #3855 → #3856 → #3857 → #3858 → #3860 stacked in this order, #3859 independent)
- Delete a contact, with confirmation (Delete contacts #3852)
- Edit a contact (Edit contacts #3845)
- Full contact form for create and edit: multiple emails and phone numbers with labels (private/work), postal addresses, organization, job title, birthday, notes (Complete contact form with all common fields #3846)
- Complete detail view: labels, online services, photo (Show all contact information in the details view #3847)
- Respect
myRights: contacts in read-only address books are shown read-only, without edit/delete actions (Respect address book permissions in the contacts app #3848) - Quality: error state, no logging of contact data (
console.info), paging for large address books, unit tests (the app currently has none) (Error handling, paging and tests for the contacts app #3849) - Recipient suggestions from contacts in the mail app's compose form (Recipient suggestions from contacts in the mail app #3850)
- Server-side search across all address books, including organization and address (depends on the backend item below; client-side filtering until then) (Server-side contact search across all address books #3851)
Backend dependencies (groupware service, groupware branch at 2e0034cc0a):
-
JmapContactCardSupplierimplements neitherUpdatenorDelete, soPATCHandDELETE /accounts/{accountId}/contacts/{contactId}fail withDELCNT("no supplier supports that id"). Blocks deleting and editing. - All address book calls in
pkg/jmap/api_addressbook.gopassMailboxTypeinstead ofAddressBookType, soAddressBook/getis sent without theurn:ietf:params:jmap:contactscapability andGET /accounts/{accountId}/addressbooksreturns 500. Blocks the whole app. - Listing an empty address book panics in
squery(items[len(items)-1], index out of range [-1]). - Contacts with an anniversary date (
PartialDate, e.g. a birthday) can't be decoded ('Anniversaries[…].Date' expected type 'jscontact.AnniversaryDate'), so the whole contact list returns 500. -
ContactCardChangeis serialized withomitempty, soPATCHcan't clear a property completely (e.g. removing the only nickname or all email addresses keeps the old value). - As soon as another account shares an address book (or anything else) with a user,
GET /groupware/accountsreturns 403 for that user: identities are requested for all session accounts, and the mail server forbidsIdentity/getfor the shared account ("You are not an owner of account …"). All groupware apps stop loading. Blocks testing read-only address books. - Paging with
nextfails:SingleSupplierQueryParamsSupplier.ForSupplieralways returns "unable to provide for supplier with single supplier token", but the JMAP contact supplier has an id and ends up there. Blocks address books with more than one page. - The contacts list keeps returning a
nexttoken after the last page; empty pages omitresults({"limit":…,"total":…}) and later pages arenull. - The contact filters (
name,email, …) only match whole words, so they can't be used for search while typing or recipient suggestions (the web app filters locally for now). - The
addresscontact filter doesn't seem to be registered (uidappears twice insupportedContactsFilterQueryParams). Needed for searching by address.
Out of scope for the MVP (follow-ups):
- Global address book / internal users (needs a principals/directory endpoint in the backend)
- Distribution lists
- Create, rename and delete address books
- vCard import/export
- Photo upload
- Quick actions (send mail, call, save sender from mail)
- Multi-select, move/copy between address books
- Sharing address books (needs sharing endpoints in the backend)
Activity