Skip to content

Conversation

@gememma
Copy link
Member

@gememma gememma commented Dec 1, 2025

Main issue: COR-986 (see sub-issues for task lists)
Relevant Slack channel: #project-mirrord-wizard
Notion page: MBE-1451 mirrord onboarding wizard

Unfinished:

  1. Backend endpoints - cluster and target details
  2. Dev-facing docs
  3. User-facing docs
  4. Tests for backend

@0x00A5 0x00A5 requested review from 0x00A5 and meowjesty December 1, 2025 16:38
Copy link
Member

@meowjesty meowjesty left a comment

Choose a reason for hiding this comment

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

Buncha comments for the Rust side.

I wonder if the wizard should be a separate crate/sub-crate of cli instead of just a mod, it has a whole js web app, so it for sure feels it deserves a bit more than just a mod wizard_yolo.

@meowjesty
Copy link
Member

Buncha comments for the Rust side.

I wonder if the wizard should be a separate crate/sub-crate of cli instead of just a mod, it has a whole js web app, so it for sure feels it deserves a bit more than just a mod wizard_yolo.

@0x00A5

Copy link
Member

@meowjesty meowjesty left a comment

Choose a reason for hiding this comment

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

Started looking into the frontend, so far a bunch of minor issues and things I don't really know if we need? We might need them, but I don't know, do you know?

Comment on lines +12 to +18
"noImplicitAny": false,
"noUnusedParameters": false,
"skipLibCheck": true,
"allowJs": true,
"noUnusedLocals": false,
"strictNullChecks": false
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"noImplicitAny": false,
"noUnusedParameters": false,
"skipLibCheck": true,
"allowJs": true,
"noUnusedLocals": false,
"strictNullChecks": false
}
"noImplicitAny": true,
"noUnusedParameters": true,
"skipLibCheck": true,
"allowJs": false,
"noUnusedLocals": true,
"strictNullChecks": true
}

Do we need both this and tsconfig.app.json?

Comment on lines +16 to +20
"strict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true
},
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
"strict": true,
"noUnusedLocals": false,
"noUnusedParameters": false,
"noFallthroughCasesInSwitch": true
},
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},

Omg, how many tsconfig files do we need? Isn't there some bundler or whatever that takes it all from one place?

});

if (error) {
console.log(error)
Copy link
Member

Choose a reason for hiding this comment

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

No notification anywhere that we have an error? I think we should have something, maybe there's something wrong with the user setup, and this might leave them confused until they randomly check the browser console.

Copy link
Member

Choose a reason for hiding this comment

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

Also, this won't just display [Object object], right?

And lastly, console.error(error) (I think that's the correct one?).

const { error, isLoading, data } = useQuery({
queryKey: ["userIsReturning"],
queryFn: () =>
fetch(window.location.href + "api/v1/is-returning").then(async (res) =>
Copy link
Member

Choose a reason for hiding this comment

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

AI said to use https://developer.mozilla.org/en-US/docs/Web/API/Location/origin instead of href, cause href may or may not contain a trailling /.

Copy link
Member

Choose a reason for hiding this comment

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

Can we also get a global/const json object with all the backend routes? Something like:

const ALL_THE_ROUTES = {
    isReturning: "/api/v1/is-returning,
};

Something along these lines, so we can have a central point to define all of this strings (muh grpc).

Copy link
Member

@meowjesty meowjesty left a comment

Choose a reason for hiding this comment

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

Some more small stuff (I want to refresh the page and am scared of losing some of the comments, so here they are).

Comment on lines +18 to +22
<p className="text-xl text-gray-600 mb-4">Oops! Page not found</p>
<a href="/" className="text-blue-500 hover:text-blue-700 underline">
Return to Home
</a>
</div>
Copy link
Member

Choose a reason for hiding this comment

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

No metalbear bear funny image? Like the bear confused, searching for something that they can't find.

Copy link
Member Author

Choose a reason for hiding this comment

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

no time for whimsy, this wizard is SERIOUS

Comment on lines +1 to +3
import HomepageReturning from "@/components/HomepageReturning";
import HomepageNewUser from "../components/HomepageNewUser";
import { useContext } from "react";
Copy link
Member

Choose a reason for hiding this comment

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

Why @ for returning and ../ for new?

Copy link
Member Author

Choose a reason for hiding this comment

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

dear lord this is cursed

Copy link
Member

@meowjesty meowjesty left a comment

Choose a reason for hiding this comment

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

Some more frontend comments.

We use some strings here and there as id/type-ish-like, and I wonder if we could use something else, maybe an enum or the types variant thingy that ts supports.

@@ -0,0 +1,191 @@
import * as React from "react"
Copy link
Member

Choose a reason for hiding this comment

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

Am I (color)blind, or does this file not contain a single ; at the end of its lines?

Copy link
Member

Choose a reason for hiding this comment

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

Adding some formatter config fixes this (I think), and it would be nice in general, so we don't end up with formatting changes in future PRs.


type ActionType = typeof actionTypes

type Action =
Copy link
Member

Choose a reason for hiding this comment

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

react 19 introduced something to deal with actions https://react.dev/blog/2024/12/05/react-19#actions wonder if it would be applicable here (making this comment before I checked where this gets used).

const BoilerplateStep: () => WizardStep = () => {
const boilerplateConfigs: BoilerplateCardProps[] = [
{
id: "steal",
Copy link
Member

Choose a reason for hiding this comment

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

Nit: These id thingies kinda look like variants, so maybe they should be represented as such? Some sort of

enum Mode {
    Mirrord = "mirror",
    Steal = "steal",
    ...
}

id: FilterMode.Steal

scale_down: boolean,
config: LayerFileConfig
) => {
if (typeof config !== "object") {
Copy link
Member

Choose a reason for hiding this comment

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

How is this possible? I mean, how would this not be an object, since the function is taking a LayerFileConfig?

},
];

const { config, setConfig } = useContext(ConfigDataContext);
Copy link
Member

Choose a reason for hiding this comment

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

I'm seeing config and setConfig in vscode as any, is that right, or it's just my setup?

const [selectedBoilerplate, setSelectedBoilerplate] = useState<string>("");
const handleBoilerplateSelect = (boilerplateId: string) => {
setSelectedBoilerplate(boilerplateId);
if (boilerplateId === "replace") {
Copy link
Member

Choose a reason for hiding this comment

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

Would be nice if these things were not just strings we have to type and match correctly, such as enum or maybe just one of those ts variant types mirror | steal | replace that gives a compilation error if you have a typo, since they're a match on a sort of type.

id: "boilerplate",
title: "mirrord configuration",
content: (
<div className="space-y-6">
Copy link
Member

Choose a reason for hiding this comment

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

kevin

const ConfigTabs = () => {
const { config } = useContext(ConfigDataContext);
const [currentTab, setCurrentTab] = useState<string>("target");
const [savedIncoming, setSavedIncoming] = useState<any>(readIncoming(config));
Copy link
Member

Choose a reason for hiding this comment

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

any? 😿

};

const nextTab = () => {
if (currentTab === "target") setCurrentTab("network");
Copy link
Member

Choose a reason for hiding this comment

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

Who doesn't love having a bunch of strings control navigation!

Copy link
Member

Choose a reason for hiding this comment

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

Is it feasible to have these tab strings as variants? Maybe setCurrentTab gets some sort of Tab enum thingy?

Copy link
Member

@meowjesty meowjesty left a comment

Choose a reason for hiding this comment

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

Couple more small stuff.

import { updateConfigCopyTarget, updateConfigMode } from "../JsonUtils";

export interface BoilerplateCardProps {
id: string;
Copy link
Member

Choose a reason for hiding this comment

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

Oh, I guess the enum or the variant typescritiroo thingy would go here, like:

type IdThingy = "steal" | "mirror" | "replace";

id: IdThingy

@gememma gememma force-pushed the gemma/cor-986-onboarding-wizard-via-ui branch 2 times, most recently from c35c511 to 6ce0461 Compare December 8, 2025 15:45
@gememma gememma force-pushed the gemma/cor-986-onboarding-wizard-via-ui branch 2 times, most recently from d3d7caf to 72e8a2a Compare December 9, 2025 11:42
@gememma gememma force-pushed the gemma/cor-986-onboarding-wizard-via-ui branch from 72e8a2a to 32f517b Compare December 9, 2025 12:07
@gememma gememma force-pushed the gemma/cor-986-onboarding-wizard-via-ui branch from f2ca4cd to 894d39a Compare December 9, 2025 18:11
@gememma gememma force-pushed the gemma/cor-986-onboarding-wizard-via-ui branch from eca3897 to e519bef Compare December 10, 2025 11:26
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.

2 participants