mirror of
https://github.com/SigNoz/signoz.git
synced 2026-08-06 05:00:42 +01:00
* fix(logs): open log details in table (Column) format when activeId is set
Opening a log link (?activeLogId=...) and switching to Column/table format
left the highlighted row un-openable — clicking it did nothing.
Root cause: the shared TanStackTable decided open vs. close internally from
`isRowActive` + `onRowDeactivate`. LogsExplorerList had overloaded `isRowActive`
with `|| log.id === activeLogId`, so a URL-highlighted-but-closed row looked
"active" and the first click ran the deactivate (close) path instead of opening.
Fix (PR 1 of 2): move click routing to the consumer.
- Remove `onRowDeactivate` from TanStackTable; it took no args and only fired
when re-clicking the same active row (clicking A→B never deactivated A).
- `onRowClick` now receives a third `{ isActive }` context arg (additive; the
~14 existing consumers are unaffected).
- LogsExplorerList and LiveLogsList own the toggle:
`isActive ? handleCloseLogDetail() : handleSetActiveLog(log)`, and
`isRowActive` tracks only `activeLog?.id`.
The linked-row visual highlight (`isHighlighted`) is deferred to PR 2 (blocked
on a design decision for the highlight color); see
frontend/docs/tdd-tanstack-row-click-routing.md.
* feat(logs): highlight the URL-linked (activeLogId) row in table format (#12271)
Restores the linked-row highlight that the TanStack migration (#10946)
dropped from the table view, without coupling it to click routing.
Uses the table's existing `getRowClassName` hook (styling-only) — no new
shared-table prop:
- LogsExplorerList / LiveLogsList set getRowClassName to 'logs-linked-row'
when `log.id === activeLogId`.
- A global, lowest-specificity rule paints `.logs-linked-row td` using the
per-row `--row-active-bg` var (already set via getRowStyle). The table's own
:hover / .tableRowActive cell rules are higher-specificity !important, so
active/hover correctly win when a linked row is also open or hovered.
`isRowActive` stays `activeLog?.id` only, so the highlighted row still opens on
first click (relies on the routing fix in the base PR).
Color reuses --row-active-bg as a placeholder; a distinct "linked" token is a
follow-up pending design.
Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>
* chore: remove comments
* chore: remove extra comments
* feat: add e2e for flows
* chore: add test id
* chore: chore: remove comment
* chore: remove comment
* chore: remove comment
* chore: add comment
* chore: remove comment
---------
Co-authored-by: Gaurav Tewari <tewarig@users.noreply.github.com>