Skip to content

refactor(forms): migrate Input to TS - #7762

Merged
talissoncosta merged 28 commits into
mainfrom
feat/input-ts-7758
Jul 24, 2026
Merged

refactor(forms): migrate Input to TS#7762
talissoncosta merged 28 commits into
mainfrom
feat/input-ts-7758

Conversation

@talissoncosta

Copy link
Copy Markdown
Contributor

Thanks for submitting a PR! Please check the boxes below:

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Contributes to #7758

Migrates the Input base component (behind ~94 call sites) from Input.js to a typed function component, Input.tsx. Stacked on #7745 (base branch feat/label-variant-key-ui) — will retarget to main once that merges.

  • Typed FC. React 19 ref-as-prop + useImperativeHandle exposing the E2E-guarded focus() (no-op under E2E, matching the original).
  • Drops the unused react-maskedinput dependency and the checkbox/radio delegation (the one caller renders <Checkbox> directly).
  • Unifies the password/search icon widths via one size map; the invalid password icon uses the colorIconDanger token instead of a hardcoded hex.
  • Updates ~17 call sites: removes bogus DOM InputEvent/KeyboardEvent annotations on Input handlers (React infers the synthetic events) and fixes a few loose usages typing surfaced (JSX in the string title, readonlyreadOnly, non-boolean isValid, a boolean value).

Out of scope (follow-ups): the wrapper-less redesign with PasswordInput/SearchInput, an Input variant API, the autocompleteautoComplete alias removal, and the repo-wide InputEvent-annotation cleanup.

How did you test this code?

  • npm run typecheck: 0 new errors vs the base branch (the typed Input removed one pre-existing error; 976 → 975).
  • npm run lint: clean on all changed files.
  • Opened as draft to validate the CI lint gate, typecheck and E2E. Manual in-app verification (light/dark, password reveal, search, underline variant) still pending.

@talissoncosta talissoncosta added the front-end Issue related to the React Front End Dashboard label Jun 11, 2026
@vercel

vercel Bot commented Jun 11, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Jul 15, 2026 5:42pm
flagsmith-frontend-staging Ready Ready Preview, Comment Jul 15, 2026 5:42pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Jul 15, 2026 5:42pm

Request Review

@talissoncosta talissoncosta changed the title Migrate Input to TS refactor(forms): migrate Input to TS Jun 11, 2026
@talissoncosta
talissoncosta marked this pull request as ready for review June 11, 2026 17:53
@talissoncosta
talissoncosta requested a review from a team as a code owner June 11, 2026 17:53
@talissoncosta
talissoncosta requested review from kyle-ssg and removed request for a team June 11, 2026 17:53
@talissoncosta
talissoncosta removed the request for review from kyle-ssg June 11, 2026 17:54
@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-e2e:pr-7762 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api-test:pr-7762 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-frontend:pr-7762 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-api:pr-7762 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7762 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7762 Finished ✅ Results

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  35.5 seconds
commit  34e9558
info  🔄 Run: #17442 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.6 seconds
commit  34e9558
info  🔄 Run: #17442 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  1 minute
commit  34e9558
info  🔄 Run: #17442 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  55.5 seconds
commit  34e9558
info  🔄 Run: #17442 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  45.1 seconds
commit  b6ae7f9
info  🔄 Run: #17514 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  59.1 seconds
commit  b6ae7f9
info  🔄 Run: #17514 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.7 seconds
commit  b6ae7f9
info  🔄 Run: #17514 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

failed  1 failed
passed  1 passed

Details

stats  2 tests across 2 suites
duration  21.2 seconds
commit  b6ae7f9
info  📦 Artifacts: View test results and HTML report
🔄 Run: #17514 (attempt 1)

Failed tests

firefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise

### Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 4 suites
duration  38.3 seconds
commit  b6ae7f9
info  🔄 Run: #17514 (attempt 2)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  39.6 seconds
commit  484f4cf
info  🔄 Run: #17515 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  11.1 seconds
commit  484f4cf
info  🔄 Run: #17515 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  46.4 seconds
commit  484f4cf
info  🔄 Run: #17515 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  31.6 seconds
commit  484f4cf
info  🔄 Run: #17515 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.2 seconds
commit  73b3787
info  🔄 Run: #17516 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.3 seconds
commit  73b3787
info  🔄 Run: #17516 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  56.7 seconds
commit  73b3787
info  🔄 Run: #17516 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  58.9 seconds
commit  73b3787
info  🔄 Run: #17516 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.5 seconds
commit  b6e5271
info  🔄 Run: #17518 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.8 seconds
commit  b6e5271
info  🔄 Run: #17518 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  58.9 seconds
commit  b6e5271
info  🔄 Run: #17518 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  39.5 seconds
commit  b6e5271
info  🔄 Run: #17518 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.6 seconds
commit  7581761
info  🔄 Run: #17519 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  43.8 seconds
commit  7581761
info  🔄 Run: #17519 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  46.9 seconds
commit  7581761
info  🔄 Run: #17519 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  1 minute, 2 seconds
commit  7581761
info  🔄 Run: #17519 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  40.9 seconds
commit  1838b31
info  🔄 Run: #17520 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  44.2 seconds
commit  1838b31
info  🔄 Run: #17520 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  55.1 seconds
commit  1838b31
info  🔄 Run: #17520 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  1 minute, 6 seconds
commit  1838b31
info  🔄 Run: #17520 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  17.5 seconds
commit  d1584f6
info  🔄 Run: #18209 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  34.5 seconds
commit  d1584f6
info  🔄 Run: #18209 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

failed  3 failed

Details

stats  3 tests across 3 suites
duration  23 seconds
commit  8a4c307
info  📦 Artifacts: View test results and HTML report
🔄 Run: #18208 (attempt 1)

Failed tests

firefox › tests/change-request-test.pw.ts › Change Request Tests › Change requests can be created, approved, and published with four-eyes approval @enterprise
firefox › tests/roles-test.pw.ts › Roles Tests › Roles can be created with project and environment permissions @enterprise
firefox › tests/sso-test.pw.ts › SCIM Tests › SCIM configuration can be created, regenerated, and deleted @enterprise

### Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  11.1 seconds
commit  d1584f6
info  🔄 Run: #18209 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  59.8 seconds
commit  d1584f6
info  🔄 Run: #18209 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  41.9 seconds
commit  0989d36
info  🔄 Run: #18210 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  5 passed

Details

stats  5 tests across 3 suites
duration  40.8 seconds
commit  0989d36
info  🔄 Run: #18210 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  6 passed

Details

stats  6 tests across 4 suites
duration  36.5 seconds
commit  0989d36
info  🔄 Run: #18210 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  53.7 seconds
commit  0989d36
info  🔄 Run: #18210 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  37.1 seconds
commit  d745e12
info  🔄 Run: #18211 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  44.6 seconds
commit  d745e12
info  🔄 Run: #18211 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  38.6 seconds
commit  d745e12
info  🔄 Run: #18211 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  7 passed

Details

stats  7 tests across 5 suites
duration  43 seconds
commit  d745e12
info  🔄 Run: #18211 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  44.4 seconds
commit  e4ab1bf
info  🔄 Run: #18212 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 2 suites
duration  36.1 seconds
commit  e4ab1bf
info  🔄 Run: #18212 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  7 passed

Details

stats  7 tests across 5 suites
duration  11.7 seconds
commit  e4ab1bf
info  🔄 Run: #18212 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  12.8 seconds
commit  e4ab1bf
info  🔄 Run: #18212 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  33.7 seconds
commit  be9263d
info  🔄 Run: #18214 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  39.5 seconds
commit  be9263d
info  🔄 Run: #18214 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  32.8 seconds
commit  be9263d
info  🔄 Run: #18214 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  11.9 seconds
commit  be9263d
info  🔄 Run: #18214 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  34.1 seconds
commit  fc62109
info  🔄 Run: #18243 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  19.4 seconds
commit  fc62109
info  🔄 Run: #18243 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  11.9 seconds
commit  fc62109
info  🔄 Run: #18243 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  1 minute, 8 seconds
commit  fc62109
info  🔄 Run: #18243 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 2 suites
duration  11.7 seconds
commit  be9263d
info  🔄 Run: #18249 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  12 seconds
commit  be9263d
info  🔄 Run: #18249 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  5 passed

Details

stats  5 tests across 3 suites
duration  43.3 seconds
commit  be9263d
info  🔄 Run: #18249 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  6 passed

Details

stats  6 tests across 4 suites
duration  54 seconds
commit  be9263d
info  🔄 Run: #18249 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  3 passed

Details

stats  3 tests across 3 suites
duration  40.3 seconds
commit  bfad4da
info  🔄 Run: #18310 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  11.9 seconds
commit  bfad4da
info  🔄 Run: #18310 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  6 passed

