Skip to content

fix: resolve CI failures in TypeScript migration#47

Merged
eirikhaugstulen merged 1 commit into
eh/feat/rewrite-to-typescriptfrom
devin/1776115415-fix-ts-migration-ci
Apr 13, 2026
Merged

fix: resolve CI failures in TypeScript migration#47
eirikhaugstulen merged 1 commit into
eh/feat/rewrite-to-typescriptfrom
devin/1776115415-fix-ts-migration-ci

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Fixes CI failures from dhis2#1736


Description

This PR addresses all CI failures found in the TypeScript migration branch (eh/feat/rewrite-to-typescript):

Prettier formatting

  • Applied prettier formatting to 112+ migrated .tsx/.ts files and scripts/ts-check.js

ESLint errors

  • Removed unused eslint-disable directives in use-root-org-data.ts and transfer-option.tsx
  • Replaced Record<string, any> with proper typed alternatives in use-root-org-data.ts

Test fixes

  • dropdown-button.test.js: Updated modal import from .js to .tsx (file was renamed during migration)
  • simple-single-select-field.tsx: Restored missing labelId prop on Field component (was dropped during migration)
  • table-header-cell.test.js / table-data-cell.test.js: Updated colSpan/rowSpan assertions to expect Number() values (component now converts string to number)
  • organisation-unit-tree.test.js: Replaced obsolete prop-types validation tests with TypeScript-compatible render tests (prop-types no longer fire with TS interfaces)

Broken story imports

  • Fixed 35 simple-single-select story files importing from ../simple-single-select.js.tsx
  • Fixed checkbox story files importing from ./index.tsx./index.ts
  • Fixed divider story file importing from ./divider.js./divider.tsx

Known issues

  • None

Checklist

  • API docs are generated
  • Tests were added
  • Storybook demos were added

Screenshots

N/A - these are lint/test/formatting fixes only

Link to Devin session: https://app.devin.ai/sessions/75b6a28c77ad4d729c55d304516932ac
Requested by: @eirikhaugstulen

- Fix prettier formatting for all migrated .tsx/.ts files
- Fix ESLint errors: remove unused eslint-disable directives, replace any types
- Fix dropdown-button test: update modal import from .js to .tsx
- Fix simple-single-select-field: restore missing labelId prop on Field
- Fix table-header-cell/table-data-cell tests: expect Number() for colSpan/rowSpan
- Fix organisation-unit-tree tests: replace obsolete prop-types tests with TS-compatible tests
- Fix broken story imports: update .js/.tsx references to match renamed files
- Fix scripts/ts-check.js formatting

Co-Authored-By: Eirik <eirik.haugstulen@gmail.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

Prompt hidden (unlisted session)

@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@eirikhaugstulen eirikhaugstulen marked this pull request as ready for review April 13, 2026 21:41
@eirikhaugstulen eirikhaugstulen merged commit 17340be into eh/feat/rewrite-to-typescript Apr 13, 2026
@eirikhaugstulen eirikhaugstulen deleted the devin/1776115415-fix-ts-migration-ci branch April 13, 2026 21:42
Copy link
Copy Markdown
Author

@devin-ai-integration devin-ai-integration Bot left a comment

Choose a reason for hiding this comment

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

Devin Review found 2 potential issues.

View 4 additional findings in Devin Review.

Open in Devin Review

disabled={disabled}
required={required}
name={name}
labelId={labelId}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🔴 SimpleSingleSelectField drops name prop from Field, breaking label's htmlFor attribute

The change on line 90 replaces name={name} with labelId={labelId} when rendering the <Field> component. While this correctly adds an id to the <label> element (enabling aria-labelledby on the select), it removes the name prop that Field uses to set htmlFor on the label (components/field/src/field/field.tsx:54). Without htmlFor, clicking the label no longer focuses the associated select input, which is an accessibility regression. Both name={name} and labelId={labelId} should be passed to Field.

Suggested change
labelId={labelId}
labelId={labelId}
name={name}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

}: FieldGroupProps) => (
<FieldSet {...({ classname: className } as Record<string, unknown>)} dataTest={dataTest}>
<FieldSet
{...({ classname: className } as Record<string, unknown>)}
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

🔴 FieldGroup passes classname (lowercase) instead of className to FieldSet, so CSS class is never applied

The spread object uses classname (lowercase 'n') instead of className (camelCase): { classname: className }. Since React prop names are case-sensitive, this results in an unrecognized DOM attribute classname being passed instead of the standard className. The className prop value provided to FieldGroup is silently discarded and never applied to the <FieldSet> element. This is a pre-existing bug that is visible in the reformatted lines.

Suggested change
{...({ classname: className } as Record<string, unknown>)}
{...({ className: className } as Record<string, unknown>)}
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

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.

1 participant