Skip to content

CONSOLE-5040: Detangle TableColumn and ConsoleDataViewColumn - #16984

Merged
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
logonoff:CONSOLE-5040-dataviewcol
Aug 14, 2026
Merged

CONSOLE-5040: Detangle TableColumn and ConsoleDataViewColumn#16984
openshift-merge-bot[bot] merged 1 commit into
openshift:mainfrom
logonoff:CONSOLE-5040-dataviewcol

Conversation

@logonoff

@logonoff logonoff commented Aug 13, 2026

Copy link
Copy Markdown
Member

Analysis / Root cause:

TableColumn refers to virtualized table and not DataView, so the types were tangled up I think

Solution description:

Changed all usage of TableColumn (virtualized table type) in the context of DataView to the correct type

Simply inline the bodge into ConsoleDataViewColumn instead because useConsoleDataViewData handles the transformation from the custom type to DataViewTh

sortFunction appeared to have been set as internal state of dataViewColumns, while actual consumers would use sort. This caused some issues as when tightening up the types, sort was not accepted as a valid property.

Had to append as const to props.modifier of the columns so that TypeScript would narrow it down to 'nowrap' instead of string.

Test cases:

  • Sorting works the same as before

Summary by CodeRabbit

  • Improvements
    • Standardized table and data-view column handling across resource, workload, Helm, monitoring, and administration views.
    • Preserved existing table behavior, including sorting, filtering, selection, cell formatting, and non-wrapping columns.
    • Improved consistency and reliability of table headers, rows, and configurable cells throughout the console.
    • Updated sorting configuration terminology for supported data-view columns.

Changed all usage of `TableColumn` (virtualized table type) in the context of DataView to the correct type

Simply inline the bodge into `ConsoleDataViewColumn` instead because `useConsoleDataViewData` handles the transformation from the custom type to `DataViewTh`

sortFunction appeared to have been set as internal state of dataViewColumns, while actual consumers would use `sort`. This caused some issues as when tightening up the types, `sort` was not accepted as a valid property.

Had to append `as const` to props.modifier of the columns so that TypeScript would narrow it down to `'nowrap'` instead of `string`.
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Pipeline controller notification
This repo is configured to use the pipeline controller. Second-stage tests will be triggered either automatically or after lgtm label is added, depending on the repository configuration. The pipeline controller will automatically detect which contexts are required and will utilize /test Prow commands to trigger the second stage.

For optional jobs, comment /test ? to see a list of all defined jobs. To trigger manually all jobs from second stage use /pipeline required command.

This repository is configured in: LGTM mode

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Aug 13, 2026
@openshift-ci-robot

openshift-ci-robot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

@logonoff: This pull request references CONSOLE-5040 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the story to target the "5.0.0" version, but no target version was set.

Details

In response to this:

Analysis / Root cause:

TableColumn refers to virtualized table and not DataView, so the types were tangled up I think

Solution description:

Changed all usage of TableColumn (virtualized table type) in the context of DataView to the correct type

Simply inline the bodge into ConsoleDataViewColumn instead because useConsoleDataViewData handles the transformation from the custom type to DataViewTh

sortFunction appeared to have been set as internal state of dataViewColumns, while actual consumers would use sort. This caused some issues as when tightening up the types, sort was not accepted as a valid property.

Had to append as const to props.modifier of the columns so that TypeScript would narrow it down to 'nowrap' instead of string.

Test cases:

  • Sorting works the same as before

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci openshift-ci Bot added component/core Related to console core functionality component/helm Related to helm-plugin approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Aug 13, 2026
@coderabbitai

coderabbitai Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: openshift/coderabbit/.coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4aa133a6-cb02-4a74-9df5-7f5fbe929749

📥 Commits

Reviewing files that changed from the base of the PR and between 93260e2 and 40a08b8.