Details

stats  6 tests across 4 suites
duration  34 seconds
commit  bfad4da
info  🔄 Run: #18310 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

failed  1 failed
passed  2 passed

Details

stats  3 tests across 3 suites
duration  57 seconds
commit  bfad4da
info  📦 Artifacts: View test results and HTML report
🔄 Run: #18310 (attempt 1)

Failed tests

firefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise

### Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  6.9 seconds
commit  6a5ff39
info  🔄 Run: #18311 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  11.2 seconds
commit  6a5ff39
info  🔄 Run: #18311 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  3 passed

Details

stats  3 tests across 2 suites
duration  12.8 seconds
commit  6a5ff39
info  🔄 Run: #18311 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  6 passed

Details

stats  6 tests across 4 suites
duration  12.7 seconds
commit  6a5ff39
info  🔄 Run: #18311 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  40.8 seconds
commit  5f0b8ea
info  🔄 Run: #18312 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  41.5 seconds
commit  5f0b8ea
info  🔄 Run: #18312 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  19.3 seconds
commit  5f0b8ea
info  🔄 Run: #18312 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  2 passed

Details

stats  2 tests across 2 suites
duration  55.8 seconds
commit  5f0b8ea
info  🔄 Run: #18312 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  43.7 seconds
commit  e852609
info  🔄 Run: #18313 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  4 passed

Details

stats  4 tests across 3 suites
duration  44.1 seconds
commit  e852609
info  🔄 Run: #18313 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  44.2 seconds
commit  e852609
info  🔄 Run: #18313 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  53.1 seconds
commit  e852609
info  🔄 Run: #18313 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  34.1 seconds
commit  bbea84d
info  🔄 Run: #18315 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  6 passed

Details

stats  6 tests across 4 suites
duration  36.6 seconds
commit  bbea84d
info  🔄 Run: #18315 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  55.4 seconds
commit  bbea84d
info  🔄 Run: #18315 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

failed  1 failed
passed  1 passed

Details

stats  2 tests across 2 suites
duration  58.3 seconds
commit  bbea84d
info  📦 Artifacts: View test results and HTML report
🔄 Run: #18315 (attempt 1)

Failed tests

firefox › tests/environment-permission-test.pw.ts › Environment Permission Tests › Environment-level permissions control access to features, identities, and segments @enterprise

### Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  5 passed

Details

stats  5 tests across 4 suites
duration  37.7 seconds
commit  bbea84d
info  🔄 Run: #18315 (attempt 2)

@github-actions

github-actions Bot commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Visual Regression

19 screenshots compared. See report for details.
View full report

talissoncosta and others added 3 commits July 13, 2026 15:12
Mirror the login form's actual rightComponent usage (Forgot password link next
to the Password field) instead of a made-up API key example.
…htComponent

The login form placed 'Forgot password' in the password field's label row via
InputGroup's rightComponent escape hatch — an uncommon pattern. Move it to a
right-aligned link below the field (the conventional placement). HomePage was
the sole rightComponent consumer, so remove the prop from InputGroup entirely
and its Storybook story.

Behaviour: same link/handler, just relocated. No E2E selects it by position.
The Input.tsx migration removed the last MaskedInput usage; drop the
dependency (and its orphaned inputmask-core transitive) from package.json
and the lockfile. Its React ^16 peer range is also incompatible with our
React 19.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 11


ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 02e16119-3f7f-441d-832f-96a718c81729

📥 Commits

Reviewing files that changed from the base of the PR and between 26a1e29 and 8a4c307.

