Skip to content

fix: column sort in experiments table#1576

Open
shivoomiess wants to merge 9 commits into
developfrom
SWAP-5630-fix
Open

fix: column sort in experiments table#1576
shivoomiess wants to merge 9 commits into
developfrom
SWAP-5630-fix

Conversation

@shivoomiess

@shivoomiess shivoomiess commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

Description

This PR fixes the issue of column sorting not working properly in the Experiments Table.

Motivation and Context

The column sorting feature in the Experiments Table was not functioning as expected, leading to a less intuitive and potentially confusing user experience. This fix is necessary to ensure that users can sort data in a logical and predictable manner, improving the usability of the table.

Changes

  1. Debugging capabilities were added to React and the local backend to better facilitate future troubleshooting efforts.
  2. The backend's dev script was updated to include the --inspect flag, allowing for easier debugging.
  3. The ExperimentDataSource.ts file was updated to include a map of fields that can be sorted. This provides explicit control over which columns can have their sorting functionality enabled.
  4. The experiments.cy.ts e2e test file was updated to include tests for the sorting functionality of each column in the visit table. This ensures that our sorting feature works as expected in the future.

How Has This Been Tested?

Fixes Jira Issue

https://jira.ess.eu//browse/SWAP-5630

Depends On

Tests included/Docs Updated?

  • I have added tests to cover my changes.
  • All relevant doc has been updated

@shivoomiess shivoomiess requested a review from a team as a code owner June 15, 2026 13:24
@shivoomiess shivoomiess requested review from ChongJiaChua, jekabs-karklins and yoganandaness and removed request for a team and ChongJiaChua June 15, 2026 13:24
@shivoomiess shivoomiess self-assigned this Jun 15, 2026
@shivoomiess shivoomiess changed the title Fix: Column sorting not working Experiments Table fix: Column sorting not working Experiments Table Jun 15, 2026
@shivoomiess shivoomiess changed the title fix: Column sorting not working Experiments Table fix: column sorting not working in Experiments table Jun 15, 2026
@shivoomiess shivoomiess changed the title fix: column sorting not working in Experiments table fix: column sort in experiments table Jun 15, 2026
Comment thread apps/backend/package.json
"build": "npm run build:validation && npm run generate:uows && rm -rf ./build && tsc",
"postinstall": "npm run build:validation",
"dev": "docker compose up -d --remove-orphans && ts-node-dev -r tsconfig-paths/register --respawn -T ./index.ts",
"dev": "docker compose up -d --remove-orphans && ts-node-dev --inspect=9229 -r tsconfig-paths/register --respawn -T ./index.ts",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we need to update readme about this? @jekabs-karklins

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should not add it here, because we already have the "debug" script. Does that work for you @shivoomiess

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I think that runs a separate instance of the frontend dev server while reusing existing docker containers? Haven't tried using the debug script separately; we could:

  • either add a port number for the inspect in debug
  • or make the dev server debuggable (should be fine since we're already in dev?)

Comment thread apps/backend/src/datasources/postgres/ExperimentDataSource.ts Outdated
Comment thread apps/backend/src/datasources/postgres/ExperimentDataSource.ts Outdated
Comment thread apps/e2e/cypress/e2e/experiments.cy.ts
Comment thread apps/e2e/cypress/e2e/experiments.cy.ts Outdated
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.

3 participants