From 5075e9f4c585138cddfe7e7962170dbd2e73874a Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Sun, 2 Aug 2026 19:57:22 -0700 Subject: Header: wallet + avatar only; the avatar opens an identity menu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The chat button leaves the header — the avatar's popup menu carries Edit profile, Settings, Messages, and Logout (lock()). The menu is available inside the chat takeover too, which now keeps the full header. Messages provides just the avatar node via the headerAvatar seam; the app owns the menu. Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Wvj4aoeMZwA7VUGdJP9Swi --- src/features/messages.js | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'src/features') diff --git a/src/features/messages.js b/src/features/messages.js index d74c338..70142e0 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -42,7 +42,6 @@ const COMMUNITY = { }; const EPOCH = 0; -const CHAT_ICON = ''; const DM_RELAYS = ['wss://relay.coinos.io', 'wss://nos.lol']; const APP_BASE = 'https://v3.coinos.io'; const CACHE_MAX = 50; // messages kept per channel / per DM thread in feature state @@ -1250,27 +1249,14 @@ export function messagesFeature(ctx) { id: 'messages', // Chat lives behind a header button and takes over the whole screen — // no balance card, no tabs; each view carries its own way back. - headerButtons() { - return [h('button', { - class: 'btn-sm', title: t('tabMessages'), - onClick: () => { ui.chatOpen = true; render(); }, - }, h('span', { html: CHAT_ICON }))]; - }, - // Rightmost in the header, after the wallet selector. - headerAvatar() { - const me = myPubkeys()[0]; - if (!me) return null; - return h('button', { - class: 'header-avatar', title: t('profEdit'), - onClick: () => openProfile(me), - }, avatar(me, 'chat-avatar header-ava', false)); - }, + // The bare avatar node for the app header's identity menu. + headerAvatar(pk) { return avatar(pk, 'chat-avatar header-ava', false); }, screenView() { if (ui.screen !== 'wallet') return null; if (ui.profilePk) return profileScreen(); if (!ui.chatOpen) return null; return h('div', { class: 'col', style: 'gap:16px' }, - ctx.brandHeader(false), + ctx.brandHeader(true), messagesTab()); }, // Anyone (ark's history, other features) can open a profile or render a -- cgit v1.2.3