⛔ Files ignored due to path filters (1)
  • frontend/package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (44)
  • frontend/documentation/components/FieldError.stories.tsx
  • frontend/documentation/components/FieldLabel.stories.tsx
  • frontend/documentation/components/InputGroup.stories.tsx
  • frontend/documentation/components/LabelWithTooltip.stories.tsx
  • frontend/package.json
  • frontend/web/components/BreadcrumbSeparator.tsx
  • frontend/web/components/ChangeRequestsSetting.tsx
  • frontend/web/components/GroupSelect.tsx
  • frontend/web/components/PermissionsTabs.tsx
  • frontend/web/components/RegexTester.tsx
  • frontend/web/components/RolesSelect.tsx
  • frontend/web/components/base/LabelWithTooltip.tsx
  • frontend/web/components/base/forms/FieldError.tsx
  • frontend/web/components/base/forms/FieldLabel.tsx
  • frontend/web/components/base/forms/Input.js
  • frontend/web/components/base/forms/Input.tsx
  • frontend/web/components/base/forms/InputGroup.js
  • frontend/web/components/base/forms/InputGroup.tsx
  • frontend/web/components/import-export/ImportPage.tsx
  • frontend/web/components/inspect-permissions/InspectPermissions.tsx
  • frontend/web/components/inspect-permissions/ProjectPermissions.tsx
  • frontend/web/components/metrics/EnvironmentMetric.tsx
  • frontend/web/components/modals/ChangeEmailAddress.tsx
  • frontend/web/components/modals/ConfirmDeleteAccount.tsx
  • frontend/web/components/modals/CreateEditIntegrationModal.tsx
  • frontend/web/components/modals/CreateGroup.tsx
  • frontend/web/components/modals/CreateSegmentRulesTabForm.tsx
  • frontend/web/components/modals/create-feature/components/FeatureNameInput.tsx
  • frontend/web/components/onboarding/OnboardingAccountForm.tsx
  • frontend/web/components/pages/AccountSettingsPage.tsx
  • frontend/web/components/pages/GitHubSetupPage.tsx
  • frontend/web/components/pages/HomePage.tsx
  • frontend/web/components/pages/UsersAndPermissionsPage.tsx
  • frontend/web/components/pages/organisation-settings/tabs/sso/saml/modals/CreateSAML.tsx
  • frontend/web/components/pages/sdk-keys/SDKKeysPage.tsx
  • frontend/web/components/segments/Rule/components/RuleConditionValueInput.tsx
  • frontend/web/components/tables/TableFilterOptions.tsx
  • frontend/web/components/tables/TableSearchFilter.tsx
  • frontend/web/components/tables/TableTagFilter.tsx
  • frontend/web/components/tables/TableValueFilter.tsx
  • frontend/web/components/tags/AddEditTags.tsx
  • frontend/web/components/tags/CreateEditTag.tsx
  • frontend/web/styles/components/_input.scss
  • frontend/web/styles/project/_forms.scss
💤 Files with no reviewable changes (15)
  • frontend/web/components/base/LabelWithTooltip.tsx
  • frontend/web/components/pages/sdk-keys/SDKKeysPage.tsx
  • frontend/web/components/base/forms/InputGroup.js
  • frontend/documentation/components/LabelWithTooltip.stories.tsx
  • frontend/web/components/modals/create-feature/components/FeatureNameInput.tsx
  • frontend/package.json
  • frontend/web/components/onboarding/OnboardingAccountForm.tsx
  • frontend/web/components/pages/organisation-settings/tabs/sso/saml/modals/CreateSAML.tsx
  • frontend/web/components/RegexTester.tsx
  • frontend/web/components/modals/ChangeEmailAddress.tsx
  • frontend/web/components/tags/CreateEditTag.tsx
  • frontend/web/components/modals/ConfirmDeleteAccount.tsx
  • frontend/web/components/modals/CreateGroup.tsx
  • frontend/web/components/pages/AccountSettingsPage.tsx
  • frontend/web/components/base/forms/Input.js

Comment thread frontend/documentation/components/InputGroup.stories.tsx Outdated
Comment thread frontend/web/components/base/forms/FieldError.tsx
Comment thread frontend/web/components/base/forms/FieldLabel.tsx
Comment thread frontend/web/components/base/forms/Input.tsx
Comment thread frontend/web/components/base/forms/Input.tsx Outdated
Comment thread frontend/web/components/base/forms/InputGroup.tsx Outdated
Comment thread frontend/web/components/base/forms/InputGroup.tsx
Comment thread frontend/web/components/base/forms/InputGroup.tsx
Comment thread frontend/web/styles/components/_input.scss
Comment thread frontend/web/styles/components/_input.scss Outdated
MCPIntegration still imported the removed LabelWithTooltip, breaking the
frontend bundle build. Replace it with the new FieldLabel, which owns the
label + info-tooltip pattern.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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: ASSERTIVE

Plan: Pro Plus

Run ID: 013fbede-9e8e-4445-9ec4-ba51c3fe6d0c

📥 Commits

Reviewing files that changed from the base of the PR and between 8a4c307 and d1584f6.

📒 Files selected for processing (1)
  • frontend/web/components/integrations/MCPIntegration.tsx

