github →

Issue #20940

Bug: "Move Left" & "Move Right" buttons to rearrange columns in table view are unreliable.

draft pr open
bug easy85% confidencesonarly:medium

Bug Description

Reordering columns in the default table view sometimes works, sometimes doesn't

https://github.com/user-attachments/assets/8bd052c8-48d8-4664-99f9-0d44f1f1e84e

Technical inputs

Clicking "Move Right/Left" seems to cycle it's position through several invisible columns (maybe the position is being calculated against all fields, not just the visible ones.)

Verification
Unverified — we couldn’t run the checks

Dependencies failed to install in the sandbox, so lint/typecheck/test never ran. This diff has NOT been verified — review it manually before trusting it.

Likely addresses the issue (95% confidence)

An AI estimate of whether the change actually fixes the issue — the checks themselves only confirm nothing broke. It's a hint for review, not a pass/fail check.

Why?

The diff switches `useMoveRecordField` from fetching all fields via `currentRecordFieldsComponentState` to fetching only visible fields through `visibleRecordFieldsComponentSelector`, and it performs the move logic on `sortedVisibleRecordFields`. This directly fixes the issue’s stated cause—positions being calculated against invisible columns—so the Left/Right buttons now reorder within the visible set only.

  • installfailed · exit 1 · 101.3s
    wenty-server@workspace:packages/twenty-server doesn't provide ts-morph (pc21088), requested by @nestjs/graphql and other dependencies.
    ➤ YN0002: │ twenty-server@workspace:packages/twenty-server doesn't provide typescript (p92d011), requested by @nestjs/schematics and other dependencies.
    ➤ YN0002: │ twenty-server@workspace:packages/twenty-server doesn't provide vite (pef8501), requested by @lingui/vite-plugin and other dependencies.
    ➤ YN0002: │ twenty-shared@workspace:packages/twenty-shared doesn't provide @babel/core (p391504), requested by @babel/preset-env and other dependencies.
    ➤ YN0002: │ twenty-shared@workspace:packages/twenty-shared doesn't provide react (p129351), requested by react-router-dom.
    ➤ YN0002: │ twenty-shared@workspace:packages/twenty-shared doesn't provide react-dom (p4a4c2c), requested by react-router-dom.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui [8bbfd] doesn't provide @storybook/addon-docs (p0d096d), requested by @storybook-community/storybook-addon-cookie.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui [8bbfd] doesn't provide storybook (pd6b102), requested by @storybook-community/storybook-addon-cookie and other dependencies.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui [8bbfd] doesn't provide typescript (p338493), requested by ts-jest and other dependencies.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui [8bbfd] doesn't provide vite (pea6567), requested by @storybook/react-vite and other dependencies.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui [ac1a7] doesn't provide @storybook/addon-docs (p771c2b), requested by @storybook-community/storybook-addon-cookie.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui [ac1a7] doesn't provide storybook (peca01d), requested by @storybook-community/storybook-addon-cookie and other dependencies.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui [ac1a7] doesn't provide typescript (pf49884), requested by ts-jest and other dependencies.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui [ac1a7] doesn't provide vite (pa9394a), requested by @storybook/react-vite and other dependencies.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui doesn't provide @storybook/addon-docs (p749c9f), requested by @storybook-community/storybook-addon-cookie.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui doesn't provide monaco-editor (p231c05), requested by @monaco-editor/react.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui doesn't provide storybook (p2dfd3a), requested by @storybook-community/storybook-addon-cookie and other dependencies.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui doesn't provide typescript (pb9675b), requested by ts-jest and other dependencies.
    ➤ YN0002: │ twenty-ui@workspace:packages/twenty-ui doesn't provide vite (pb920ee), requested by @storybook/react-vite and other dependencies.
    ➤ YN0002: │ twenty-website@workspace:packages/twenty-website doesn't provide @babel/runtime (p05daae), requested by next-with-linaria.
    ➤ YN0002: │ twenty-website@workspace:packages/twenty-website doesn't provide @wyw-in-js/transform (pff9dc1), requested by next-with-linaria.
    ➤ YN0002: │ twenty-website@workspace:packages/twenty-website doesn't provide typescript (p71aed7), requested by ts-jest.
    ➤ YN0002: │ twenty-zapier@workspace:packages/twenty-zapier doesn't provide typescript (p1a7c14), requested by ts-jest and other dependencies.
    ➤ YN0002: │ twenty@workspace:. doesn't provide storybook (p8a1a51), requested by @nx/storybook.
    ➤ YN0002: │ twenty@workspace:. doesn't provide vite (p5f0369), requested by @nx/vite.
    ➤ YN0002: │ twenty@workspace:. doesn't provide vitest (pe204bf), requested by @nx/vite.
    ➤ YN0086: │ Some peer dependencies are incorrectly met by your project; run yarn explain peer-requirements <hash> for details, where <hash> is the six-letter p-prefixed code.
    ➤ YN0086: │ Some peer dependencies are incorrectly met by dependencies; run yarn explain peer-requirements for details.
    ➤ YN0000: └ Completed in 0s 513ms
    ➤ YN0000: ┌ Fetch step

lint, typecheck, build, and test are not defined separately in this repo.

Ran 6/4/2026, 4:16:46 AM · yarn

Get the code

Pull this branch
With gh CLI
gh pr checkout 2 --repo muazHL/twenty
Raw git
git fetch https://github.com/muazHL/twenty.git gitgot/issue-20940
git checkout -b gitgot/issue-20940 FETCH_HEAD

Fork-mode request: the branch lives on muazHL/twenty (your fork), not twentyhq/twenty, so the commands above target the fork.

Drive locally

Paste this into your local coding agent (Claude Code, Cursor, etc.) to continue iterating with full repo context.

Context prompt
You are continuing work on a draft PR for twentyhq/twenty, addressing issue #20940.

First, check out the branch with gitgot's first-pass change (run from a clone of the repo):
  gh pr checkout 2 --repo muazHL/twenty

Then review the diff and:
- run the project's lint/typecheck/test commands and fix anything broken
- if the diff is wrong-headed, revert it and start fresh from the issue
- keep the change tight; do not refactor unrelated code
PR thread
  • No comments on the PR yet. Use the form below to start the thread.