```kotlin
From c65669d9fd85ef3aa746f1661e9851c0577e5e12 Mon Sep 17 00:00:00 2001
From: Nicholas Molnar <65710+neekolas@users.noreply.github.com>
Date: Wed, 7 Oct 2026 13:31:43 -0700
Subject: [PATCH 4/5] docs: weight repeated SDK examples below guide text
---
apps/docs/src/content/docs/content-types/attachments.mdx | 8 ++++++++
apps/docs/src/content/docs/sdk/groups.mdx | 4 ++++
2 files changed, 12 insertions(+)
diff --git a/apps/docs/src/content/docs/content-types/attachments.mdx b/apps/docs/src/content/docs/content-types/attachments.mdx
index 565c057854..08c2e7f1c2 100644
--- a/apps/docs/src/content/docs/content-types/attachments.mdx
+++ b/apps/docs/src/content/docs/content-types/attachments.mdx
@@ -47,6 +47,9 @@ a byte source already holds the file in application memory.
The following examples use an existing `client` and `group`. The path must name
a readable file in the application's filesystem. Browser paths name OPFS entries.
+{/* Repeated SDK examples have less search weight than guide text. */}
+
+
@@ -99,6 +102,7 @@ if attachments.offered() {
+
For an in-memory file, use `AttachmentSource.Bytes(bytes, filename, mimeType)`
on Kotlin or `.bytes(bytes:filename:mimeType:)` on Swift. Browser path sources
@@ -116,6 +120,9 @@ to be available first.
Decode the received content with `RemoteAttachmentCodec` to get a
`RemoteAttachment`. Pass that record to `download`:
+{/* Repeated SDK examples have less search weight than guide text. */}
+
+
@@ -152,6 +159,7 @@ let filename = downloaded.filename
+
`DownloadedAttachment.path` names a file with the original content bytes, not
the encoded envelope or ciphertext. The returned MIME type and filename come
diff --git a/apps/docs/src/content/docs/sdk/groups.mdx b/apps/docs/src/content/docs/sdk/groups.mdx
index 6c1b9b388d..cc776b4837 100644
--- a/apps/docs/src/content/docs/sdk/groups.mdx
+++ b/apps/docs/src/content/docs/sdk/groups.mdx
@@ -167,6 +167,9 @@ The following examples run with an existing `group`. The operator must publish
`GROUP_CATEGORY` and `USER_PRONOUNS` as shown in the backend guide. The group
must have registered them, and the caller must be an admin to set the category.
+{/* Repeated SDK examples have less search weight than guide text. */}
+
+
@@ -234,6 +237,7 @@ if let pronouns = try await group.metadataField(name: "USER_PRONOUNS")?.field {
+
`userData(fields, inboxIds)` returns a map from inbox ID to present field and
value records. Omit the filters with `undefined` on Browser and Node,
From 631bf8fb1c2f199e5b6fd17a56e63cea5e05e898 Mon Sep 17 00:00:00 2001
From: Nicholas Molnar <65710+neekolas@users.noreply.github.com>
Date: Wed, 7 Oct 2026 13:40:39 -0700
Subject: [PATCH 5/5] docs: keep guide title ranking stable with SDK tabs
---
apps/docs/scripts/search-config.mjs | 2 +-
apps/docs/src/content/docs/content-types/attachments.mdx | 4 ----
apps/docs/src/content/docs/sdk/groups.mdx | 2 --
3 files changed, 1 insertion(+), 7 deletions(-)
diff --git a/apps/docs/scripts/search-config.mjs b/apps/docs/scripts/search-config.mjs
index efc14b823e..1c036d229d 100644
--- a/apps/docs/scripts/search-config.mjs
+++ b/apps/docs/scripts/search-config.mjs
@@ -9,5 +9,5 @@ export const searchRanking = {
termSaturation: 2,
termSimilarity: 9,
// Keep guide title matches above repeated terms in longer guide bodies.
- metaWeights: { title: 0, guideTitle: 100 },
+ metaWeights: { title: 0, guideTitle: 1000 },
};
diff --git a/apps/docs/src/content/docs/content-types/attachments.mdx b/apps/docs/src/content/docs/content-types/attachments.mdx
index 08c2e7f1c2..f72cc56302 100644
--- a/apps/docs/src/content/docs/content-types/attachments.mdx
+++ b/apps/docs/src/content/docs/content-types/attachments.mdx
@@ -47,8 +47,6 @@ a byte source already holds the file in application memory.
The following examples use an existing `client` and `group`. The path must name
a readable file in the application's filesystem. Browser paths name OPFS entries.
-{/* Repeated SDK examples have less search weight than guide text. */}
-
@@ -120,8 +118,6 @@ to be available first.
Decode the received content with `RemoteAttachmentCodec` to get a
`RemoteAttachment`. Pass that record to `download`:
-{/* Repeated SDK examples have less search weight than guide text. */}
-
diff --git a/apps/docs/src/content/docs/sdk/groups.mdx b/apps/docs/src/content/docs/sdk/groups.mdx
index cc776b4837..e9bf714f7a 100644
--- a/apps/docs/src/content/docs/sdk/groups.mdx
+++ b/apps/docs/src/content/docs/sdk/groups.mdx
@@ -167,8 +167,6 @@ The following examples run with an existing `group`. The operator must publish
`GROUP_CATEGORY` and `USER_PRONOUNS` as shown in the backend guide. The group
must have registered them, and the caller must be an admin to set the category.
-{/* Repeated SDK examples have less search weight than guide text. */}
-