Skip to content

[Frontend Fx] Observability table column resizing issues#4411

Open
ardaerzin wants to merge 4 commits into
mainfrom
fe-fix/table-resizing-issues
Open

[Frontend Fx] Observability table column resizing issues#4411
ardaerzin wants to merge 4 commits into
mainfrom
fe-fix/table-resizing-issues

Conversation

@ardaerzin
Copy link
Copy Markdown
Contributor

@ardaerzin ardaerzin commented May 25, 2026

Summary

fixes #4409

Fixes column resizing in the shared @agenta/ui/table (InfiniteVirtualTable) — sticky and maxWidth columns become resizable, column-group headers (Evaluators) become resizable, drag is live, header/body widths re-sync after fast horizontal scroll, the sticky-right ghost slot is gone, and the observability Name cell uses CSS ellipsis so content tracks column width.

Blast radius

Two different scopes — worth knowing before merging.

Resize-machinery changes (useSmartResizableColumns.ts, ResizableTitle.tsx, custom-resize-handle.css)

Visible only when a table sets resizableColumns. Three tables do:

  • Observability traces table (the one in the bug report)
  • Observability sessions table
  • Annotation ScenarioListView

For these: sticky / constrained / group columns become resizable, drag is live, sticky-right ghost handle is gone. For every other table: no-op (useSmartResizableColumns returns columns unchanged when disabled).

Scroll-end layout re-sync (InfiniteVirtualTableInner.tsx)

Runs unconditionally on every @agenta/ui/table consumer:

  • Both observability tables, Deployments table, Registry table, Evaluators table, App management section, Prompts page table, Trace drawer linked spans, New evaluation flow selectors (variant / evaluator / workflow), Testcase/Entity tables in @agenta/entity-ui, Annotation queues view.

Cost: one re-render 150 ms after a horizontal scroll-end where scrollLeft actually changed. Vertical scroll is ignored. Tables that don't horizontally scroll pay nothing beyond attaching a listener.

Benefit: if any of these tables suffer from the same AntD fast-scroll desync (header <th> widths drifting from body cell widths) that the observability table did, the fix lands there automatically.

Observability-only changes

NodeNameCell.tsx and queries.ts (nodeDisplayNameAtomFamily removal) — observability traces table only.

Not affected

EvalRunDetails/Table.tsx and any other consumer of @/oss/components/InfiniteVirtualTable (a separate, older copy of IVT that lives under oss/src). The repo has two parallel IVT implementations — fixes have to land twice if they're supposed to apply to both.

Commits

  • make InfiniteVirtualTable columns properly resizable — sticky / constrained / group columns + live drag commit
  • re-sync InfiniteVirtualTable layout after fast scroll, anchor sticky-right resize handle inside celllayoutNudge debounced scroll listener + CSS rule on .ant-table-cell-fix-right .custom-resize-handle
  • use CSS ellipsis for observability Name cellsNodeNameCell + atom removal
  • use sum of child mins as the group resize floor — CR suggestion applied as hygiene fix

Testing

QA follow-up

Check against the issues reported in #4409. Also worth eyeballing in:

  • Deployments, Evaluators, Prompts, and Variants registry tables — confirm no regression on horizontal scroll
  • Trace drawer linked spans tab
  • New evaluation flow modal selectors

Checklist

  • I have included a video or screen recording for UI changes, or marked Demo as N/A
  • Relevant tests pass locally
  • Relevant linting and formatting pass locally
  • I have signed the CLA, or I will sign it when the bot prompts me

Contributor Resources

ardaerzin added 3 commits May 25, 2026 12:56
Sticky and maxWidth columns now honor user-resized widths and the resize
handle is wired uniformly across fixed, constrained, and flexible columns.
Column-group headers (e.g. Evaluators) become resizable; the drag delta
distributes proportionally across leaf children so the group expands
uniformly instead of one column absorbing the entire change.

handleResize commits the new width on every drag frame so AntD's colgroup
updates live — header and body resize together instead of snapping on
release.

ResizableTitle no longer carries an inline width when idle, so AntD's
colgroup is the sole source of truth outside of an active drag.
… anchor sticky-right resize handle inside cell

Two table layout fixes:

- After fast horizontal scrolling, AntD's body cell widths can drift
  away from the header colgroup until something forces a column-level
  re-render. A debounced scroll listener on .ant-table-body bumps a
  layoutNudge counter 150ms after horizontal scroll settles; the memoed
  finalColumns then produces fresh column object references and AntD
  rebuilds its layout state. The listener ignores vertical scroll so
  normal browsing has no extra re-render cost.
- The resize handle on sticky-right columns (e.g. the observability
  Actions column) is anchored inside the cell (right: 0; width: 9px)
  instead of overhanging by 9px, removing the ~18px ghost slot that
  used to appear on the table's right edge.
NodeNameCell renders the full span name through Typography.Text with
ellipsis={{tooltip: name}} so truncation tracks the rendered column
width and the full name is reachable via tooltip. The
nodeDisplayNameAtomFamily that hardcoded a 15-character JS slice is
removed.
@vercel
Copy link
Copy Markdown

vercel Bot commented May 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
agenta-documentation Ready Ready Preview, Comment May 25, 2026 3:39pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 25, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR removes a JS truncation atom, simplifies NodeNameCell to use CSS ellipsis, anchors the custom resize handle in sticky/right cells, makes fixed/constrained/group columns resizable with continuous commit and min-only clamping, refines drag-only width handling, and adds a debounced layout nudge after horizontal scrolling.

