refactor: filter linked progress [ENG-3259, ENG-2794]#7846
refactor: filter linked progress [ENG-3259, ENG-2794]#7846speaker-ender wants to merge 1 commit intomainfrom
Conversation
03b3f99 to
4d0cd24
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
4d0cd24 to
03c9feb
Compare
03c9feb to
393d6fa
Compare
393d6fa to
3fe3a3a
Compare
There was a problem hiding this comment.
Code Review
This PR is a frontend-only refactor that replaces the local MONITOR_TYPES enum with the API-generated APIMonitorType, decomposes the monolithic MonitorStats into three focused widgets (MonitorProgressWidget, MonitorStatsWidget, MonitorDetailsWidget), and adds a refresh button across action center pages. The direction is good, but there are a few bugs and polish issues to address before merging.
Must Fix
1. Literal commas rendered as text in JSX (MonitorStats.tsx lines 50, 55)
The trailing , after <Divider /> inside the JSX Fragment will render as literal , characters in the DOM. Remove the commas. (Inline comment added.)
2. Typos in user-visible strings and constant names (utils.ts, ProgressCard.tsx)
"Classifeid"→"Classified""unlabled"/"Unlabled"→"unlabeled"/"Unlabeled"(appears in key names inutils.ts, segment labels, and the badge text inProgressCard.tsx— all must be updated together since they're used as data keys)MONIOR_BAR_CHART_SEGMENTS→MONITOR_BAR_CHART_SEGMENTS"accross"→"across"in theProgressCardbody text
3. Refresh button can get permanently stuck in loading state
In ActionCenterLayout.tsx and website/[monitorId]/index.tsx, setRefreshing(false) is called after await, but without try/finally. If the API call rejects, the button stays disabled forever. Wrap in try/finally. (Inline comments added.)
Suggestions
4. reduce for divider insertion creates nested arrays (MonitorStats.tsx lines 32–47)
The accumulator builds up nested arrays ([[[], item1], divider, item2]) which React flattens at render time, so it won't crash — but the logic is hard to follow. A map with an index-based guard is simpler and more idiomatic. (Inline comment with suggested alternative added.)
5. Root page refresh triggers WEBSITE stats even when flag is off (index.tsx)
APIMonitorType.WEBSITE is included in the Promise.all unconditionally regardless of the webMonitor flag. (Inline comment added.)
6. MonitorDetailsWidget renders null when heliosInsights is off, but its surrounding dividers in MonitorStats do not
When heliosInsights is false, MonitorDetailsWidget returns null, but the two <Divider> elements around it (lines 50 and 55) will still render — causing extra visual separators with nothing between them. Either move the flag check up to MonitorStats, or have the widget render its own dividers.
clients/admin-ui/src/features/data-discovery-and-detection/action-center/MonitorStats.tsx
Outdated
Show resolved
Hide resolved
clients/admin-ui/src/features/data-discovery-and-detection/action-center/ProgressCard/utils.ts
Outdated
Show resolved
Hide resolved
clients/admin-ui/src/features/data-discovery-and-detection/action-center/ProgressCard/utils.ts
Outdated
Show resolved
Hide resolved
...min-ui/src/features/data-discovery-and-detection/action-center/ProgressCard/ProgressCard.tsx
Outdated
Show resolved
Hide resolved
...min-ui/src/features/data-discovery-and-detection/action-center/ProgressCard/ProgressCard.tsx
Outdated
Show resolved
Hide resolved
clients/admin-ui/src/pages/data-discovery/action-center/website/[monitorId]/index.tsx
Outdated
Show resolved
Hide resolved
clients/admin-ui/src/features/data-discovery-and-detection/action-center/MonitorStats.tsx
Show resolved
Hide resolved
9119129 to
076209f
Compare
076209f to
389b82b
Compare
389b82b to
0768ff3
Compare
0768ff3 to
97dd2fa
Compare
c701ec7 to
5f97a48
Compare
5f97a48 to
06ec644
Compare
06ec644 to
7e97dab
Compare
7e97dab to
39d868e
Compare
9352bb7 to
284e55f
Compare
wip: hooked up wip: dimming wip: more wip: more refactors chore: lots of widgets chore: linting and refinements chore: update changelog wip: avatar update chore: updated avatar color chore: all of the async stuff chore: additional clean up chore: fix typos chore: fix async states chore: additional clean up fix: test enum chore: fix overflow chore: more ellipsis stuff chore: formatting chore: restore keys on monitor fix: open tooltip chore: hiding tooltip chore: add system and integration links chore: adding tooltip to icon chore: adding additional tooltip chore: updating types fix: unassociated systems bug fix: layout issues fix: alignment on smaller screens chore: formatting
284e55f to
f955cbd
Compare
Ticket [ENG-3259, ENG-2794]
Description Of Changes
Code Changes
Steps to Confirm
Pre-Merge Checklist
CHANGELOG.mdupdatedmaindowngrade()migration is correct and works