Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat(pam): add LIVE indicator to session logs and revert page size to 1000 events
bernie-g34d35658d1a6
diff --git a/frontend/src/hooks/api/pam/queries.tsx b/frontend/src/hooks/api/pam/queries.tsxindex 8c450b771f..a89114cd9a 100644--- a/frontend/src/hooks/api/pam/queries.tsx+++ b/frontend/src/hooks/api/pam/queries.tsx@@ -305,7 +305,7 @@ export const useGetPamSessionById = (};const LOGS_BATCH_FETCH_SIZE = 100;-const LOGS_EVENT_PAGE_SIZE = 5000;+const LOGS_EVENT_PAGE_SIZE = 1000;const LOGS_POLL_INTERVAL_MS = 5000;// Fetch batches until we have at least targetEventCount new events or no more batches remain.@@ -398,7 +398,11 @@ export const useGetPamSessionLogs = (sessionId: string, isActive: boolean) => {const loadMore = async () => {setIsLoadingMore(true);try {- const result = await fetchUntilEventTarget(sessionId, batchCursorRef.current, LOGS_EVENT_PAGE_SIZE);+ const result = await fetchUntilEventTarget(+ sessionId,+ batchCursorRef.current,+ LOGS_EVENT_PAGE_SIZE+ );batchCursorRef.current = result.cursor;setLogs((prev) => [...prev, ...result.logs]);setHasMore(result.hasMore);diff --git a/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx b/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsxindex c077764440..06b7096cd3 100644--- a/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx+++ b/frontend/src/pages/pam/PamSessionsByIDPage/components/PamSessionLogsSection.tsx@@ -42,8 +42,14 @@ export const PamSessionLogsSection = ({ session }: Props) => {return (<div className="flex h-full w-full flex-col gap-4 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">- <div className="flex items-center border-b border-mineshaft-400 pb-4">+ <div className="flex items-center justify-between border-b border-mineshaft-400 pb-4"><h3 className="text-lg font-medium text-mineshaft-100">Session Logs</h3>+ {isActive && (+ <span className="flex items-center gap-1.5 rounded-full bg-green-900/40 px-2.5 py-1 text-xs font-medium text-green-400">+ <span className="size-1.5 animate-pulse rounded-full bg-green-400" />+ LIVE+ </span>+ )}</div>{isDatabaseSession && hasLogs && <CommandLogView logs={logs as TPamCommandLog[]} />}