Skip to content

Commit c6b8759

Browse files
feat(logs): inspect entries inline while following live updates (#2136)
* feat(logs): add contextual inline log explorer * fix(logs): stop live updates for fixed time ranges * fix(logs): preserve inspection across refresh and navigation * style(logs): keep inspection status within the toolbar row * fix(logs): restore contextual inspection and bound batch work * fix(logs): preserve emissions and follow bounded read semantics * fix(logs): finish inspection and context edge cases * feat(logs): navigate expanded logs with arrow keys * style(logs): simplify details and show arrow-key guidance * style(logs): make navigation hint subtle * fix(logs): reveal expanded content while navigating * feat(logs): preserve reading position during live updates * fix(logs): inset time range dropdown arrow * fix(logs): address closing review compatibility and polling concerns * fix(logs): retain scroll allowance and avoid passive focus changes * fix(logs): distinguish scroll movement from pointer intent * fix(logs): show loaded count only in the results summary * fix(logs): keep status height stable during mobile live updates * fix(logs): clear retained spacing when following resumes * feat(logs): show readable local timestamps and relative age * fix(logs): separate timestamp and relative age text * fix(logs): leave space below the log results * fix(logs): keep neighboring context visible during navigation * test(logs): keep DST edit fixtures valid across timezones
1 parent 2d718d4 commit c6b8759

32 files changed

Lines changed: 2860 additions & 696 deletions

‎DESIGN.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ This file collects architecture and design notes for studio that aren't otherwis
44

55
## Active design documents
66

7+
- [`src/features/instance/log/MAP.md`](src/features/instance/log/MAP.md) — navigation index for log inspection, transport, and context behavior.
8+
79
- [`src/features/organizations/DESIGN.md`](src/features/organizations/DESIGN.md) — shared organization target policy, switch destinations, and account-menu behavior.
810

911
- [`src/features/clusters/DESIGN.md`](src/features/clusters/DESIGN.md) — cluster list lifecycle classification, optional metadata and notification scope, where a saved cluster draft reopens, and when the cluster form may terminate a cluster.

‎e2e/tests/logs.anon.spec.ts‎

Lines changed: 430 additions & 0 deletions
Large diffs are not rendered by default.

‎src/components/ui/table.tsx‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,14 @@ const RESIZE_HANDLE_WIDTH = 16;
1717
export interface TableProps extends React.ComponentProps<'table'> {
1818
containerClassName?: string;
1919
containerRef?: React.Ref<HTMLDivElement>;
20+
containerTabIndex?: number;
2021
}
2122

22-
export function Table({ className, containerClassName, containerRef, ...props }: TableProps) {
23+
export function Table({ className, containerClassName, containerRef, containerTabIndex, ...props }: TableProps) {
2324
return (
2425
<div
2526
ref={containerRef}
27+
tabIndex={containerTabIndex}
2628
data-slot="table-container"
2729
className={cn('relative w-full overflow-x-auto', containerClassName)}
2830
>
@@ -74,6 +76,7 @@ export function TableHead({ className, ...props }: React.ComponentProps<'th'>) {
7476

7577
export function TableHeadSortable<TData extends RowData>({
7678
header,
79+
children,
7780
onColumnClick,
7881
className,
7982
...props
@@ -95,7 +98,9 @@ export function TableHeadSortable<TData extends RowData>({
9598
// table that uses this header, not just the browse table that wires up sizing + persistence.
9699
const enableResizing = header.getContext().table.options.enableColumnResizing === true
97100
&& header.column.getCanResize();
98-
const content = header.isPlaceholder ? null : flexRender(header.column.columnDef.header, header.getContext());
101+
const content = header.isPlaceholder
102+
? null
103+
: children ?? flexRender(header.column.columnDef.header, header.getContext());
99104
const table = header.getContext().table;
100105
const size = header.getSize();
101106
const minSize = header.column.columnDef.minSize ?? table.options.defaultColumn?.minSize ?? 20;
@@ -112,7 +117,7 @@ export function TableHeadSortable<TData extends RowData>({
112117
const selector = `[data-col-id="${CSS.escape(header.column.id)}"]`;
113118
const range = document.createRange();
114119
const measure = (el: Element) => {
115-
range.selectNodeContents(el);
120+
range.selectNodeContents(el.querySelector('[data-column-content]') ?? el);
116121
return range.getBoundingClientRect().width;
117122
};
118123
let widest = 0;

‎src/components/ui/utils/badgeLogLevel.tsx‎

Lines changed: 0 additions & 32 deletions
This file was deleted.

‎src/components/ui/utils/badgeNode.tsx‎

Lines changed: 0 additions & 17 deletions
This file was deleted.

‎src/features/instance/log/Logs.test.tsx‎

Lines changed: 394 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)