Skip to content

Features: suggested records, click-to-sort columns, hidden-filter chokepoint - #49

Closed
mayeack wants to merge 1 commit into
claude/hotfix-import-crash-and-scorefrom
claude/features-suggestions-sort-notifications
Closed

mayeack wants to merge 1 commit into
claude/hotfix-import-crash-and-scorefrom
claude/features-suggestions-sort-notifications

Conversation

@mayeack

@mayeack mayeack commented Jun 4, 2026

Copy link
Copy Markdown
Owner

Three of the five requested features. Stacked on #48 (base will retarget to main when #48 merges). Notifications chiclet + archive-on-import follow in PR 3.

2a — Three suggested records in contact pickers

New ContactSuggestionEngine ranks candidates by contextual similarity to the subject — shared tags (×3), groups (×2), locations (×2), plus a per-field signal — with a relationship-score fallback so suggestions are always available. IntroducedToPickerView and MetViaPickerView now show a Suggested section (top 3) when not searching, with the remainder under All Contacts. The engine is reusable for any future record field.

2b — Click column headers to sort

ContactListViewModel gains sortColumn + sortAscending and toggleSort(). Clicking a header sorts by that column; clicking the active column flips direction (active column shows a ▲/▼ chevron). Covers Name, Score, Groups, Locations, Tags, Met via, Introduced to — string columns sort by their first value alphabetically with blanks last; numeric columns default to descending. The sort menu was migrated to the same model and keeps Recent/Added.

2e — Hidden contacts excluded from every search surface

Audit result: every selection surface already filtered !isHidden && !isMergedAway (the two pickers in the screenshots included). Added a single chokepoint — Sequence<Contact>.selectable — and adopted it in the contact pickers + ContactListViewModel, so the CLAUDE.md rule has one enforcement point and a regression test. A hidden contact still appearing on another device is sync propagation, not a missing filter (same conflict-resolution family as the score fix in #48) — called out, not silently bundled.

Tests

  • ContactSuggestionEngineTests: similarity ranking, exclusion of self/hidden/excluded IDs, score fallback always returns 3.
  • ContactListViewModelTests: direction toggle, string-column blanks-last in both directions, .selectable helper.
  • Full macOS suite green: 226 tests, 0 failures.

iOS Simulator tests run via CI; locally executed on the macOS destination (CoreSimulator version drift on Xcode 26.5).

🤖 Generated with Claude Code

…en-filter chokepoint

Three of the five requested features (notifications + archive-on-import follow in PR 3).

2a. Three suggested records in contact pickers
New ContactSuggestionEngine ranks candidates by contextual similarity to the subject
— shared tags (x3), groups (x2), locations (x2), plus a per-field signal — and falls
back to relationship score so suggestions are always available. IntroducedToPickerView
and MetViaPickerView now show a "Suggested" section (top 3) when not searching, with the
rest under "All Contacts".

2b. Click column headers to sort
ContactListViewModel gains sortColumn + sortAscending and toggleSort(): clicking a
header sorts by that column; clicking the active column flips direction. The active
column shows a chevron. Sorts Name, Score, Groups, Locations, Tags, Met via, Introduced
to (string columns sort their first value alphabetically with blanks last; numeric
columns default to descending). The sort menu was updated to the same model and keeps
Recent/Added. Replaces the old ContactSortOrder enum.

2e. Hidden contacts excluded from every search surface
Audit found all selection surfaces already filtered !isHidden && !isMergedAway. Added a
single chokepoint — `Sequence<Contact>.selectable` — and adopted it in the contact
pickers and ContactListViewModel so the CLAUDE.md rule has one enforcement point.
(A hidden contact still appearing on another device is sync propagation, not a missing
filter — same conflict-resolution family as the score fix in PR #48.)

Tests: ContactSuggestionEngineTests (ranking, exclusions, score fallback) and
ContactListViewModelTests (+toggle direction, string-column blanks-last, .selectable).
Full macOS suite green (226 tests).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
mayeack pushed a commit that referenced this pull request Jun 4, 2026
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@mayeack
mayeack deleted the branch claude/hotfix-import-crash-and-score June 4, 2026 02:53
@mayeack mayeack closed this Jun 4, 2026
@mayeack
mayeack deleted the claude/features-suggestions-sort-notifications branch June 4, 2026 03:16
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