Fix bug on Links, Array, Emails, Phones Field inputs#16603
Merged
Conversation
Contributor
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
...rc/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx
Outdated
Show resolved
Hide resolved
Contributor
There was a problem hiding this comment.
3 issues found across 11 files
Prompt for AI agents (all 3 issues)
Check if these issues are valid — if so, understand the root cause of each and fix them.
<file name="packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx">
<violation number="1" location="packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx:16">
P1: Do not import `console` from 'console' in frontend code. The Node.js 'console' module is not designed for browser environments. Remove this import and use the global `console` object (or better yet, remove the debug statements entirely).</violation>
<violation number="2" location="packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx:121">
P0: **Runtime error when `items` is empty.** `getItemValueAsString(0)` is now called unconditionally, but when `items` is empty, `items[0]` is `undefined` and accessing properties on it will throw. Move this back inside the useState initializer or add a guard.</violation>
</file>
<file name="packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/LinksFieldInput.tsx">
<violation number="1" location="packages/twenty-front/src/modules/object-record/record-field/ui/meta-types/input/components/LinksFieldInput.tsx:58">
P2: Potential stale closure: `draftValue` is captured at render time, but `onClickOutside` may be invoked later after user edits. The original `getLatestDraftValue(instanceId)` pattern ensured fresh state was read at invocation time. Consider using a ref to always access the latest value, or restore the `getLatestDraftValue` approach if it was removed from the hook.</violation>
</file>
Reply to cubic to teach it or ask questions. Re-run a review with @cubic-dev-ai review this PR
...rc/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx
Outdated
Show resolved
Hide resolved
...rc/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx
Outdated
Show resolved
Hide resolved
...nt/src/modules/object-record/record-field/ui/meta-types/input/components/LinksFieldInput.tsx
Outdated
Show resolved
Hide resolved
...rc/modules/object-record/record-field/ui/meta-types/input/components/MultiItemFieldInput.tsx
Show resolved
Hide resolved
|
Hey @charlesBochet! After you've done the QA of your Pull Request, you can mark it as done here. Thank you! |
NotYen
pushed a commit
to NotYen/twenty-ym
that referenced
this pull request
Dec 23, 2025
…entyhq#16603) - Added onEnter handler to field inputs - Added MULTI_ITEM_FIELD_INPUT_DROPDOWN_ID_PREFIX constant - Fixed dropdown click outside handling - Added PhoneCountryCodePickerDropdownId constant Original commit: 58c85e7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The following PR introduced several bugs: #16042
Enregistrement.de.l.ecran.2025-12-16.a.18.00.06.mov