Skip to content

Commit f82e0bf

Browse files
authored
Merge pull request #76 from k4m2a/fix/force-disable-onboarding
Force-disable onboarding regardless of persisted state
2 parents 0991747 + 1f6f6e0 commit f82e0bf

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

src/state/session/agent.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,19 @@ export async function createAgentAndCreateAccount(
211211
logger.info(`createAgentAndCreateAccount: failed to set initial feeds`)
212212
throw e
213213
}),
214+
/*
215+
* Auto-follow the brand account. This used to happen at the end of
216+
* onboarding (StepFinished), which is now skipped entirely, so it
217+
* happens here as part of account setup instead.
218+
*/
219+
networkRetry(3, () => {
220+
return agent.follow(getActiveBrand().appAccountDid)
221+
}).catch(e => {
222+
logger.info(
223+
`createAgentAndCreateAccount: failed to follow brand account`,
224+
)
225+
throw e
226+
}),
214227
// wait for AA data to load first, then check state
215228
aa.then(() => {
216229
const {flags} = unsafeGetAndComputeAgeAssurance({did: account.did})

src/state/shell/onboarding.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,15 @@ export function isOnboardingActive() {
114114
}
115115

116116
function compute(state: persisted.Schema['onboarding']): StateContext {
117+
/*
118+
* Onboarding is disabled entirely (issue #67) - users go straight into
119+
* the app after signup. The persisted step is deliberately ignored so
120+
* stale state written by older builds (or any stray 'start' dispatch)
121+
* can never re-trigger the onboarding screens.
122+
*/
117123
return {
118124
...state,
119-
isActive: state.step !== 'Home',
120-
isComplete: state.step === 'Home',
125+
isActive: false,
126+
isComplete: true,
121127
}
122128
}

0 commit comments

Comments
 (0)