@peers-app/peers-ui 0.14.0 → 0.14.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -84,7 +84,8 @@ const AdvancedSettingsTab = () => {
|
|
|
84
84
|
react_1.default.createElement(AutoUpdatePeersCore, null),
|
|
85
85
|
react_1.default.createElement(ResetDeviceSyncInfos, null),
|
|
86
86
|
react_1.default.createElement(DeleteLocalDatabase, null),
|
|
87
|
-
react_1.default.createElement(ImportOldPeersData, null)
|
|
87
|
+
react_1.default.createElement(ImportOldPeersData, null),
|
|
88
|
+
react_1.default.createElement(ResetChangeTracking, null)));
|
|
88
89
|
};
|
|
89
90
|
const ProfileSection = () => {
|
|
90
91
|
const [deviceId] = (0, hooks_1.useObservable)(peers_sdk_1.thisDeviceId);
|
|
@@ -237,6 +238,30 @@ const DeleteLocalDatabase = () => {
|
|
|
237
238
|
}
|
|
238
239
|
} }, "Delete Local Database")));
|
|
239
240
|
};
|
|
241
|
+
const ResetChangeTracking = () => {
|
|
242
|
+
const [busy, setBusy] = (0, react_1.useState)(false);
|
|
243
|
+
return (react_1.default.createElement("div", { className: "mt-4 pt-3 border-top" },
|
|
244
|
+
react_1.default.createElement("h6", { className: "mb-2" }, "Change tracking"),
|
|
245
|
+
react_1.default.createElement("small", { className: "text-muted d-block mb-2" }, "Clears all change history for the current group and rebuilds it from your current database rows. Device sync cursors are cleared; a full resync with peers may follow. Use when debugging sync issues."),
|
|
246
|
+
react_1.default.createElement("button", { className: "btn btn-warning btn-sm", disabled: busy, onClick: async () => {
|
|
247
|
+
const confirmed = window.confirm('Reset Change Tracking will clear all change history and rebuild it from scratch. This may take a while. Continue?');
|
|
248
|
+
if (!confirmed)
|
|
249
|
+
return;
|
|
250
|
+
setBusy(true);
|
|
251
|
+
try {
|
|
252
|
+
await peers_sdk_1.rpcServerCalls.resetChangeTracking();
|
|
253
|
+
await peers_sdk_1.rpcServerCalls.flushDatabases();
|
|
254
|
+
alert('Change tracking reset successfully.');
|
|
255
|
+
}
|
|
256
|
+
catch (err) {
|
|
257
|
+
console.error('Error while resetting change tracking', err);
|
|
258
|
+
alert('Failed to reset change tracking: ' + (err.message || String(err)));
|
|
259
|
+
}
|
|
260
|
+
finally {
|
|
261
|
+
setBusy(false);
|
|
262
|
+
}
|
|
263
|
+
} }, busy ? 'Resetting…' : 'Reset Change Tracking')));
|
|
264
|
+
};
|
|
240
265
|
const IMPORT_TOOL_ID = '00mh0wlipkdbeaw8imptsk001';
|
|
241
266
|
const ImportOldPeersData = () => {
|
|
242
267
|
const fileInputRef = (0, react_1.useRef)(null);
|
|
@@ -60,24 +60,24 @@ exports.systemApps = [
|
|
|
60
60
|
// Core Navigation & Search
|
|
61
61
|
search_app_2.searchApp,
|
|
62
62
|
threads_app_2.threadsApp,
|
|
63
|
+
// System Tools & Debugging
|
|
64
|
+
network_viewer_app_2.networkViewerApp,
|
|
65
|
+
console_logs_app_2.consoleLogsApp,
|
|
66
|
+
data_explorer_app_2.dataExplorerApp,
|
|
63
67
|
// Core Management Apps
|
|
64
|
-
variables_app_2.variablesApp,
|
|
65
68
|
types_app_2.typesApp,
|
|
66
|
-
|
|
69
|
+
variables_app_2.variablesApp,
|
|
67
70
|
tools_app_2.toolsApp,
|
|
68
71
|
workflows_app_2.workflowsApp,
|
|
72
|
+
assistants_app_2.assistantsApp,
|
|
69
73
|
packages_app_2.packagesApp,
|
|
74
|
+
contacts_app_2.contactsApp,
|
|
70
75
|
groups_app_2.groupsApp,
|
|
71
76
|
join_group_app_2.joinGroupApp,
|
|
72
|
-
contacts_app_2.contactsApp,
|
|
73
77
|
// User & Settings Apps
|
|
74
78
|
settings_app_2.settingsApp,
|
|
75
79
|
// Mobile Settings (only in React Native)
|
|
76
80
|
...(isReactNative() ? [mobile_settings_app_2.mobileSettingsApp] : []),
|
|
77
|
-
// System Tools & Debugging
|
|
78
|
-
console_logs_app_2.consoleLogsApp,
|
|
79
|
-
network_viewer_app_2.networkViewerApp,
|
|
80
|
-
data_explorer_app_2.dataExplorerApp,
|
|
81
81
|
];
|
|
82
82
|
// Virtual system package for tabs integration
|
|
83
83
|
exports.systemPackage = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@peers-app/peers-ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.1",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/peers-app/peers-ui.git"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test:coverage": "jest --coverage"
|
|
27
27
|
},
|
|
28
28
|
"peerDependencies": {
|
|
29
|
-
"@peers-app/peers-sdk": "^0.14.
|
|
29
|
+
"@peers-app/peers-sdk": "^0.14.1",
|
|
30
30
|
"bootstrap": "^5.3.3",
|
|
31
31
|
"react": "^18.0.0",
|
|
32
32
|
"react-dom": "^18.0.0"
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"@babel/preset-env": "^7.24.5",
|
|
37
37
|
"@babel/preset-react": "^7.24.1",
|
|
38
38
|
"@babel/preset-typescript": "^7.27.1",
|
|
39
|
-
"@peers-app/peers-sdk": "0.14.
|
|
39
|
+
"@peers-app/peers-sdk": "0.14.1",
|
|
40
40
|
"@testing-library/dom": "^10.4.0",
|
|
41
41
|
"@testing-library/jest-dom": "^6.6.3",
|
|
42
42
|
"@testing-library/react": "^16.3.0",
|
|
@@ -62,6 +62,7 @@ const AdvancedSettingsTab: React.FC = () => {
|
|
|
62
62
|
<ResetDeviceSyncInfos />
|
|
63
63
|
<DeleteLocalDatabase />
|
|
64
64
|
<ImportOldPeersData />
|
|
65
|
+
<ResetChangeTracking />
|
|
65
66
|
</>
|
|
66
67
|
);
|
|
67
68
|
};
|
|
@@ -325,6 +326,42 @@ const DeleteLocalDatabase: React.FC = () => {
|
|
|
325
326
|
);
|
|
326
327
|
}
|
|
327
328
|
|
|
329
|
+
const ResetChangeTracking: React.FC = () => {
|
|
330
|
+
const [busy, setBusy] = useState(false);
|
|
331
|
+
return (
|
|
332
|
+
<div className="mt-4 pt-3 border-top">
|
|
333
|
+
<h6 className="mb-2">Change tracking</h6>
|
|
334
|
+
<small className="text-muted d-block mb-2">
|
|
335
|
+
Clears all change history for the current group and rebuilds it from your current database rows.
|
|
336
|
+
Device sync cursors are cleared; a full resync with peers may follow. Use when debugging sync issues.
|
|
337
|
+
</small>
|
|
338
|
+
<button
|
|
339
|
+
className="btn btn-warning btn-sm"
|
|
340
|
+
disabled={busy}
|
|
341
|
+
onClick={async () => {
|
|
342
|
+
const confirmed = window.confirm(
|
|
343
|
+
'Reset Change Tracking will clear all change history and rebuild it from scratch. This may take a while. Continue?'
|
|
344
|
+
);
|
|
345
|
+
if (!confirmed) return;
|
|
346
|
+
setBusy(true);
|
|
347
|
+
try {
|
|
348
|
+
await rpcServerCalls.resetChangeTracking();
|
|
349
|
+
await rpcServerCalls.flushDatabases();
|
|
350
|
+
alert('Change tracking reset successfully.');
|
|
351
|
+
} catch (err) {
|
|
352
|
+
console.error('Error while resetting change tracking', err);
|
|
353
|
+
alert('Failed to reset change tracking: ' + ((err as Error).message || String(err)));
|
|
354
|
+
} finally {
|
|
355
|
+
setBusy(false);
|
|
356
|
+
}
|
|
357
|
+
}}
|
|
358
|
+
>
|
|
359
|
+
{busy ? 'Resetting…' : 'Reset Change Tracking'}
|
|
360
|
+
</button>
|
|
361
|
+
</div>
|
|
362
|
+
);
|
|
363
|
+
};
|
|
364
|
+
|
|
328
365
|
const IMPORT_TOOL_ID = '00mh0wlipkdbeaw8imptsk001';
|
|
329
366
|
|
|
330
367
|
interface IDryRunResult {
|
package/src/system-apps/index.ts
CHANGED
|
@@ -47,26 +47,28 @@ export const systemApps: IAppNav[] = [
|
|
|
47
47
|
searchApp,
|
|
48
48
|
threadsApp,
|
|
49
49
|
|
|
50
|
+
// System Tools & Debugging
|
|
51
|
+
networkViewerApp,
|
|
52
|
+
consoleLogsApp,
|
|
53
|
+
dataExplorerApp,
|
|
54
|
+
|
|
50
55
|
// Core Management Apps
|
|
51
|
-
variablesApp,
|
|
52
56
|
typesApp,
|
|
53
|
-
|
|
57
|
+
variablesApp,
|
|
54
58
|
toolsApp,
|
|
55
59
|
workflowsApp,
|
|
60
|
+
assistantsApp,
|
|
56
61
|
packagesApp,
|
|
62
|
+
contactsApp,
|
|
57
63
|
groupsApp,
|
|
58
64
|
joinGroupApp,
|
|
59
|
-
contactsApp,
|
|
60
65
|
|
|
61
66
|
// User & Settings Apps
|
|
62
67
|
settingsApp,
|
|
63
68
|
// Mobile Settings (only in React Native)
|
|
64
69
|
...(isReactNative() ? [mobileSettingsApp] : []),
|
|
65
70
|
|
|
66
|
-
|
|
67
|
-
consoleLogsApp,
|
|
68
|
-
networkViewerApp,
|
|
69
|
-
dataExplorerApp,
|
|
71
|
+
|
|
70
72
|
];
|
|
71
73
|
|
|
72
74
|
// Virtual system package for tabs integration
|