Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(mobile): 离线时仍允许退出标签排序
ylliuuu660181a351e6ad
diff --git a/apps/mobile/src/__tests__/taskTagsNative.test.tsx b/apps/mobile/src/__tests__/taskTagsNative.test.tsxindex c1a7fb864e..d884427d5d 100644--- a/apps/mobile/src/__tests__/taskTagsNative.test.tsx+++ b/apps/mobile/src/__tests__/taskTagsNative.test.tsx@@ -288,3 +288,19 @@ it('resets sorting after leaving the list and keeps an exit when the catalog shrenvironment: { key: 'editMode', value: 'inactive' },});});++it('allows finishing sorting while offline without enabling writes or re-entry', async () => {+ const state = baseState();+ await render(state);+ await press('taskTags.reorder');+ await render({ ...state, disabled: true });+ const reorderButton = () =>+ node.querySelector<HTMLButtonElement>('[data-testid="taskTags.reorder"]')!;+ expect(reorderButton().disabled).toBe(false);+ await press('taskTags.reorder');+ expect(modifiers()).toContainEqual({ environment: { key: 'editMode', value: 'inactive' } });+ expect(reorderButton().disabled).toBe(true);+ expect(node.querySelector<HTMLButtonElement>('[data-testid="taskTags.tag.a"]')!.disabled).toBe(true);+ act(() => h.onMove!([0], 3));+ expect(state.onMove).not.toHaveBeenCalled();+});diff --git a/apps/mobile/src/session/TaskTagsNative.ios.tsx b/apps/mobile/src/session/TaskTagsNative.ios.tsxindex 4296192ab5..b7bc3609da 100644--- a/apps/mobile/src/session/TaskTagsNative.ios.tsx+++ b/apps/mobile/src/session/TaskTagsNative.ios.tsx@@ -280,7 +280,7 @@ export function NativeTaskTagsExpanded({ state }: { state: TaskTagsExpandedState<Section><ComposerNativeRowtitle={t(sorting ? 'taskTags.reorderDone' : 'taskTags.reorder')}- disabled={state.disabled}+ disabled={state.disabled && !sorting}onPress={() => setSorting((value) => !value)}testID="taskTags.reorder"/>