Repository navigation
fix(dashboard): UI bug fixes batch 3 #211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
d202ebd
b147069
6dd1ded
d1fc4de
3faa3c2
9df878b
a92c493
6567669
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -39,6 +39,7 @@ import { ActionKbd } from "#/features/dashboard/keyboard-shortcuts-reveal"; | |
|
|
||
| const INBOX_VIEW_IDS = new Set<string>(INBOX_VIEWS.map((view) => view.id)); | ||
|
|
||
| /** Reads the tab URL param, falling back to the all view for unknown values. */ | ||
| function parseInboxView(value: string): InboxView { | ||
| return INBOX_VIEW_IDS.has(value) ? (value as InboxView) : "all"; | ||
| } | ||
|
|
@@ -75,6 +76,26 @@ const FOLDER_TITLES: Record<string, string> = { | |
| needs_approval: "Needs approval", | ||
| }; | ||
|
|
||
| // Empty-state copy per folder. The old fallback, "Choose an email to view | ||
| // details", read as if there were mail to pick. | ||
| const FOLDER_EMPTY_DESCRIPTIONS: Record<string, string> = { | ||
| agent: "Threads your agent is handling will show up here.", | ||
| archive: "Archived conversations will show up here.", | ||
| archived: "Archived conversations will show up here.", | ||
| spam: "Mail marked as spam will show up here.", | ||
| trash: "Deleted conversations will show up here.", | ||
| drafts: "Drafts you save will show up here.", | ||
| starred: "Star a thread to keep it here.", | ||
| needs_approval: "Agent drafts that need your approval will show up here.", | ||
| }; | ||
|
|
||
| /** Empty-state description for a folder that has no threads. */ | ||
| const folderEmptyDescription = (folder: string): string => | ||
| FOLDER_EMPTY_DESCRIPTIONS[folder] ?? | ||
| (folder.startsWith("label:") | ||
| ? "Threads with this label will show up here." | ||
| : "Nothing here yet."); | ||
|
|
||
| const isTypingTarget = (target: EventTarget | null) => { | ||
| if (!(target instanceof HTMLElement)) return false; | ||
| const tag = target.tagName; | ||
|
|
@@ -135,6 +156,7 @@ export const AgentInboxContent = ({ | |
| parseAsString.withDefault(""), | ||
| ); | ||
| const activeTab = parseInboxView(tabParam); | ||
| const hasListFilters = searchQuery !== "" || activeFilterCount > 0; | ||
| const showInboxTabs = folder === "inbox"; | ||
|
|
||
| const folderTitle = folder.startsWith("label:") | ||
|
|
@@ -730,7 +752,9 @@ export const AgentInboxContent = ({ | |
| ) : (listLoading || isLoadingMailboxes) && | ||
| filteredThreads.length === 0 ? ( | ||
| <MailListSkeleton /> | ||
| ) : filteredThreads.length === 0 && !threadsError ? ( | ||
| ) : filteredThreads.length === 0 && !threadsError && !hasListFilters ? ( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Reset the bulk-selection anchor when the view changes. This branch keeps If the user changes to another search and Shift-clicks a checkbox,
|
||
| // Folder or tab is empty. When search or filters hide every | ||
| // thread, ThreadList shows its no-matches state with clear filters. | ||
| <div className="flex min-h-0 flex-1 items-center justify-center p-6"> | ||
| <InboxEmptyState | ||
| title={ | ||
|
|
@@ -747,7 +771,7 @@ export const AgentInboxContent = ({ | |
| ? "Inbox shows emails sent to this address. Outbound mail lives in Sent." | ||
| : folder === "sent" | ||
| ? "Emails you send from this address will show up here." | ||
| : "Choose an email to view details" | ||
| : folderEmptyDescription(folder) | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| } | ||
| onCompose={openCompose} | ||
| /> | ||
|
|
@@ -760,7 +784,7 @@ export const AgentInboxContent = ({ | |
| selectedId={selectedThreadId} | ||
| onSelect={handleSelectThread} | ||
| isLoading={listLoading} | ||
| hasFilters={searchQuery !== "" || activeFilterCount > 0} | ||
| hasFilters={hasListFilters} | ||
| onClearFilters={() => { | ||
| setSearchQuery(null); | ||
| setFilterParam(null); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
totalnow counts matching contacts, but the group page passes it toContactExportModalalongside whole-group subscribed and unsubscribed counts. The dialog subtracts those counts fromtotalto calculate blocked contacts.For a group with 10 subscribed, 5 unsubscribed and 2 blocked contacts, selecting Subscribed makes
total10. The export dialog then reports zero blocked contacts and prevents exporting them. Fetch separate counts for the export's search scope, without the table's status filter.Knowledge Base Used: Contact management