Skip to content

Feat: add contact book#10

Merged
davidborzek merged 4 commits intomainfrom
feat/contacts
Mar 10, 2026
Merged

Feat: add contact book#10
davidborzek merged 4 commits intomainfrom
feat/contacts

Conversation

@davidborzek
Copy link
Copy Markdown
Owner

@davidborzek davidborzek commented Mar 8, 2026

Summary

  • Load contacts from ~/.config/ringo/contacts.toml (name → numbers mapping)
  • Resolve contact names in call list (priority: contact > SIP display_name > raw peer) and call history (including search)
  • Add contacts picker overlay (f key / :contacts command) with fuzzy search, navigation, and Enter to dial
  • Inline contact management: a add, e edit, d delete (with y/n confirmation)
  • Edit contacts via $EDITOR (E in picker) with auto-reload — uses render_loop-level terminal handoff
  • Fuzzy phone number matching: contacts saved as 01555... resolve for calls from +491555..., 491555..., 004915551... and vice versa

Test plan

  • cargo test — all 124 tests pass (18 new for contacts module)
  • Create ~/.config/ringo/contacts.tomlf → contacts visible
  • Select contact → number in dial input → Enter dials
  • Incoming/outgoing call → contact name shown in calls list
  • Call history → contact name shown, search by name works
  • a add contact → form popup → Tab switch fields → Enter saves
  • e edit contact → pre-filled form → modify → Enter saves
  • d delete contact → confirmation prompt → y deletes, any other key cancels
  • E in contacts picker → editor opens → changes reload on close
  • Incoming call from +49... matches contact saved as 0... (and vice versa)

🤖 Generated with Claude Code

davidborzek and others added 4 commits March 8, 2026 20:27
Load contacts from ~/.config/ringo/contacts.toml with name → numbers
mapping. Resolve contact names in call list and call history. Add
contacts picker overlay (f key) with search, navigation, and $EDITOR
integration for editing contacts.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use the same pattern as edit_profile: set a flag, break out of
render_loop, open $EDITOR via terminal.backend_mut(), then
terminal.clear() and resume. Removes the needs_clear workaround.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- [a] add new contact via inline form (name + comma-separated numbers)
- [e] edit selected contact inline
- [d] delete selected contact
- [E] open $EDITOR (moved from [e])
- Tab switches between name/numbers fields, Enter saves, Esc cancels
- save() in contacts.rs writes Vec<Contact> back to TOML

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add confirmation prompt (y/n) before deleting contacts, and implement
fuzzy number matching so contacts saved in different formats (local
01555..., international +491555..., no-plus 491555...) resolve correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davidborzek davidborzek changed the title Feat: add contact book for outgoing calls Feat: add contact book Mar 10, 2026
@davidborzek davidborzek merged commit 88e6031 into main Mar 10, 2026
1 check passed
@davidborzek davidborzek deleted the feat/contacts branch March 10, 2026 08:35
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