diff --git a/docker-compose.yml b/docker-compose.yml index 5e4a7c6..1793caa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: . args: - VITE_DEFAULT_RELAYS: "wss://theforest.nostr1.com,wss://nostr21.com,wss://nostr.land,wss://nostr.wine,wss://nostr.sovbit.host" + VITE_DEFAULT_RELAYS: "wss://theforest.nostr1.com,wss://nostr21.com,wss://nostr.land,wss://nostr.wine,wss://nostr.sovbit.host,wss://orly-relay.imwald.eu" VITE_ZAP_THRESHOLD: "1" VITE_THREAD_TIMEOUT_DAYS: "30" VITE_PWA_ENABLED: "true" diff --git a/public/healthz.json b/public/healthz.json index f26830a..32db4f4 100644 --- a/public/healthz.json +++ b/public/healthz.json @@ -2,7 +2,7 @@ "status": "ok", "service": "aitherboard", "version": "0.1.0", - "buildTime": "2026-02-02T15:23:47.430Z", + "buildTime": "2026-02-03T06:34:16.073Z", "gitCommit": "unknown", - "timestamp": 1770045827431 + "timestamp": 1770100456074 } \ No newline at end of file diff --git a/src/lib/modules/comments/Comment.svelte b/src/lib/modules/comments/Comment.svelte index b08c4d1..29ae6e7 100644 --- a/src/lib/modules/comments/Comment.svelte +++ b/src/lib/modules/comments/Comment.svelte @@ -3,6 +3,7 @@ import MarkdownRenderer from '../../components/content/MarkdownRenderer.svelte'; import ReplyContext from '../../components/content/ReplyContext.svelte'; import type { NostrEvent } from '../../types/nostr.js'; + import { getKindInfo } from '../../types/kind-lookup.js'; interface Props { comment: NostrEvent; @@ -106,6 +107,11 @@ {expanded ? 'Show less' : 'Show more'} {/if} + +
Loading feed...
- {:else if posts.length === 0} + {:else if posts.length === 0 && replaceableEvents.length === 0}No posts yet. Be the first to post!
{:else} {#if newPostsCount > 0} @@ -364,21 +476,27 @@Loading more...
{/if} - {#if !hasMore && getFilteredPosts().length > 0} + {#if !hasMore && getAllFeedItems().length > 0}No more posts
{/if} - {#if showOPsOnly && getFilteredPosts().length === 0 && posts.length > 0} + {#if showOPsOnly && getFilteredPosts().length === 0 && posts.length > 0 && replaceableEvents.length === 0}No original posts found. Try unchecking "Show OPs only".
{/if} {/if} diff --git a/src/lib/modules/feed/FeedPost.svelte b/src/lib/modules/feed/FeedPost.svelte index 774693c..2e4cac2 100644 --- a/src/lib/modules/feed/FeedPost.svelte +++ b/src/lib/modules/feed/FeedPost.svelte @@ -9,6 +9,7 @@ import { relayManager } from '../../services/nostr/relay-manager.js'; import { onMount } from 'svelte'; import type { NostrEvent } from '../../types/nostr.js'; + import { getKindInfo } from '../../types/kind-lookup.js'; interface Props { post: NostrEvent; @@ -182,6 +183,11 @@ {expanded ? 'Show less' : 'Show more'} {/if} + +Thread not found
@@ -160,6 +166,7 @@ .thread-view { max-width: var(--content-width); margin: 0 auto; + position: relative; } .thread-content { @@ -203,4 +210,30 @@ border: none; cursor: pointer; } + + .kind-badge { + position: absolute; + bottom: 0.5rem; + right: 0.5rem; + display: flex; + flex-direction: column; + align-items: flex-end; + gap: 0.125rem; + font-size: 0.625rem; + line-height: 1; + color: var(--fog-text-light, #9ca3af); + } + + :global(.dark) .kind-badge { + color: var(--fog-dark-text-light, #6b7280); + } + + .kind-number { + font-weight: 600; + } + + .kind-description { + font-size: 0.5rem; + opacity: 0.8; + } diff --git a/src/lib/services/nostr/config.ts b/src/lib/services/nostr/config.ts index 7a38956..4be7aae 100644 --- a/src/lib/services/nostr/config.ts +++ b/src/lib/services/nostr/config.ts @@ -8,7 +8,8 @@ const DEFAULT_RELAYS = [ 'wss://nostr21.com', 'wss://nostr.land', 'wss://nostr.wine', - 'wss://nostr.sovbit.host' + 'wss://nostr.sovbit.host', + 'wss://orly-relay.imwald.eu' ]; const PROFILE_RELAYS = [ @@ -17,12 +18,20 @@ const PROFILE_RELAYS = [ 'wss://profiles.nostr1.com' ]; +const THREAD_PUBLISH_RELAYS = [ + 'wss://thecitadel.nostr1.com' +]; + +const RELAY_TIMEOUT = 10000; + export interface NostrConfig { defaultRelays: string[]; profileRelays: string[]; zapThreshold: number; threadTimeoutDays: number; pwaEnabled: boolean; + threadPublishRelays: string[]; + relayTimeout: number; } function parseRelays(envVar: string | undefined, fallback: string[]): string[] { @@ -52,7 +61,9 @@ export function getConfig(): NostrConfig { profileRelays: PROFILE_RELAYS, zapThreshold: parseIntEnv(import.meta.env.VITE_ZAP_THRESHOLD, 1, 0), threadTimeoutDays: parseIntEnv(import.meta.env.VITE_THREAD_TIMEOUT_DAYS, 30), - pwaEnabled: parseBoolEnv(import.meta.env.VITE_PWA_ENABLED, true) + pwaEnabled: parseBoolEnv(import.meta.env.VITE_PWA_ENABLED, true), + threadPublishRelays: THREAD_PUBLISH_RELAYS, + relayTimeout: RELAY_TIMEOUT }; } diff --git a/src/lib/services/nostr/nostr-client.ts b/src/lib/services/nostr/nostr-client.ts index 17985e5..822c7bc 100644 --- a/src/lib/services/nostr/nostr-client.ts +++ b/src/lib/services/nostr/nostr-client.ts @@ -89,11 +89,33 @@ class NostrClient { async removeRelay(url: string): Promise