Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/design/04-composer-actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,13 +74,14 @@ Soft wrap at the field width; caret and selection across wrapped and hard lines;

## Autocomplete (frame 7)

One popover component for `@`, `#` and `:`. Anchored 6 px above the card, left edges aligned, 340 wide, `popover` fill, radius 12, pad 4, `shadow_pop`. Rows 40 px, radius 8, selected row `selected`; section labels 26 px, 11 px caps `text_faint`. At most 8 rows, then it scrolls. The first row is selected on open. No open or close animation.
One popover component for `@`, `#`, `:` and `/`. Anchored 6 px above the card, left edges aligned, 340 wide (the `/` list 360), `popover` fill, radius 12, pad 4, `shadow_pop`. Rows 40 px, radius 8, selected row `selected`; section labels 26 px, 11 px caps `text_faint`. At most 8 rows, then it scrolls. The first row is selected on open. No open or close animation.

| Trigger | Opens | Row | Ranking |
| --- | --- | --- | --- |
| `@` at a word start | At once, with recents | 26 px avatar with a 10 px presence dot, name 13 semibold, secondary 12 `text_faint` ("handle · spoke 9:36 AM" or team/role) | People who spoke here, newest first; then members by display-name prefix, handle prefix, word prefix, substring. Then `@here`, `@channel`, `@everyone`, roles and groups where the network has them, with "notifies 14 people". |
| `#` at a word start | At once | Channel avatar 26, name, server or workspace as secondary | Channels of this server or workspace only: recently opened, then prefix, then substring. Absent in Telegram and in DMs outside a workspace. |
| `:` plus 2 letters | After the 2nd letter | Glyph 22 (or the custom image), `:name:` | My recents, then prefix, then keyword match; this workspace's custom emoji ranked with the rest. `:name:` typed in full with the closing colon converts without the list. |
| `/` as the field's first character, caret still in that word | Slack: at once, with the built-ins. Discord: once this conversation's commands are loaded | 360 wide. Slack: the command 12 semibold `text`, its usage `text_faint`, and its description `text_soft` on a second line. Discord: `/name`, the signature of its options, the app's name at the right, and its description below | Slack: at most 8 commands whose name starts with what is typed, built-ins first, then the workspace's own (`commands.list`, kept by chatd for a day). Discord: this conversation's app commands, then the choices of the one picked. Tab, Return or a click completes the name, which sends nothing. Return on the finished line then runs the command: on Slack it is never posted as text (`product/polish/09-composer-sending.md`, story 23); on Discord a line that names no app command of this conversation is sent as an ordinary message |

**Lookup in flight.** Local matches draw in the same frame as the keystroke. If the network is also being asked (Slack directory, Discord member search if the owner allows it: product 03 question 3), the last line of the popover is static 12 px text, "Searching Discord for “dev”…". Results append under a "More people" label; rows already shown never move or reorder, so Return always completes what I was looking at. No results: "No one else matches". No spinner; a keystroke-driven lookup is not idle, but text is enough and nothing needs a frame clock. Queries are debounced 150 ms and cancelled by the next keystroke. Space after no match closes the list.

Expand Down Expand Up @@ -186,4 +187,4 @@ New Lucide glyphs: paperclip, smile, smile-plus, check, square, x, corner-up-lef

## Deliberately absent

Live formatted (WYSIWYG) editing and a formatting button bar. Escape-to-clear. An undo toast for delete. Disabled-but-visible controls for features a network lacks. A GIF picker, stickers, voice recording, scheduled send, slash commands and bot buttons (cut in `stories.md`). Inline custom-emoji images in the composer. Uploading at staging time (bytes leave only on Send). Background resend of old failed messages. Edit history. Per-emoji skin-tone long-press. A send sound. A character counter below 90% of the limit. Any spinner.
Live formatted (WYSIWYG) editing and a formatting button bar. Escape-to-clear. An undo toast for delete. Disabled-but-visible controls for features a network lacks. A GIF picker, stickers, voice recording, scheduled send and bot buttons (cut in `stories.md`). Inline custom-emoji images in the composer. Uploading at staging time (bytes leave only on Send). Background resend of old failed messages. Edit history. Per-emoji skin-tone long-press. A send sound. A character counter below 90% of the limit. Any spinner.
12 changes: 10 additions & 2 deletions docs/design/polish/06-composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,21 @@ show their thumbnail and never play. Click sends at once. Search filters loaded
| F | Star or unstar the selected GIF or sticker. |
| Esc | Closes; focus returns to the composer (`07` R12). Typing in the grid goes to search. |

## 4. `:`, `@`, `#` and the large ping (frames 10–11)
## 4. `:`, `@`, `#`, `/` and the large ping (frames 10–11)

One popover (P1§): above the card, left-aligned, 340 wide, pad 4, rows 28 (people 36). `:` opens after two letters,
never in a link or after a digit (10:30): glyph 20, `:tada:` 13, custom rows add the Space 12 `text_soft` right; 8 rows;
frecency, prefix, keyword. Return/Tab inserts; Esc or a space with no match closes. `@` adds roles and groups after
people ("notifies 14 people"); `@here/@channel/@everyone` only where allowed; non-members last, "not in #ops".