Comment thread frontend/web/components/integrations/MCPIntegration.tsx
- Input: password reveal toggle is now a <button> with aria-label and
  aria-pressed (was a non-focusable span, unreachable by keyboard).
- InputGroup: extract the legacy isValid union into a named
  InputGroupValidity type.
- _input.scss: dark textarea uses --color-border-default so the border is
  visible (was --color-surface-default, blending into the fill).
- _input.scss / _forms.scss: satisfy stylelint empty-line-before-comment.
- InputGroup story: type meta against the component.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
frontend/web/components/base/forms/Input.tsx (1)

53-54: 📐 Maintainability & Code Quality | 🟠 Major | 🏗️ Heavy lift

New form components not organised per the one-folder-per-component guideline. Both Input and InputGroup are new components added flat into frontend/web/components/base/forms/ rather than each living in its own folder with a barrel index.ts and co-located ComponentName.scss/subcomponents.

  • frontend/web/components/base/forms/Input.tsx#L53-L54: move into forms/Input/Input.tsx with a forms/Input/index.ts barrel and update imports to reference the folder path.
  • frontend/web/components/base/forms/InputGroup.tsx#L62-L62: move into forms/InputGroup/InputGroup.tsx with a forms/InputGroup/index.ts barrel and update imports to reference the folder path.

As per coding guidelines, frontend/web/components/**/*.{ts,tsx,scss} requires "Each new component must live in its own folder with a barrel index.ts, a ComponentName/ComponentName.tsx file, co-located ComponentName.scss... and imports should use the component folder path rather than the inner file."

Source: Coding guidelines

frontend/web/components/base/forms/InputGroup.tsx (2)

54-57: 📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Extract error's inline union into a named type.

error?: string | string[] is an inline union that should follow the same treatment already applied to isValid (InputGroupValidity).

♻️ Proposed fix
+type InputGroupError = string | string[]
+
 inputProps?: Record<string, any> & {
-    error?: string | string[]
+    error?: InputGroupError
     name?: string
   }
As per coding guidelines, `frontend/**/*.{ts,tsx}` must extract inline union types into named types (for example, use `type Status = 'A' | 'B'` instead of an inline union).

Source: Coding guidelines


129-134: 🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Custom component still bypasses label/error wiring.

The component branch renders the consumer-supplied node as-is, without id, aria-invalid, or aria-describedby. When id is generated internally (useId()), the rendered label/error cannot be associated with the custom control. This was flagged previously and remains unresolved.

♻️ Duplicate comments (2)
frontend/web/components/base/forms/Input.tsx (1)

76-89: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Sync type with typeProp, still unresolved.

useState(typeProp) only captures the initial value; subsequent changes to the type prop (e.g. dynamic type switching by a consumer) will not update the rendered <input>. This was already flagged in a previous review round and remains unfixed.

Deriving the type instead of storing it removes the desync entirely and simplifies the toggle logic:

🐛 Proposed fix
-  const [type, setType] = useState(typeProp)
+  const [revealed, setRevealed] = useState(false)
+  const type = typeProp === 'password' && revealed ? 'text' : typeProp

Then update the toggle button:

-          aria-label={type === 'password' ? 'Show password' : 'Hide password'}
-          aria-pressed={type === 'text'}
+          aria-label={revealed ? 'Hide password' : 'Show password'}
+          aria-pressed={revealed}
...
-          onClick={() => setType(type === 'password' ? 'text' : 'password')}
+          onClick={() => setRevealed((r) => !r)}

and the icon name:

-            name={type === 'password' ? 'eye' : 'eye-off'}
+            name={revealed ? 'eye-off' : 'eye'}
frontend/web/components/base/forms/InputGroup.tsx (1)

135-156: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Internal ref is still overridden by the consumer-prop spread.

ref is set before {...restInputProps} for both the textarea and Input branches. If inputProps contains a ref key, it silently overwrites the internal callback ref, breaking InputGroup.focus(). This exact issue was flagged in a previous review round and remains unfixed.

🐛 Proposed fix
 <textarea
-  ref={(c) => {
-    inputRef.current = c
-  }}
   {...(restInputProps as React.TextareaHTMLAttributes<HTMLTextAreaElement>)}
+  ref={(c) => {
+    inputRef.current = c
+  }}
   disabled={disabled}
 <Input
-  ref={(c) => {
-    inputRef.current = c
-  }}
   {...restInputProps}
