Replace the Conversations page with a dedicated search page featuring: - Large, prominent search input with autofocus - Collapsible filter panel with time range presets (24h, week, month, 3 months, custom date range), channel filter (comma-separated, - prefix to exclude), and agent filter (same syntax) - Search-results-only display with helpful empty state when no search has been performed - Remove duplicate "Conversations" heading, rename to "Search" - Update sidebar nav label and icon to match Backend changes: - Add channel, agent, after, before query parameters to GET /api/messages/search endpoint - Add Channels, ExcludeChannels, Agents, ExcludeAgents fields to SearchOptions with SQL filter generation in store.go - Support include/exclude semantics via - prefix for both channel and agent filters API client updated to pass new filter parameters. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
43 lines
1.9 KiB
Go
43 lines
1.9 KiB
Go
package messaging
|
|
|
|
// SendOptions configures message sending behavior.
|
|
type SendOptions struct {
|
|
Subject string `json:"subject,omitempty"`
|
|
Priority int `json:"priority,omitempty"`
|
|
Metadata string `json:"metadata,omitempty"`
|
|
ChannelID *int64 `json:"channel_id,omitempty"`
|
|
ConversationID *int64 `json:"conversation_id,omitempty"`
|
|
ReplyTo *int64 `json:"reply_to,omitempty"`
|
|
}
|
|
|
|
// ReadOptions configures inbox reading behavior.
|
|
type ReadOptions struct {
|
|
Status string `json:"status,omitempty"`
|
|
FromAgent string `json:"from_agent,omitempty"`
|
|
ConversationID *int64 `json:"conversation_id,omitempty"`
|
|
MinPriority int `json:"min_priority,omitempty"`
|
|
Limit int `json:"limit,omitempty"`
|
|
Offset int `json:"offset,omitempty"`
|
|
After string `json:"after,omitempty"`
|
|
Before string `json:"before,omitempty"`
|
|
IncludeRead bool `json:"include_read,omitempty"`
|
|
}
|
|
|
|
// SearchOptions configures message search behavior.
|
|
type SearchOptions struct {
|
|
FromAgent string `json:"from_agent,omitempty"`
|
|
ToAgent string `json:"to_agent,omitempty"`
|
|
ChannelID *int64 `json:"channel_id,omitempty"`
|
|
MinPriority int `json:"min_priority,omitempty"`
|
|
Status string `json:"status,omitempty"`
|
|
Limit int `json:"limit,omitempty"`
|
|
Offset int `json:"offset,omitempty"`
|
|
After string `json:"after,omitempty"`
|
|
Before string `json:"before,omitempty"`
|
|
Channel string `json:"channel,omitempty"`
|
|
Channels []string `json:"channels,omitempty"` // include messages in these channels
|
|
ExcludeChannels []string `json:"exclude_channels,omitempty"` // exclude messages in these channels
|
|
Agents []string `json:"agents,omitempty"` // include messages from/to these agents
|
|
ExcludeAgents []string `json:"exclude_agents,omitempty"` // exclude messages from/to these agents
|
|
}
|