Skip to content

Commit e575af6

Browse files
committed
🔖 Release Version v1.0.7-rc1
1 parent fdc3630 commit e575af6

File tree

8 files changed

+44
-19
lines changed

8 files changed

+44
-19
lines changed

‎changelog.md

+14
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
# Twake Drive v1.0.7
2+
3+
## Features
4+
5+
- Big folder upload with new upload modal
6+
- Added root folder for all uploads, document creation, and cleanup after
7+
- Add testing identifier to new upload modal
8+
9+
## Fixes and Improvements
10+
11+
- Print memory usage periodically in the backend
12+
- Rollup final script file to add dependencies after
13+
- Made performance test runnable
14+
115
# Twake Drive v1.0.6
216

317
## Features

‎tdrive/backend/node/src/core/platform/services/diagnostics/providers/process.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const e2eTestOverride = {
88
export default () =>
99
diagnostics.registerProviders({
1010
key: "process",
11-
tags: ["live", "ready"],
11+
tags: ["live", "ready", "stats"],
1212
async get() {
1313
return {
1414
ok: !e2eTestOverride.forceFail,
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export default {
2-
current: /* @VERSION_DETAIL */ "1.0.6",
2+
current: /* @VERSION_DETAIL */ "1.0.7-rc1",
33
minimal: {
4-
web: /* @MIN_VERSION_WEB */ "1.0.6",
5-
mobile: /* @MIN_VERSION_MOBILE */ "1.0.6",
4+
web: /* @MIN_VERSION_WEB */ "1.0.7-rc1",
5+
mobile: /* @MIN_VERSION_MOBILE */ "1.0.7-rc1",
66
},
77
};

‎tdrive/frontend/src/app/components/file-uploads/pending-root-components/pending-root-list.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ const PendingRootList = ({
131131
style={{ width: '100%', maxHeight: 300 }}
132132
>
133133
{keys.map(key => (
134-
<PendingRootRow key={key} rootKey={key} root={roots[key]} parentId={parentId} />
134+
<PendingRootRow key={key} rootKey={key} root={roots[key]} />
135135
))}
136136
</PerfectScrollbar>
137137
</div>

‎tdrive/frontend/src/app/components/file-uploads/pending-root-components/pending-root-row.tsx

+15-8
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ import Languages from 'app/features/global/services/languages-service';
1919
const PendingRootRow = ({
2020
rootKey,
2121
root,
22-
parentId,
2322
}: {
2423
rootKey: string;
2524
root: UploadRootType;
26-
parentId: string;
2725
}): JSX.Element => {
2826
const { pauseOrResumeRootUpload, cancelRootUpload, clearRoots } = useUpload();
2927
const [showFolder, setShowFolder] = useState(false);
3028
const [restoredFolder, setRestoredFolder] = useState(false);
29+
const { item } = useDriveItem(root?.id || '');
3130
const { restore } = useDriveActions();
32-
const { refresh } = useDriveItem(parentId || '');
31+
const { refresh, children } = useDriveItem(item?.parent_id || '');
3332

3433
const firstPendingFile = root.items[0];
3534
const uploadedFilesSize = root.uploadedSize;
@@ -42,6 +41,7 @@ const PendingRootRow = ({
4241
if (!showFolder || isFileRoot) {
4342
const redirectionURL = RouterService.generateRouteFromState({
4443
itemId: root.id,
44+
dirId: item?.parent_id || '',
4545
});
4646
window.open(redirectionURL, '_blank');
4747
} else {
@@ -74,16 +74,23 @@ const PendingRootRow = ({
7474
}
7575
}, [isUploadCompleted]);
7676

77+
const waitForChild = async (itemId: string, retries = 5, interval = 1000) => {
78+
for (let attempt = 0; attempt < retries; attempt++) {
79+
await new Promise(resolve => setTimeout(resolve, interval));
80+
if (children.some(child => child.id === itemId)) return true;
81+
}
82+
return false;
83+
};
84+
7785
useEffect(() => {
7886
const postProcess = async () => {
7987
if (isUploadCompleted && !restoredFolder) {
80-
await new Promise(resolve => setTimeout(resolve, 1000));
81-
await restore(root.id, parentId);
82-
await new Promise(resolve => setTimeout(resolve, 1000));
83-
await refresh(parentId);
88+
if (!isFileRoot) await restore(root.id, item?.parent_id || '');
89+
const found = isFileRoot || (await waitForChild(root.id));
90+
if (found) await refresh(item?.parent_id || '');
8491
}
8592
};
86-
if (isUploadCompleted && !restoredFolder) {
93+
if (isUploadCompleted && root.id && !restoredFolder) {
8794
setRestoredFolder(true);
8895
postProcess();
8996
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export default {
2-
version: /* @VERSION */ '1.0.6',
3-
version_detail: /* @VERSION_DETAIL */ '1.0.6',
2+
version: /* @VERSION */ '1.0.7-rc1',
3+
version_detail: /* @VERSION_DETAIL */ '1.0.7-rc1',
44
version_name: /* @VERSION_NAME */ 'Ghost-Dog',
5-
};
5+
};

‎tdrive/frontend/src/app/features/drive/hooks/use-drive-item.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { ToasterService } from '@features/global/services/toaster-service';
22
import { LoadingStateInitTrue } from '@features/global/state/atoms/Loading';
33
import useRouterCompany from '@features/router/hooks/use-router-company';
4-
import { useCallback } from 'react';
4+
import { useCallback, useEffect } from 'react';
55
import { useRecoilCallback, useRecoilState, useRecoilValue } from 'recoil';
66
import { DriveItemAtom, DriveItemChildrenAtom, DriveItemPagination } from '../state/store';
77
import { DriveItem } from '../types';
@@ -154,6 +154,12 @@ export const useDriveItem = (id: string) => {
154154
item?.item?.is_in_trash;
155155
const sharedWithMe = id == 'shared_with_me';
156156

157+
useEffect(() => {
158+
if (id) {
159+
refresh(id, true); // Re-fetch from backend and update Recoil state
160+
}
161+
}, [id, refresh]);
162+
157163
return {
158164
sharedWithMe,
159165
inTrash,

‎tdrive/frontend/src/app/views/client/body/drive/browser.tsx

-2
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,6 @@ export default memo(
341341
companyId,
342342
parentId,
343343
});
344-
await new Promise (resolve => setTimeout(resolve, 1000));
345-
refresh(parentId);
346344
}}
347345
onDragOver={handleDragOver}
348346
onDrop={handleDrop}

0 commit comments

Comments
 (0)