Channel

A team's timeline of people and agents, with days, threads, reactions and private replies.

Yesterday

  1. BO
    Ben Okafor

    Heads up: checkout errors are up since the 5 PM deploy. Looking into it.

Today

  1. AL
    Ada Lovelace

    @Scout can you triage the bugs that came in overnight? Anything that touches checkout goes to Payments.

  2. ScoutAgentfor Ada Lovelace
    Triaged 14 issues · 9 duplicates closed
    Thought for 11s

    Search issues opened after 18:00. Match titles and stack traces against open issues. Checkout bugs: payments, cart and invoice components.

    Three new bugs touch checkout:

    • PAY-412 Card declined when retrying payment

    • PAY-415 VAT shown twice on EU invoices

    • PAY-418 Wallet button missing on tablets

    I'd like to move them to Payments.

  3. Move 3 issues to Payments

    Scout wants toissues.update
    Issues
    PAY-412, PAY-415, PAY-418
    Team
    Triage → Payments
    Priority
    PAY-412 → Urgent, others → High
    Expires in 30 min
  4. ScoutAgent
    Only you can see this

    Two issues assigned to you were closed as duplicates: ENG-88 and ENG-91. Their reporters were added to the originals.

  5. MP
    Mira Patel

    Thanks! I'll take PAY-415, VAT is mine.

  6. The invoice template changed on Tuesday, I bet that's it.

Ben Okafor is typing…

Installation

pnpm dlx shadcn@latest add checkfu/uicontext/channel

Usage

import { Channel } from "./ui/uicontext/components/kit/Channel.ts"import type { ChannelMessage } from "./ui/uicontext/components/kit/Channel.ts"
const Message = UiSchema.TaggedEnum({	Reacted: { message: Schema.String, emoji: Schema.String, on: Schema.Boolean },	OpenedThread: { message: Schema.String },})export const TriageChannel = (h: Html.H<typeof Message.Type>, messages: ReadonlyArray<ChannelMessage>) =>	Channel(h, {		props: { label: "#triage", messages, me: "ada", can: ["react", "reply"] },		onEmit: {			RequestedReaction: ({ message, emoji, on }) => Message.Reacted({ message, emoji, on }),			RequestedOpenThread: ({ message }) => Message.OpenedThread({ message }),			RequestedDismiss: () => undefined,			RequestedEdit: () => undefined,			RequestedAction: () => undefined,			RequestedSave: () => undefined,			RequestedDelete: () => undefined,			RequestedRetry: () => undefined,			RequestedMarkUnread: () => undefined,		},	})

Examples

Read-only, with a running agent

Without react and reply in can, reactions show but can't be changed. An agent's run sits above its message.

Today

  1. LF
    Lena Fischer

    Cutting 2.14 from main after the standup.

  2. Release BotAgentfor Lena Fischer
    Deploying 2.14 · Step 3 of 5: database migrations

    Release notes are drafted from the 23 merged changes. Production follows staging once checks pass.

  3. OH
    Omar Haddad

    Support is ready for the new export format.

Message states

Today

  1. MP
    Mira Patel

    @Maya Chen can you check the pricing file before the review?

  2. Pinned
    Northwind DesignPricing v4: mobile

    Comparison table with sticky plan names and the annual toggle.

  3. CIApp

    Deploy #482 to staging failed

    Step
    migrate
    Error
    lock timeout
  4. MC
    Saved for later
    Maya Chen(edited)

    Looks good, one nit on the annual toggle.

  5. This message was deleted.

  6. Sending the mock in a minute

    Sending…
  7. Mock attached

API reference

Props

Channel props
NameTypeDefaultDescription
agentIdstring—The id agents see this channel by; derived from label when left out
labelrequiredstring—The channel's name, and the timeline's accessible name: "#triage"
messagesrequiredChannelMessage[]—The timeline's messages, oldest first
mestring—The reader's id: their reactions are theirs, and only their ephemeral messages show
typingActor[]—Who is writing right now
canCan(["react", "reply", "edit", "delete", "save"])bothWhat the reader may do: react, open threads to reply (both by default), and opt-in: edit and delete their own messages, save messages for later
quickReactionsstring[]—The emoji a hovered message offers in one press; three common ones by default
editRequest{ message, request }—Opens one of the reader's own messages for editing, as Up in an empty composer does: a new request opens message, or opens it once it's stored if it's still sending. A remount with the same request opens it again, so clear it after.
startstring—Shown at the very top once there's nothing older: "This is the start of #general."
lastReadstring—The id of the last message the reader has seen. A "New" line marks where the unread ones start, unless the reader wrote them.
threadboolean—A thread, not a channel: the first message is the parent, and a divider counts the replies
nowstring—The time "Today" is measured from (ISO); the reader's clock when left out
maxHeightnumber—A fixed height for the timeline, in CSS pixels; otherwise a constrained parent sizes it
localestring—Formats times and days; the reader's own when left out
timeZonestring—The time zone for times and days; the reader's own when left out

Events

Channel events
EventPayloadDescription
RequestedReaction{ message: string; emoji: string; on: boolean }Add (on) or take back the reader's reaction
RequestedOpenThread{ message: string }The person opened a message's replies
RequestedDismiss{ message: string }Hide an ephemeral message
RequestedAction{ message: string; action: string }The person picked an action on a message
RequestedEdit{ message: string; body: string }The reader saved a new text for their own message; show it with edited: true
RequestedSave{ message: string; on: boolean }Save a message for later (on), or take it off the list
RequestedDelete{ message: string }Delete the reader's own message, or discard one that failed to send
RequestedRetry{ message: string }Send a failed message again
RequestedMarkUnread{ message: string }Move the reader's last-read mark to just before this message

Agent actions

What agents can do with Channel
ActionDescription
ClickedReactionReact to a message, or take the reader's reaction back (on: false). Target: { id, body }
ClickedRepliesOpen a message's thread to read or reply
ClickedSaveSave a message for later (on: true), or take it off the saved list
ClickedMessageActionTake one of a message's actions (its menu or its card's buttons), by message id and action id

Accessibility

  • Each day is a named region with an ordered list of messages; each message names its author and time, and says when only you can see it.
  • Message actions show on hover and on keyboard focus: quick reactions, find a reaction, reply in thread, save, and a menu with the rest. On a touch screen a long press opens them as a sheet.
  • A message that mentions you, didn't send or was deleted says so in its name; a failed send's Retry is a button. The New line says how many messages are new, and a button jumps back to it.
  • Who's typing is announced. Agents read the newest messages and can react, open a thread or take a message's action, naming the message.

Source