📒 Files selected for processing (50)
  • frontend/packages/console-app/src/components/data-view/ConsoleDataView.tsx
  • frontend/packages/console-app/src/components/data-view/useConsoleDataViewData.tsx
  • frontend/packages/console-app/src/components/nodes/NodesPage.tsx
  • frontend/packages/console-app/src/components/pdb/PDBList.tsx
  • frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot-class.tsx
  • frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot-content.tsx
  • frontend/packages/console-app/src/components/volume-snapshot/volume-snapshot.tsx
  • frontend/packages/console-dynamic-plugin-sdk/src/api/internal-types.ts
  • frontend/packages/console-dynamic-plugin-sdk/src/extensions/console-types.ts
  • frontend/packages/helm-plugin/src/components/details-page/history/HelmReleaseHistoryTableHelpers.tsx
  • frontend/packages/helm-plugin/src/components/details-page/resources/HelmReleaseResourcesHeader.tsx
  • frontend/packages/helm-plugin/src/components/forms/rollback/RevisionListHeader.tsx
  • frontend/packages/helm-plugin/src/components/list-page/HelmReleaseList.tsx
  • frontend/packages/helm-plugin/src/components/list-page/RepositoriesHeader.tsx
  • frontend/packages/operator-lifecycle-manager-v1/src/components/cluster-extension/ClusterExtensionListPage.tsx
  • frontend/public/components/RBAC/bindings.tsx
  • frontend/public/components/alert-manager.tsx
  • frontend/public/components/api-explorer.tsx
  • frontend/public/components/build-config.tsx
  • frontend/public/components/build.tsx
  • frontend/public/components/cluster-settings/cluster-operator.tsx
  • frontend/public/components/cluster-settings/related-objects.tsx
  • frontend/public/components/configmap.tsx
  • frontend/public/components/control-plane-machine-set.tsx
  • frontend/public/components/cron-job.tsx
  • frontend/public/components/custom-resource-definition.tsx
  • frontend/public/components/default-resource.tsx
  • frontend/public/components/factory/Table/active-columns-hook.ts
  • frontend/public/components/group.tsx
  • frontend/public/components/hpa.tsx
  • frontend/public/components/image-stream.tsx
  • frontend/public/components/job.tsx
  • frontend/public/components/limit-range.tsx
  • frontend/public/components/machine-autoscaler.tsx
  • frontend/public/components/machine-config-pool.tsx
  • frontend/public/components/machine-config.tsx
  • frontend/public/components/machine-health-check.tsx
  • frontend/public/components/machine-set.tsx
  • frontend/public/components/machine.tsx
  • frontend/public/components/monitoring/alertmanager/alertmanager-config.tsx
  • frontend/public/components/persistent-volume-claim.tsx
  • frontend/public/components/persistent-volume.tsx
  • frontend/public/components/pod-list.tsx
  • frontend/public/components/prometheus.tsx
  • frontend/public/components/secret.tsx
  • frontend/public/components/storage-class.tsx
  • frontend/public/components/template-instance.tsx
  • frontend/public/components/user.tsx
  • frontend/public/components/volume-attributes-class.tsx
  • frontend/public/components/workload-table.tsx
💤 Files with no reviewable changes (2)
  • frontend/packages/console-app/src/components/data-view/ConsoleDataView.tsx
  • frontend/packages/console-dynamic-plugin-sdk/src/extensions/console-types.ts

Walkthrough

The PR migrates table column definitions from TableColumn to ConsoleDataViewColumn, updates sorting and column contracts, and narrows PatternFly modifiers to literal types across console components.

Changes

ConsoleDataView column migration

