Add global message search and more e2e tests

This commit is contained in:
Jack Kingsman
2026-03-03 19:19:24 -08:00
parent 73a835688d
commit e0e71180b2
26 changed files with 2309 additions and 136 deletions
+6 -1
View File
@@ -2,7 +2,7 @@ import type { Channel, Contact, Conversation } from '../types';
import { getContactDisplayName } from './pubkey';
interface ParsedHashConversation {
type: 'channel' | 'contact' | 'raw' | 'map' | 'visualizer';
type: 'channel' | 'contact' | 'raw' | 'map' | 'visualizer' | 'search';
/** Conversation identity token (channel key or contact public key, or legacy name token) */
name: string;
/** Optional human-readable label segment (ignored for identity resolution) */
@@ -29,6 +29,10 @@ export function parseHashConversation(): ParsedHashConversation | null {
return { type: 'visualizer', name: 'visualizer' };
}
if (hash === 'search') {
return { type: 'search', name: 'search' };
}
// Check for map with focus: #map/focus/{pubkey_prefix}
if (hash.startsWith('map/focus/')) {
const focusKey = hash.slice('map/focus/'.length);
@@ -107,6 +111,7 @@ function getConversationHash(conv: Conversation | null): string {
if (conv.type === 'raw') return '#raw';
if (conv.type === 'map') return '#map';
if (conv.type === 'visualizer') return '#visualizer';
if (conv.type === 'search') return '#search';
// Use immutable IDs for identity, append readable label for UX.
if (conv.type === 'channel') {