File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -172,7 +172,6 @@ export default function MainApp() {
172172 queueSaveSettings,
173173 } ) ;
174174 const {
175- isMobileRuntime,
176175 showMobileSetupWizard,
177176 mobileSetupWizardProps,
178177 handleMobileConnectSuccess,
@@ -182,7 +181,8 @@ export default function MainApp() {
182181 queueSaveSettings,
183182 refreshWorkspaces,
184183 } ) ;
185- const updaterEnabled = ! isMobileRuntime ;
184+ // Community builds are unsigned and do not publish Tauri updater metadata yet.
185+ const updaterEnabled = false ;
186186
187187 const workspacesById = useMemo (
188188 ( ) => new Map ( workspaces . map ( ( workspace ) => [ workspace . id , workspace ] ) ) ,
Original file line number Diff line number Diff line change @@ -418,4 +418,35 @@ describe("useAccountSwitching", () => {
418418 root . unmount ( ) ;
419419 } ) ;
420420 } ) ;
421+
422+ it ( "does not alert when saved profiles are unavailable in remote mode" , async ( ) => {
423+ vi . mocked ( listSavedAuthProfiles ) . mockRejectedValue (
424+ new Error ( "Saved auth profiles are not supported in remote mode" ) ,
425+ ) ;
426+
427+ const refreshAccountInfo = vi . fn ( ) ;
428+ const refreshAccountRateLimits = vi . fn ( ) ;
429+ const alertError = vi . fn ( ) ;
430+
431+ const { root } = await mount ( {
432+ activeWorkspaceId : "ws-1" ,
433+ accountByWorkspace : { } ,
434+ activeRateLimits : null ,
435+ refreshAccountInfo,
436+ refreshAccountRateLimits,
437+ alertError,
438+ } ) ;
439+
440+ await waitFor ( ( ) => {
441+ expect ( listSavedAuthProfiles ) . toHaveBeenCalledWith ( "ws-1" ) ;
442+ } ) ;
443+
444+ expect ( latest ?. savedProfiles ) . toEqual ( [ ] ) ;
445+ expect ( latest ?. savedProfilesLoading ) . toBe ( false ) ;
446+ expect ( alertError ) . not . toHaveBeenCalled ( ) ;
447+
448+ await act ( async ( ) => {
449+ root . unmount ( ) ;
450+ } ) ;
451+ } ) ;
421452} ) ;
Original file line number Diff line number Diff line change @@ -60,6 +60,12 @@ function hasUsableRateLimitSnapshot(rateLimits: RateLimitSnapshot | null | undef
6060 ) ;
6161}
6262
63+ function isSavedAuthProfilesUnsupported ( error : unknown ) : boolean {
64+ const message =
65+ typeof error === "string" ? error : error instanceof Error ? error . message : "" ;
66+ return message . toLowerCase ( ) . includes ( "saved auth profiles are not supported in remote mode" ) ;
67+ }
68+
6369function normalizeAccountType ( value : unknown ) : SavedAccountProfile [ "accountType" ] {
6470 const normalized = typeof value === "string" ? value . trim ( ) . toLowerCase ( ) : "" ;
6571 if ( normalized === "chatgpt" || normalized === "apikey" ) {
@@ -207,6 +213,10 @@ export function useAccountSwitching({
207213 const response = await listSavedAuthProfiles ( workspaceId ) ;
208214 setSavedProfiles ( normalizeSavedProfiles ( response ) ) ;
209215 } catch ( error ) {
216+ if ( isSavedAuthProfilesUnsupported ( error ) ) {
217+ setSavedProfiles ( [ ] ) ;
218+ return ;
219+ }
210220 alertErrorRef . current ( error ) ;
211221 } finally {
212222 setSavedProfilesLoading ( false ) ;
You can’t perform that action at this time.
0 commit comments