feat(ui): promote the address book to a Contacts sidebar tab

Phase 0b. The address book was buried in Settings behind a modal dialog.
Make it a first-class "Contacts" tab (which will also become the chat
roster), rendered inline in the main content area.

- New NavPage::Contacts (after History; ICON_MD_CONTACTS) +
  WalletUiSurface::Contacts. isUiSurfaceAvailable's `default: return true`
  shows it in BOTH variants; uiSurfaceNeedsWalletData's default keeps it
  usable before wallet data loads. All the touchpoints wired: NavPageSurface,
  GetNavIconMD, the app.cpp dispatch case, the app_network.cpp tracePageName
  case, and the `contacts` i18n label.
- New src/ui/windows/contacts_tab.{h,cpp}: RenderContactsTab lifts the
  toolbar + table + add/edit modal out of address_book_dialog, rendered in a
  BeginChild scroll region (peers_tab pattern) instead of an overlay; the
  add/edit form stays a modal layered over the tab. Reuses the existing
  address_book_* i18n keys and the dialogs.address-book schema.
- Delete address_book_dialog.{h,cpp}; remove its app.cpp render pump and the
  dead App::show_address_book_. The Settings "Address Book…" button now
  navigates to the tab (setCurrentPage) instead of opening the modal, so the
  Tools & Actions grid layout is untouched.
- CMake: swap the dialog sources for contacts_tab.

Behavior-preserving move; search/sort/keyboard/contrast land in 0d. Visual
check pending the per-theme screenshot sweep.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-05 16:59:34 -05:00
parent 62998179ec
commit ee59a9e2cd
12 changed files with 310 additions and 335 deletions

View File

@@ -25,6 +25,7 @@ enum class NavPage {
Send,
Receive,
History,
Contacts,
// --- separator ---
Mining,
Market,
@@ -51,6 +52,7 @@ inline const NavItem kNavItems[] = {
{ "Send", NavPage::Send, nullptr, "send", nullptr },
{ "Receive", NavPage::Receive, nullptr, "receive", nullptr },
{ "History", NavPage::History, nullptr, "history", nullptr },
{ "Contacts", NavPage::Contacts, nullptr, "contacts", nullptr },
{ "Mining", NavPage::Mining, "TOOLS", "mining", "tools" },
{ "Market", NavPage::Market, nullptr, "market", nullptr },
{ "Console", NavPage::Console, "ADVANCED","console", "advanced" },
@@ -78,6 +80,7 @@ inline wallet::WalletUiSurface NavPageSurface(NavPage page)
case NavPage::Send: return wallet::WalletUiSurface::Send;
case NavPage::Receive: return wallet::WalletUiSurface::Receive;
case NavPage::History: return wallet::WalletUiSurface::History;
case NavPage::Contacts: return wallet::WalletUiSurface::Contacts;
case NavPage::Mining: return wallet::WalletUiSurface::Mining;
case NavPage::Market: return wallet::WalletUiSurface::Market;
case NavPage::Console: return wallet::WalletUiSurface::Console;
@@ -103,6 +106,7 @@ inline const char* GetNavIconMD(NavPage page)
case NavPage::Send: return ICON_MD_CALL_MADE;
case NavPage::Receive: return ICON_MD_CALL_RECEIVED;
case NavPage::History: return ICON_MD_HISTORY;
case NavPage::Contacts: return ICON_MD_CONTACTS;
case NavPage::Mining: return ICON_MD_CONSTRUCTION;
case NavPage::Market: return ICON_MD_TRENDING_UP;
case NavPage::Console: return ICON_MD_TERMINAL;