diff --git a/src/components/topic-detail-client.test.tsx b/src/components/topic-detail-client.test.tsx
index 912441e..edc0b7c 100644
--- a/src/components/topic-detail-client.test.tsx
+++ b/src/components/topic-detail-client.test.tsx
@@ -234,7 +234,8 @@ describe('TopicDetailClient', () => {
await user.click(screen.getByRole('button', { name: /reply to this topic/i }))
// The composer should expand and show the reply target banner with the topic author
- expect(screen.getByText(`Replying to @${topic.authorDid}`)).toBeInTheDocument()
+ const expectedHandle = topic.author?.handle ?? topic.authorDid
+ expect(screen.getByText(`Replying to @${expectedHandle}`)).toBeInTheDocument()
})
it('clears reply target when dismiss button is clicked', async () => {
diff --git a/src/components/topic-detail-client.tsx b/src/components/topic-detail-client.tsx
index af6da0b..5aa0798 100644
--- a/src/components/topic-detail-client.tsx
+++ b/src/components/topic-detail-client.tsx
@@ -112,7 +112,7 @@ export function TopicDetailClient({ topic, replies, isLocked = false }: TopicDet
handleReply({
uri: topic.uri,
cid: topic.cid,
- authorHandle: topic.authorDid,
+ authorHandle: topic.author?.handle ?? topic.authorDid,
snippet: topic.content.slice(0, 100),
})
: undefined
diff --git a/src/components/topic-view.test.tsx b/src/components/topic-view.test.tsx
index 138bce4..b2042ca 100644
--- a/src/components/topic-view.test.tsx
+++ b/src/components/topic-view.test.tsx
@@ -63,8 +63,16 @@ describe('TopicView', () => {
expect(screen.getByText(topic.content)).toBeInTheDocument()
})
- it('renders author handle', () => {
+ it('renders author display name with link', () => {
render(