Layer / File(s) Summary
Column contracts and data processing
frontend/packages/console-dynamic-plugin-sdk/src/api/internal-types.ts, frontend/packages/console-dynamic-plugin-sdk/src/extensions/console-types.ts, frontend/packages/console-app/src/components/data-view/*
The SDK defines the sort property and optional additional flag. The data-view hook accepts ConsoleDataViewColumn, preserves header props, and applies sorting and selection state through the new contract.
Console and plugin consumers
frontend/packages/console-app/src/components/{nodes,pdb,volume-snapshot}/..., frontend/packages/helm-plugin/src/..., frontend/packages/operator-lifecycle-manager-v1/src/...
Column hooks and memoized arrays now use ConsoleDataViewColumn. Existing column behavior remains unchanged.
Public component consumers
frontend/public/components/...
Public tables replace TableColumn with ConsoleDataViewColumn. nowrap modifiers use literal assertions where required by the new type.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Mergeability Score: ⚪ Minimal · up to 40a08

This PR updates DataView column typing and sorting-related usage without any identified merge-blocking correctness or production risk; it is merge-ready after normal checks and review.

Possibly related PRs

Suggested reviewers: rhamilto, vojtechszocs, sg00dwin

🚥 Pre-merge checks | ✅ 15
✅ Passed checks (15 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: separating TableColumn from ConsoleDataViewColumn.
Description check ✅ Passed The description explains the root cause, solution, and sorting test case; omitted non-critical sections are acceptable for this non-visual refactor.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Stable And Deterministic Test Names ✅ Passed The PR changes only TypeScript/DataView source files; the exact diff adds no test-like paths or Ginkgo It, Describe, Context, or When calls.
Test Structure And Quality ✅ Passed PASS: The PR changes only TypeScript/TSX files and adds no Ginkgo test files, It blocks, cluster operations, or Eventually/Consistently calls.
Microshift Test Compatibility ✅ Passed The PR changes only frontend TypeScript/TSX files and adds no Ginkgo e2e tests or It/Describe/Context/When blocks, so MicroShift compatibility rules do not apply.
Single Node Openshift (Sno) Test Compatibility ✅ Passed The patch changes only existing frontend TypeScript/TSX files; it adds no Go or test files, Ginkgo declarations, or multi-node assumptions.
Topology-Aware Scheduling Compatibility ✅ Passed The PR changes only frontend TypeScript/DataView and table type files; the parent diff contains no manifests, operators, controllers, or scheduling constraints covered by this check.
Ote Binary Stdout Contract ✅ Passed The PR changes only 47 TSX and 3 TypeScript files. The diff adds no process-level code or stdout writes such as fmt.Print, console.log, klog, or process.stdout.
Ipv6 And Disconnected Network Test Compatibility ✅ Passed The PR changes 50 existing frontend TypeScript/TSX files and adds no Ginkgo e2e test files or test declarations; no IPv4 or external-connectivity test assumption is introduced.
No-Weak-Crypto ✅ Passed The PR changes DataView types, sorting, and column modifiers only; added-line scans found no weak algorithms, crypto APIs, custom crypto, or secret comparisons.
Container-Privileges ✅ Passed The PR changes only TypeScript/TSX files; the added-line scans found no privileged, hostPID, hostNetwork, hostIPC, SYS_ADMIN, or allowPrivilegeEscalation settings.
No-Sensitive-Data-In-Logs ✅ Passed The PR diff adds no logging calls or logger arguments. Sensitive-term matches are type names only, and existing console.error calls remain unchanged.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@openshift-ci openshift-ci Bot added component/monitoring Related to monitoring component/olm Related to OLM component/sdk Related to console-plugin-sdk plugin-api-changed Categorizes a PR as containing plugin API changes labels Aug 13, 2026
title: string;
sortFunction?: string | ((filteredData: TData[], sortDirection: SortByDirection) => TData[]);
sort?: string | ((filteredData: TData[], sortDirection: SortByDirection) => TData[]);
additional?: boolean;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Prop from TableColumn that appears to be in active use

id: string;
title: string;
sortFunction?: string | ((filteredData: TData[], sortDirection: SortByDirection) => TData[]);
sort?: string | ((filteredData: TData[], sortDirection: SortByDirection) => TData[]);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Actual usage in tables use sort and not sortFunction

@logonoff

logonoff commented Aug 13, 2026

Copy link
Copy Markdown
Member Author

/label plugin-api-approved

changes are to internal-api only and the removal of property TableColumn has 0 api impact (nobody is using resizable dataview outside of console)

@openshift-ci openshift-ci Bot added the plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer label Aug 13, 2026
@logonoff

Copy link
Copy Markdown
Member Author

/label px-approved
/label docs-approved

@openshift-ci openshift-ci Bot added px-approved Signifies that Product Support has signed off on this PR docs-approved Signifies that Docs has signed off on this PR labels Aug 13, 2026
@logonoff

Copy link
Copy Markdown
Member Author

QA Verification Evidence

Details
Branch CONSOLE-5040-dataviewcol
Baseline main @ 14d949da3c
Candidate CONSOLE-5040-dataviewcol @ 40a08b89be
Verified 2026-08-13
Browser Playwright 1.62.1 / Chrome for Testing 151.0.7922.34 (playwright chromium v1234)
OS Darwin 25.6.0
Jira CONSOLE-5040

Verification Steps

# Route Action Status
number route action status
1 /k8s/ns/openshift-console/pods View pod list pass
2 /k8s/ns/openshift-console/pods?sortBy=Name&orderBy=desc Click Name column to sort descending pass
3 /k8s/cluster/nodes View nodes list pass
4 /k8s/cluster/nodes?sortBy=Status&orderBy=asc Click Status column to sort ascending pass
5 /k8s/ns/openshift-console/secrets View secrets list pass
6 /k8s/ns/openshift-console/configmaps View configmaps list pass
7 /k8s/cluster/storageclasses View storage classes list pass
8 /api-explorer View API explorer pass
Animated overview (click to expand)
Baseline Candidate
Step 1: description (status)
Baseline (main) Candidate (CONSOLE-5040-dataviewcol)
Step 2: Pods list page (pass)
Baseline (main) Candidate (CONSOLE-5040-dataviewcol)
Step 3: Pods sorted by Name desc (pass)
Baseline (main) Candidate (CONSOLE-5040-dataviewcol)
Step 4: Nodes list page (pass)
Baseline (main) Candidate (CONSOLE-5040-dataviewcol)
Step 5: Nodes sorted by Status (pass)
Baseline (main) Candidate (CONSOLE-5040-dataviewcol)
Step 6: Secrets list page (pass)
Baseline (main) Candidate (CONSOLE-5040-dataviewcol)
Step 7: ConfigMaps list page (pass)
Baseline (main) Candidate (CONSOLE-5040-dataviewcol)
Step 8: StorageClasses list page (pass)
Baseline (main) Candidate (CONSOLE-5040-dataviewcol)

Warning

This verification was performed by an AI agent. Results may contain false positives or miss
regressions that require human judgment. Always review the screenshots manually before approving.

Automated QA verification by Claude Code

@logonoff

Copy link
Copy Markdown
Member Author

/verified by claude

@openshift-ci-robot

Copy link
Copy Markdown
Contributor

@logonoff: This PR has been marked as verified by claude.

Details

In response to this:

/verified by claude

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the verified Signifies that the PR passed pre-merge verification criteria label Aug 13, 2026
@logonoff

Copy link
Copy Markdown
Member Author

/pipeline required

@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Scheduling tests matching the pipeline_run_if_changed or not excluded by pipeline_skip_if_only_changed parameters:
/test e2e-gcp-console
/test e2e-playwright

@TheRealJon TheRealJon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci Bot added the lgtm Indicates that a PR is ready to be merged. label Aug 13, 2026
@openshift-merge-bot

Copy link
Copy Markdown
Contributor

Tests from second stage were triggered manually. Pipeline can be controlled only manually, until HEAD changes. Use command to trigger second stage.

@openshift-ci

openshift-ci Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: logonoff, TheRealJon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@logonoff

Copy link
Copy Markdown
Member Author

/test backend frontend images okd-scos-images analyze

@logonoff

Copy link
Copy Markdown
Member Author

/test e2e-gcp-console

@openshift-ci

openshift-ci Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

@logonoff: all tests passed!

Full PR test history. Your PR dashboard.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

@openshift-merge-bot
openshift-merge-bot Bot merged commit 85e1584 into openshift:main Aug 14, 2026
11 checks passed
@logonoff
logonoff deleted the CONSOLE-5040-dataviewcol branch August 14, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality component/helm Related to helm-plugin component/monitoring Related to monitoring component/olm Related to OLM component/sdk Related to console-plugin-sdk docs-approved Signifies that Docs has signed off on this PR jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. lgtm Indicates that a PR is ready to be merged. plugin-api-approved Indicates a PR with plugin API changes has been approved by an API reviewer plugin-api-changed Categorizes a PR as containing plugin API changes px-approved Signifies that Product Support has signed off on this PR verified Signifies that the PR passed pre-merge verification criteria

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants