The cross-harness, self-improving memory layer for AI agents. Join our community: https://discord.com/invite/zdNChS2fBu
Go agent-ai-cliagent-harnessesagent-securitybrowser-extensionciclaude-codecloudcodexcursordetection-engineeringjevknowledge-basememorymobile-device-managementobservabilitysecuritysecurity-information-and-event-managementsecurity-toolstelemetrytraces
fix(dashboard): use native links for session navigation (#956)
Rudy Mizrahi Celeklia950f52303bd
diff --git a/cli/beacon/internal/endpoint/dashboard/static/app.js b/cli/beacon/internal/endpoint/dashboard/static/app.jsindex 7d96e1dc..9a56d651 100644--- a/cli/beacon/internal/endpoint/dashboard/static/app.js+++ b/cli/beacon/internal/endpoint/dashboard/static/app.js@@ -1522,7 +1522,7 @@ function sessionRowHTML(session) {: `<span class="muted">No prompt captured</span>`;return `<tr class="row-link" data-session-id="${escapeHTML(session.id)}">- <td class="mono"><span class="cell-link">${escapeHTML(formatSessionID(session.id))}</span></td>+ <td class="mono"><a class="cell-link" href="${escapeHTML(sessionPageURL(session.id))}">${escapeHTML(formatSessionID(session.id))}</a></td><td>${badge(session.max_severity || "unknown", `severity-${session.max_severity || "unknown"}`)}${review ? `<br /><span class="muted">${escapeHTML(review)} review</span>` : ""}</td><td>${sessionHarnessCell(session)}</td><td class="col-message">@@ -1586,7 +1586,8 @@ function bindShareRefreshCopy(scope = document) {function bindSessionRows(scope = document) {const rows = scope.matches?.("tr[data-session-id]") ? [scope] : Array.from(scope.querySelectorAll("tr[data-session-id]"));rows.forEach((row) => {- row.addEventListener("click", () => {+ row.addEventListener("click", (event) => {+ if (event.defaultPrevented || event.target.closest("a, button, input, select, textarea")) return;window.location.href = sessionPageURL(row.dataset.sessionId);});});diff --git a/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/tests/session-navigation.spec.ts b/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/tests/session-navigation.spec.tsnew file mode 100644index 00000000..99585d74--- /dev/null+++ b/cli/beacon/internal/endpoint/dashboard/testdata/lens-e2e/tests/session-navigation.spec.ts@@ -0,0 +1,72 @@+import { expect, test, type BrowserContext, type Page } from '@playwright/test';++const alpha = { id: 'session-alpha', harness: 'codex_cli', original_prompt: 'Inspect the cat', event_count: 1 };+async function fixture(context: BrowserContext, session = alpha) {+ // These API records know nothing about DOM links, focus, or click handlers.+ // Context routing also supplies the first request in genuinely opened tabs.+ await context.route('**/api/**', async (route) => {+ const url = new URL(route.request().url());+ const json = url.pathname === '/api/sessions' ? { sessions: [session] }+ : url.pathname === '/api/session' ? { session, events: [] }+ : url.pathname === '/api/summary' ? { total_events: 1, active_sessions: 1 }+ : url.pathname === '/api/lenses' ? { lenses: [] } : {};+ await route.fulfill({ json });+ });+}+async function list(page: Page) {+ await page.goto('/?range=all&session_state=');+ await expect(page.locator('#events tr[data-session-id]')).toHaveCount(1);+}+async function detail(page: Page, id: string) {+ await expect(page).toHaveURL((url) => url.pathname === '/session.html' && url.searchParams.get('id') === id);+ expect(new URL(page.url()).searchParams.size).toBe(1);+ await expect(page.locator('#session-full-id')).toHaveText(id);+}++test('a session is reachable through sequential Tab and native Enter', async ({ page, context }) => {+ await fixture(context);+ await list(page);+ await page.locator('[name="q"]').focus();+ let reached = false;+ for (let i = 0; i < 20; i++) {+ await page.keyboard.press('Tab');+ reached = await page.evaluate(() => !!document.activeElement?.closest('#events tr[data-session-id] a'));+ if (reached) break;+ }+ expect(reached).toBe(true);+ await page.keyboard.press('Enter');+ await detail(page, alpha.id);+});++for (const gesture of ['modifier', 'middle'] as const) {+ test(`${gesture} click opens the session in a real separate tab`, async ({ page, context }) => {+ await fixture(context);+ await list(page);+ const original = page.url();+ const link = page.locator('#events tr[data-session-id] a');+ await expect(link).toHaveCount(1);+ const opened = context.waitForEvent('page');+ if (gesture === 'middle') await link.click({ button: 'middle' });+ else await link.click({ modifiers: [process.platform === 'darwin' ? 'Meta' : 'Control'] });+ const tab = await opened;+ await detail(tab, alpha.id);+ await expect(page).toHaveURL(original);+ await expect(page.locator('#events tr[data-session-id]')).toHaveCount(1);+ await tab.close();+ });+}++test('ordinary row-background click still opens the session', async ({ page, context }) => {+ await fixture(context);+ await list(page);+ await page.locator('#events tr td').nth(3).click();+ await detail(page, alpha.id);+});++test('row navigation preserves reserved characters in the session ID', async ({ page, context }) => {+ const session = { ...alpha, id: 'session/a?b#c&d="<quoted>' };+ await fixture(context, session);+ await list(page);+ await page.locator('#events tr td').nth(3).click();+ await detail(page, session.id);+});diff --git a/docs/changelog/cli.mdx b/docs/changelog/cli.mdxindex 9afd6e5d..8710bc98 100644--- a/docs/changelog/cli.mdx+++ b/docs/changelog/cli.mdx@@ -23,6 +23,7 @@ Stay up to date with the latest changes to the Agent Beacon CLI.- **Vector forwarding configs work with Windows log paths** · Beacon wrote log paths into the Vector configs for Beacon Cloud and the SIEM packs without escaping them, so on Windows a path's backslashes made `vector.toml` fail to parse, or quietly point Vector at a different file. Paths are now escaped and Vector reads exactly the configured runtime, inventory and backfill logs.- **Memory candidate and evaluation search finds older matches** · `beacon memory candidates list` and `beacon memory evaluations list` with `--query` paged before matching, so a page could come back empty or skip matches whenever newer records that didn't match filled it. Searches now page over matching records, as `beacon memory list` already did.- **Splunk and Falcon HEC forwarding redacts secrets** · With direct Splunk HEC or Falcon LogScale HEC forwarding configured, credentials in prompts, tool output and other telemetry reached the SIEM unredacted, while the local runtime log redacted them. The collector now redacts secrets before telemetry fans out to those exporters, with the same rules as the local log. Installs without HEC forwarding are unchanged.+- **Dashboard session IDs are real links** · Session IDs in the dashboard's session list only responded to a row click, so they couldn't be reached with Tab or opened in a new tab. Each ID is now a link: Tab and Enter open the session, and modifier-click or middle-click opens it in another tab. Clicking elsewhere in the row still opens it.- **Dashboard output tokens count reasoning once** · The local dashboard's token view added reasoning tokens to output, but `gen_ai.usage.output_tokens` already includes them, so models that report reasoning had their output and total tokens overstated. Output and the total now count reasoning once, the split bar no longer shows reasoning as a separate segment, and a note below it gives the reasoning count included in output. `beacon token-usage` already counted it this way.---