Skip to content

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

fix(sync-audit-panel): correct event log panel test configuration

Steven Enamakeld280b0cabf81
diff --git a/app/src/components/intelligence/SyncAuditPanel.tsx b/app/src/components/intelligence/SyncAuditPanel.tsx
index 9a7638b0f7..4ed5867447 100644
--- a/app/src/components/intelligence/SyncAuditPanel.tsx
+++ b/app/src/components/intelligence/SyncAuditPanel.tsx
@@ -228,7 +228,9 @@ export function SyncAuditPanel({ fill = false }: SyncAuditPanelProps = {}) {
</span>
<span aria-hidden>·</span>
<span>
- {formatTokens(totalInput)} in / {formatTokens(totalOutput)} out
+ {t('sync.tokensInOut', '{in} in / {out} out')
+ .replace('{in}', formatTokens(totalInput))
+ .replace('{out}', formatTokens(totalOutput))}
</span>
<span aria-hidden>·</span>
<span className="font-medium text-content-secondary">
diff --git a/app/src/components/settings/panels/__tests__/EventLogPanel.sseConfig.test.tsx b/app/src/components/settings/panels/__tests__/EventLogPanel.sseConfig.test.tsx
index d2796972b1..b8ea843d2a 100644
--- a/app/src/components/settings/panels/__tests__/EventLogPanel.sseConfig.test.tsx
+++ b/app/src/components/settings/panels/__tests__/EventLogPanel.sseConfig.test.tsx
@@ -97,16 +97,20 @@ describe('EventLogPanel SSE config frame', () => {
expect(renderedEvents(['AlphaEvent', 'BetaEvent'])).toEqual(['BetaEvent', 'AlphaEvent']);
});
- it("appends newest-last when the config frame asks for new_entries 'bottom'", async () => {
- // The whole point of the frame: the server decides the direction. With
- // 'bottom' the order must invert relative to the case above.
+ it("still renders newest-first when the config frame asks for new_entries 'bottom'", async () => {
+ // `new_entries: 'bottom'` still governs which end of the in-memory buffer
+ // new rows join (and so which end gets trimmed at `max_entries` — see the
+ // cap tests below), but display order no longer follows it: EventLogPanel
+ // now always shows page 1 as "latest first" regardless of the stream's
+ // append direction (EventLogPanel.tsx's `orderedEntries`, which reverses
+ // the buffer for 'bottom' precisely so paging stays "page 1 = newest").
mockFetchRaw(
config({ max_entries: 100, new_entries: 'bottom' }) + evt('AlphaEvent') + evt('BetaEvent')
);
renderWithProviders(<EventLogPanel />);
await waitFor(() => expect(screen.getByText('BetaEvent')).toBeTruthy());
- expect(renderedEvents(['AlphaEvent', 'BetaEvent'])).toEqual(['AlphaEvent', 'BetaEvent']);
+ expect(renderedEvents(['AlphaEvent', 'BetaEvent'])).toEqual(['BetaEvent', 'AlphaEvent']);
});
it('caps the buffer at max_entries, dropping the oldest when newest-first', async () => {