Skip to content

Feat: Uptime Progress Indicator#3673

Open
Br0wnHammer wants to merge 5 commits into
developfrom
feat/fe/uptime-progress-indicator
Open

Feat: Uptime Progress Indicator#3673
Br0wnHammer wants to merge 5 commits into
developfrom
feat/fe/uptime-progress-indicator

Conversation

@Br0wnHammer
Copy link
Copy Markdown
Member

Describe your changes

Splits the overwhelming single-page "Create Uptime Monitor" form into a focused 3-step wizard (Basics → Monitoring → Advanced) with a slim segmented progress bar in Checkmate's green palette, validating each step before advancing. Scoped to uptime create only — edit/configure, pagespeed, and hardware flows keep the existing flat form unchanged.

Please ensure all items are checked off before requesting a review. "Checked off" means you need to add an "x" character between brackets so they turn into checkmarks.

  • (Do not skip this or your PR will be closed) I deployed the application locally.
  • (Do not skip this or your PR will be closed) I have performed a self-reviewing and testing of my code.
  • I have included the issue # in the PR.
  • I have added i18n support to visible strings (instead of <div>Add</div>, use):
const { t } = useTranslation();
<div>{t('add')}</div>
  • I have not included any files that are not related to my pull request, including package-lock and package-json if dependencies have not changed
  • I didn't use any hardcoded values (otherwise it will not scale, and will make it difficult to maintain consistency across the application).
  • I made sure font sizes, color choices etc are all referenced from the theme. I don't have any hardcoded dimensions.
  • My PR is granular and targeted to one specific feature.
  • I ran npm run format in server and client directories, which automatically formats your code.
  • I took a screenshot or a video and attached to this PR if there is a UI change.
Screenshot 2026-05-25 at 23 36 22 Screenshot 2026-05-25 at 23 36 51 Screenshot 2026-05-25 at 23 40 35

@Br0wnHammer Br0wnHammer added this to the 3.7.2 milestone May 25, 2026
@Br0wnHammer Br0wnHammer self-assigned this May 25, 2026
@Br0wnHammer Br0wnHammer added enhancement New feature or request frontend labels May 25, 2026
Copy link
Copy Markdown
Collaborator

@ajhollid ajhollid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Visually looks good.

There are a couple of bugs to work out.

  1. I can create invalid monitor types by manipulating the form steps. The form should be reset on changing monitor type.

  2. A blank third screen is rendered for many monitor types, we should skip rendering the advanced third page if it is not used for that monitor type

I think other than that things look good!

Comment on lines +24 to +29
const background =
index < current
? completedBg
: index === current
? activeBg
: theme.palette.divider;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please extract this logic? Nested ternaries aren't my favourite

}, [defaults, form]);

// Multi-step wizard (uptime create only). Other flows keep the flat form.
const isWizard = showTypeSelector;
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isWizard just shadows showTypeSelector 🤔 I assume we can just remove this one the other pages also implement the wizard flow?

Comment on lines +298 to +302
if (isValid) {
setCurrentStep((step) => Math.min(step + 1, TOTAL_STEPS - 1));
}
};
const handleBack = () => setCurrentStep((step) => Math.max(step - 1, 0));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these clamps here to avoid issues with keyboard shortcuts? You should never be able to advance past the page limit or go back past page 0 via the UI controls since there are render guards in place already.

@Br0wnHammer Br0wnHammer requested a review from ajhollid May 26, 2026 19:40
Copy link
Copy Markdown
Collaborator

@ajhollid ajhollid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think most of the issues are resolved now.

My only real remaining concern is that there is an implicit and unstated dependency between the zod validation schema and the array of field names in the create monitor page.

I think this relationship should be made explicit so that there will not be divergence between the schema and the fields in the array in the future.

Comment on lines +223 to +244
[
"type",
"url",
"name",
"port",
"gameId",
"grpcServiceName",
"dnsServer",
"dnsRecordType",
],
["interval", "statusWindowSize", "statusWindowThreshold", "notifications", "tags"],
[
"ignoreTlsErrors",
"useAdvancedMatching",
"matchMethod",
"expectedValue",
"jsonPath",
"geoCheckEnabled",
"geoCheckLocations",
"geoCheckInterval",
],
];
Copy link
Copy Markdown
Collaborator

@ajhollid ajhollid May 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think there is probably a better approach here. This is quite fragile as it relies on unstated assumptions about how the zod schema is set up.

For example, if we rename one of the fields in the validation schema/db model, someone needs to rememeber to also update these arrays.

This is an unstated dependency and will be difficult to track down later on.

A more robust approach is probably to derive these fields from the monitor type so there is an explicit dependency.

In other words, the set of fields to validate should not be the superset of all fields available for STEP[n], it should be the set of exactly the fields available for the selected monitor type.

It also relies on an unstated assumption that the order of the array is the same order as the steps. Not a huge deal, but this is a code smell, so I'd avoid it and be more explicit. A map or set is probably a better choice here 🤔

@Br0wnHammer Br0wnHammer requested a review from ajhollid May 27, 2026 06:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request frontend

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants