feat(rename): complete searchSpace to workspace transition across frontend and backend

- Introduced a comprehensive specification for renaming `searchSpace` to `workspace` in `surfsense_web` and `surfsense_desktop`, ensuring all TypeScript identifiers, React props, and local data structures are updated.
- Implemented migration shims for persisted local state to prevent data loss during the transition.
- Updated observability metrics and IPC channels to reflect the new naming convention.
- Removed legacy `active-search-space` module and replaced it with `active-workspace` to maintain consistency.
- Ensured no behavioral changes or data loss for users during the renaming process.
This commit is contained in:
Anish Sarkar 2026-07-06 15:12:40 +05:30
parent 2a020629c5
commit a8c1fb660d
259 changed files with 5480 additions and 2285 deletions

View file

@ -7,7 +7,7 @@ import { documentsApiService } from "@/lib/apis/documents-api.service";
interface FileChangedEvent {
id: string;
rootFolderId: number | null;
searchSpaceId: number;
workspaceId: number;
folderPath: string;
folderName: string;
relativePath: string;
@ -29,7 +29,7 @@ interface FileEntry {
interface BatchItem {
folderPath: string;
folderName: string;
searchSpaceId: number;
workspaceId: number;
rootFolderId: number | null;
files: FileEntry[];
ackIds: string[];
@ -66,7 +66,7 @@ export function useFolderSync() {
await documentsApiService.folderUploadFiles(files, {
folder_name: batch.folderName,
workspace_id: batch.searchSpaceId,
workspace_id: batch.workspaceId,
relative_paths: addChangeFiles.map((f) => f.relativePath),
root_folder_id: batch.rootFolderId,
});
@ -75,7 +75,7 @@ export function useFolderSync() {
if (unlinkFiles.length > 0) {
await documentsApiService.folderNotifyUnlinked({
folder_name: batch.folderName,
workspace_id: batch.searchSpaceId,
workspace_id: batch.workspaceId,
root_folder_id: batch.rootFolderId,
relative_paths: unlinkFiles.map((f) => f.relativePath),
});
@ -128,7 +128,7 @@ export function useFolderSync() {
pendingByFolder.current.set(folderKey, {
folderPath: event.folderPath,
folderName: event.folderName,
searchSpaceId: event.searchSpaceId,
workspaceId: event.workspaceId,
rootFolderId: event.rootFolderId,
files: [
{