Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(settings): correct approval history panel to show pending approvals

Steven Enamakel5b857fac9176
diff --git a/app/src/components/settings/panels/ApprovalHistoryPanel.tsx b/app/src/components/settings/panels/ApprovalHistoryPanel.tsx
index 30336f5b11..e552309277 100644
--- a/app/src/components/settings/panels/ApprovalHistoryPanel.tsx
+++ b/app/src/components/settings/panels/ApprovalHistoryPanel.tsx
@@ -1,4 +1,5 @@
import debug from 'debug';
+import { RefreshCw } from 'lucide-react';
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
import { useT } from '../../../lib/i18n/I18nContext';
@@ -161,10 +162,16 @@ const ApprovalHistoryPanel = () => {
const hasEntries = filteredEntries.length > 0;
return (
+ // Non-scrolling page body: the table card fills it and only its rows scroll.
<SettingsPanel
testId="approval-history-panel"
- description={t('settings.approvalHistory.subtitle')}>
+ description={t('settings.approvalHistory.subtitle')}
+ scrollable={false}
+ bodyClassName="flex h-full min-h-0 flex-col gap-4">
<DataTable<ApprovalAuditEntry>
+ title={t('settings.approvalHistory.tableTitle')}
+ description={t('settings.approvalHistory.tableDesc')}
+ pagination={{ pageSize: 25, testId: 'approval-history-pagination' }}
columns={columns}
rows={filteredEntries}
rowKey={entry => entry.request_id}
@@ -183,11 +190,12 @@ const ApprovalHistoryPanel = () => {
))}
</TableRow>
)}
- toolbarEnd={
+ actions={
<Button
type="button"
- variant="primary"
- size="xs"
+ variant="secondary"
+ size="sm"
+ leadingIcon={<RefreshCw className="h-3.5 w-3.5" aria-hidden />}
onClick={handleRefresh}
disabled={isLoading}
data-testid="approval-history-refresh">
@@ -234,7 +242,7 @@ const ApprovalHistoryPanel = () => {
}
empty={
error ? undefined : (
- <div className="px-4 py-8 text-center" data-testid="approval-history-empty">
+ <div data-testid="approval-history-empty">
<EmptyState label={t('settings.approvalHistory.emptyState')} />
</div>
)
diff --git a/app/src/lib/i18n/en.ts b/app/src/lib/i18n/en.ts
index 32121ac68f..c88138643c 100644
--- a/app/src/lib/i18n/en.ts
+++ b/app/src/lib/i18n/en.ts
@@ -6364,6 +6364,8 @@ const en: TranslationMap = {
'settings.sandbox.noEnvVars': 'No environment variables configured.',
'settings.approvalHistory.title': 'Approval history',
+ 'settings.approvalHistory.tableTitle': 'Decisions',
+ 'settings.approvalHistory.tableDesc': 'Every approve or deny, with the tool and what it was asked to do.',
'settings.approvalHistory.subtitle': 'Recent tool-approval decisions, newest first.',
'settings.approvalHistory.refresh': 'Refresh',
'settings.approvalHistory.loading': 'Loading approval history…',