Skip to content

Conversation

@Fredkiss3
Copy link
Contributor

@Fredkiss3 Fredkiss3 commented Nov 11, 2025

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

Main changes:

Other changes:

  • Moved the auth page settings to its own tab in the Org general settings page
  • Added a process.exit(0) line to the migration script because otherwise the migration script would just hang even though it has already finished running https://github.com/Fredkiss3/pangolin/blob/7a31292ec7192efae9b1be30fa5113153150debe/server/db/pg/migrate.ts#L13-L14
  • Proposition: generate the build.ts file like this:
    export const build = "oss" as "saas" | "enterprise" | "oss";
    This way it prevents typos when comparing the value of build everywhere and is validated by TypeScript.
  • Added a prop exact to the HorizontalTabs component to match paths exactly

Screenshots

- -
Branding settings Screenshot 2025-11-15 at 06 27 15
Auth page tab Screenshot 2025-11-15 at 06 27 19
Resource auth page with branding Screenshot 2025-11-15 at 06 27 26
Org auth page with branding Screenshot 2025-11-15 at 06 27 31

@Fredkiss3 Fredkiss3 marked this pull request as ready for review November 15, 2025 05:41
Copy link
Member

@miloschwartz miloschwartz left a comment

Choose a reason for hiding this comment

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

Looks really good, thanks Fred! A few small tweaks but hopefully nothing hard -- mostly around how the feature is presented when in an unlicensed or unsubscribed state. I included some screenshots with notes, so hopefully that helps.

redirect(`/${orgId}`);
}

let subscriptionStatus: GetOrgTierResponse | null = null;
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should move this to a helper function for server components to reuse? If it's tricky to do, don't worry about it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can do that yes

@Lokowitz
Copy link
Contributor

Hi @Fredkiss3
just a hint, with #1875 we upgraded to zod v4. So you will need to do some adjustments to your code.

@Fredkiss3
Copy link
Contributor Author

Hi @Fredkiss3 just a hint, with #1875 we upgraded to zod v4. So you will need to do some adjustments to your code.

@Lokowitz thanks for the heads up

@Fredkiss3
Copy link
Contributor Author

Fredkiss3 commented Nov 17, 2025

@Lokowitz I merged the dev branch and ran the codemod but it seems to have added way more changes to the PR, I thought that was already handled in your PR? 🤔

Here is an example of the changes it added:

# server/blueprint/types.ts
export const SiteSchema = z.object({
    name: z.string().min(1).max(100),
-   "docker-socket-enabled": z.boolean().optional().default(true)
+   "docker-socket-enabled": z.boolean().optional().prefault(true)
});
export const TargetHealthCheckSchema = z.object({
    hostname: z.string(),
    port: z.int().min(1).max(65535),
-   enabled: z.boolean().optional().default(true),
+   enabled: z.boolean().optional().prefault(true),
    path: z.string().optional(),
    scheme: z.string().optional(),
-   mode: z.string().default("http"),
-   interval: z.int().default(30),
-   "unhealthy-interval": z.int().default(30),
+   mode: z.string().prefault("http"),
+   interval: z.int().prefault(30),
+   "unhealthy-interval": z.int().prefault(30),
    unhealthyInterval: z.int().optional(), // deprecated alias
-   timeout: z.int().default(5),
-   headers: z.array(z.object({ name: z.string(), value: z.string() })).nullable().optional().default(null),
-   "follow-redirects": z.boolean().default(true),
+   timeout: z.int().prefault(5),
+   headers: z.array(z.object({ name: z.string(), value: z.string() })).nullable().optional().prefault(null),
+   "follow-redirects": z.boolean().prefault(true),
    followRedirects: z.boolean().optional(), // deprecated alias
-   method: z.string().default("GET"),
+   method: z.string().prefault("GET"),
    status: z.int().optional()
});

### and way more...

@Lokowitz
Copy link
Contributor

Ah yeah, sorry for not pointing at this.
The code mod is changing everything default to prefault. But this was not working everywhere and I think it is not needed. So I just changed it to prefault where it is needed like prefault({}) and prefault(new Date().toISOString()).
(Hope this are all the specials)

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.

3 participants