One behaviour for phones, addresses and social profiles on a company, a contact and Your details #1018

Merged
tiagoagueda merged 2 commits from 934-contact-details-parity into main 2026-10-22 01:19:31 +00:00
Owner

Closes #934

What changed

  • Your details builds its numbers and addresses through PhoneNumbersMixin and PostalAddressesMixin, as a company and a contact do; its own get_numbers and get_addresses are gone.
  • A company's and a contact's forms get the star for primary, the bin that removes a row at once and the help mark, as Your details has them. The bin needed two new routes, jobs:company_remove_row and jobs:contact_remove_row (POST, write access to the holder, a row of another holder is a 404).
  • A browser fills a telephone box only on the person's own numbers (tel), off on a company's or a contact's, as it already did for addresses. The widget template had tel hard-coded; it now follows the field.
  • A contact's card on its company's page lists its postal addresses.
  • A company's vCard carries its mailbox, every number and address, its website and its social profiles; importing one reads them back, and _not_kept only names a second website, the title and messaging handles. The profile's card still prints the primary only (a CV choice), now documented.
  • API: a contact takes and returns phone_numbers, postal_addresses and web_links; phone, phone_country and linkedin_url are kept as aliases, marked deprecated in the schema, with a CHANGELOG line under Deprecated.
  • Deliberate differences (phone uniqueness and account recovery only on the profile, social links only for a company, a company's addresses always on the map, the printed primary) are in the docstrings of PhoneNumber, PostalAddress and WebLink and in the wiki, and each is pinned by a test in tests/test_contact_details_parity.py.

Already done on main (left alone)

#932 (the LinkedIn company prefix), the extension advice and the postal autofill.

Tests

tests/test_contact_details_parity.py (new). Three older tests pinned the old shapes and were updated: test_a_contacts_form_keeps_its_help_in_sight, test_the_contact_form_keeps_its_boxes and the Gets me back in page check (now about the rows, the help drawer being the topic's one text). The page-coverage and isolation sweeps list the two new routes. Full unit suite green; the browser tests for the company and contact forms, row removal, phone groups and accessibility pass.

Library check

None needed.

Model use

Written with Claude Code, reviewed by the person who opens the PR.

🤖 Generated with Claude Code

Closes #934 ## What changed - Your details builds its numbers and addresses through `PhoneNumbersMixin` and `PostalAddressesMixin`, as a company and a contact do; its own `get_numbers` and `get_addresses` are gone. - A company's and a contact's forms get the star for primary, the bin that removes a row at once and the help mark, as Your details has them. The bin needed two new routes, `jobs:company_remove_row` and `jobs:contact_remove_row` (POST, write access to the holder, a row of another holder is a 404). - A browser fills a telephone box only on the person's own numbers (`tel`), `off` on a company's or a contact's, as it already did for addresses. The widget template had `tel` hard-coded; it now follows the field. - A contact's card on its company's page lists its postal addresses. - A company's vCard carries its mailbox, every number and address, its website and its social profiles; importing one reads them back, and `_not_kept` only names a second website, the title and messaging handles. The profile's card still prints the primary only (a CV choice), now documented. - API: a contact takes and returns `phone_numbers`, `postal_addresses` and `web_links`; `phone`, `phone_country` and `linkedin_url` are kept as aliases, marked deprecated in the schema, with a CHANGELOG line under Deprecated. - Deliberate differences (phone uniqueness and account recovery only on the profile, social links only for a company, a company's addresses always on the map, the printed primary) are in the docstrings of `PhoneNumber`, `PostalAddress` and `WebLink` and in the wiki, and each is pinned by a test in `tests/test_contact_details_parity.py`. ## Already done on main (left alone) #932 (the LinkedIn company prefix), the extension advice and the postal autofill. ## Tests `tests/test_contact_details_parity.py` (new). Three older tests pinned the old shapes and were updated: `test_a_contacts_form_keeps_its_help_in_sight`, `test_the_contact_form_keeps_its_boxes` and the *Gets me back in* page check (now about the rows, the help drawer being the topic's one text). The page-coverage and isolation sweeps list the two new routes. Full unit suite green; the browser tests for the company and contact forms, row removal, phone groups and accessibility pass. ## Library check None needed. ## Model use Written with Claude Code, reviewed by the person who opens the PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
One behaviour for phones, addresses and social profiles on a company, a contact and Your details (#934)
Some checks failed
CI / Security audit (push) Successful in 37s
CI / Browser tests (Chromium) (push) Failing after 29m45s
CI / Unit tests and coverage (Python 3.14) (push) Failing after 11m33s
CI / Checks: lint, migrations, catalogues, settings, built files (push) Successful in 2m29s
CI / Database tests on PostgreSQL (push) Successful in 3m17s
Every Python / Unit tests (Python 3.12) (push) Failing after 11m42s
Every Python / Unit tests (Python 3.13) (push) Failing after 11m34s
CI / Unit tests and coverage (Python 3.14) (pull_request) Failing after 11m35s
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Successful in 2m31s
CI / Database tests on PostgreSQL (pull_request) Successful in 3m21s
CI / Security audit (pull_request) Successful in 40s
CI / Browser tests (Chromium) (pull_request) Failing after 29m21s
b370951278
The three owners stored their rows in the same tables but edited, showed,
exported and offered them through the API differently, by accident rather
than by intent. This makes them the same and writes down, with a test each,
the differences that are deliberate.

- Your details builds its numbers and addresses through PhoneNumbersMixin and
  PostalAddressesMixin like the other two; its own get_numbers and
  get_addresses are gone.
- A company's and a contact's forms get the star, the bin that removes a row
  at once (new jobs:company_remove_row and jobs:contact_remove_row, write
  access to the holder required) and the help mark, as Your details has them.
- A browser fills a telephone box only on the person's own numbers
  (autocomplete tel, off elsewhere), as it already did for addresses.
- A contact's card on its company's page lists its postal addresses.
- A company's vCard carries its mailbox, every number and address, its website
  and its social profiles, and importing one reads them back. Your own card
  keeps the printed primary only: that is a choice about a document.
- The API: a contact takes and returns phone_numbers, postal_addresses and
  web_links lists; the single phone, phone_country and linkedin_url stay as
  deprecated aliases.
- Deliberate differences (phone uniqueness and account recovery only on the
  profile, social links only for a company, a company's addresses always on the
  map) are in the shared models' docstrings and pinned by tests.

Already done on main and left alone: the company LinkedIn prefix (#932), the
extension advice and postal autofill.

Closes #934

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Merge main into 934-contact-details-parity
Some checks failed
CI / Checks: lint, migrations, catalogues, settings, built files (push) Has been cancelled
CI / Database tests on PostgreSQL (push) Has been cancelled
CI / Security audit (push) Has been cancelled
CI / Browser tests (Chromium) (push) Has been cancelled
Every Python / Unit tests (Python 3.12) (push) Has been cancelled
Every Python / Unit tests (Python 3.13) (push) Has been cancelled
CI / Unit tests and coverage (Python 3.14) (push) Has been cancelled
CI / Browser tests (Chromium) (pull_request) Has been cancelled
CI / Unit tests and coverage (Python 3.14) (pull_request) Has been cancelled
CI / Checks: lint, migrations, catalogues, settings, built files (pull_request) Has been cancelled
CI / Database tests on PostgreSQL (pull_request) Has been cancelled
CI / Security audit (pull_request) Has been cancelled
73e74dd941
The company card keeps both the contact-details parity of this branch and the legal-state
note of main; the contact the API creates is made by the surface service and then given its
numbers and addresses as rows. The two remove-row routes are write routes in the sharing
sweep, as the identifier one is.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
tiagoagueda deleted branch 934-contact-details-parity 2026-10-22 01:19:36 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo!1018
No description provided.