Skip to content
Open
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
14 changes: 7 additions & 7 deletions apps/frontend/src/renderer/components/ChatHistorySidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,25 +335,25 @@ export function ChatHistorySidebar({

{/* Bulk action toolbar */}
{isSelectionMode && selectedIds.size > 0 && (
<div className="flex items-center gap-2 border-t border-border px-3 py-2">
<div className="flex items-center gap-2 overflow-hidden min-w-0 border-t border-border px-3 py-2">
<Button
variant="destructive"
size="sm"
className="flex-1 text-xs"
className="min-w-0 flex-1 text-xs"
onClick={() => setBulkDeleteOpen(true)}
>
<Trash2 className="mr-1.5 h-3.5 w-3.5" />
{t('selection.deleteSelected')} ({selectedIds.size})
<Trash2 className="shrink-0 mr-1.5 h-3.5 w-3.5" />
<span className="truncate">{t('selection.deleteSelected')} ({selectedIds.size})</span>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟑 Minor

🧩 Analysis chain

🏁 Script executed:

# First, let's check the ChatHistorySidebar.tsx file around the mentioned lines
cat -n apps/frontend/src/renderer/components/ChatHistorySidebar.tsx | sed -n '340,365p'

Repository: AndyMik90/Auto-Claude

Length of output: 1237


🏁 Script executed:

# Search for translation keys in locale files
echo "=== Searching for deleteSelected key ==="
rg -n "deleteSelected" --type json

echo ""
echo "=== Searching for archiveSelected key ==="
rg -n "archiveSelected" --type json

echo ""
echo "=== Checking if 'selection' namespace exists ==="
rg -n '"selection"' --type json

Repository: AndyMik90/Auto-Claude

Length of output: 1339


🏁 Script executed:

# List all locale file directories to understand structure
echo "=== Listing locale directories ==="
fd -type d -name "locales" | head -20

echo ""
echo "=== Showing structure of en locale files ==="
fd -e json . apps/frontend/src/shared/i18n/locales/en/ 2>/dev/null | sort

Repository: AndyMik90/Auto-Claude

Length of output: 933


🏁 Script executed:

# Check the structure of selection namespace in common.json
echo "=== Checking 'selection' namespace in en/common.json ==="
sed -n '131,150p' apps/frontend/src/shared/i18n/locales/en/common.json

echo ""
echo "=== Checking 'selection' namespace in fr/common.json ==="
sed -n '131,150p' apps/frontend/src/shared/i18n/locales/fr/common.json

echo ""
echo "=== Checking 'insights' namespace in en/common.json ==="
rg -A 5 '"insights"' apps/frontend/src/shared/i18n/locales/en/common.json | head -20

Repository: AndyMik90/Auto-Claude

Length of output: 1720


🏁 Script executed:

# Check if selection.deleteSelected specifically exists
echo "=== Full search for 'selection' key patterns ==="
rg -A 20 '"selection":\s*{' apps/frontend/src/shared/i18n/locales/en/common.json

Repository: AndyMik90/Auto-Claude

Length of output: 226


🏁 Script executed:

# Search for all t() calls in ChatHistorySidebar.tsx
echo "=== All translation key usages in ChatHistorySidebar.tsx ==="
rg "t\(" apps/frontend/src/renderer/components/ChatHistorySidebar.tsx -A 1 | head -40

Repository: AndyMik90/Auto-Claude

Length of output: 1346


🏁 Script executed:

# Check if insights.deleteSelected exists anywhere
echo "=== Checking if insights.deleteSelected exists ==="
rg "deleteSelected" apps/frontend/src/shared/i18n/locales/en/common.json -B 2 -A 2

echo ""
echo "=== Full insights namespace ==="
rg -A 30 '"insights"' apps/frontend/src/shared/i18n/locales/en/common.json | head -40

Repository: AndyMik90/Auto-Claude

Length of output: 1750


Correct the namespace inconsistency on line 356: use selection.archiveSelected instead of insights.archiveSelected.

Both selection.deleteSelected (line 346) and selection.archiveSelected are properly defined in both en/common.json and fr/common.json. However, line 356 incorrectly uses insights.archiveSelected, creating an inconsistency between adjacent parallel actions. The selection namespace is the correct home for both keys, so line 356 should be updated to selection.archiveSelected to maintain consistency.

πŸ› οΈ Proposed fix
-              <span className="truncate">{t('insights.archiveSelected')} ({selectedIds.size})</span>
+              <span className="truncate">{t('selection.archiveSelected')} ({selectedIds.size})</span>
πŸ€– Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/frontend/src/renderer/components/ChatHistorySidebar.tsx` at line 346, In
ChatHistorySidebar (the component rendering the action buttons), replace the
incorrect translation key usage t('insights.archiveSelected') with
t('selection.archiveSelected') so the archive button uses the same `selection`
namespace as the delete button (the span rendering t('selection.deleteSelected')
and the archive span/button should both reference `selection.archiveSelected` to
match en/common.json and fr/common.json).

</Button>
{onArchiveSessions && (
<Button
variant="secondary"
size="sm"
className="flex-1 text-xs"
className="min-w-0 flex-1 text-xs"
onClick={handleBulkArchive}
>
<Archive className="mr-1.5 h-3.5 w-3.5" />
{t('insights.archiveSelected')} ({selectedIds.size})
<Archive className="shrink-0 mr-1.5 h-3.5 w-3.5" />
<span className="truncate">{t('insights.archiveSelected')} ({selectedIds.size})</span>
</Button>
)}
</div>
Expand Down
Loading