Skip to content

fix(ui): improve long text display in rule hit details - #902

Merged
LordofAvernus merged 2 commits into
zjrc_3.2408from
fix/996-rule-hit-text-overflow
Oct 22, 2026
Merged

LordofAvernus merged 2 commits into
zjrc_3.2408from
fix/996-rule-hit-text-overflow

Conversation

@LordofAvernus

Copy link
Copy Markdown
Collaborator

Summary

  • Correct the rule hit table field mapping so Rule displays rule_name and Description displays message.
  • Replace the native table with ActiontechTable and define stable column widths.
  • Show width-based ellipsis for long Rule and Description values with full text available in the tooltip.
  • Keep horizontal table scrolling as a fallback for narrow viewports.
  • Add component coverage for long text, empty values, and hit counts.

Problem

The rule hit details table had no width, overflow, tooltip, or scrolling constraints. Long Rule and Description values could push columns outside the viewport, forcing users to zoom the page. The Rule column also preferred message, which duplicated the Description column instead of showing the rule name.

Solution

The table now uses the shared table and typography components. Rule and Description use fixed visual widths and single-line ellipsis based on rendered width rather than character count. Hovering truncated content exposes the complete value, while a minimum table width provides horizontal scrolling on smaller screens.

Test plan

  • pnpm checker
  • pnpm exec jest packages/sqle/src/page/SqlAudit/Detail/RuleHitDetails/index.test.tsx --runInBand --watchAll=false

Fixes actiontech/dms-ee#996

@github-actions

Copy link
Copy Markdown

Coverage report

St.❔
Category Percentage Covered / Total
🟢 Statements 90.12% 15452/17146
🟡 Branches 73.3% 6510/8881
🟢 Functions 90.45% 5380/5948
🟢 Lines 90.64% 15188/16757

Test suite run success

2326 tests passing in 630 suites.

Report generated by 🧪jest coverage report action from 78118f5

@LordofAvernus
LordofAvernus merged commit 6cb53be into zjrc_3.2408 Oct 22, 2026
9 checks passed
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