**`/` on Slack.** The same popover, 360 wide, while `/` is the field's first character and the caret is still in that
word. At most 8 rows, whose name starts with what is typed after the `/`, either case: Slack's built-in commands, then
the workspace's own (`commands.list`, kept by chatd for a day per workspace; the built-ins are there at once, the
workspace's once chatd answers). A row is the command 12/600 `text` with its usage, where it has one, `text_faint`,
and its description 12 `text_soft` below. ↑/↓ move and wrap; Tab, Return or a click completes the name and adds a space;
Esc closes. Completing sends nothing. Return on the finished line hands the command to chatd, which runs it and never
posts it as text (`09`, story 23).

**Large ping.** Return on a message that reaches more than 25 people (sum of `@everyone`, `@here`, roles, groups, by
member count) does not send. The card border turns `warning`, and the caption reads (triangle-alert `warning`, words
`text`, number 600): "This notifies **1,204 people** in #general. Return again to send." The second Return sends; any
Expand Down Expand Up @@ -251,5 +259,5 @@ attachment limits and permissions still apply through the staging tray.

Disabled or locked controls and upsells. A formatting bar. Uploading at staging. Locking the composer during upload.
Autoplaying GIF grids and animated stickers. Our own GIPHY key. GIFs on Slack and Teams. Teams importance, Loop and
Urgent. Slash commands (`/` posts as text with the caption from `09`). Voice recording (P2). Image editing or crop.
Urgent. Voice recording (P2). Image editing or crop.
Inline images in the field. A sticker button on the card. Per-emoji skin-tone long-press. A send sound. Spinners.
2 changes: 1 addition & 1 deletion docs/product/03-message-content.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The order is an estimate of daily use, not measured data.
| 20 | Spoilers | P1 | Hidden until clicked. |
| 21 | Pins | P2 | |
| 22 | Polls, location, contacts, tables, headings | P2 | Placeholder line until then. |
| — | Slash commands, bot buttons and forms, canvases, scheduled send, edit history, read receipts per message | cut | The GIF and sticker picker is in. Buttons are `MessageKind::Unsupported` plus "Open in {network}". |
| — | Bot buttons and forms, canvases, scheduled send, edit history, read receipts per message | cut | The GIF and sticker picker is in. Slash commands are out of this list: on Slack a command typed by hand runs and is never posted as text (`polish/09-composer-sending.md`, story 23), and Discord's app commands run from the composer. Buttons are `MessageKind::Unsupported` plus "Open in {network}". |

## Stories

Expand Down
7 changes: 4 additions & 3 deletions docs/product/polish/09-composer-sending.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ Files, images, emoji, GIFs, stickers, voice, formatting and mentions, per networ
`--seed-demo` shots of `#showcase` with `--open-first` and `TINYCLIENT_SHOT_PICKER`; `composer.rs`,
`composer/*`, `input.rs`, `conversation/emoji.rs`; each adapter's `send`. Tags: **[C]** in our code,
**[W]** confirmed on the web (sources at the end), **[U]** unconfirmed, check on a live session.
This file reverses the cut of the GIF picker and of stickers in `stories.md` and `03`; voice
recording is in on Telegram and nowhere else.
This file reverses the cut of the GIF picker and of stickers in `stories.md` and `03`, and of slash
commands in `03` (story 23); voice recording is in on Telegram and nowhere else.

## 1. What is there today

Expand Down Expand Up @@ -137,7 +137,8 @@ recording is in on Telegram and nowhere else.
| 20 | attach a file in a Teams chat | It lands in OneDrive "Microsoft Teams Chat Files" and opens for the other person | P1 |
| 21 | send a Discord sticker; mention a role or user group; schedule a Slack or Telegram message (server-side) | Each visible in the official app | P2 |
| 22 | record a Telegram voice note on the composer's mic (press, or hold with push-to-talk on) | Built. Recorded and encoded in `mediad` (it already has Opus), which exits after; chatd uploads the `.ogg` path | P2 |
| — | GIFs on Slack/Teams until their client API is captured; slash commands (a `/` message on Discord or Slack shows "Commands run in the official app; this posts as text"); `/remind`; Teams Urgent and Loop; Telegram polls, location, self-destruct; animated sticker playback; inline images in the field | | cut |
| 23 | type `/` in a Slack conversation, take a command from the list or finish its name, and press Return | Built. The list offers Slack's built-in commands and the workspace's own (`commands.list`, kept a day per workspace), each with its description and, where it has one, its usage. A line that starts with `/` and a name (up to 64 letters, digits, `_` or `-`, the first a letter) is a command and is never posted as text; a path such as `/usr/bin/env` is a message. Each built-in runs on Slack's own call for it (`/me` is `chat.meMessage`, `/topic` is `conversations.setTopic`), and every other command (`/remind`, an app's) goes to Slack through `chat.command`, the call Slack's own client makes. `/me` and `/shrug` post their message, as in Slack; the other built-ins leave no message in the channel, and what was done or what Slack answered is one line marked "Only visible to you", never stored as channel history. A refused command is a failed send with Slack's reason, which names the command when Slack itself was asked to run it. **[C]**. `chat.command` and `commands.list` are the web client's calls, not in Slack's published method list, and are **[U]** on a live session | P1 |
| — | GIFs on Slack/Teams until their client API is captured; Teams Urgent and Loop; Telegram polls, location, self-destruct; animated sticker playback; inline images in the field | | cut |

## 7. What the contract needs

Expand Down
Loading