Changes

Column resizing infrastructure and observability table fixes

Layer / File(s) Summary
Remove JS-based text truncation
web/oss/src/state/newObservability/atoms/queries.ts, web/oss/src/components/pages/observability/components/NodeNameCell.tsx
Removes exported nodeDisplayNameAtomFamily atom and simplifies NodeNameCell to render the provided name directly using Typography.Text with CSS-based ellipsis and native tooltip instead of computing truncated text in JS.
Fix resize handle positioning in fixed-right columns
web/oss/src/assets/custom-resize-handle.css
Adds CSS override for .ant-table-cell-fix-right .custom-resize-handle to anchor the handle within the cell and prevent overflow into the scrollbar gutter.
Refine drag-only width state in ResizableTitle
web/packages/agenta-ui/src/InfiniteVirtualTable/components/common/ResizableTitle.tsx
Changes liveWidth to a transient state initialized as undefined; conditionally applies inline width style only during drag, returning control to AntD/colgroup sizing when idle; forwards resize events and removes useEffect prop-syncing logic.
Enhance useSmartResizableColumns for fixed, constrained, and group columns
web/packages/agenta-ui/src/InfiniteVirtualTable/hooks/useSmartResizableColumns.ts
Makes fixed and constrained columns resizable by honoring userResizedWidths in width computation; adds group-header resizing with proportional leaf-width delta distribution via snapshot mechanism; enforces minWidth-only clamping for commits; commits column widths continuously during onResize frames; wires fixed and grouped headers as resizable.
Add layout re-sync workaround for horizontal scrolling
web/packages/agenta-ui/src/InfiniteVirtualTable/components/InfiniteVirtualTableInner.tsx
Introduces layoutNudge state and debounced scroll listener to detect scrollLeft changes, wait 150ms, then increment layoutNudge to force AntD column layout rebuild, keeping header and body widths aligned after horizontal scroll.

🎯 4 (Complex) | ⏱️ ~75 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The PR title clearly describes the main objective: fixing column resizing issues in the Observability table, matching the primary change across all modified files.
Linked Issues check ✅ Passed All six acceptance criteria from #4409 are addressed: fixed columns now resizable via useSmartResizableColumns changes [1], user widths override maxWidth via computeSmartWidths updates [1], visible width updates via layoutNudge state [2], header-body alignment via ResizableTitle refactor [3], ghost handle removed via CSS override [4], and JS truncation replaced with CSS ellipsis [5].
Out of Scope Changes check ✅ Passed All changes are scoped to issue #4409: CSS override for fixed-right handle, NodeNameCell simplification, atom removal, layoutNudge state for sync, ResizableTitle refactor, and useSmartResizableColumns enhancements match the stated objectives.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description clearly relates to the changeset, detailing column resizing fixes for the Observability table and explaining the scope, testing, and implementation details.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fe-fix/table-resizing-issues

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ardaerzin ardaerzin marked this pull request as ready for review May 25, 2026 13:36
@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. Frontend UI labels May 25, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9805d6a9-f456-40b0-a09c-f4a8788637a1

📥 Commits

Reviewing files that changed from the base of the PR and between 3c9b1db and fa356f6.

📒 Files selected for processing (6)
  • web/oss/src/assets/custom-resize-handle.css
  • web/oss/src/components/pages/observability/components/NodeNameCell.tsx
  • web/oss/src/state/newObservability/atoms/queries.ts
  • web/packages/agenta-ui/src/InfiniteVirtualTable/components/InfiniteVirtualTableInner.tsx
  • web/packages/agenta-ui/src/InfiniteVirtualTable/components/common/ResizableTitle.tsx
  • web/packages/agenta-ui/src/InfiniteVirtualTable/hooks/useSmartResizableColumns.ts
💤 Files with no reviewable changes (1)
  • web/oss/src/state/newObservability/atoms/queries.ts

Comment thread web/packages/agenta-ui/src/InfiniteVirtualTable/hooks/useSmartResizableColumns.ts Outdated
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 25, 2026

Railway Preview Environment

Preview URL https://gateway-production-34b7.up.railway.app/w
Project agenta-oss-pr-4411
Image tag pr-4411-88782c0
Status Deployed
Railway logs Open logs
Workflow logs View workflow run
Updated at 2026-05-25T15:47:57.968Z

A column group can't shrink smaller than every child being at its own
minimum simultaneously, so the parent floor must be the sum of child
minimums, not the smallest. No behavioural change today because
table-layout: fixed ignores the parent th's minWidth — this is a
hygiene fix that becomes load-bearing the moment we add minConstraints
to the Resizable handle.
@ashrafchowdury
Copy link
Copy Markdown
Contributor

I believe these changes will not affect other areas where we are using the Virtual table, right @ardaerzin ??

@ardaerzin
Copy link
Copy Markdown
Contributor Author

I believe these changes will not affect other areas where we are using the Virtual table, right @ardaerzin ??

incorrect, IVT level changes / improvements affect other tables too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Frontend size:L This PR changes 100-499 lines, ignoring generated files. UI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Observability table columns are not properly resizable (including sticky/fixed columns)

2 participants