Skip to content

feat(contacts): refactor contacts#4061

Merged
ComputelessComputer merged 12 commits intomainfrom
devin/1771404417-contacts-refactor
Feb 18, 2026
Merged

feat(contacts): refactor contacts#4061
ComputelessComputer merged 12 commits intomainfrom
devin/1771404417-contacts-refactor

Conversation

@devin-ai-integration
Copy link
Contributor

feat(contacts): refactor contacts with unified selection and pin/ordering

Summary

Replaces the two-column contacts layout (organizations + people) with a single unified contacts list, and changes the selection state from { selectedOrganization, selectedPerson } to a tagged union ContactsSelection ({ type: "person" | "organization", id }).

Key changes:

  • New ContactsSelection enum in Rust (state.rs) and auto-generated TypeScript bindings
  • New contacts-list.tsx (~600 LOC) with combined pinned list, drag-to-reorder (via motion/react), search hotkey (Cmd+F), and sort options
  • Added created_at, pinned, pin_order fields to organization schema (zod + tinybase + queries)
  • Added created_at, pin_order to human transform/frontmatter logic
  • Updated all consumers of ContactsState (advanced-search, search, sidebar, tab schema, tests)
  • Removed organizations.tsx and people.tsx (replaced by contacts-list.tsx)
  • Removed pin toggle from contact details panel (pinning is now list-only)
  • Sort dropdown changed from Select to DropdownMenu
  • Contacts permission row added to Settings > Permissions
  • Layout from 3-panel (orgs | people | detail) → 2-panel (contacts list | detail)

This is a clean re-creation of #3995 on top of current main.

Review & Testing Checklist for Human

  • Tab state migration: The ContactsState shape changed but there is no migration logic. Old persisted tabs will have selected: undefined. The auto-select useEffect should mask this, but verify no runtime errors on app load with pre-existing contacts tabs.
  • Person avatars: contacts-list.tsx uses getInitials with a plain gray circle for person avatars. Main's deleted people.tsx used <Facehash>. Verify this visual regression is acceptable, or port Facehash into PersonItem.
  • created_at sort for organizations: Existing organizations won't have created_at populated. Verify "Newest"/"Oldest" sort options produce sensible order for pre-existing data.
  • Pin/reorder end-to-end: Create people and organizations, pin some of each, reorder via drag, switch sort options, use Cmd+F search (reorder is disabled during search), clear search, close/reopen app — verify pin order is preserved.
  • Detail panel layout: The detail panel header was redesigned (centered avatar, name moved to field row, pin button removed). Verify the layout looks correct for both person and organization details.

Suggested test plan: Open contacts tab, create a few people and organizations, pin some of each, reorder the pinned list via drag, switch sort options, use Cmd+F search (verify reorder is disabled and items remain visible), clear search (verify reorder works again), close and reopen the app, and verify selection state + pin order are preserved. Also try pinning from the detail panel — oh wait, you can't anymore, pinning is list-only now.

Notes

  • Transform tests now assert pin_order round-trip for both human and organization transforms
  • Desktop typecheck passes
  • This is a clean re-creation of feat(contacts): refactor contacts #3995 to eliminate merge conflict noise from the original PR

Link to Devin run: https://app.devin.ai/sessions/f17e07d836f84d6bbd5a54b7ce9e6f4c
Requested by: @ComputelessComputer

@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for hyprnote-storybook canceled.

Name Link
🔨 Latest commit 241f6ec
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote-storybook/deploys/699594b744ed4300084affcd

@devin-ai-integration
Copy link
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR that start with 'DevinAI' or '@devin'.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@netlify
Copy link

netlify bot commented Feb 18, 2026

Deploy Preview for hyprnote ready!

Name Link
🔨 Latest commit 241f6ec
🔍 Latest deploy log https://app.netlify.com/projects/hyprnote/deploys/699594b736843000089f0152
😎 Deploy Preview https://deploy-preview-4061--hyprnote.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ComputelessComputer ComputelessComputer force-pushed the devin/1771404417-contacts-refactor branch from d852397 to f2bb8cf Compare February 18, 2026 09:52
devin-ai-integration bot and others added 12 commits February 18, 2026 18:53
…n/ordering support

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
…ng, fix details maxOrder

Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
Restructure organization and person detail views to improve visual
hierarchy and usability. Center profile avatars at the top, organize
information into structured rows with consistent labels, and improve
spacing throughout the interface.

Key changes:
- Center avatars in header section with increased size
- Replace horizontal layout with vertical field rows
- Add consistent label-value pairs for better readability
- Improve responsive layout with proper overflow handling
- Enhance visual separation between sections
Add organization fallback selection in contacts view. When no
person is selected and no people are available, automatically
select the first organization instead. This improves user
experience by ensuring a contact is always selected when
available.
Replace EditPersonOrganizationSelector with EditablePersonNameField
in contact details view and update field label from "Company" to
"Name". Standardize input styling by reducing height from h-8 to h-7
and font size from text-lg to text-base for consistent appearance
across person and organization name fields.
Remove contact pinning feature from the details view. Delete pin
button, toggle handler, and related state management. Fix duplicate
name field by replacing with company selector field. Simplify name
field layout by removing pin button wrapper.
Co-Authored-By: john@hyprnote.com <john@hyprnote.com>
Add arrow key navigation and Enter key selection to the organization
dropdown. Implement highlighted index state to track the currently
selected item and enable keyboard-driven selection of organizations
or creation of new ones. Update styling to show highlighted state
and reset highlighting when search term changes.
Move person and organization delete functionality from detail panel
to the contacts list. Remove danger zone section from details view
and implement context menu-based deletion for better UX consistency.
Pass delete handlers down to list items instead of detail components.
Remove custom getInitials utility function and replace text-based
initials with Facehash component for contact avatars. Use person
name, email, or humanId as fallback for generating unique visual
avatars. This provides more visually distinctive and consistent
contact representation in the contacts list.
@ComputelessComputer ComputelessComputer force-pushed the devin/1771404417-contacts-refactor branch from f2bb8cf to 241f6ec Compare February 18, 2026 10:30
@ComputelessComputer ComputelessComputer merged commit 42dc472 into main Feb 18, 2026
15 checks passed
@ComputelessComputer ComputelessComputer deleted the devin/1771404417-contacts-refactor branch February 18, 2026 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments