Skip to content

Commit d84d977

Browse files
isaacrowntreeclaude
andcommitted
feat: add quick-actions footers and improve dm list output
Improve dm list to use multi-line format with truncated message previews and spacing between conversations. Add quick-actions footers to dm list, message list, channel list, and message search commands showing contextual next-step commands. Update docs and regenerate reference pages. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 48be8e1 commit d84d977

8 files changed

Lines changed: 85 additions & 8 deletions

File tree

docs/src/content/docs/commands.md

Lines changed: 40 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,17 @@ slackbuzz dm list --json
9898
| `--json` | Output as JSON |
9999
| `--jq EXPR` | Filter JSON output with a jq expression |
100100

101-
Reading and sending individual DMs already works via the message commands:
101+
Each conversation is shown with the user, message count, and relative time on the first line, followed by a truncated preview of the last message. A quick-actions footer suggests next steps:
102102

103-
```sh
104-
slackbuzz message list @sarah
105-
slackbuzz message send @sarah "hey"
103+
```
104+
@sarah 3 messages 2 hours ago
105+
last: "truncated message preview..."
106+
107+
---
108+
Quick actions:
109+
Read: slackbuzz message list @<user>
110+
Reply: slackbuzz message send @<user> "text"
111+
Save: slackbuzz later add @<user> <ts>
106112
```
107113

108114
---
@@ -208,6 +214,16 @@ slackbuzz message list #general --limit 10
208214
| `--json` | Output as JSON |
209215
| `--jq EXPR` | Filter JSON output with a jq expression |
210216

217+
Output includes a quick-actions footer with contextual commands:
218+
219+
```
220+
---
221+
Quick actions:
222+
Reply: slackbuzz message send #general "text" --thread-ts <ts>
223+
React: slackbuzz react #general <ts> :emoji:
224+
Edit: slackbuzz message edit #general <ts> "new text"
225+
```
226+
211227
### `message send <channel> <text>`
212228

213229
Send a message to a channel or DM.
@@ -277,6 +293,16 @@ slackbuzz message search "deploy" --sort score --page 2
277293
| `--json` | Output as JSON |
278294
| `--jq EXPR` | Filter JSON output with a jq expression |
279295

296+
Results include pagination info and a quick-actions footer:
297+
298+
```
299+
---
300+
Quick actions:
301+
Reply: slackbuzz message send <channel> "text" --thread-ts <ts>
302+
React: slackbuzz react <channel> <ts> :emoji:
303+
Save: slackbuzz later add <channel> <ts>
304+
```
305+
280306
---
281307

282308
## file
@@ -378,6 +404,16 @@ slackbuzz channel list --json
378404
| `--json` | Output as JSON |
379405
| `--jq EXPR` | Filter JSON output with a jq expression |
380406

407+
Output includes a quick-actions footer:
408+
409+
```
410+
---
411+
Quick actions:
412+
Info: slackbuzz channel info <channel>
413+
Read: slackbuzz message list <channel>
414+
Send: slackbuzz message send <channel> "text"
415+
```
416+
381417
### `channel info <channel>`
382418

383419
Show details about a channel.

docs/src/content/docs/reference/slackbuzz_message_delete.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ slackbuzz message delete <channel> <timestamp> [flags]
3131
### Options
3232

3333
```
34+
--as-bot Delete as the bot instead of your user account
3435
--confirm Skip confirmation prompt
3536
-h, --help help for delete
3637
--jq string Filter JSON output using a jq expression

docs/src/content/docs/reference/slackbuzz_message_edit.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ slackbuzz message edit <channel> <timestamp> [new-text] [flags]
3131
### Options
3232

3333
```
34+
--as-bot Edit as the bot instead of your user account
3435
-h, --help help for edit
3536
--jq string Filter JSON output using a jq expression
3637
--json Output JSON

docs/src/content/docs/reference/slackbuzz_message_send.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ slackbuzz message send <channel> [text] [flags]
3737
### Options
3838

3939
```
40+
--as-bot Send as the bot instead of your user account
4041
-h, --help help for send
4142
--jq string Filter JSON output using a jq expression
4243
--json Output JSON

pkg/cmd/channel/list.go

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,5 +115,17 @@ func listRun(opts *listOptions) error {
115115
tp.EndRow()
116116
}
117117

118-
return tp.Render()
118+
if err := tp.Render(); err != nil {
119+
return err
120+
}
121+
122+
// Quick actions footer
123+
fmt.Fprintln(ios.Out)
124+
fmt.Fprintln(ios.Out, cs.Gray("---"))
125+
fmt.Fprintln(ios.Out, cs.Gray("Quick actions:"))
126+
fmt.Fprintf(ios.Out, " %s slackbuzz channel info <channel>\n", cs.Gray("Info:"))
127+
fmt.Fprintf(ios.Out, " %s slackbuzz message list <channel>\n", cs.Gray("Read:"))
128+
fmt.Fprintf(ios.Out, " %s slackbuzz message send <channel> \"text\"\n", cs.Gray("Send:"))
129+
130+
return nil
119131
}

pkg/cmd/dm/dm.go

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,17 +168,29 @@ func listRun(opts *listOptions) error {
168168
conversations[i], conversations[j] = conversations[j], conversations[i]
169169
}
170170

171-
for _, conv := range conversations {
171+
for i, conv := range conversations {
172172
ts := activity.ParseSlackTimestamp(conv.LastTime)
173173
timeStr := text.RelativeTime(ts)
174174

175-
fmt.Fprintf(ios.Out, " @%-14s %s last: %-10s %q\n",
175+
fmt.Fprintf(ios.Out, " @%-14s %s %s\n",
176176
cs.Bold(conv.User),
177177
cs.Gray(text.Pluralize(conv.MessageCount, "message")),
178178
cs.Gray(timeStr),
179-
conv.LastMessage,
180179
)
180+
fmt.Fprintf(ios.Out, " last: %q\n", text.Truncate(conv.LastMessage, 80))
181+
182+
if i < len(conversations)-1 {
183+
fmt.Fprintln(ios.Out)
184+
}
181185
}
182186

187+
// Quick actions footer
188+
fmt.Fprintln(ios.Out)
189+
fmt.Fprintln(ios.Out, cs.Gray("---"))
190+
fmt.Fprintln(ios.Out, cs.Gray("Quick actions:"))
191+
fmt.Fprintf(ios.Out, " %s slackbuzz message list @<user>\n", cs.Gray("Read:"))
192+
fmt.Fprintf(ios.Out, " %s slackbuzz message send @<user> \"text\"\n", cs.Gray("Reply:"))
193+
fmt.Fprintf(ios.Out, " %s slackbuzz later add @<user> <ts>\n", cs.Gray("Save:"))
194+
183195
return nil
184196
}

pkg/cmd/message/list.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,13 @@ func listRun(opts *listOptions) error {
163163
fmt.Fprintln(ios.Out)
164164
}
165165

166+
// Quick actions footer
167+
fmt.Fprintln(ios.Out, cs.Gray("---"))
168+
fmt.Fprintln(ios.Out, cs.Gray("Quick actions:"))
169+
fmt.Fprintf(ios.Out, " %s slackbuzz message send %s \"text\" --thread-ts <ts>\n", cs.Gray("Reply:"), opts.channel)
170+
fmt.Fprintf(ios.Out, " %s slackbuzz react %s <ts> :emoji:\n", cs.Gray("React:"), opts.channel)
171+
fmt.Fprintf(ios.Out, " %s slackbuzz message edit %s <ts> \"new text\"\n", cs.Gray("Edit:"), opts.channel)
172+
166173
return nil
167174
}
168175

pkg/cmd/message/search.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,12 @@ func searchRun(opts *searchOptions) error {
169169
result.Paging.Page, result.Paging.Pages, result.Total, result.Paging.Page+1)))
170170
}
171171

172+
// Quick actions footer
173+
fmt.Fprintln(ios.Out, cs.Gray("---"))
174+
fmt.Fprintln(ios.Out, cs.Gray("Quick actions:"))
175+
fmt.Fprintf(ios.Out, " %s slackbuzz message send <channel> \"text\" --thread-ts <ts>\n", cs.Gray("Reply:"))
176+
fmt.Fprintf(ios.Out, " %s slackbuzz react <channel> <ts> :emoji:\n", cs.Gray("React:"))
177+
fmt.Fprintf(ios.Out, " %s slackbuzz later add <channel> <ts>\n", cs.Gray("Save:"))
178+
172179
return nil
173180
}

0 commit comments

Comments
 (0)