From 5dbb3617446e2710cf9bbfc25ad8adcd335a3c63 Mon Sep 17 00:00:00 2001 From: Real Codesiman Date: Fri, 13 Nov 2026 15:57:55 +0700 Subject: [PATCH] feat(workspaces): auto-create default workspace for new accounts A brand-new account has no workspace membership, leaving the picker empty. Call the idempotent POST /v1/me/workspaces/default when the list resolves empty (as web does on its home page), then switch into the new workspace. Co-Authored-By: Claude Sonnet 5.5 --- src/api/generated/schema.ts | 116 ++++++++++++++++++ src/app/(app)/workspace-picker.tsx | 29 ++++- .../api/use-ensure-default-workspace.test.tsx | 93 ++++++++++++++ .../api/use-ensure-default-workspace.ts | 33 +++++ src/i18n/locales/ar.json | 3 +- src/i18n/locales/da.json | 3 +- src/i18n/locales/de.json | 3 +- src/i18n/locales/en.json | 3 +- src/i18n/locales/es.json | 3 +- src/i18n/locales/fi.json | 3 +- src/i18n/locales/fr.json | 3 +- src/i18n/locales/he.json | 3 +- src/i18n/locales/id.json | 3 +- src/i18n/locales/it.json | 3 +- src/i18n/locales/ja.json | 3 +- src/i18n/locales/nl.json | 3 +- src/i18n/locales/pt-BR.json | 3 +- src/i18n/locales/pt-PT.json | 3 +- src/i18n/locales/ro.json | 3 +- src/i18n/locales/sv.json | 3 +- src/i18n/locales/tr.json | 3 +- src/i18n/locales/vi.json | 3 +- src/i18n/locales/zh-CN.json | 3 +- src/i18n/locales/zh-TW.json | 3 +- 24 files changed, 310 insertions(+), 21 deletions(-) create mode 100644 src/features/workspaces/api/use-ensure-default-workspace.test.tsx create mode 100644 src/features/workspaces/api/use-ensure-default-workspace.ts diff --git a/src/api/generated/schema.ts b/src/api/generated/schema.ts index 6ae1fdf..319629e 100644 --- a/src/api/generated/schema.ts +++ b/src/api/generated/schema.ts @@ -6671,6 +6671,26 @@ export interface paths { patch?: never; trace?: never; }; + "/v1/me/workspaces/default": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + get?: never; + put?: never; + /** + * Ensure my default workspace + * @description Idempotent. When the signed-in user belongs to no workspace, creates their first one and returns it; otherwise returns `workspace: null`. + */ + post: operations["me.ensureDefaultWorkspace"]; + delete?: never; + options?: never; + head?: never; + patch?: never; + trace?: never; + }; "/v1/me/device-tokens": { parameters: { query?: never; @@ -162708,6 +162728,102 @@ export interface operations { }; }; }; + "me.ensureDefaultWorkspace": { + parameters: { + query?: never; + header?: never; + path?: never; + cookie?: never; + }; + requestBody?: { + content: { + "application/json": { + /** @description Name for the new workspace. Defaults to "'s workspace". */ + name?: string; + }; + }; + }; + responses: { + /** @description OK */ + 200: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + workspace: { + id: string; + /** Format: date-time */ + createdAt: string; + /** Format: date-time */ + updatedAt: string; + name: string; + defaultReply: string | null; + /** @enum {string} */ + defaultReplyFrequency: "allTime" | "oncePerHour" | "oncePerDay"; + targetCountry: string | null; + language: string; + timezone: string; + brandColor: string; + developmentMode: boolean; + smartResponseDelaySeconds: number | null; + isActive: boolean; + startTime: string | null; + endTime: string | null; + logo: string | null; + scheduledDeletionAt: string | null; + deletionRequestedById?: unknown | null; + deletionRequestedAt: string | null; + purgeStartedAt: string | null; + supportAccessUntil: string | null; + capiLimitedDataUse: boolean; + ownerId?: unknown; + tenantId?: unknown; + } | null; + }; + }; + }; + /** @description 400 */ + 400: { + headers: { + [name: string]: unknown; + }; + content: { + "application/json": { + /** @constant */ + defined: true; + /** @constant */ + code: "WORKSPACE_SELECTION_REQUIRED"; + /** @constant */ + status: 400; + /** @default Workspace selection is required */ + message: string; + data?: unknown; + } | { + /** @constant */ + defined: true; + /** @constant */ + code: "systemError"; + /** @constant */ + status: 400; + /** @default The request could not be processed */ + message: string; + data?: unknown; + } | { + /** @constant */ + defined: true; + /** @constant */ + code: "businessError"; + /** @constant */ + status: 400; + /** @default An error occurred while processing your request */ + message: string; + data?: unknown; + } | components["schemas"]["UndefinedError"]; + }; + }; + }; + }; "me.registerDeviceToken": { parameters: { query?: never; diff --git a/src/app/(app)/workspace-picker.tsx b/src/app/(app)/workspace-picker.tsx index 6dc6897..cbbc19a 100644 --- a/src/app/(app)/workspace-picker.tsx +++ b/src/app/(app)/workspace-picker.tsx @@ -1,3 +1,4 @@ +import { useCallback, useEffect, useRef } from 'react'; import { useTranslation } from 'react-i18next'; import { FlatList, RefreshControl, View } from 'react-native'; @@ -8,6 +9,7 @@ import { ErrorBanner } from '@/components/ui/error-banner'; import { Screen } from '@/components/ui/screen'; import { SkeletonRow } from '@/components/ui/skeleton'; import { Text } from '@/components/ui/text'; +import { useEnsureDefaultWorkspace } from '@/features/workspaces/api/use-ensure-default-workspace'; import { useSwitchWorkspace } from '@/features/workspaces/api/use-switch-workspace'; import { useWorkspaces, type Workspace } from '@/features/workspaces/api/use-workspaces'; import { WorkspaceRow } from '@/features/workspaces/workspace-row'; @@ -20,6 +22,25 @@ export default function WorkspacePickerScreen() { const currentWorkspaceId = useWorkspaceStore((state) => state.currentWorkspaceId); const { data: workspaces, isPending, isError, isRefetching, error, refetch } = useWorkspaces(); const switchWorkspace = useSwitchWorkspace(); + const ensureDefault = useEnsureDefaultWorkspace(); + const hasRequestedDefault = useRef(false); + const isListEmpty = workspaces !== undefined && workspaces.length === 0; + const { mutate: createDefaultWorkspace } = ensureDefault; + + const requestDefaultWorkspace = useCallback(() => { + hasRequestedDefault.current = true; + createDefaultWorkspace(undefined, { + onSuccess: (workspace) => { + if (workspace) switchWorkspace(workspace.id, { navigate: true }); + }, + }); + }, [createDefaultWorkspace, switchWorkspace]); + + // A brand-new account has no membership yet; web creates the first workspace lazily on its home + // page, so mobile asks the (idempotent) backend to do the same once the list resolves empty. + useEffect(() => { + if (isListEmpty && !hasRequestedDefault.current) requestDefaultWorkspace(); + }, [isListEmpty, requestDefaultWorkspace]); function handleSelect(workspace: Workspace) { switchWorkspace(workspace.id, { navigate: true }); @@ -31,7 +52,7 @@ export default function WorkspacePickerScreen() { {t('workspaces.title')} - {isPending ? ( + {isPending || (isListEmpty && (ensureDefault.isPending || ensureDefault.isIdle)) ? ( @@ -43,6 +64,12 @@ export default function WorkspacePickerScreen() { actionLabel={t('common.retry')} onAction={() => refetch()} /> + ) : isListEmpty && ensureDefault.isError ? ( + ) : workspaces && workspaces.length > 0 ? ( ({ + useTranslation: () => ({ + t: (key: string, vars?: { name: string }) => `${key}:${vars?.name ?? ''}`, + }), +})); + +jest.mock('@/api/client', () => ({ + apiClient: { POST: jest.fn() }, +})); + +function createWrapper(queryClient: QueryClient) { + return function QueryWrapper({ children }: PropsWithChildren) { + return {children}; + }; +} + +describe('useEnsureDefaultWorkspace', () => { + beforeEach(() => { + useAuthStore.getState().setSignedIn({ + id: 'user-1', + email: 'jane@example.com', + name: 'Jane', + mustChangePassword: false, + }); + }); + + afterEach(() => { + jest.clearAllMocks(); + }); + + it('posts a default name and invalidates the workspace list', async () => { + const workspace = { id: 'ws-1', name: "Jane's workspace", logo: null, brandColor: '#123456' }; + jest + .mocked(apiClient.POST) + .mockResolvedValue({ data: { workspace }, error: undefined } as never); + const queryClient = new QueryClient({ defaultOptions: { queries: { retry: false } } }); + const invalidate = jest.spyOn(queryClient, 'invalidateQueries'); + + const { result } = await renderHook(() => useEnsureDefaultWorkspace(), { + wrapper: createWrapper(queryClient), + }); + await act(async () => { + await result.current.mutateAsync(); + }); + + expect(apiClient.POST).toHaveBeenCalledWith('/v1/me/workspaces/default', { + body: { name: 'workspaces.defaultName:Jane' }, + }); + await waitFor(() => expect(result.current.data).toEqual(workspace)); + expect(invalidate).toHaveBeenCalledWith({ queryKey: queryKeys.workspaces() }); + }); + + it('resolves to null when the backend declines to create one', async () => { + jest + .mocked(apiClient.POST) + .mockResolvedValue({ data: { workspace: null }, error: undefined } as never); + const queryClient = new QueryClient(); + + const { result } = await renderHook(() => useEnsureDefaultWorkspace(), { + wrapper: createWrapper(queryClient), + }); + await act(async () => { + await result.current.mutateAsync(); + }); + + await waitFor(() => expect(result.current.data).toBeNull()); + }); + + it('throws ApiError on an error response', async () => { + jest.mocked(apiClient.POST).mockResolvedValue({ + data: undefined, + error: { code: 'systemError', status: 400, message: 'boom', defined: true }, + } as never); + const queryClient = new QueryClient(); + + const { result } = await renderHook(() => useEnsureDefaultWorkspace(), { + wrapper: createWrapper(queryClient), + }); + await act(async () => { + await expect(result.current.mutateAsync()).rejects.toBeInstanceOf(ApiError); + }); + }); +}); diff --git a/src/features/workspaces/api/use-ensure-default-workspace.ts b/src/features/workspaces/api/use-ensure-default-workspace.ts new file mode 100644 index 0000000..1cfc174 --- /dev/null +++ b/src/features/workspaces/api/use-ensure-default-workspace.ts @@ -0,0 +1,33 @@ +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { useTranslation } from 'react-i18next'; + +import { apiClient } from '@/api/client'; +import { ApiError } from '@/api/errors'; +import { queryKeys } from '@/api/query-keys'; +import type { Workspace } from '@/features/workspaces/api/use-workspaces'; +import { useAuthStore } from '@/stores/use-auth-store'; + +/** + * Creates the signed-in user's first workspace (`POST /v1/me/workspaces/default`). The backend is + * idempotent and resolves to `null` when the user already belongs to a workspace or a plan limit + * blocks creation, so callers must handle a null result. + */ +export function useEnsureDefaultWorkspace() { + const queryClient = useQueryClient(); + const { t } = useTranslation(); + const user = useAuthStore((state) => state.user); + + return useMutation({ + mutationFn: async (): Promise => { + const displayName = user?.name || user?.email || ''; + const { data, error } = await apiClient.POST('/v1/me/workspaces/default', { + body: { name: t('workspaces.defaultName', { name: displayName }) }, + }); + if (error) { + throw new ApiError(error); + } + return data.workspace; + }, + onSuccess: () => queryClient.invalidateQueries({ queryKey: queryKeys.workspaces() }), + }); +} diff --git a/src/i18n/locales/ar.json b/src/i18n/locales/ar.json index 814c1c3..bf026a1 100644 --- a/src/i18n/locales/ar.json +++ b/src/i18n/locales/ar.json @@ -51,7 +51,8 @@ "current": "مساحة العمل الحالية", "switch": "تبديل", "switchConfirmTitle": "تبديل مساحة العمل؟", - "switchConfirmBody": "هل تريد التبديل إلى {{name}}؟ ستغادر مساحة العمل الحالية." + "switchConfirmBody": "هل تريد التبديل إلى {{name}}؟ ستغادر مساحة العمل الحالية.", + "defaultName": "مساحة عمل {{name}}" }, "inbox": { "title": "صندوق الوارد" diff --git a/src/i18n/locales/da.json b/src/i18n/locales/da.json index bc69535..bab3b8b 100644 --- a/src/i18n/locales/da.json +++ b/src/i18n/locales/da.json @@ -51,7 +51,8 @@ "current": "Nuværende workspace", "switch": "Skift", "switchConfirmTitle": "Skift workspace?", - "switchConfirmBody": "Skift til {{name}}? Du forlader dit nuværende workspace." + "switchConfirmBody": "Skift til {{name}}? Du forlader dit nuværende workspace.", + "defaultName": "{{name}}s arbejdsområde" }, "inbox": { "title": "Indbakke" diff --git a/src/i18n/locales/de.json b/src/i18n/locales/de.json index bcd9e37..45f6104 100644 --- a/src/i18n/locales/de.json +++ b/src/i18n/locales/de.json @@ -51,7 +51,8 @@ "current": "Aktueller Workspace", "switch": "Wechseln", "switchConfirmTitle": "Workspace wechseln?", - "switchConfirmBody": "Zu {{name}} wechseln? Du verlässt deinen aktuellen Workspace." + "switchConfirmBody": "Zu {{name}} wechseln? Du verlässt deinen aktuellen Workspace.", + "defaultName": "Arbeitsbereich von {{name}}" }, "inbox": { "title": "Posteingang" diff --git a/src/i18n/locales/en.json b/src/i18n/locales/en.json index 5bb1688..61d40be 100644 --- a/src/i18n/locales/en.json +++ b/src/i18n/locales/en.json @@ -61,7 +61,8 @@ "current": "Current workspace", "switch": "Switch", "switchConfirmTitle": "Switch workspace?", - "switchConfirmBody": "Switch to {{name}}? You'll leave your current workspace." + "switchConfirmBody": "Switch to {{name}}? You'll leave your current workspace.", + "defaultName": "{{name}}'s workspace" }, "inbox": { "title": "Inbox" diff --git a/src/i18n/locales/es.json b/src/i18n/locales/es.json index 4f372ff..f8ada67 100644 --- a/src/i18n/locales/es.json +++ b/src/i18n/locales/es.json @@ -51,7 +51,8 @@ "current": "Espacio de trabajo actual", "switch": "Cambiar", "switchConfirmTitle": "¿Cambiar de espacio de trabajo?", - "switchConfirmBody": "¿Cambiar a {{name}}? Saldrás de tu espacio de trabajo actual." + "switchConfirmBody": "¿Cambiar a {{name}}? Saldrás de tu espacio de trabajo actual.", + "defaultName": "Espacio de trabajo de {{name}}" }, "inbox": { "title": "Bandeja de entrada" diff --git a/src/i18n/locales/fi.json b/src/i18n/locales/fi.json index 99f13e9..0ad3f94 100644 --- a/src/i18n/locales/fi.json +++ b/src/i18n/locales/fi.json @@ -51,7 +51,8 @@ "current": "Nykyinen työtila", "switch": "Vaihda", "switchConfirmTitle": "Vaihdetaanko työtilaa?", - "switchConfirmBody": "Vaihdetaanko työtilaan {{name}}? Poistut nykyisestä työtilastasi." + "switchConfirmBody": "Vaihdetaanko työtilaan {{name}}? Poistut nykyisestä työtilastasi.", + "defaultName": "Työtila: {{name}}" }, "inbox": { "title": "Saapuneet" diff --git a/src/i18n/locales/fr.json b/src/i18n/locales/fr.json index f943c7d..ddd95c6 100644 --- a/src/i18n/locales/fr.json +++ b/src/i18n/locales/fr.json @@ -51,7 +51,8 @@ "current": "Espace de travail actuel", "switch": "Changer", "switchConfirmTitle": "Changer d'espace de travail ?", - "switchConfirmBody": "Passer à {{name}} ? Vous quitterez votre espace de travail actuel." + "switchConfirmBody": "Passer à {{name}} ? Vous quitterez votre espace de travail actuel.", + "defaultName": "Espace de travail de {{name}}" }, "inbox": { "title": "Boîte de réception" diff --git a/src/i18n/locales/he.json b/src/i18n/locales/he.json index f285f0c..bb0e0d3 100644 --- a/src/i18n/locales/he.json +++ b/src/i18n/locales/he.json @@ -51,7 +51,8 @@ "current": "סביבת העבודה הנוכחית", "switch": "החלפה", "switchConfirmTitle": "להחליף סביבת עבודה?", - "switchConfirmBody": "לעבור אל {{name}}? תעזוב את סביבת העבודה הנוכחית." + "switchConfirmBody": "לעבור אל {{name}}? תעזוב את סביבת העבודה הנוכחית.", + "defaultName": "סביבת העבודה של {{name}}" }, "inbox": { "title": "תיבת דואר נכנס" diff --git a/src/i18n/locales/id.json b/src/i18n/locales/id.json index ed84fa3..a3ac1d1 100644 --- a/src/i18n/locales/id.json +++ b/src/i18n/locales/id.json @@ -51,7 +51,8 @@ "current": "Ruang kerja saat ini", "switch": "Ganti", "switchConfirmTitle": "Ganti ruang kerja?", - "switchConfirmBody": "Beralih ke {{name}}? Anda akan meninggalkan ruang kerja saat ini." + "switchConfirmBody": "Beralih ke {{name}}? Anda akan meninggalkan ruang kerja saat ini.", + "defaultName": "Workspace milik {{name}}" }, "inbox": { "title": "Kotak masuk" diff --git a/src/i18n/locales/it.json b/src/i18n/locales/it.json index a840775..3b98dbc 100644 --- a/src/i18n/locales/it.json +++ b/src/i18n/locales/it.json @@ -61,7 +61,8 @@ "current": "Workspace corrente", "switch": "Cambia", "switchConfirmTitle": "Cambiare workspace?", - "switchConfirmBody": "Passare a {{name}}? Lascerai il workspace corrente." + "switchConfirmBody": "Passare a {{name}}? Lascerai il workspace corrente.", + "defaultName": "Spazio di lavoro di {{name}}" }, "inbox": { "title": "Posta in arrivo" diff --git a/src/i18n/locales/ja.json b/src/i18n/locales/ja.json index cdd996a..1fa75f4 100644 --- a/src/i18n/locales/ja.json +++ b/src/i18n/locales/ja.json @@ -61,7 +61,8 @@ "current": "現在のワークスペース", "switch": "切り替え", "switchConfirmTitle": "ワークスペースを切り替えますか?", - "switchConfirmBody": "{{name}}に切り替えますか?現在のワークスペースから移動します。" + "switchConfirmBody": "{{name}}に切り替えますか?現在のワークスペースから移動します。", + "defaultName": "{{name}}のワークスペース" }, "inbox": { "title": "受信トレイ" diff --git a/src/i18n/locales/nl.json b/src/i18n/locales/nl.json index 86fa702..8e451b1 100644 --- a/src/i18n/locales/nl.json +++ b/src/i18n/locales/nl.json @@ -61,7 +61,8 @@ "current": "Huidige workspace", "switch": "Wisselen", "switchConfirmTitle": "Van workspace wisselen?", - "switchConfirmBody": "Overschakelen naar {{name}}? Je verlaat je huidige workspace." + "switchConfirmBody": "Overschakelen naar {{name}}? Je verlaat je huidige workspace.", + "defaultName": "Werkruimte van {{name}}" }, "inbox": { "title": "Inbox" diff --git a/src/i18n/locales/pt-BR.json b/src/i18n/locales/pt-BR.json index 88e6f5a..ebb9f5a 100644 --- a/src/i18n/locales/pt-BR.json +++ b/src/i18n/locales/pt-BR.json @@ -61,7 +61,8 @@ "current": "Workspace atual", "switch": "Trocar", "switchConfirmTitle": "Trocar de workspace?", - "switchConfirmBody": "Trocar para {{name}}? Você sairá do workspace atual." + "switchConfirmBody": "Trocar para {{name}}? Você sairá do workspace atual.", + "defaultName": "Workspace de {{name}}" }, "inbox": { "title": "Caixa de entrada" diff --git a/src/i18n/locales/pt-PT.json b/src/i18n/locales/pt-PT.json index 0da69be..74b307b 100644 --- a/src/i18n/locales/pt-PT.json +++ b/src/i18n/locales/pt-PT.json @@ -61,7 +61,8 @@ "current": "Espaço de trabalho atual", "switch": "Mudar", "switchConfirmTitle": "Mudar de espaço de trabalho?", - "switchConfirmBody": "Mudar para {{name}}? Vai sair do seu espaço de trabalho atual." + "switchConfirmBody": "Mudar para {{name}}? Vai sair do seu espaço de trabalho atual.", + "defaultName": "Workspace de {{name}}" }, "inbox": { "title": "Caixa de entrada" diff --git a/src/i18n/locales/ro.json b/src/i18n/locales/ro.json index 63eb762..22755c8 100644 --- a/src/i18n/locales/ro.json +++ b/src/i18n/locales/ro.json @@ -61,7 +61,8 @@ "current": "Spațiul de lucru curent", "switch": "Schimbă", "switchConfirmTitle": "Schimbi spațiul de lucru?", - "switchConfirmBody": "Treci la {{name}}? Vei părăsi spațiul de lucru curent." + "switchConfirmBody": "Treci la {{name}}? Vei părăsi spațiul de lucru curent.", + "defaultName": "Spațiul de lucru al lui {{name}}" }, "inbox": { "title": "Mesaje primite" diff --git a/src/i18n/locales/sv.json b/src/i18n/locales/sv.json index cb374cf..f788b2b 100644 --- a/src/i18n/locales/sv.json +++ b/src/i18n/locales/sv.json @@ -61,7 +61,8 @@ "current": "Aktuell arbetsyta", "switch": "Byt", "switchConfirmTitle": "Byta arbetsyta?", - "switchConfirmBody": "Byta till {{name}}? Du lämnar din nuvarande arbetsyta." + "switchConfirmBody": "Byta till {{name}}? Du lämnar din nuvarande arbetsyta.", + "defaultName": "{{name}}s arbetsyta" }, "inbox": { "title": "Inkorg" diff --git a/src/i18n/locales/tr.json b/src/i18n/locales/tr.json index 01eca9b..f424a01 100644 --- a/src/i18n/locales/tr.json +++ b/src/i18n/locales/tr.json @@ -61,7 +61,8 @@ "current": "Geçerli çalışma alanı", "switch": "Değiştir", "switchConfirmTitle": "Çalışma alanı değiştirilsin mi?", - "switchConfirmBody": "{{name}} alanına geçilsin mi? Mevcut çalışma alanından ayrılacaksınız." + "switchConfirmBody": "{{name}} alanına geçilsin mi? Mevcut çalışma alanından ayrılacaksınız.", + "defaultName": "{{name}} çalışma alanı" }, "inbox": { "title": "Gelen kutusu" diff --git a/src/i18n/locales/vi.json b/src/i18n/locales/vi.json index 1604b4d..9a1c3f1 100644 --- a/src/i18n/locales/vi.json +++ b/src/i18n/locales/vi.json @@ -61,7 +61,8 @@ "current": "Không gian làm việc hiện tại", "switch": "Chuyển", "switchConfirmTitle": "Chuyển không gian làm việc?", - "switchConfirmBody": "Chuyển sang {{name}}? Bạn sẽ rời khỏi không gian làm việc hiện tại." + "switchConfirmBody": "Chuyển sang {{name}}? Bạn sẽ rời khỏi không gian làm việc hiện tại.", + "defaultName": "Workspace của {{name}}" }, "inbox": { "title": "Hộp thư" diff --git a/src/i18n/locales/zh-CN.json b/src/i18n/locales/zh-CN.json index 77ff1db..ee72dfa 100644 --- a/src/i18n/locales/zh-CN.json +++ b/src/i18n/locales/zh-CN.json @@ -61,7 +61,8 @@ "current": "当前工作区", "switch": "切换", "switchConfirmTitle": "切换工作区?", - "switchConfirmBody": "切换到 {{name}}?你将离开当前工作区。" + "switchConfirmBody": "切换到 {{name}}?你将离开当前工作区。", + "defaultName": "{{name}}的工作区" }, "inbox": { "title": "收件箱" diff --git a/src/i18n/locales/zh-TW.json b/src/i18n/locales/zh-TW.json index a47fe6f..de18676 100644 --- a/src/i18n/locales/zh-TW.json +++ b/src/i18n/locales/zh-TW.json @@ -61,7 +61,8 @@ "current": "目前的工作區", "switch": "切換", "switchConfirmTitle": "切換工作區?", - "switchConfirmBody": "切換到 {{name}}?你將離開目前的工作區。" + "switchConfirmBody": "切換到 {{name}}?你將離開目前的工作區。", + "defaultName": "{{name}}的工作區" }, "inbox": { "title": "收件匣"