Skip to content

Commit 5297d6e

Browse files
committed
docs: address round-9 codex review findings
- interactive components: scope block_actions support to message-based blocks (modal-view containers are rejected before routing); attribution vs real-mention distinction - multi-tenant: thread reconstruction validates only; credential lookup happens at post time - reference: agent activities are thought/response/action/elicitation/error; plans/external URLs are session updates - linear generic comments: subscription precedence over mention routing - tutorial: qualify follow-up echoes under the default drop strategy
1 parent 6b7564e commit 5297d6e

5 files changed

Lines changed: 28 additions & 11 deletions

File tree

‎docs/how-to/interactive-components.md‎

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@
33
Buttons and menus are Interaction Events: normalized events with their own
44
single-slot hook, `OnInteraction`, riding the same dispatch spine as messages
55
(see [ADR 0004](../adr/0004-interactive-components.md)). This slice covers
6-
Slack `block_actions` — button clicks and menu selections.
6+
Slack `block_actions` on **messages** — button clicks and menu selections on
7+
Block Kit content posted to a channel, thread, or DM. `block_actions`
8+
originating inside a modal view carry a view container without a
9+
channel/message anchor and are not normalized yet; they are rejected before
10+
routing.
711

812
There is deliberately no cross-platform card DSL. Portable posting stays plain
913
text and portable Markdown; platform-native rich content (Block Kit) is posted
@@ -88,8 +92,10 @@ distinct `action_id`s where you can until #12 lands.
8892
The normalized `Actor` carries the Slack user ID, not a display name (the
8993
interactivity payload does not include one). Note that plain `chat.Text` is
9094
posted with Slack formatting disabled, so `<@USERID>` mention syntax renders
91-
literally; to render a real mention, resolve the display name via the Slack
92-
API or post native Block Kit content instead.
95+
literally. For plain-text *attribution*, resolve the display name via the
96+
Slack API and include it as ordinary text; for a real, clickable Slack
97+
mention, post native Block Kit content with an `mrkdwn` text element
98+
containing `<@USERID>`.
9399

94100
**Known limitation:** the interaction event identity is currently anchored on
95101
the message timestamp, not the individual activation — so when the same user

‎docs/how-to/linear-agent-sessions.md‎

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,12 @@ the flag must be set by something outside the runtime's serialized dispatch).
149149
## Generic Issue Comments
150150

151151
The adapter also participates in plain Linear issue comments (outside agent
152-
sessions): a comment that @-mentions your app routes to `OnNewMention` on a
153-
comment-backed thread, and `Thread.Post` replies in that comment thread.
152+
sessions): a comment that @-mentions your app arrives on a comment-backed
153+
thread, and `Thread.Post` replies in that comment thread. Normal routing
154+
precedence applies: the mention routes to `OnNewMention` only while the
155+
thread is unsubscribed — in a thread you have subscribed, every comment
156+
(mention or not) routes to `OnSubscribedMessage`, so do not put
157+
mention-specific handling exclusively in `OnNewMention`.
154158
Agent-activity methods (`PostThought`, `UpdateSession`, ...) are rejected on
155159
comment threads — they only make sense inside agent sessions.
156160

‎docs/how-to/multi-tenant-install.md‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,9 @@ Uninstalls: delete the row; subsequent events from that tenant resolve to
120120

121121
Thread IDs, actors, and dedupe keys all carry the platform tenant, so two
122122
workspaces never collide in runtime state. Thread handle reconstruction
123-
(`bot.Thread(ctx, threadID)`) resolves credentials for the stored tenant
124-
through the same install store — proactive posts work across installs without
125-
extra plumbing.
123+
(`bot.Thread(ctx, threadID)`) decodes and validates the stored ID without
124+
touching the install store; the credential lookup for the stored tenant
125+
happens when the reconstructed handle actually posts. Proactive posts work
126+
across installs without extra plumbing — but a successful `bot.Thread` call
127+
is not proof the tenant is still installed; an uninstalled tenant surfaces as
128+
an error from the post.

‎docs/reference.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ platform-specific surfaces differ:
6161
| Rate-limit retry with typed `RateLimited` error | Yes | Yes |
6262
| Multi-tenant installs (`InstallStore`) | Yes | Yes |
6363
| Platform escape hatch | Raw payloads on events | `RawMessage`, `GraphQL` |
64-
| Agent activities (thought/action/elicitation/error/plan) | n/a | Yes |
64+
| Agent activities (thought/response/action/elicitation/error) | n/a | Yes |
65+
| Session updates (plan, external URLs) | n/a | Yes (`UpdateSession`) |
6566

6667
For the tracked list of Linear agent APIs that are not yet wrapped in typed
6768
helpers, see [linear-agent-capabilities.md](linear-agent-capabilities.md).

‎docs/tutorials/slack-bot.md‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,11 @@ bot.OnSubscribedMessage(func(ctx context.Context, ev *chat.MessageEvent) error {
187187
```
188188

189189
Restart the bot (`Ctrl-C`, then `go run ./examples/slack-hello-world` again)
190-
and mention it once more. From then on, every follow-up message in that thread
191-
gets echoed back — no mention required. Two things to notice:
190+
and mention it once more. From then on, follow-up messages in that thread get
191+
echoed back — no mention required. (If you type several messages faster than
192+
the bot replies, some may be skipped: the default concurrency strategy drops
193+
events that arrive while the thread's previous event is still being handled.)
194+
Two things to notice:
192195

193196
- Replying never subscribes a thread. `Thread.Subscribe` is always an explicit
194197
decision, and it lasts until you call `Thread.Unsubscribe`.

0 commit comments

Comments
 (0)