Skip to content

Conversation

JGAntunes
Copy link
Member

@JGAntunes JGAntunes commented Sep 19, 2025

What this PR does / why we need it:

This PR adds the base UI changes for the new upgrade flow for the V3 installer experience.

A loom preview that doesn't go through the full flow yet - https://www.loom.com/share/87475f5c1fb5418f82932a08e7856b87?sid=af9ad7b3-a48c-421a-ba2c-f1af1cef1942

Update ☝️ with the API in place:
image

Which issue(s) this PR fixes:

https://app.shortcut.com/replicated/story/129000/iteration-1-frontend-upgrade-wizard-flow

Does this PR require a test?

yes

Does this PR require a release note?

Basic upgrade flow for the V3 installer experience

Does this PR require documentation?

NONE

@JGAntunes JGAntunes self-assigned this Sep 19, 2025
@JGAntunes JGAntunes marked this pull request as ready for review September 19, 2025 16:52
@JGAntunes JGAntunes requested a review from sgalsaleh September 19, 2025 16:53
cursor[bot]

This comment was marked as outdated.

@JGAntunes JGAntunes force-pushed the jgantunes/sc-129000/iteration-1-frontend-upgrade-wizard-flow branch from b53c278 to 64ee951 Compare September 19, 2025 16:57
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Bug: API Endpoint Mismatch in Upgrade Mode

The templateConfig function still uses a hardcoded /api/${target}/install/app/config/template endpoint, unlike submitConfigValues which now uses getApiBase(target, mode). This causes templateConfig to incorrectly target the install endpoint in upgrade mode, a latent issue if the configuration step is re-enabled.

web/src/components/wizard/config/ConfigurationStep.tsx#L40-L60

const [itemErrors, setItemErrors] = useState<Record<string, string>>({});
const [itemToFocus, setItemToFocus] = useState<AppConfigItem | null>(null);
// Holds refs to each item by name for focusing
const itemRefs = useRef<Record<string, HTMLElement | null>>({});
// Helper function to assign refs dynamically
const setRef = (name: string) => (el: HTMLElement | null) => {
itemRefs.current[name] = el;
};
const themeColor = settings.themeColor;
const templateConfig = useCallback(async (values: AppConfigValues) => {
try {
setGeneralError(null); // Clear any existing errors
const response = await debouncedFetch(`/api/${target}/install/app/config/template`, {
method: 'POST',
headers: {

web/src/components/wizard/config/ConfigurationStep.tsx#L69-L80

return;
}
if (!response.ok) {
const errorData = await response.json().catch(() => ({}));
if (response.status === 401) {
handleUnauthorized(errorData);
throw new Error('Session expired. Please log in again.');
}
throw new Error(errorData.message || 'Failed to template configuration');
}

Fix in Cursor Fix in Web


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

Successfully merging this pull request may close these issues.

1 participant