Kaynağa Gözat

refactor(ui/chat): picker docs, shared helpers, resetBrowse comments

- Replace inline ShortHelp/FullHelp in attachments_picker with shared
  pickerShortHelp/pickerFullHelp helpers (COMP #8)
- Add resetBrowse comment in channels_picker (COMP #7)
- Add file-level doc comments to emoji_picker, command_input,
  user_info (COMP #12)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
claude 1 ay önce
ebeveyn
işleme
fc8d853ba4

+ 2 - 7
internal/ui/chat/attachments_picker.go

@@ -79,14 +79,9 @@ func (ap *attachmentsPicker) HandleEvent(event tview.Event) tview.Command {
 }
 
 func (ap *attachmentsPicker) ShortHelp() []keybind.Keybind {
-	cfg := ap.cfg.Keybinds.Picker
-	return []keybind.Keybind{cfg.Up.Keybind, cfg.Down.Keybind, cfg.Select.Keybind, cfg.Cancel.Keybind}
+	return pickerShortHelp(ap.cfg.Keybinds.Picker)
 }
 
 func (ap *attachmentsPicker) FullHelp() [][]keybind.Keybind {
-	cfg := ap.cfg.Keybinds.Picker
-	return [][]keybind.Keybind{
-		{cfg.Up.Keybind, cfg.Down.Keybind, cfg.Top.Keybind, cfg.Bottom.Keybind},
-		{cfg.Select.Keybind, cfg.Cancel.Keybind},
-	}
+	return pickerFullHelp(ap.cfg.Keybinds.Picker)
 }

+ 1 - 0
internal/ui/chat/channels_picker.go

@@ -27,6 +27,7 @@ func newChannelsPicker(cfg *config.Config, chatView *Model) *channelsPicker {
 	return cp
 }
 
+// resetBrowse starts the channels picker in input mode so users can type to filter immediately.
 func (cp *channelsPicker) resetBrowse() { cp.browseMode = false }
 
 func (cp *channelsPicker) HandleEvent(event tview.Event) tview.Command {

+ 3 - 0
internal/ui/chat/command_input.go

@@ -1,3 +1,6 @@
+// command_input.go implements a vim-style command input overlay. Opened
+// with the command_mode keybind (:), it accepts commands like :q, :quit,
+// and :logout. Unknown commands are silently ignored.
 package chat
 
 import (

+ 3 - 0
internal/ui/chat/emoji_picker.go

@@ -1,3 +1,6 @@
+// emoji_picker.go implements the emoji picker overlay for adding reactions
+// to messages. It displays a searchable list of common Unicode emoji plus
+// guild-specific custom emoji, with a favorites section for quick access.
 package chat
 
 import (

+ 3 - 0
internal/ui/chat/user_info.go

@@ -1,3 +1,6 @@
+// user_info.go implements the user info popup overlay. Opened with the
+// user_info keybind (w), it displays the selected message author's
+// username, display name, roles, and account creation date.
 package chat
 
 import (