Skip to content

fix(ui): keep trace expansion stable during refresh - #11278

Open
localai-org-maint-bot wants to merge 1 commit into
masterfrom
bot/issue-11277-trace-selection
Open

fix(ui): keep trace expansion stable during refresh#11278
localai-org-maint-bot wants to merge 1 commit into
masterfrom
bot/issue-11277-trace-selection

Conversation

@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

Description

This PR fixes #11277.

The Traces page stored its expanded row by array index and also keyed React fragments by that index. When the five-second poll prepended a new trace, the same index referred to a different record, so the open detail panel moved. This change tracks expansion and reconciliation by stable trace ID instead.

A focused Playwright regression prepends a trace during manual refresh and asserts that the original trace remains expanded.

Notes for Reviewers

Validation performed:

  • npx eslint src/pages/Traces.jsx e2e/traces-pagination.spec.js (0 errors; 11 pre-existing warnings in Traces.jsx)
  • npm run lint:inline-styles (624, at baseline)
  • npm run build
  • PW_WORKERS=1 npx playwright test e2e/traces-pagination.spec.js --list (4 tests discovered)
  • git diff --check

Browser execution could not run on this NixOS host: the cached Playwright Chromium requires libglib-2.0.so.0, and no system Chromium or Nix development shell is available in this cron environment. CI should execute the regression in the repository-supported browser environment.

Signed commits

  • Yes, I signed my commits.
  • Documentation updated (docs/content/) for user-facing changes, or not applicable

Track expanded traces by their stable IDs instead of table indexes so polling cannot move an open detail panel to a newly inserted row. Use the same IDs for React keys and cover the prepend-on-refresh case in Playwright.

Fixes #11277

Assisted-by: Codex:gpt-5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

WebU(traces): Traces keep on scrolling after opening

1 participant