+  ref={(c) => {
+    inputRef.current = c
+  }}
   isValid={

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: e3b8fde5-bbfb-420a-8ee3-4c82895b51be

📥 Commits

Reviewing files that changed from the base of the PR and between d1584f6 and 0989d36.

📒 Files selected for processing (5)
  • frontend/documentation/components/InputGroup.stories.tsx
  • frontend/web/components/base/forms/Input.tsx
  • frontend/web/components/base/forms/InputGroup.tsx
  • frontend/web/styles/components/_input.scss
  • frontend/web/styles/project/_forms.scss

talissoncosta and others added 2 commits July 13, 2026 16:06
Switching the reveal toggle to a <button> reset its color, so the icon's
currentColor fill went dark and vanished on the dark input surface. Give
the Icon an explicit theme-aware fill (colorIconDefault) so it stays
visible in both themes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
.input-icon-right:hover still used the raw $primary (purple-600, fixed
across themes). Use --color-icon-action so the hover follows the theme —
purple-400 in dark for better contrast — completing the input colour
tokenisation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
frontend/web/styles/components/_input.scss (1)

122-129: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Use the dedicated disabled icon token.

The disabled right-side icon currently uses --color-text-disabled, while frontend/web/styles/_tokens.scss defines --color-icon-disabled. The values currently match, but separate theme values would not propagate correctly.

Suggested fix
       & + .input-icon-right {
         path {
-          fill: var(--color-text-disabled);
+          fill: var(--color-icon-disabled);
           opacity: $btn-disabled-opacity;
         }
       }

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 0b65858f-9718-4fb6-a07d-e4c69b8e6bd8

📥 Commits

Reviewing files that changed from the base of the PR and between d745e12 and e4ab1bf.

📒 Files selected for processing (1)
  • frontend/web/styles/components/_input.scss

label and .label-switch used $body-color (light) with separate .dark
overrides ($white / $text-icon-light). Collapse both into
var(--color-text-default) — same resolved values in each theme — and
delete the two .dark blocks.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@talissoncosta

Copy link
Copy Markdown
Contributor Author

Hey @Zaimwa9, now it is ready for review.

@Zaimwa9 Zaimwa9 left a comment

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.

A few comments, main ones to fix would be the default size of the search icon and mostly the forgot password positioning, otherwise feels good

Comment thread frontend/web/components/base/forms/InputGroup.tsx Outdated
Comment thread frontend/web/components/base/forms/Input.js
Comment thread frontend/web/components/base/forms/Input.tsx Outdated
Comment thread frontend/web/components/pages/HomePage.tsx
talissoncosta and others added 6 commits July 15, 2026 14:13
With FieldLabel the tooltip triggers from the info icon, so hiding the icon
just removed the only trigger — hideTooltipIcon had become a confusing alias
for "no tooltip". Drop it; the single caller (FeatureValueTab) now expresses
the same intent by conditionally passing `tooltip`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace the inline nested ternary with getValueTooltip(hasVariations, isEdit)
so the JSX reads cleanly and the logic is in one named place.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The unified iconWidthBySize map had default: undefined, so default-size
search/password icons fell back to the icon's intrinsic 22px — the search
icon lost its previous explicit 20px (spotted in review). Give the map a
real default of 20 and look it up for the no-size case too.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
It was typed string, but every caller passes a boolean toggle (HomePage
enableAutoComplete: true) and the `autocomplete` prop already covers explicit
tokens. Type it boolean and resolve it to 'on'/'off' for the native attribute.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Input had three ways to set autocomplete: the native `autoComplete`, a
lowercase `autocomplete` alias, and an `enableAutoComplete` boolean resolved
to on/off. Drop the two custom props and let the native `autoComplete` string
flow through — also removes the resolver clobbering a caller's `autoComplete`.

Call sites: HomePage `enableAutoComplete: true` -> `autoComplete: 'on'`;
CreateEditIntegrationModal `autocomplete=` -> `autoComplete=`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread frontend/web/components/base/forms/Input.tsx
Comment thread frontend/web/components/base/forms/InputGroup.tsx
Comment thread frontend/web/styles/project/_forms.scss
Comment thread frontend/web/components/modals/CreateEditIntegrationModal.tsx

@Zaimwa9 Zaimwa9 left a comment

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.

Thanks for the changes!

@Zaimwa9 Zaimwa9 left a comment

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.

Good job! Thanks

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

Labels

front-end Issue related to the React Front End Dashboard refactor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate Input to TS

4 participants