From bf0513bfc4f118426889d80511994fb632aaea49 Mon Sep 17 00:00:00 2001 From: Chris Nojima Date: Mon, 12 Jan 2026 09:46:09 -0500 Subject: [PATCH 1/7] WIP --- shared/app/global-errors/hook.tsx | 2 +- shared/common-adapters/reload.tsx | 2 +- shared/constants/chat2/convostate.tsx | 4 ++-- shared/constants/chat2/{util.tsx => index.tsx} | 0 shared/constants/{config/util.tsx => config.tsx} | 0 shared/constants/{crypto/util.tsx => crypto.tsx} | 0 shared/constants/fs/{util.tsx => index.tsx} | 4 ++-- shared/constants/init/index.desktop.tsx | 2 +- .../{notifications/util.tsx => notifications.tsx} | 0 shared/constants/{people/util.tsx => people.tsx} | 0 shared/constants/push.native.tsx | 2 +- shared/constants/{router2/util.tsx => router2.tsx} | 0 shared/constants/{settings/util.tsx => settings.tsx} | 0 shared/constants/{teams/util.tsx => teams.tsx} | 0 shared/constants/{tracker2/util.tsx => tracker2.tsx} | 0 .../{unlock-folders/util.tsx => unlock-folders.tsx} | 0 shared/constants/{users/util.tsx => users.tsx} | 0 shared/crypto/routes.tsx | 2 +- shared/desktop/renderer/main2.desktop.tsx | 2 +- shared/login/routes.tsx | 2 +- shared/people/announcement.tsx | 2 +- shared/people/todo.tsx | 2 +- shared/router-v2/account-switcher/index.tsx | 2 +- shared/router-v2/tab-bar.desktop.tsx | 2 +- shared/settings/routes.tsx | 2 +- shared/stores/archive.tsx | 2 +- shared/stores/autoreset.tsx | 2 +- shared/stores/chat2.tsx | 4 ++-- shared/stores/config.tsx | 4 ++-- shared/stores/crypto.tsx | 6 +++--- shared/stores/fs.tsx | 6 +++--- shared/stores/git.tsx | 2 +- shared/stores/logout.tsx | 4 ++-- shared/stores/pinentry.tsx | 2 +- shared/stores/profile.tsx | 4 ++-- shared/stores/provision.tsx | 4 ++-- shared/stores/recover-password.tsx | 2 +- shared/stores/router2.tsx | 6 +++--- shared/stores/settings-contacts.native.tsx | 2 +- shared/stores/settings-invites.tsx | 2 +- shared/stores/settings-password.tsx | 2 +- shared/stores/settings.tsx | 6 +++--- shared/stores/signup.tsx | 2 +- shared/stores/team-building.tsx | 2 +- shared/stores/teams.tsx | 8 ++++---- shared/stores/tracker2.tsx | 2 +- shared/teams/team/menu-container.tsx | 2 +- shared/whats-new/versions.tsx | 4 ++-- 48 files changed, 56 insertions(+), 56 deletions(-) rename shared/constants/chat2/{util.tsx => index.tsx} (100%) rename shared/constants/{config/util.tsx => config.tsx} (100%) rename shared/constants/{crypto/util.tsx => crypto.tsx} (100%) rename shared/constants/fs/{util.tsx => index.tsx} (99%) rename shared/constants/{notifications/util.tsx => notifications.tsx} (100%) rename shared/constants/{people/util.tsx => people.tsx} (100%) rename shared/constants/{router2/util.tsx => router2.tsx} (100%) rename shared/constants/{settings/util.tsx => settings.tsx} (100%) rename shared/constants/{teams/util.tsx => teams.tsx} (100%) rename shared/constants/{tracker2/util.tsx => tracker2.tsx} (100%) rename shared/constants/{unlock-folders/util.tsx => unlock-folders.tsx} (100%) rename shared/constants/{users/util.tsx => users.tsx} (100%) diff --git a/shared/app/global-errors/hook.tsx b/shared/app/global-errors/hook.tsx index f35ad7056a9c..d8e9d9701d30 100644 --- a/shared/app/global-errors/hook.tsx +++ b/shared/app/global-errors/hook.tsx @@ -2,7 +2,7 @@ import * as C from '@/constants' import * as React from 'react' import {useConfigState} from '@/stores/config' import type {RPCError} from '@/util/errors' -import {settingsFeedbackTab} from '@/constants/settings/util' +import {settingsFeedbackTab} from '@/constants/settings' import {useDaemonState} from '@/stores/daemon' export type Size = 'Closed' | 'Small' | 'Big' diff --git a/shared/common-adapters/reload.tsx b/shared/common-adapters/reload.tsx index 08fe71c05cd7..03279bdf596a 100644 --- a/shared/common-adapters/reload.tsx +++ b/shared/common-adapters/reload.tsx @@ -9,7 +9,7 @@ import Text from './text' import Button from './button' import Icon from './icon' import type {RPCError} from '@/util/errors' -import {settingsFeedbackTab} from '@/constants/settings/util' +import {settingsFeedbackTab} from '@/constants/settings' import {useConfigState} from '@/stores/config' const Kb = { diff --git a/shared/constants/chat2/convostate.tsx b/shared/constants/chat2/convostate.tsx index a1c4d33dd1df..bb1e0e7a016f 100644 --- a/shared/constants/chat2/convostate.tsx +++ b/shared/constants/chat2/convostate.tsx @@ -23,7 +23,7 @@ import * as Message from './message' import * as Meta from './meta' import * as React from 'react' import * as Z from '@/util/zustand' -import {makeActionForOpenPathInFilesTab} from '@/constants/fs/util' +import {makeActionForOpenPathInFilesTab} from '@/constants/fs' import HiddenString from '@/util/hidden-string' import isEqual from 'lodash/isEqual' import logger from '@/logger' @@ -41,7 +41,7 @@ import {hexToUint8Array} from 'uint8array-extras' import assign from 'lodash/assign' import {clearChatTimeCache} from '@/util/timestamp' import {registerDebugClear} from '@/util/debug' -import * as Config from '@/constants/config/util' +import * as Config from '@/constants/config' import {isMobile} from '@/constants/platform' import {enumKeys, ignorePromise, shallowEqual} from '../utils' import * as Strings from '@/constants/strings' diff --git a/shared/constants/chat2/util.tsx b/shared/constants/chat2/index.tsx similarity index 100% rename from shared/constants/chat2/util.tsx rename to shared/constants/chat2/index.tsx diff --git a/shared/constants/config/util.tsx b/shared/constants/config.tsx similarity index 100% rename from shared/constants/config/util.tsx rename to shared/constants/config.tsx diff --git a/shared/constants/crypto/util.tsx b/shared/constants/crypto.tsx similarity index 100% rename from shared/constants/crypto/util.tsx rename to shared/constants/crypto.tsx diff --git a/shared/constants/fs/util.tsx b/shared/constants/fs/index.tsx similarity index 99% rename from shared/constants/fs/util.tsx rename to shared/constants/fs/index.tsx index d57ccfd6c7cc..543c1ff5d733 100644 --- a/shared/constants/fs/util.tsx +++ b/shared/constants/fs/index.tsx @@ -2,8 +2,8 @@ import type * as React from 'react' import * as Tabs from '../tabs' import * as T from '../types' import {isLinux, isMobile} from '../platform' -import {settingsFsTab} from '../settings/util' -import {navigateAppend} from '../router2/util' +import {settingsFsTab} from '../settings' +import {navigateAppend} from '../router2' export const makeActionForOpenPathInFilesTab = ( // TODO: remove the second arg when we are done with migrating to nav2 path: T.FS.Path diff --git a/shared/constants/init/index.desktop.tsx b/shared/constants/init/index.desktop.tsx index c7ba7e02fb83..1b239d9bad46 100644 --- a/shared/constants/init/index.desktop.tsx +++ b/shared/constants/init/index.desktop.tsx @@ -18,7 +18,7 @@ import {isLinux, isWindows} from '@/constants/platform.desktop' import {kbfsNotification} from '@/constants/platform-specific/kbfs-notifications' import {skipAppFocusActions} from '@/local-debug.desktop' import NotifyPopup from '@/util/notify-popup' -import {noKBFSFailReason} from '@/constants/config/util' +import {noKBFSFailReason} from '@/constants/config' import {initSharedSubscriptions, _onEngineIncoming} from './shared' import {wrapErrors} from '@/util/debug' diff --git a/shared/constants/notifications/util.tsx b/shared/constants/notifications.tsx similarity index 100% rename from shared/constants/notifications/util.tsx rename to shared/constants/notifications.tsx diff --git a/shared/constants/people/util.tsx b/shared/constants/people.tsx similarity index 100% rename from shared/constants/people/util.tsx rename to shared/constants/people.tsx diff --git a/shared/constants/push.native.tsx b/shared/constants/push.native.tsx index 7f115f028fe5..968e5785ab58 100644 --- a/shared/constants/push.native.tsx +++ b/shared/constants/push.native.tsx @@ -1,7 +1,7 @@ import * as Tabs from '@/constants/tabs' import * as S from '@/constants/strings' import {ignorePromise, neverThrowPromiseFunc, timeoutPromise} from '@/constants/utils' -import {navigateAppend, navUpToScreen, switchTab} from '@/constants/router2/util' +import {navigateAppend, navUpToScreen, switchTab} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' diff --git a/shared/constants/router2/util.tsx b/shared/constants/router2.tsx similarity index 100% rename from shared/constants/router2/util.tsx rename to shared/constants/router2.tsx diff --git a/shared/constants/settings/util.tsx b/shared/constants/settings.tsx similarity index 100% rename from shared/constants/settings/util.tsx rename to shared/constants/settings.tsx diff --git a/shared/constants/teams/util.tsx b/shared/constants/teams.tsx similarity index 100% rename from shared/constants/teams/util.tsx rename to shared/constants/teams.tsx diff --git a/shared/constants/tracker2/util.tsx b/shared/constants/tracker2.tsx similarity index 100% rename from shared/constants/tracker2/util.tsx rename to shared/constants/tracker2.tsx diff --git a/shared/constants/unlock-folders/util.tsx b/shared/constants/unlock-folders.tsx similarity index 100% rename from shared/constants/unlock-folders/util.tsx rename to shared/constants/unlock-folders.tsx diff --git a/shared/constants/users/util.tsx b/shared/constants/users.tsx similarity index 100% rename from shared/constants/users/util.tsx rename to shared/constants/users.tsx diff --git a/shared/crypto/routes.tsx b/shared/crypto/routes.tsx index da93e894f5bb..14200ecfdaf5 100644 --- a/shared/crypto/routes.tsx +++ b/shared/crypto/routes.tsx @@ -1,6 +1,6 @@ import * as React from 'react' import * as C from '@/constants' -import * as Crypto from '@/constants/crypto/util' +import * as Crypto from '@/constants/crypto' import {HeaderLeftCancel2, type HeaderBackButtonProps} from '@/common-adapters/header-hoc' import cryptoTeamBuilder from '../team-building/page' diff --git a/shared/desktop/renderer/main2.desktop.tsx b/shared/desktop/renderer/main2.desktop.tsx index 9a4faab9139f..5a1f39baa4a6 100644 --- a/shared/desktop/renderer/main2.desktop.tsx +++ b/shared/desktop/renderer/main2.desktop.tsx @@ -16,7 +16,7 @@ import {useConfigState} from '@/stores/config' import {usePinentryState} from '@/stores/pinentry' import * as T from '@/constants/types' import {RPCError} from '@/util/errors' -import {switchTab} from '@/constants/router2/util' +import {switchTab} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {onEngineConnected, onEngineDisconnected} from '@/constants/init/index.desktop' import {handleAppLink, handleSaltPackOpen} from '@/constants/deeplinks' diff --git a/shared/login/routes.tsx b/shared/login/routes.tsx index f6d31a7081eb..06d196706d66 100644 --- a/shared/login/routes.tsx +++ b/shared/login/routes.tsx @@ -5,7 +5,7 @@ import {InfoIcon} from '@/signup/common' import {newRoutes as provisionRoutes} from '../provision/routes-sub' import {sharedNewRoutes as settingsRoutes} from '../settings/routes' import {newRoutes as signupRoutes} from './signup/routes' -import {settingsFeedbackTab} from '@/constants/settings/util' +import {settingsFeedbackTab} from '@/constants/settings' const recoverPasswordStyles = Kb.Styles.styleSheetCreate(() => ({ questionBox: Kb.Styles.padding(Kb.Styles.globalMargins.tiny, Kb.Styles.globalMargins.tiny, 0), diff --git a/shared/people/announcement.tsx b/shared/people/announcement.tsx index 8e44e7145ec9..d3807eff4157 100644 --- a/shared/people/announcement.tsx +++ b/shared/people/announcement.tsx @@ -4,7 +4,7 @@ import * as T from '@/constants/types' import openURL from '@/util/open-url' import * as Kb from '@/common-adapters' import PeopleItem from './item' -import * as Settings from '@/constants/settings/util' +import * as Settings from '@/constants/settings' import {usePeopleState} from '@/stores/people' type OwnProps = { diff --git a/shared/people/todo.tsx b/shared/people/todo.tsx index 87cafea4576a..016bc55b3d41 100644 --- a/shared/people/todo.tsx +++ b/shared/people/todo.tsx @@ -8,7 +8,7 @@ import PeopleItem, {type TaskButton} from './item' import * as Kb from '@/common-adapters' import {useSettingsPhoneState} from '@/stores/settings-phone' import {useSettingsEmailState} from '@/stores/settings-email' -import {settingsAccountTab, settingsGitTab} from '@/constants/settings/util' +import {settingsAccountTab, settingsGitTab} from '@/constants/settings' import {useTrackerState} from '@/stores/tracker2' import {useProfileState} from '@/stores/profile' import {usePeopleState, todoTypes} from '@/stores/people' diff --git a/shared/router-v2/account-switcher/index.tsx b/shared/router-v2/account-switcher/index.tsx index fa570869a785..f4a67159ff4d 100644 --- a/shared/router-v2/account-switcher/index.tsx +++ b/shared/router-v2/account-switcher/index.tsx @@ -4,7 +4,7 @@ import {useConfigState} from '@/stores/config' import * as Kb from '@/common-adapters' import * as React from 'react' import type * as T from '@/constants/types' -import {settingsLogOutTab} from '@/constants/settings/util' +import {settingsLogOutTab} from '@/constants/settings' import {useTrackerState} from '@/stores/tracker2' import {useProfileState} from '@/stores/profile' import {useUsersState} from '@/stores/users' diff --git a/shared/router-v2/tab-bar.desktop.tsx b/shared/router-v2/tab-bar.desktop.tsx index a9cceadc90c8..67baf715faf2 100644 --- a/shared/router-v2/tab-bar.desktop.tsx +++ b/shared/router-v2/tab-bar.desktop.tsx @@ -13,7 +13,7 @@ import openURL from '@/util/open-url' import {isLinux} from '@/constants/platform' import KB2 from '@/util/electron.desktop' import './tab-bar.css' -import {settingsLogOutTab} from '@/constants/settings/util' +import {settingsLogOutTab} from '@/constants/settings' import {useTrackerState} from '@/stores/tracker2' import {useFSState} from '@/stores/fs' import {useProfileState} from '@/stores/profile' diff --git a/shared/settings/routes.tsx b/shared/settings/routes.tsx index 71bf575d9e67..dead7baabb06 100644 --- a/shared/settings/routes.tsx +++ b/shared/settings/routes.tsx @@ -3,7 +3,7 @@ import * as C from '@/constants' import {newRoutes as devicesRoutes} from '../devices/routes' import {newRoutes as gitRoutes} from '../git/routes' import {newRoutes as walletsRoutes} from '../wallets/routes' -import * as Settings from '@/constants/settings/util' +import * as Settings from '@/constants/settings' const SettingsRootDesktop = React.lazy(async () => import('./root-desktop-tablet')) diff --git a/shared/stores/archive.tsx b/shared/stores/archive.tsx index 450e6b3ec185..cfca7916add7 100644 --- a/shared/stores/archive.tsx +++ b/shared/stores/archive.tsx @@ -2,7 +2,7 @@ import * as T from '../constants/types' import * as Z from '@/util/zustand' import {ignorePromise} from '../constants/utils' import * as EngineGen from '@/actions/engine-gen-gen' -import {pathToRPCPath} from '@/constants/fs/util' +import {pathToRPCPath} from '@/constants/fs' import {formatTimeForPopup} from '@/util/timestamp' import {uint8ArrayToHex} from 'uint8array-extras' import {isMobile} from '../constants/platform' diff --git a/shared/stores/autoreset.tsx b/shared/stores/autoreset.tsx index af4e33076267..2ab312814930 100644 --- a/shared/stores/autoreset.tsx +++ b/shared/stores/autoreset.tsx @@ -5,7 +5,7 @@ import * as T from '@/constants/types' import * as EngineGen from '@/actions/engine-gen-gen' import logger from '@/logger' import {RPCError} from '@/util/errors' -import {navigateAppend, navUpToScreen} from '@/constants/router2/util' +import {navigateAppend, navUpToScreen} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' type Store = T.Immutable<{ diff --git a/shared/stores/chat2.tsx b/shared/stores/chat2.tsx index 18936b18c5c4..cae3e1ae7c13 100644 --- a/shared/stores/chat2.tsx +++ b/shared/stores/chat2.tsx @@ -5,7 +5,7 @@ import * as EngineGen from '@/actions/engine-gen-gen' import type * as ConfigConstants from '@/stores/config' import * as Message from '@/constants/chat2/message' import * as Router2 from '@/stores/router2' -import * as TeamConstants from '@/constants/teams/util' +import * as TeamConstants from '@/constants/teams' import logger from '@/logger' import {RPCError} from '@/util/errors' import * as Meta from '@/constants/chat2/meta' @@ -16,7 +16,7 @@ import {clearChatStores, chatStores} from '@/constants/chat2/convostate' import {uint8ArrayToString} from 'uint8array-extras' import isEqual from 'lodash/isEqual' import {bodyToJSON} from '@/constants/rpc-utils' -import {navigateAppend, navUpToScreen, switchTab} from '@/constants/router2/util' +import {navigateAppend, navUpToScreen, switchTab} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' diff --git a/shared/stores/config.tsx b/shared/stores/config.tsx index d1a2498cbe20..bed141114cad 100644 --- a/shared/stores/config.tsx +++ b/shared/stores/config.tsx @@ -11,8 +11,8 @@ import type {Tab} from '@/constants/tabs' import {RPCError, convertToError, isEOFError, isErrorTransient, niceError} from '@/util/errors' import {defaultUseNativeFrame, isMobile} from '@/constants/platform' import {type CommonResponseHandler} from '@/engine/types' -import {invalidPasswordErrorString} from '@/constants/config/util' -import {navigateAppend} from '@/constants/router2/util' +import {invalidPasswordErrorString} from '@/constants/config' +import {navigateAppend} from '@/constants/router2' type Store = T.Immutable<{ active: boolean diff --git a/shared/stores/crypto.tsx b/shared/stores/crypto.tsx index 881fb2f59a11..99fd2fdd3781 100644 --- a/shared/stores/crypto.tsx +++ b/shared/stores/crypto.tsx @@ -6,10 +6,10 @@ import HiddenString from '@/util/hidden-string' import logger from '@/logger' import * as T from '@/constants/types' import {RPCError} from '@/util/errors' -import {navigateAppend} from '@/constants/router2/util' +import {navigateAppend} from '@/constants/router2' import {useCurrentUserState} from '@/stores/current-user' -import {Operations} from '@/constants/crypto/util' -export * from '@/constants/crypto/util' +import {Operations} from '@/constants/crypto' +export * from '@/constants/crypto' type CommonStore = { bytesComplete: number diff --git a/shared/stores/fs.tsx b/shared/stores/fs.tsx index ace4730a19c4..1cf21b1987d9 100644 --- a/shared/stores/fs.tsx +++ b/shared/stores/fs.tsx @@ -11,13 +11,13 @@ import logger from '@/logger' import {tlfToPreferredOrder} from '@/util/kbfs' import isObject from 'lodash/isObject' import isEqual from 'lodash/isEqual' -import {navigateAppend, navigateUp} from '@/constants/router2/util' +import {navigateAppend, navigateUp} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' -import * as Util from '@/constants/fs/util' +import * as Util from '@/constants/fs' -export * from '@/constants/fs/util' +export * from '@/constants/fs' const subscriptionDeduplicateIntervalSecond = 1 diff --git a/shared/stores/git.tsx b/shared/stores/git.tsx index 9ea6dbc1d2c6..3b09ac438bd7 100644 --- a/shared/stores/git.tsx +++ b/shared/stores/git.tsx @@ -5,7 +5,7 @@ import * as EngineGen from '@/actions/engine-gen-gen' import * as dateFns from 'date-fns' import * as Z from '@/util/zustand' import debounce from 'lodash/debounce' -import {navigateAppend} from '@/constants/router2/util' +import {navigateAppend} from '@/constants/router2' import {useConfigState} from '@/stores/config' const parseRepos = (results: ReadonlyArray) => { diff --git a/shared/stores/logout.tsx b/shared/stores/logout.tsx index 1f4983b4fa0d..1348cca9b47b 100644 --- a/shared/stores/logout.tsx +++ b/shared/stores/logout.tsx @@ -3,8 +3,8 @@ import {ignorePromise, timeoutPromise} from '@/constants/utils' import * as T from '@/constants/types' // normally util.container but it re-exports from us so break the cycle import * as Z from '@/util/zustand' -import {settingsPasswordTab} from '@/constants/settings/util' -import {navigateAppend} from '@/constants/router2/util' +import {settingsPasswordTab} from '@/constants/settings' +import {navigateAppend} from '@/constants/router2' import {isMobile} from '@/constants/platform' import * as Tabs from '@/constants/tabs' diff --git a/shared/stores/pinentry.tsx b/shared/stores/pinentry.tsx index 8ad874ff5cf1..8dc26ad61ace 100644 --- a/shared/stores/pinentry.tsx +++ b/shared/stores/pinentry.tsx @@ -2,7 +2,7 @@ import * as Z from '@/util/zustand' import * as EngineGen from '@/actions/engine-gen-gen' import * as T from '@/constants/types' import logger from '@/logger' -import {invalidPasswordErrorString} from '@/constants/config/util' +import {invalidPasswordErrorString} from '@/constants/config' import {wrapErrors} from '@/constants/utils' // This store has no dependencies on other stores and is safe to import directly from other stores. diff --git a/shared/stores/profile.tsx b/shared/stores/profile.tsx index 8d1f42ea1fef..57f864cb01c6 100644 --- a/shared/stores/profile.tsx +++ b/shared/stores/profile.tsx @@ -7,10 +7,10 @@ import logger from '@/logger' import openURL from '@/util/open-url' import {RPCError} from '@/util/errors' import {fixCrop} from '@/util/crop' -import {clearModals, navigateAppend, navigateUp} from '@/constants/router2/util' +import {clearModals, navigateAppend, navigateUp} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {useCurrentUserState} from '@/stores/current-user' -import {navToProfile} from '@/constants/router2/util' +import {navToProfile} from '@/constants/router2' type ProveGenericParams = { logoBlack: T.Tracker.SiteIconSet diff --git a/shared/stores/provision.tsx b/shared/stores/provision.tsx index b30d9a3d5e05..cf3f5c95f5ad 100644 --- a/shared/stores/provision.tsx +++ b/shared/stores/provision.tsx @@ -7,8 +7,8 @@ import {isMobile} from '@/constants/platform' import {type CommonResponseHandler} from '@/engine/types' import isEqual from 'lodash/isEqual' import {rpcDeviceToDevice} from '@/constants/rpc-utils' -import {invalidPasswordErrorString} from '@/constants/config/util' -import {clearModals, navigateAppend} from '@/constants/router2/util' +import {invalidPasswordErrorString} from '@/constants/config' +import {clearModals, navigateAppend} from '@/constants/router2' import {useWaitingState} from '@/stores/waiting' export type Device = { diff --git a/shared/stores/recover-password.tsx b/shared/stores/recover-password.tsx index 464bb2e1aa87..83b3dd4b8f52 100644 --- a/shared/stores/recover-password.tsx +++ b/shared/stores/recover-password.tsx @@ -6,7 +6,7 @@ import logger from '@/logger' import {RPCError} from '@/util/errors' import {type Device} from '@/stores/provision' import {rpcDeviceToDevice} from '@/constants/rpc-utils' -import {clearModals, navigateAppend, navigateUp} from '@/constants/router2/util' +import {clearModals, navigateAppend, navigateUp} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {useConfigState} from '@/stores/config' diff --git a/shared/stores/router2.tsx b/shared/stores/router2.tsx index 69864067988b..9fda0d2fd922 100644 --- a/shared/stores/router2.tsx +++ b/shared/stores/router2.tsx @@ -3,7 +3,7 @@ import * as Z from '@/util/zustand' import * as Tabs from '@/constants/tabs' import type {RouteKeys} from '@/router-v2/route-params' import {storeRegistry} from '@/constants/store-registry' -import * as Util from '@/constants/router2/util' +import * as Util from '@/constants/router2' export { type NavState, @@ -21,8 +21,8 @@ export { getRouteLoggedIn, useSafeFocusEffect, makeScreen, -} from '@/constants/router2/util' -export type {PathParam, Navigator} from '@/constants/router2/util' +} from '@/constants/router2' +export type {PathParam, Navigator} from '@/constants/router2' type Store = T.Immutable<{ navState?: unknown diff --git a/shared/stores/settings-contacts.native.tsx b/shared/stores/settings-contacts.native.tsx index 786e6d0710ab..21b095955efd 100644 --- a/shared/stores/settings-contacts.native.tsx +++ b/shared/stores/settings-contacts.native.tsx @@ -10,7 +10,7 @@ import {RPCError} from '@/util/errors' import {getDefaultCountryCode} from 'react-native-kb' import {getE164} from '@/util/phone-numbers' import {pluralize} from '@/util/string' -import {navigateAppend} from '@/constants/router2/util' +import {navigateAppend} from '@/constants/router2' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' import {useWaitingState} from '@/stores/waiting' diff --git a/shared/stores/settings-invites.tsx b/shared/stores/settings-invites.tsx index 75cf71ef468f..93e5df2833bf 100644 --- a/shared/stores/settings-invites.tsx +++ b/shared/stores/settings-invites.tsx @@ -5,7 +5,7 @@ import {RPCError} from '@/util/errors' import logger from '@/logger' import trim from 'lodash/trim' import * as T from '@/constants/types' -import {navigateAppend} from '@/constants/router2/util' +import {navigateAppend} from '@/constants/router2' type InviteBase = { id: string diff --git a/shared/stores/settings-password.tsx b/shared/stores/settings-password.tsx index 138097633658..0b3c441f2422 100644 --- a/shared/stores/settings-password.tsx +++ b/shared/stores/settings-password.tsx @@ -4,7 +4,7 @@ import {waitingKeySettingsGeneric} from '@/constants/strings' import logger from '@/logger' import {RPCError} from '@/util/errors' import * as T from '@/constants/types' -import {navigateUp} from '@/constants/router2/util' +import {navigateUp} from '@/constants/router2' import {useLogoutState} from '@/stores/logout' type Store = T.Immutable<{ diff --git a/shared/stores/settings.tsx b/shared/stores/settings.tsx index 73fbe751a5f8..7954c2f818cb 100644 --- a/shared/stores/settings.tsx +++ b/shared/stores/settings.tsx @@ -7,14 +7,14 @@ import * as Z from '@/util/zustand' import {RPCError} from '@/util/errors' import * as Tabs from '@/constants/tabs' import logger from '@/logger' -import {clearModals, navigateAppend, switchTab} from '@/constants/router2/util' +import {clearModals, navigateAppend, switchTab} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' import {useWaitingState} from '@/stores/waiting' -import {processorProfileInProgressKey, traceInProgressKey} from '@/constants/settings/util' +import {processorProfileInProgressKey, traceInProgressKey} from '@/constants/settings' -export * from '@/constants/settings/util' +export * from '@/constants/settings' type Store = T.Immutable<{ checkPasswordIsCorrect?: boolean diff --git a/shared/stores/signup.tsx b/shared/stores/signup.tsx index 2a0058d0f5cf..f128cb185893 100644 --- a/shared/stores/signup.tsx +++ b/shared/stores/signup.tsx @@ -8,7 +8,7 @@ import logger from '@/logger' import trim from 'lodash/trim' import {RPCError} from '@/util/errors' import {isValidEmail, isValidName, isValidUsername} from '@/util/simple-validators' -import {navigateAppend, navigateUp} from '@/constants/router2/util' +import {navigateAppend, navigateUp} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {useConfigState} from '@/stores/config' diff --git a/shared/stores/team-building.tsx b/shared/stores/team-building.tsx index 4db76d25466f..bd1100b809d5 100644 --- a/shared/stores/team-building.tsx +++ b/shared/stores/team-building.tsx @@ -12,7 +12,7 @@ import {type StoreApi, type UseBoundStore, useStore} from 'zustand' import {validateEmailAddress} from '@/util/email-address' import {registerDebugClear} from '@/util/debug' import {searchWaitingKey} from '@/constants/team-building/utils' -import {navigateUp} from '@/constants/router2/util' +import {navigateUp} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {useCryptoState} from '@/stores/crypto' export {allServices, selfToUser, searchWaitingKey} from '@/constants/team-building/utils' diff --git a/shared/stores/teams.tsx b/shared/stores/teams.tsx index 27fbb2f9fac0..af2dd3e332fa 100644 --- a/shared/stores/teams.tsx +++ b/shared/stores/teams.tsx @@ -9,7 +9,7 @@ import { navigateUp, navUpToScreen, navToProfile, -} from '@/constants/router2/util' +} from '@/constants/router2' import * as Z from '@/util/zustand' import invert from 'lodash/invert' import logger from '@/logger' @@ -22,8 +22,8 @@ import {fixCrop} from '@/util/crop' import {storeRegistry} from '@/constants/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' -import * as Util from '@/constants/teams/util' -import {getTab} from '@/constants/router2/util' +import * as Util from '@/constants/teams' +import {getTab} from '@/constants/router2' export { baseRetentionPolicies, @@ -33,7 +33,7 @@ export { teamRoleByEnum, retentionPolicyToServiceRetentionPolicy, userIsRoleInTeamWithInfo, -} from '@/constants/teams/util' +} from '@/constants/teams' export const teamRoleTypes = ['reader', 'writer', 'admin', 'owner'] as const diff --git a/shared/stores/tracker2.tsx b/shared/stores/tracker2.tsx index 1fa1152e9c29..efca69cd2f9e 100644 --- a/shared/stores/tracker2.tsx +++ b/shared/stores/tracker2.tsx @@ -6,7 +6,7 @@ import logger from '@/logger' import * as T from '@/constants/types' import {RPCError} from '@/util/errors' import {mapGetEnsureValue} from '@/util/map' -import {navigateAppend, navigateUp} from '@/constants/router2/util' +import {navigateAppend, navigateUp} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {useCurrentUserState} from '@/stores/current-user' diff --git a/shared/teams/team/menu-container.tsx b/shared/teams/team/menu-container.tsx index fdc3047a780a..d618e52631eb 100644 --- a/shared/teams/team/menu-container.tsx +++ b/shared/teams/team/menu-container.tsx @@ -1,7 +1,7 @@ import * as C from '@/constants' import * as Kb from '@/common-adapters' import type * as React from 'react' -import * as FS from '@/constants/fs/util' +import * as FS from '@/constants/fs' import * as Teams from '@/stores/teams' import capitalize from 'lodash/capitalize' import * as T from '@/constants/types' diff --git a/shared/whats-new/versions.tsx b/shared/whats-new/versions.tsx index 05433c1fa130..ddf79961c28c 100644 --- a/shared/whats-new/versions.tsx +++ b/shared/whats-new/versions.tsx @@ -1,10 +1,10 @@ import * as C from '@/constants' -import {encryptTab} from '@/constants/crypto/util' +import {encryptTab} from '@/constants/crypto' import type * as React from 'react' import * as Kb from '@/common-adapters' import {keybaseFM} from '@/stores/whats-new' import NewFeatureRow from './new-feature-row' -import {settingsCryptoTab, settingsDisplayTab} from '@/constants/settings/util' +import {settingsCryptoTab, settingsDisplayTab} from '@/constants/settings' export type VersionProps = { seen: boolean From ab333267e3f21e2d8541cf4d9456565122b41f5e Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Mon, 12 Jan 2026 09:52:39 -0500 Subject: [PATCH 2/7] WIP --- shared/constants/chat2/convostate.tsx | 4 ++-- shared/constants/chat2/message.tsx | 8 ++++---- shared/constants/chat2/meta.tsx | 6 +++--- shared/constants/config.tsx | 2 +- shared/constants/crypto.tsx | 2 +- shared/constants/deeplinks/index.tsx | 4 ++-- shared/constants/fs/platform-specific.desktop.tsx | 2 +- shared/constants/router2.tsx | 11 +++++------ shared/constants/teams.tsx | 2 +- 9 files changed, 20 insertions(+), 21 deletions(-) diff --git a/shared/constants/chat2/convostate.tsx b/shared/constants/chat2/convostate.tsx index bb1e0e7a016f..edf4bdf966ea 100644 --- a/shared/constants/chat2/convostate.tsx +++ b/shared/constants/chat2/convostate.tsx @@ -1,6 +1,6 @@ // TODO remove useChatNavigateAppend // TODO remove -import * as TeamsUtil from '../teams/util' +import * as TeamsUtil from '../teams' import * as PlatformSpecific from '../platform-specific' import { clearModals, @@ -11,7 +11,7 @@ import { getVisibleScreen, getModalStack, navToThread, -} from '../router2/util' +} from '../router2' import {isIOS} from '../platform' import {updateImmer} from '../utils' import * as T from '../types' diff --git a/shared/constants/chat2/message.tsx b/shared/constants/chat2/message.tsx index c35c576d07e2..2897f2899bb1 100644 --- a/shared/constants/chat2/message.tsx +++ b/shared/constants/chat2/message.tsx @@ -1,14 +1,14 @@ // Message related constants import * as T from '../types' -import * as TeamsUtil from '../teams/util' +import * as TeamsUtil from '@/constants/teams' import type * as ConvoConstants from './convostate' import HiddenString from '@/util/hidden-string' import logger from '@/logger' -import type * as MessageTypes from '../types/chat2/message' +import type * as MessageTypes from '@/constants/types/chat2/message' import type {ServiceId} from 'util/platforms' -import {noConversationIDKey} from '../types/chat2/common' +import {noConversationIDKey} from '@/constants/types/chat2/common' import invert from 'lodash/invert' -import {isIOS, isMobile} from '../platform' +import {isIOS, isMobile} from '@/constants/platform' const noString = new HiddenString('') diff --git a/shared/constants/chat2/meta.tsx b/shared/constants/chat2/meta.tsx index 93b889627441..bcbc6717cc93 100644 --- a/shared/constants/chat2/meta.tsx +++ b/shared/constants/chat2/meta.tsx @@ -1,10 +1,10 @@ // Meta manages the metadata about a conversation. Participants, isMuted, reset people, etc. Things that drive the inbox import {shallowEqual} from '../utils' -import * as T from '../types' -import * as Teams from '../teams/util' +import * as T from '@/constants/types' +import * as Teams from '@/constants/teams' import * as Message from './message' import {base64ToUint8Array, uint8ArrayToHex} from 'uint8array-extras' -import {storeRegistry} from '../store-registry' +import {storeRegistry} from '@/constants/store-registry' import {useCurrentUserState} from '@/stores/current-user' const conversationMemberStatusToMembershipType = (m: T.RPCChat.ConversationMemberStatus) => { diff --git a/shared/constants/config.tsx b/shared/constants/config.tsx index b44de040a866..954a6daddde8 100644 --- a/shared/constants/config.tsx +++ b/shared/constants/config.tsx @@ -1,5 +1,5 @@ import uniq from 'lodash/uniq' -import {runMode} from '../platform' +import {runMode} from './platform' // An ugly error message from the service that we'd like to rewrite ourselves. export const invalidPasswordErrorString = 'Bad password: Invalid password. Server rejected login attempt..' diff --git a/shared/constants/crypto.tsx b/shared/constants/crypto.tsx index 6f88e37d8e57..459215e60c1f 100644 --- a/shared/constants/crypto.tsx +++ b/shared/constants/crypto.tsx @@ -1,4 +1,4 @@ -import {isMobile} from '../platform' +import {isMobile} from './platform' export const saltpackDocumentation = 'https://saltpack.org' export const inputDesktopMaxHeight = {maxHeight: '30%'} as const diff --git a/shared/constants/deeplinks/index.tsx b/shared/constants/deeplinks/index.tsx index 998f184dc780..10921b92b0f6 100644 --- a/shared/constants/deeplinks/index.tsx +++ b/shared/constants/deeplinks/index.tsx @@ -1,11 +1,11 @@ -import * as Crypto from '../crypto/util' +import * as Crypto from '../crypto' import * as Tabs from '../tabs' import {isPathSaltpackEncrypted, isPathSaltpackSigned} from '@/util/path' import type HiddenString from '@/util/hidden-string' import URL from 'url-parse' import logger from '@/logger' import * as T from '@/constants/types' -import {navigateAppend, switchTab} from '../router2/util' +import {navigateAppend, switchTab} from '../router2' import {storeRegistry} from '../store-registry' import {useCryptoState} from '@/stores/crypto' import {useConfigState} from '@/stores/config' diff --git a/shared/constants/fs/platform-specific.desktop.tsx b/shared/constants/fs/platform-specific.desktop.tsx index 557910c110af..86c3137c337c 100644 --- a/shared/constants/fs/platform-specific.desktop.tsx +++ b/shared/constants/fs/platform-specific.desktop.tsx @@ -7,7 +7,7 @@ import logger from '@/logger' import * as Path from '@/util/path' import KB2 from '@/util/electron.desktop' import {uint8ArrayToHex} from 'uint8array-extras' -import {navigateAppend} from '../router2/util' +import {navigateAppend} from '../router2' import {useConfigState} from '@/stores/config' const useFSState = Constants.useFSState diff --git a/shared/constants/router2.tsx b/shared/constants/router2.tsx index f47b6a479a5e..5da352fedcb7 100644 --- a/shared/constants/router2.tsx +++ b/shared/constants/router2.tsx @@ -1,6 +1,6 @@ import type * as React from 'react' -import type * as T from '../types' -import * as Tabs from '../tabs' +import type * as T from './types' +import * as Tabs from './tabs' import { StackActions, CommonActions, @@ -10,11 +10,11 @@ import { type NavigationState, } from '@react-navigation/core' import type {NavigateAppendType, RouteKeys, RootParamList as KBRootParamList} from '@/router-v2/route-params' -import type {GetOptionsRet} from '../types/router2' +import type {GetOptionsRet} from './types/router2' import {produce} from 'immer' import isEqual from 'lodash/isEqual' -import {isMobile, isTablet} from '../platform' -import {shallowEqual, type ViewPropsToPageProps} from '../utils' +import {isMobile, isTablet} from './platform' +import {shallowEqual, type ViewPropsToPageProps} from './utils' import {registerDebugClear} from '@/util/debug' export const navigationRef = createNavigationContainerRef() @@ -440,4 +440,3 @@ export const appendEncryptRecipientsBuilder = () => { selected: 'cryptoTeamBuilder', }) } - diff --git a/shared/constants/teams.tsx b/shared/constants/teams.tsx index ce11cc0f9c40..5eb4fbea86ff 100644 --- a/shared/constants/teams.tsx +++ b/shared/constants/teams.tsx @@ -1,4 +1,4 @@ -import * as T from '../types' +import * as T from './types' import invert from 'lodash/invert' export const makeRetentionPolicy = ( From 6648c48fe10b10af302e35a480f3a01bc3ae5a3d Mon Sep 17 00:00:00 2001 From: Chris Nojima Date: Mon, 12 Jan 2026 10:03:14 -0500 Subject: [PATCH 3/7] WIP --- shared/constants/{deeplinks/index.tsx => deeplinks.tsx} | 0 .../{recover-password/utils.tsx => recover-password.tsx} | 0 .../constants/{team-building/utils.tsx => team-building.tsx} | 0 shared/constants/{wallets/utils.tsx => wallets.tsx} | 0 shared/constants/{whats-new/utils.tsx => whats-new.tsx} | 0 shared/stores/team-building.tsx | 4 ++-- shared/stores/wallets.tsx | 4 ++-- shared/stores/whats-new.tsx | 4 ++-- 8 files changed, 6 insertions(+), 6 deletions(-) rename shared/constants/{deeplinks/index.tsx => deeplinks.tsx} (100%) rename shared/constants/{recover-password/utils.tsx => recover-password.tsx} (100%) rename shared/constants/{team-building/utils.tsx => team-building.tsx} (100%) rename shared/constants/{wallets/utils.tsx => wallets.tsx} (100%) rename shared/constants/{whats-new/utils.tsx => whats-new.tsx} (100%) diff --git a/shared/constants/deeplinks/index.tsx b/shared/constants/deeplinks.tsx similarity index 100% rename from shared/constants/deeplinks/index.tsx rename to shared/constants/deeplinks.tsx diff --git a/shared/constants/recover-password/utils.tsx b/shared/constants/recover-password.tsx similarity index 100% rename from shared/constants/recover-password/utils.tsx rename to shared/constants/recover-password.tsx diff --git a/shared/constants/team-building/utils.tsx b/shared/constants/team-building.tsx similarity index 100% rename from shared/constants/team-building/utils.tsx rename to shared/constants/team-building.tsx diff --git a/shared/constants/wallets/utils.tsx b/shared/constants/wallets.tsx similarity index 100% rename from shared/constants/wallets/utils.tsx rename to shared/constants/wallets.tsx diff --git a/shared/constants/whats-new/utils.tsx b/shared/constants/whats-new.tsx similarity index 100% rename from shared/constants/whats-new/utils.tsx rename to shared/constants/whats-new.tsx diff --git a/shared/stores/team-building.tsx b/shared/stores/team-building.tsx index bd1100b809d5..c8e274f40028 100644 --- a/shared/stores/team-building.tsx +++ b/shared/stores/team-building.tsx @@ -11,11 +11,11 @@ import {serviceIdFromString} from '@/util/platforms' import {type StoreApi, type UseBoundStore, useStore} from 'zustand' import {validateEmailAddress} from '@/util/email-address' import {registerDebugClear} from '@/util/debug' -import {searchWaitingKey} from '@/constants/team-building/utils' +import {searchWaitingKey} from '@/constants/team-building' import {navigateUp} from '@/constants/router2' import {storeRegistry} from '@/constants/store-registry' import {useCryptoState} from '@/stores/crypto' -export {allServices, selfToUser, searchWaitingKey} from '@/constants/team-building/utils' +export {allServices, selfToUser, searchWaitingKey} from '@/constants/team-building' type Store = T.Immutable<{ namespace: T.TB.AllowedNamespace diff --git a/shared/stores/wallets.tsx b/shared/stores/wallets.tsx index e340fd2cf383..6fffb6c14dd2 100644 --- a/shared/stores/wallets.tsx +++ b/shared/stores/wallets.tsx @@ -1,10 +1,10 @@ import * as T from '@/constants/types' import {ignorePromise} from '@/constants/utils' import * as Z from '@/util/zustand' -import {loadAccountsWaitingKey} from '@/constants/wallets/utils' +import {loadAccountsWaitingKey} from '@/constants/wallets' import {useConfigState} from '@/stores/config' -export {loadAccountsWaitingKey} from '@/constants/wallets/utils' +export {loadAccountsWaitingKey} from '@/constants/wallets' export type Account = { accountID: string diff --git a/shared/stores/whats-new.tsx b/shared/stores/whats-new.tsx index 2944a3685655..e52289d7527c 100644 --- a/shared/stores/whats-new.tsx +++ b/shared/stores/whats-new.tsx @@ -1,9 +1,9 @@ import type * as T from '@/constants/types' import * as Z from '@/util/zustand' import {uint8ArrayToString} from 'uint8array-extras' -import {noVersion, getSeenVersions} from '@/constants/whats-new/utils' +import {noVersion, getSeenVersions} from '@/constants/whats-new' -export {currentVersion, lastVersion, lastLastVersion, keybaseFM} from '@/constants/whats-new/utils' +export {currentVersion, lastVersion, lastLastVersion, keybaseFM} from '@/constants/whats-new' // This store has no dependencies on other stores and is safe to import directly from other stores. type SeenVersionsMap = {[key in string]: boolean} From 7978bfc091cff25240153bdd7fd1642cccf311ca Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Mon, 12 Jan 2026 10:05:13 -0500 Subject: [PATCH 4/7] WIP --- shared/constants/deeplinks.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shared/constants/deeplinks.tsx b/shared/constants/deeplinks.tsx index 10921b92b0f6..5decd0102859 100644 --- a/shared/constants/deeplinks.tsx +++ b/shared/constants/deeplinks.tsx @@ -1,12 +1,12 @@ -import * as Crypto from '../crypto' -import * as Tabs from '../tabs' +import * as Crypto from './crypto' +import * as Tabs from './tabs' import {isPathSaltpackEncrypted, isPathSaltpackSigned} from '@/util/path' import type HiddenString from '@/util/hidden-string' import URL from 'url-parse' import logger from '@/logger' import * as T from '@/constants/types' -import {navigateAppend, switchTab} from '../router2' -import {storeRegistry} from '../store-registry' +import {navigateAppend, switchTab} from './router2' +import {storeRegistry} from './store-registry' import {useCryptoState} from '@/stores/crypto' import {useConfigState} from '@/stores/config' From 640ae67458a6de0c03f663a96cc89cbd9042df7f Mon Sep 17 00:00:00 2001 From: Chris Nojima Date: Mon, 12 Jan 2026 10:08:23 -0500 Subject: [PATCH 5/7] WIP --- shared/constants/chat2/convostate.tsx | 2 +- shared/constants/chat2/meta.tsx | 2 +- shared/constants/deeplinks.tsx | 2 +- shared/constants/init/shared.tsx | 2 +- shared/constants/platform-specific/push.native.tsx | 2 +- shared/constants/push.native.tsx | 2 +- shared/desktop/renderer/main2.desktop.tsx | 2 +- shared/stores/autoreset.tsx | 2 +- shared/stores/chat2.tsx | 2 +- shared/stores/fs.tsx | 2 +- shared/stores/notifications.tsx | 2 +- shared/stores/profile.tsx | 2 +- shared/stores/recover-password.tsx | 2 +- shared/stores/router2.tsx | 2 +- shared/stores/settings.tsx | 2 +- shared/stores/signup.tsx | 2 +- shared/{constants => stores}/store-registry.tsx | 0 shared/stores/team-building.tsx | 2 +- shared/stores/teams.tsx | 2 +- shared/stores/tracker2.tsx | 2 +- 20 files changed, 19 insertions(+), 19 deletions(-) rename shared/{constants => stores}/store-registry.tsx (100%) diff --git a/shared/constants/chat2/convostate.tsx b/shared/constants/chat2/convostate.tsx index edf4bdf966ea..0b6329782c17 100644 --- a/shared/constants/chat2/convostate.tsx +++ b/shared/constants/chat2/convostate.tsx @@ -46,7 +46,7 @@ import {isMobile} from '@/constants/platform' import {enumKeys, ignorePromise, shallowEqual} from '../utils' import * as Strings from '@/constants/strings' -import {storeRegistry} from '../store-registry' +import {storeRegistry} from '../../stores/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' diff --git a/shared/constants/chat2/meta.tsx b/shared/constants/chat2/meta.tsx index bcbc6717cc93..1540e8f9879f 100644 --- a/shared/constants/chat2/meta.tsx +++ b/shared/constants/chat2/meta.tsx @@ -4,7 +4,7 @@ import * as T from '@/constants/types' import * as Teams from '@/constants/teams' import * as Message from './message' import {base64ToUint8Array, uint8ArrayToHex} from 'uint8array-extras' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useCurrentUserState} from '@/stores/current-user' const conversationMemberStatusToMembershipType = (m: T.RPCChat.ConversationMemberStatus) => { diff --git a/shared/constants/deeplinks.tsx b/shared/constants/deeplinks.tsx index 5decd0102859..500d24c16be9 100644 --- a/shared/constants/deeplinks.tsx +++ b/shared/constants/deeplinks.tsx @@ -6,7 +6,7 @@ import URL from 'url-parse' import logger from '@/logger' import * as T from '@/constants/types' import {navigateAppend, switchTab} from './router2' -import {storeRegistry} from './store-registry' +import {storeRegistry} from '../stores/store-registry' import {useCryptoState} from '@/stores/crypto' import {useConfigState} from '@/stores/config' diff --git a/shared/constants/init/shared.tsx b/shared/constants/init/shared.tsx index 7be982c97f36..78c6c3c2ec1a 100644 --- a/shared/constants/init/shared.tsx +++ b/shared/constants/init/shared.tsx @@ -24,7 +24,7 @@ import type * as UseNotificationsStateType from '@/stores/notifications' import type * as UsePeopleStateType from '@/stores/people' import type * as UsePinentryStateType from '@/stores/pinentry' import {useProvisionState} from '@/stores/provision' -import {storeRegistry} from '../store-registry' +import {storeRegistry} from '../../stores/store-registry' import {useSettingsContactsState} from '@/stores/settings-contacts' import type * as UseSignupStateType from '@/stores/signup' import type * as UseTeamsStateType from '@/stores/teams' diff --git a/shared/constants/platform-specific/push.native.tsx b/shared/constants/platform-specific/push.native.tsx index 60d5fb4df93b..de122f6913b2 100644 --- a/shared/constants/platform-specific/push.native.tsx +++ b/shared/constants/platform-specific/push.native.tsx @@ -9,7 +9,7 @@ import { getInitialNotification, removeAllPendingNotificationRequests, } from 'react-native-kb' -import {storeRegistry} from '../store-registry' +import {storeRegistry} from '../../stores/store-registry' import {useConfigState} from '@/stores/config' import {useLogoutState} from '@/stores/logout' diff --git a/shared/constants/push.native.tsx b/shared/constants/push.native.tsx index 968e5785ab58..ea5e57e6d087 100644 --- a/shared/constants/push.native.tsx +++ b/shared/constants/push.native.tsx @@ -2,7 +2,7 @@ import * as Tabs from '@/constants/tabs' import * as S from '@/constants/strings' import {ignorePromise, neverThrowPromiseFunc, timeoutPromise} from '@/constants/utils' import {navigateAppend, navUpToScreen, switchTab} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' import {useLogoutState} from '@/stores/logout' diff --git a/shared/desktop/renderer/main2.desktop.tsx b/shared/desktop/renderer/main2.desktop.tsx index 5a1f39baa4a6..e2153297bafe 100644 --- a/shared/desktop/renderer/main2.desktop.tsx +++ b/shared/desktop/renderer/main2.desktop.tsx @@ -17,7 +17,7 @@ import {usePinentryState} from '@/stores/pinentry' import * as T from '@/constants/types' import {RPCError} from '@/util/errors' import {switchTab} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {onEngineConnected, onEngineDisconnected} from '@/constants/init/index.desktop' import {handleAppLink, handleSaltPackOpen} from '@/constants/deeplinks' import logger from '@/logger' diff --git a/shared/stores/autoreset.tsx b/shared/stores/autoreset.tsx index 2ab312814930..ebb8f4d61f74 100644 --- a/shared/stores/autoreset.tsx +++ b/shared/stores/autoreset.tsx @@ -6,7 +6,7 @@ import * as EngineGen from '@/actions/engine-gen-gen' import logger from '@/logger' import {RPCError} from '@/util/errors' import {navigateAppend, navUpToScreen} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' type Store = T.Immutable<{ active: boolean diff --git a/shared/stores/chat2.tsx b/shared/stores/chat2.tsx index cae3e1ae7c13..44db48471c5c 100644 --- a/shared/stores/chat2.tsx +++ b/shared/stores/chat2.tsx @@ -17,7 +17,7 @@ import {uint8ArrayToString} from 'uint8array-extras' import isEqual from 'lodash/isEqual' import {bodyToJSON} from '@/constants/rpc-utils' import {navigateAppend, navUpToScreen, switchTab} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' import {useWaitingState} from '@/stores/waiting' diff --git a/shared/stores/fs.tsx b/shared/stores/fs.tsx index 1cf21b1987d9..a7dbef4ad088 100644 --- a/shared/stores/fs.tsx +++ b/shared/stores/fs.tsx @@ -12,7 +12,7 @@ import {tlfToPreferredOrder} from '@/util/kbfs' import isObject from 'lodash/isObject' import isEqual from 'lodash/isEqual' import {navigateAppend, navigateUp} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' import * as Util from '@/constants/fs' diff --git a/shared/stores/notifications.tsx b/shared/stores/notifications.tsx index 3fcbeab6cb8c..5a2304b81a77 100644 --- a/shared/stores/notifications.tsx +++ b/shared/stores/notifications.tsx @@ -4,7 +4,7 @@ import type * as T from '@/constants/types' import {isMobile} from '@/constants/platform' import isEqual from 'lodash/isEqual' import * as Tabs from '@/constants/tabs' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' diff --git a/shared/stores/profile.tsx b/shared/stores/profile.tsx index 57f864cb01c6..b0c7204ced98 100644 --- a/shared/stores/profile.tsx +++ b/shared/stores/profile.tsx @@ -8,7 +8,7 @@ import openURL from '@/util/open-url' import {RPCError} from '@/util/errors' import {fixCrop} from '@/util/crop' import {clearModals, navigateAppend, navigateUp} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useCurrentUserState} from '@/stores/current-user' import {navToProfile} from '@/constants/router2' diff --git a/shared/stores/recover-password.tsx b/shared/stores/recover-password.tsx index 83b3dd4b8f52..80e96c070b3a 100644 --- a/shared/stores/recover-password.tsx +++ b/shared/stores/recover-password.tsx @@ -7,7 +7,7 @@ import {RPCError} from '@/util/errors' import {type Device} from '@/stores/provision' import {rpcDeviceToDevice} from '@/constants/rpc-utils' import {clearModals, navigateAppend, navigateUp} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useConfigState} from '@/stores/config' type Store = T.Immutable<{ diff --git a/shared/stores/router2.tsx b/shared/stores/router2.tsx index 9fda0d2fd922..0e5c0c8f2c6e 100644 --- a/shared/stores/router2.tsx +++ b/shared/stores/router2.tsx @@ -2,7 +2,7 @@ import type * as T from '@/constants/types' import * as Z from '@/util/zustand' import * as Tabs from '@/constants/tabs' import type {RouteKeys} from '@/router-v2/route-params' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import * as Util from '@/constants/router2' export { diff --git a/shared/stores/settings.tsx b/shared/stores/settings.tsx index 7954c2f818cb..27b3240712b7 100644 --- a/shared/stores/settings.tsx +++ b/shared/stores/settings.tsx @@ -8,7 +8,7 @@ import {RPCError} from '@/util/errors' import * as Tabs from '@/constants/tabs' import logger from '@/logger' import {clearModals, navigateAppend, switchTab} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' import {useWaitingState} from '@/stores/waiting' diff --git a/shared/stores/signup.tsx b/shared/stores/signup.tsx index f128cb185893..6e9c390979f6 100644 --- a/shared/stores/signup.tsx +++ b/shared/stores/signup.tsx @@ -9,7 +9,7 @@ import trim from 'lodash/trim' import {RPCError} from '@/util/errors' import {isValidEmail, isValidName, isValidUsername} from '@/util/simple-validators' import {navigateAppend, navigateUp} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useConfigState} from '@/stores/config' type Store = T.Immutable<{ diff --git a/shared/constants/store-registry.tsx b/shared/stores/store-registry.tsx similarity index 100% rename from shared/constants/store-registry.tsx rename to shared/stores/store-registry.tsx diff --git a/shared/stores/team-building.tsx b/shared/stores/team-building.tsx index c8e274f40028..5d0631b64b95 100644 --- a/shared/stores/team-building.tsx +++ b/shared/stores/team-building.tsx @@ -13,7 +13,7 @@ import {validateEmailAddress} from '@/util/email-address' import {registerDebugClear} from '@/util/debug' import {searchWaitingKey} from '@/constants/team-building' import {navigateUp} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useCryptoState} from '@/stores/crypto' export {allServices, selfToUser, searchWaitingKey} from '@/constants/team-building' diff --git a/shared/stores/teams.tsx b/shared/stores/teams.tsx index af2dd3e332fa..dd71b509190d 100644 --- a/shared/stores/teams.tsx +++ b/shared/stores/teams.tsx @@ -19,7 +19,7 @@ import {isMobile, isPhone} from '@/constants/platform' import {mapGetEnsureValue} from '@/util/map' import {bodyToJSON} from '@/constants/rpc-utils' import {fixCrop} from '@/util/crop' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' import * as Util from '@/constants/teams' diff --git a/shared/stores/tracker2.tsx b/shared/stores/tracker2.tsx index efca69cd2f9e..60712f586ef3 100644 --- a/shared/stores/tracker2.tsx +++ b/shared/stores/tracker2.tsx @@ -7,7 +7,7 @@ import * as T from '@/constants/types' import {RPCError} from '@/util/errors' import {mapGetEnsureValue} from '@/util/map' import {navigateAppend, navigateUp} from '@/constants/router2' -import {storeRegistry} from '@/constants/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useCurrentUserState} from '@/stores/current-user' export const noDetails: T.Tracker.Details = { From ea02241472943f69fa56322f50a36d2b64d863b0 Mon Sep 17 00:00:00 2001 From: chrisnojima Date: Mon, 12 Jan 2026 10:11:37 -0500 Subject: [PATCH 6/7] WIP --- shared/constants/team-building.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/constants/team-building.tsx b/shared/constants/team-building.tsx index e277db5d587f..bdad54ace64d 100644 --- a/shared/constants/team-building.tsx +++ b/shared/constants/team-building.tsx @@ -1,4 +1,4 @@ -import type * as T from '../types' +import type * as T from './types' const searchServices: Array = ['keybase', 'twitter', 'github', 'reddit', 'hackernews'] From 1d5e91b5305a3196e1f018f2ea6e03737cd9e092 Mon Sep 17 00:00:00 2001 From: Chris Nojima Date: Mon, 12 Jan 2026 10:18:28 -0500 Subject: [PATCH 7/7] WIP --- shared/constants/chat2/convostate.tsx | 2 +- shared/constants/deeplinks.tsx | 2 +- shared/constants/init/shared.tsx | 2 +- shared/constants/platform-specific/push.native.tsx | 2 +- shared/stores/archive.tsx | 6 +++--- shared/stores/settings-contacts.d.ts | 2 +- shared/stores/settings-contacts.native.tsx | 6 +++--- shared/team-building/phone-search.tsx | 2 +- shared/util/crop.tsx | 2 +- 9 files changed, 13 insertions(+), 13 deletions(-) diff --git a/shared/constants/chat2/convostate.tsx b/shared/constants/chat2/convostate.tsx index 0b6329782c17..5f2b250a8c10 100644 --- a/shared/constants/chat2/convostate.tsx +++ b/shared/constants/chat2/convostate.tsx @@ -46,7 +46,7 @@ import {isMobile} from '@/constants/platform' import {enumKeys, ignorePromise, shallowEqual} from '../utils' import * as Strings from '@/constants/strings' -import {storeRegistry} from '../../stores/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useConfigState} from '@/stores/config' import {useCurrentUserState} from '@/stores/current-user' diff --git a/shared/constants/deeplinks.tsx b/shared/constants/deeplinks.tsx index 500d24c16be9..23e8d713efc2 100644 --- a/shared/constants/deeplinks.tsx +++ b/shared/constants/deeplinks.tsx @@ -6,7 +6,7 @@ import URL from 'url-parse' import logger from '@/logger' import * as T from '@/constants/types' import {navigateAppend, switchTab} from './router2' -import {storeRegistry} from '../stores/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useCryptoState} from '@/stores/crypto' import {useConfigState} from '@/stores/config' diff --git a/shared/constants/init/shared.tsx b/shared/constants/init/shared.tsx index 78c6c3c2ec1a..9c148b3de4e6 100644 --- a/shared/constants/init/shared.tsx +++ b/shared/constants/init/shared.tsx @@ -24,7 +24,7 @@ import type * as UseNotificationsStateType from '@/stores/notifications' import type * as UsePeopleStateType from '@/stores/people' import type * as UsePinentryStateType from '@/stores/pinentry' import {useProvisionState} from '@/stores/provision' -import {storeRegistry} from '../../stores/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useSettingsContactsState} from '@/stores/settings-contacts' import type * as UseSignupStateType from '@/stores/signup' import type * as UseTeamsStateType from '@/stores/teams' diff --git a/shared/constants/platform-specific/push.native.tsx b/shared/constants/platform-specific/push.native.tsx index de122f6913b2..dd44edad2b3f 100644 --- a/shared/constants/platform-specific/push.native.tsx +++ b/shared/constants/platform-specific/push.native.tsx @@ -9,7 +9,7 @@ import { getInitialNotification, removeAllPendingNotificationRequests, } from 'react-native-kb' -import {storeRegistry} from '../../stores/store-registry' +import {storeRegistry} from '@/stores/store-registry' import {useConfigState} from '@/stores/config' import {useLogoutState} from '@/stores/logout' diff --git a/shared/stores/archive.tsx b/shared/stores/archive.tsx index cfca7916add7..f5869166c8d0 100644 --- a/shared/stores/archive.tsx +++ b/shared/stores/archive.tsx @@ -1,11 +1,11 @@ -import * as T from '../constants/types' +import * as T from '@/constants/types' import * as Z from '@/util/zustand' -import {ignorePromise} from '../constants/utils' +import {ignorePromise} from '@/constants/utils' import * as EngineGen from '@/actions/engine-gen-gen' import {pathToRPCPath} from '@/constants/fs' import {formatTimeForPopup} from '@/util/timestamp' import {uint8ArrayToHex} from 'uint8array-extras' -import {isMobile} from '../constants/platform' +import {isMobile} from '@/constants/platform' type ChatJob = { id: string diff --git a/shared/stores/settings-contacts.d.ts b/shared/stores/settings-contacts.d.ts index 0ab05a739542..2920c6643055 100644 --- a/shared/stores/settings-contacts.d.ts +++ b/shared/stores/settings-contacts.d.ts @@ -1,4 +1,4 @@ -import type * as T from '../constants/types' +import type * as T from '@/constants/types' import type {UseBoundStore, StoreApi} from 'zustand' type PermissionStatus = 'granted' | 'denied' | 'undetermined' | 'unknown' diff --git a/shared/stores/settings-contacts.native.tsx b/shared/stores/settings-contacts.native.tsx index 21b095955efd..5043bf04d1f3 100644 --- a/shared/stores/settings-contacts.native.tsx +++ b/shared/stores/settings-contacts.native.tsx @@ -1,7 +1,7 @@ import * as Contacts from 'expo-contacts' -import {ignorePromise} from '../constants/utils' -import {importContactsWaitingKey} from '../constants/strings' -import * as T from '../constants/types' +import {ignorePromise} from '@/constants/utils' +import {importContactsWaitingKey} from '@/constants/strings' +import * as T from '@/constants/types' import * as Z from '@/util/zustand' import {addNotificationRequest} from 'react-native-kb' import logger from '@/logger' diff --git a/shared/team-building/phone-search.tsx b/shared/team-building/phone-search.tsx index 993278b057c9..69a8a3d36f61 100644 --- a/shared/team-building/phone-search.tsx +++ b/shared/team-building/phone-search.tsx @@ -2,7 +2,7 @@ import * as C from '@/constants' import * as TB from '@/stores/team-building' import * as React from 'react' import * as Kb from '@/common-adapters/index' -import type * as T from 'constants/types' +import type * as T from '@/constants/types' import ContinueButton from './continue-button' import {useSettingsPhoneState} from '@/stores/settings-phone' diff --git a/shared/util/crop.tsx b/shared/util/crop.tsx index b06f65bb002b..2f3b745a0c57 100644 --- a/shared/util/crop.tsx +++ b/shared/util/crop.tsx @@ -1,4 +1,4 @@ -import type * as T from '../constants/types' +import type * as T from '@/constants/types' export const fixCrop = (c?: T.RPCChat.Keybase1.ImageCropRect) => { return c