feat(contacts): refactor contacts#4061
Merged
ComputelessComputer merged 12 commits intomainfrom Feb 18, 2026
Merged
Conversation
✅ Deploy Preview for hyprnote-storybook canceled.
|
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
✅ Deploy Preview for hyprnote ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
d852397 to
f2bb8cf
Compare
…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.
f2bb8cf to
241f6ec
Compare
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.
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 unionContactsSelection({ type: "person" | "organization", id }).Key changes:
ContactsSelectionenum in Rust (state.rs) and auto-generated TypeScript bindingscontacts-list.tsx(~600 LOC) with combined pinned list, drag-to-reorder (viamotion/react), search hotkey (Cmd+F), and sort optionscreated_at,pinned,pin_orderfields to organization schema (zod + tinybase + queries)created_at,pin_orderto human transform/frontmatter logicContactsState(advanced-search, search, sidebar, tab schema, tests)organizations.tsxandpeople.tsx(replaced bycontacts-list.tsx)SelecttoDropdownMenuThis is a clean re-creation of #3995 on top of current
main.Review & Testing Checklist for Human
ContactsStateshape changed but there is no migration logic. Old persisted tabs will haveselected: undefined. The auto-selectuseEffectshould mask this, but verify no runtime errors on app load with pre-existing contacts tabs.contacts-list.tsxusesgetInitialswith a plain gray circle for person avatars. Main's deletedpeople.tsxused<Facehash>. Verify this visual regression is acceptable, or portFacehashintoPersonItem.created_atsort for organizations: Existing organizations won't havecreated_atpopulated. Verify "Newest"/"Oldest" sort options produce sensible order for pre-existing data.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
pin_orderround-trip for both human and organization transformsLink to Devin run: https://app.devin.ai/sessions/f17e07d836f84d6bbd5a54b7ce9e6f4c
Requested by: @ComputelessComputer