Skip to content

chore: enforce titles on CSS-truncated elements - #41438

Draft
iamjoel wants to merge 5 commits into
mainfrom
chore/truncate-add-title
Draft

chore: enforce titles on CSS-truncated elements#41438
iamjoel wants to merge 5 commits into
mainfrom
chore/truncate-add-title

Conversation

@iamjoel

@iamjoel iamjoel commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add an autofixable Oxlint rule requiring CSS-truncated JSX content to provide a non-empty title unless covered by a Dify UI Tooltip.
  • Apply the rule across Web and Dify UI, including shared controls, inline styles, dynamic class expressions, and CSS Modules.
  • Cache CSS Module analysis and keep the full frontend rule runtime to approximately 80.7 ms.

Fixes FPRD-124

Checklist

  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.

@github-actions github-actions Bot added the web This relates to changes on the web. label Aug 28, 2026
@codecov

codecov Bot commented Aug 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 92.20056% with 28 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.85%. Comparing base (94fdda1) to head (8bfc5eb).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
packages/dify-ui/src/select/index.tsx 75.00% 5 Missing ⚠️
packages/dify-ui/src/utils/get-text-from-node.ts 69.23% 4 Missing ⚠️
.../model-provider-page/provider-added-card/index.tsx 0.00% 3 Missing ⚠️
web/app/components/api-key/api-key-table.tsx 50.00% 2 Missing ⚠️
...p-publisher/built-in-publisher/summary-section.tsx 84.61% 2 Missing ⚠️
packages/dify-ui/src/combobox/index.tsx 96.00% 1 Missing ⚠️
...nts/app/deploy/built-in-environment-card/index.tsx 66.66% 1 Missing ⚠️
...alog/deployment-configuration/credential-field.tsx 75.00% 1 Missing ⚠️
...mponents/datasets/common/document-picker/index.tsx 87.50% 1 Missing ⚠️
...asets/hit-testing/components/child-chunks-item.tsx 0.00% 1 Missing ⚠️
... and 7 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #41438      +/-   ##
==========================================
+ Coverage   86.83%   86.85%   +0.02%     
==========================================
  Files        5291     5451     +160     
  Lines      304694   309601    +4907     
  Branches    60922    62353    +1431     
==========================================
+ Hits       264582   268915    +4333     
- Misses      34827    35401     +574     
  Partials     5285     5285              
Flag Coverage Δ
cli 89.38% <ø> (?)
dify-ui 93.07% <83.33%> (-0.68%) ⬇️
web 86.91% <93.97%> (-0.03%) ⬇️

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.

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

Labels

web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant