Skip to content

Commit 15bd747

Browse files
feat(onboarding): add new onboarding flows for Unraid OS (#1746)
### PR Summary This PR introduces a new onboarding-focused API surface, expands system configuration capabilities, and refactors activation/customization data into a more structured schema. ### What changed - Added full onboarding domain support in GraphQL: - `Onboarding`, `OnboardingState`, `OnboardingStatus` - `onboarding` mutation group (complete/reset/override flows) - Added plugin install lifecycle APIs: - `unraidPlugins` mutations (`installPlugin`, `installLanguage`) - operation tracking queries + `pluginInstallUpdates` subscription - Added system time management APIs: - `systemTime`, `timeZoneOptions`, `updateSystemTime` - Added display/network/config enhancements: - `display` query + `displaySubscription` - `Info.networkInterfaces` and `Info.primaryNetwork` - server/SSH update mutations and `Server.comment` - Updated REST customization asset endpoint to return dynamic image MIME types (not hardcoded PNG). ### Breaking schema changes - Removed `PublicPartnerInfo` type. - Removed query fields: - `isInitialSetup` - `publicPartnerInfo` - Removed `Customization.partnerInfo` and `Customization.theme`. - Restructured `ActivationCode` from flat fields to nested: - `partner`, `branding`, `system` objects. ### Net effect - API becomes more modular and onboarding-driven. - Consumers must update GraphQL queries for removed fields and adopt the new `ActivationCode` shape. - Frontend onboarding/plugin/system-time workflows are now first-class in the API. ### ⚠️ Breaking GraphQL changes (15 total) 1. Removed type: - `PublicPartnerInfo` 2. Removed `Query` fields: - `isInitialSetup` - `publicPartnerInfo` 3. Removed `Customization` fields: - `partnerInfo` - `theme` 4. Reshaped `ActivationCode` (flat fields removed): - `partnerName`, `partnerUrl` - `serverName`, `sysModel`, `comment` - `header`, `headermetacolor`, `background`, `showBannerGradient`, `theme` #### Migration mapping (old -> new) - `activationCode.partnerName` -> `activationCode.partner.name` - `activationCode.partnerUrl` -> `activationCode.partner.url` - `activationCode.serverName` -> `activationCode.system.serverName` - `activationCode.sysModel` -> `activationCode.system.model` - `activationCode.comment` -> `activationCode.system.comment` - `activationCode.header` -> `activationCode.branding.header` - `activationCode.headermetacolor` -> `activationCode.branding.headermetacolor` - `activationCode.background` -> `activationCode.branding.background` - `activationCode.showBannerGradient` -> `activationCode.branding.showBannerGradient` - `activationCode.theme` -> `activationCode.branding.theme` - `query isInitialSetup` -> `query isFreshInstall` (verify semantics in consumers) - `Customization.partnerInfo` -> `Customization.activationCode.partner` + `Customization.activationCode.branding` - `Customization.theme` -> use `publicTheme` (or `display.theme`, depending on consumer need) --- ### Major non-breaking schema additions 1. Onboarding domain: - New types: `Onboarding`, `OnboardingState`, `OnboardingStatus` - New mutation namespace: `onboarding` (`completeOnboarding`, `resetOnboarding`, override helpers) - `Customization.onboarding` added 2. Plugin install lifecycle: - New mutations: `unraidPlugins.installPlugin`, `unraidPlugins.installLanguage` - New queries: `pluginInstallOperation`, `pluginInstallOperations`, `installedUnraidPlugins` - New subscription: `pluginInstallUpdates` - New types: `PluginInstallOperation`, `PluginInstallEvent`, status enum/inputs 3. System time management: - New query fields: `systemTime`, `timeZoneOptions` - New mutation: `updateSystemTime` - New types/inputs: `SystemTime`, `TimeZoneOption`, `UpdateSystemTimeInput` 4. Display/network/settings surface: - New query field: `display` (`InfoDisplay`) - New subscription: `displaySubscription` - `Info` adds `networkInterfaces`, `primaryNetwork` - `Customization.availableLanguages` added - New mutation: `customization.setLocale` - New mutations: `updateServerIdentity`, `updateSshSettings` - `Server.comment` added --- ### REST contract note (non-GraphQL) - `GET /customizations/:type` now returns detected image MIME type dynamically (not always `image/png`). --- ### Data/schema scope note - No DB migration/schema files were changed in this branch; major schema impact is API contract (primarily GraphQL). Source files reviewed: - `/Users/ajitmehrotra/Projects/api/api/generated-schema.graphql` - `/Users/ajitmehrotra/Projects/api/api/src/unraid-api/rest/rest.controller.ts` - `/Users/ajitmehrotra/Projects/api/api/src/unraid-api/rest/rest.service.ts` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit # Release Notes * **New Features** * Multi-step onboarding flow with partner branding support * System time and timezone configuration from UI * Plugin and language pack installation capabilities * Server identity management (name, description, model) * SSH settings configuration interface * Onboarding admin panel for testing and debugging * **Improvements** * Enhanced theme and locale switching * Better network interface information display * Improved server information visibility * Partner logo and branding customization support <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Ajit Mehrotra <ajitmehrotra2009@gmail.com> Co-authored-by: Ajit Mehrotra <ajit@lime-technology.com>
1 parent a6b38c6 commit 15bd747

File tree

215 files changed

+19617
-3966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

215 files changed

+19617
-3966
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,11 @@ api/dev/Unraid.net/myservers.cfg
122122

123123
# local Mise settings
124124
.mise.toml
125+
mise.toml
125126

126127
# Compiled test pages (generated from Nunjucks templates)
127128
web/public/test-pages/*.html
128129

130+
# local scripts for testing and development
131+
.dev-scripts/
132+

@tailwind-shared/css-variables.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,4 @@
141141
--background: 0 0% 3.9%;
142142
--foreground: 0 0% 98%;
143143
--border: 0 0% 14.9%;
144-
}
144+
}
Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,37 @@
11
{
22
"code": "EXAMPLE_CODE_123",
3-
"partnerName": "MyPartner Inc.",
4-
"partnerUrl": "https://partner.example.com",
5-
"serverName": "MyAwesomeServer",
6-
"sysModel": "CustomBuild v1.0",
7-
"comment": "This is a test activation code for development.",
8-
"header": "#336699",
9-
"headermetacolor": "#FFFFFF",
10-
"background": "#F0F0F0",
11-
"showBannerGradient": "yes",
12-
"theme": "black"
3+
"partner": {
4+
"name": "MyPartner Inc.",
5+
"url": "https://partner.example.com",
6+
"hardwareSpecsUrl": "https://partner.example.com/specs/customBuild-v1",
7+
"manualUrl": "https://partner.example.com/docs/customBuild-manual",
8+
"supportUrl": "https://partner.example.com/support",
9+
"extraLinks": [
10+
{
11+
"title": "Community Forums",
12+
"url": "https://partner.example.com/forums"
13+
},
14+
{
15+
"title": "Video Tutorials",
16+
"url": "https://partner.example.com/tutorials"
17+
}
18+
]
19+
},
20+
"branding": {
21+
"theme": "black",
22+
"bannerImage": "./assets/banner.png",
23+
"caseModelImage": "./assets/case-model.png",
24+
"partnerLogoLightUrl": "./assets/partner-logo-light.svg",
25+
"partnerLogoDarkUrl": "./assets/partner-logo-dark.svg",
26+
"onboardingTitle": "Welcome to MyPartner",
27+
"onboardingSubtitle": "Setting up your CustomBuild v1.0",
28+
"header": "#336699",
29+
"headermetacolor": "#FFFFFF",
30+
"background": "#F0F0F0",
31+
"showBannerGradient": true
32+
},
33+
"system": {
34+
"serverName": "MyAwesomeServer",
35+
"model": "CustomBuild v1.0"
36+
}
1337
}

api/dev/configs/api.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"version": "4.29.2",
33
"extraOrigins": [],
4-
"sandbox": true,
4+
"sandbox": false,
55
"ssoSubIds": [],
66
"plugins": [
77
"unraid-api-plugin-connect"
88
]
9-
}
9+
}

api/dev/dynamix/default.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ hotssd="60"
2828
maxssd="70"
2929
power=""
3030
theme="white"
31+
terminalButton="yes"
3132
locale=""
3233
raw=""
3334
rtl=""
@@ -77,4 +78,4 @@ UseTLSCert="NO"
7778
TLSCert=""
7879
AuthMethod="login"
7980
AuthUser=""
80-
AuthPass=""
81+
AuthPass=""

api/dev/dynamix/dynamix.cfg

Lines changed: 49 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,52 @@
11
[display]
2-
date=%c
3-
time=%I:%M %p
4-
number=.,
5-
scale=-1
6-
tabs=1
7-
users=Tasks:3
8-
resize=0
9-
wwn=0
10-
total=1
11-
usage=0
12-
banner=image
13-
dashapps=icons
14-
theme=black
15-
text=1
16-
unit=C
17-
warning=70
18-
critical=90
19-
hot=45
20-
max=55
21-
sysinfo=/Tools/SystemProfiler
22-
header=336699
23-
headermetacolor=FFFFFF
24-
background=F0F0F0
25-
showBannerGradient=yes
26-
2+
date="%c"
3+
time="%I:%M %p"
4+
number=".,"
5+
scale="-1"
6+
tabs="1"
7+
users="Tasks:3"
8+
resize="0"
9+
wwn="0"
10+
total="1"
11+
usage="0"
12+
banner="image"
13+
dashapps="icons"
14+
theme="black"
15+
terminalButton="yes"
16+
text="1"
17+
unit="C"
18+
warning="70"
19+
critical="90"
20+
hot="45"
21+
max="55"
22+
sysinfo="/Tools/SystemProfiler"
23+
header="336699"
24+
headermetacolor="FFFFFF"
25+
background="F0F0F0"
26+
showBannerGradient="yes"
27+
width=""
28+
font=""
29+
tty="15"
30+
hotssd="60"
31+
maxssd="70"
32+
power=""
33+
locale=""
34+
raw=""
35+
rtl=""
36+
headerdescription="yes"
2737
[notify]
28-
entity=1
29-
normal=1
30-
warning=1
31-
alert=1
32-
unraid=1
33-
plugin=1
34-
docker_notify=1
35-
report=1
36-
display=0
37-
date=d-m-Y
38-
time=H:i
39-
position=top-right
40-
path=./dev/notifications
41-
system=*/1 * * * *
38+
entity="1"
39+
normal="1"
40+
warning="1"
41+
alert="1"
42+
unraid="1"
43+
plugin="1"
44+
docker_notify="1"
45+
report="1"
46+
display="0"
47+
date="d-m-Y"
48+
time="H:i"
49+
position="top-right"
50+
path="./dev/notifications"
51+
system="*/1 * * * *"
4252

0 commit comments

Comments
 (0)