Skip to content

fix(dify-ui): improve picker type inference#38428

Merged
lyzno1 merged 2 commits into
mainfrom
codex/dify-ui-picker-type-inference
Jul 5, 2026
Merged

fix(dify-ui): improve picker type inference#38428
lyzno1 merged 2 commits into
mainfrom
codex/dify-ui-picker-type-inference

Conversation

@lyzno1

@lyzno1 lyzno1 commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

  • wrap the Dify UI Select root with Base UI generic props for type-safe value inference
  • tighten web Select consumers to use typed values instead of string coercion or truthy guards
  • align prompt/config/select option surfaces with explicit string, number, and enum value types

Verification

  • pnpm -C web type-check
  • pnpm -C packages/dify-ui type-check
  • pnpm -C web test app/components/share/text-generation/run-once/tests/index.spec.tsx app/components/app/configuration/debug/tests/chat-user-input.spec.tsx app/components/app/configuration/prompt-value-panel/tests/index.spec.tsx app/components/app/configuration/config-var/config-modal/tests/form-fields.spec.tsx
  • pnpm -C web test app/components/workflow/nodes/iteration/tests/use-config.spec.ts app/components/datasets/documents/detail/completed/hooks/tests/use-search-filter.spec.ts app/components/datasets/documents/detail/completed/components/tests/menu-bar.spec.tsx app/components/header/account-setting/preference-page/tests/index.spec.tsx app/components/plugins/install-plugin/install-from-github/steps/tests/selectPackage.spec.tsx app/components/base/features/new-feature-panel/text-to-speech/tests/param-config-content.spec.tsx app/components/plugins/plugin-detail-panel/tool-selector/components/tests/reasoning-config-form.spec.tsx
  • git diff --check

Notes

  • static scan after the cleanup: Select valueStringCoerce 0, Combobox valueStringCoerce 0, truthy guard 0

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. refactor labels Jul 5, 2026
@github-actions github-actions Bot added the web This relates to changes on the web. label Jul 5, 2026
@lyzno1 lyzno1 enabled auto-merge July 5, 2026 12:27
@codecov

codecov Bot commented Jul 5, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 89.52381% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 85.29%. Comparing base (1b3e8e9) to head (4a9847c).

Files with missing lines Patch % Lines
...omponents/share/text-generation/run-once/index.tsx 84.09% 7 Missing ⚠️
...documents/detail/completed/components/menu-bar.tsx 50.00% 2 Missing ⚠️
...figuration/config-var/config-modal/form-fields.tsx 83.33% 1 Missing ⚠️
...tool-selector/components/reasoning-config-form.tsx 88.88% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #38428      +/-   ##
==========================================
- Coverage   85.35%   85.29%   -0.06%     
==========================================
  Files        5159     5004     -155     
  Lines      269252   264935    -4317     
  Branches    51418    50365    -1053     
==========================================
- Hits       229810   225987    -3823     
+ Misses      35005    34511     -494     
  Partials     4437     4437              
Flag Coverage Δ
cli ?
dify-ui 94.77% <100.00%> (+0.01%) ⬆️
web 84.84% <88.88%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@lyzno1 lyzno1 added this pull request to the merge queue Jul 5, 2026
@dosubot dosubot Bot added the lgtm This PR has been approved by a maintainer label Jul 5, 2026
Merged via the queue into main with commit e742e0e Jul 5, 2026
38 checks passed
@lyzno1 lyzno1 deleted the codex/dify-ui-picker-type-inference branch July 5, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer refactor size:L This PR changes 100-499 lines, ignoring generated files. web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants