Console maintained objects list#36389
Conversation
7f76cdf to
a7d5aa8
Compare
| */ | ||
| export function buildLagAggregateQuery({ | ||
| lookbackMinutes, | ||
| }: LagAggregateParams) { |
There was a problem hiding this comment.
nit: I kind of feel like we should be making sure we're validating that lookbackMinutes is less than a day on the API side.
There was a problem hiding this comment.
Will add a sql test for for this
There was a problem hiding this comment.
Ah is this the test you're referring to 6e2ae07?
Sorry I should've been more clear. So the underlying relation only has 24 hours of history. I was saying along with the client validation (of just hiding the option), maybe we should also validate closer to the API side (similar to how we validate the start time for the query history https://github.com/leedqin/materialize//blob/console-maintained-objects-list/console/src/api/materialize/query-history/queryHistoryList.ts#L164-L178).
This is more of a nit because we're only exposing upto 24 hours as a lookback window on the client side. However it's a bit more useful if other hooks/pages try to reuse the build function. We don't need to do this however
|
I think when we scroll, the search bar should be anchored to the left, similar to the query history Screen.Recording.2026-05-04.at.4.50.13.PM.mov |
|
Ux nit: It feels jarring to have this go to a number. Can we change this to like "2 selected"? Screen.Recording.2026-05-04.at.4.55.59.PM.mov |
SangJunBak
left a comment
There was a problem hiding this comment.
Reviewed the first commit! Will review the second later
| const data = React.useMemo<MaintainedObjectListItem[]>(() => { | ||
| const lagById = new Map(lag.data.map((r) => [r.object_id, r])); | ||
| const hydrationById = new Map(hydration.data.map((r) => [r.object_id, r])); | ||
| const num = (v: bigint | null | undefined) => (v ? Number(v) : 0); |
There was a problem hiding this comment.
Let's just make this a top level function
| // Subsources and progress sources are managed by their parent source. | ||
| return !( | ||
| obj.objectType === "source" && | ||
| (obj.sourceType === "subsource" || obj.sourceType === "progress") | ||
| ); | ||
| }) |
There was a problem hiding this comment.
Technically progress sources are now just the source and subsources are tables. Did we account for this?
| name: string; | ||
| schemaName: string | null; | ||
| databaseName: string | null; | ||
| objectType: MaintainedObjectType; |
There was a problem hiding this comment.
Why are these nullable again?
| const lag = useSubscribeToLagAggregate({ lookbackMinutes }); | ||
| const hydration = useSubscribeToHydrationAggregate(); | ||
|
|
||
| const data = React.useMemo<MaintainedObjectListItem[]>(() => { |
There was a problem hiding this comment.
Nit: Rather than making the data structure a list, I like to make the "main" data structure an object / map keyed by the ID then derive a sorted list from it.So in this case, the ID would be object_id.
| export const disabledFlexibleDeploymentFlags: Record<string, boolean> = {}; | ||
| export const disabledFlexibleDeploymentFlags: Record<string, boolean> = { | ||
| "maintained-objects-ui-50": false, | ||
| }; |
There was a problem hiding this comment.
What does the rollout look like for self managed? Wanted to call out that if we're aiming for releasing to self managed by next week, then there's no way a user can toggle htis
SangJunBak
left a comment
There was a problem hiding this comment.
Moreso found some design flaws/bugs, but everything else looks good to me!
| }; | ||
|
|
||
| return ( | ||
| <RadioGroup |
| */ | ||
| export function buildLagAggregateQuery({ | ||
| lookbackMinutes, | ||
| }: LagAggregateParams) { |
There was a problem hiding this comment.
Ah is this the test you're referring to 6e2ae07?
Sorry I should've been more clear. So the underlying relation only has 24 hours of history. I was saying along with the client validation (of just hiding the option), maybe we should also validate closer to the API side (similar to how we validate the start time for the query history https://github.com/leedqin/materialize//blob/console-maintained-objects-list/console/src/api/materialize/query-history/queryHistoryList.ts#L164-L178).
This is more of a nit because we're only exposing upto 24 hours as a lookback window on the client side. However it's a bit more useful if other hooks/pages try to reuse the build function. We don't need to do this however
|
Noticing we're persisting the lookback to local storage but the URL still blips. Why not just have it in the URL, especially if it doesn't sync to the lookback selects on other pages? Screen.Recording.2026-05-05.at.1.49.35.PM.mov |
- Sql queries and tests. Leveraging allObjects subscribe query in the console and only added a query for showing pMax values and hydration statuses. Joining this data client side to be rendered in a table
- Added a filter on Universal Table column header - Added a Maintained Objects route behind a Launch Darkly flag - Added filter chips to show filters selected - Added the filter components fror the different filter columns: freshness, multi select and search for cluster, object types, hydration status - Maintained Objects List with cells defined for each column, columns using Tanstack sorting / filtering, universal tanstack table components with Url params and pagination - Maintained Objects List react table with happy path of listing objects and listing objects with filters
- Changed the filter chips to show all the filters seelected i.e "Type: source x", "Type: index x" "Cluter: quickstart" etc - ujpdated the margins to match the Tag component margins - Moved search to the left
- Added a sql test to validate lookback minutes behavior for freshness - Collapsed cluster and lag objects - MaintainedObjectLIst is now a map keyed by the object id rather than a structured list
- Added pMAX ≥ 5s and ≥ 10s filter options to match the column's warning/outdated color thresholds (was previously starting at 1 minute) - Switched the freshness filter radios to the form variant so they pick up the brand purple instead of Chakra's default blue - Removed the duplicate "X of Y objects" footer that overlapped with the TablePagination summary when more than one page was visible
49fd430 to
85ce905
Compare
|
I don't think the unit UI makes sense without an apply button, similar to the query history filters. E.g. if I were to filter for >=30 minutes Screen.Recording.2026-05-07.at.10.17.04.AM.mov |
- Made the freshness filter a draft-then-apply flow matching query-history's FilterMenu, so typing a number or switching units no longer fires the filter through intermediate values - Added an Apply / Clear footer with a top divider; Enter in the number field also commits
apply_freshness_filter.movAdded the Apply Filter for freshness |





Motivation
Maintained Objects List to show objects (sources, indexes, tables, mvs) in a table view to dive deeper into freshness (pMax), hydration status, clusters.
First PR/ n for maintained objects feature. Fixes CNS-50
Description
Objects List

Filters for the objects list

Objects filter:

pMax Filter:

Cluster Filter

Tips for the reviewer