@@ -29,13 +29,13 @@ data Welcome = Welcome
2929data DownloadBase
3030 = DownloadBase ReadRemoteNamespace | DontDownloadBase
3131
32- -- Previously Created is different from Previously Onboarded because a user can
33- -- 1.) create a new codebase
32+ -- Previously Created is different from Previously Onboarded because a user can
33+ -- 1.) create a new codebase
3434-- 2.) decide not to go through the onboarding flow until later and exit
35- -- 3.) then reopen their blank codebase
35+ -- 3.) then reopen their blank codebase
3636data CodebaseInitStatus
3737 = NewlyCreatedCodebase -- Can transition to [Base, Author, Finished]
38- | PreviouslyCreatedCodebase -- Can transition to [Base, Author, Finished, PreviouslyOnboarded].
38+ | PreviouslyCreatedCodebase -- Can transition to [Base, Author, Finished, PreviouslyOnboarded].
3939
4040data Onboarding
4141 = Init CodebaseInitStatus -- Can transition to [DownloadingBase, Author, Finished, PreviouslyOnboarded]
@@ -46,7 +46,7 @@ data Onboarding
4646 | PreviouslyOnboarded
4747
4848welcome :: CodebaseInitStatus -> DownloadBase -> FilePath -> String -> Welcome
49- welcome initStatus downloadBase filePath unisonVersion =
49+ welcome initStatus downloadBase filePath unisonVersion =
5050 Welcome (Init initStatus) downloadBase filePath unisonVersion
5151
5252pullBase :: ReadRemoteNamespace -> Either Event Input
@@ -95,9 +95,9 @@ toInput pretty =
9595
9696determineFirstStep :: DownloadBase -> Codebase IO v a -> IO Onboarding
9797determineFirstStep downloadBase codebase = do
98- isBlankCodebase <- Codebase. isBlank codebase
98+ isEmptyCodebase <- Codebase. getRootBranchExists codebase
9999 case downloadBase of
100- DownloadBase ns | isBlankCodebase ->
100+ DownloadBase ns | isEmptyCodebase ->
101101 pure $ DownloadingBase ns
102102 _ ->
103103 pure PreviouslyOnboarded
@@ -131,7 +131,7 @@ asciiartUnison =
131131downloading :: Path -> P. Pretty P. ColorText
132132downloading path =
133133 P. lines
134- [ P. group (P. wrap " 🐣 Since this is a fresh codebase, let me download the base library for you." <> P. newline ),
134+ [ P. group (P. wrap " 🐣 Since this is a fresh codebase, let me download the base library for you." <> P. newline ),
135135 P. wrap
136136 (" 🕐 Downloading"
137137 <> P. blue (P. string (show path))
0 commit comments