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

@ -1,29 +1,29 @@
import type { APIRequestContext } from "@playwright/test";
import { authHeaders, BACKEND_URL } from "./auth";
export type SearchSpaceRow = {
export type WorkspaceRow = {
id: number;
name: string;
description: string | null;
};
export async function createSearchSpace(
export async function createWorkspace(
request: APIRequestContext,
token: string,
name: string,
description = "E2E test search space"
): Promise<SearchSpaceRow> {
description = "E2E test workspace"
): Promise<WorkspaceRow> {
const response = await request.post(`${BACKEND_URL}/api/v1/workspaces`, {
headers: authHeaders(token),
data: { name, description },
});
if (!response.ok()) {
throw new Error(`createSearchSpace failed (${response.status()}): ${await response.text()}`);
throw new Error(`createWorkspace failed (${response.status()}): ${await response.text()}`);
}
return (await response.json()) as SearchSpaceRow;
return (await response.json()) as WorkspaceRow;
}
export async function deleteSearchSpace(
export async function deleteWorkspace(
request: APIRequestContext,
token: string,
id: number
@ -34,7 +34,7 @@ export async function deleteSearchSpace(
if (!response.ok() && response.status() !== 404) {
// 404 is acceptable: the test may have already deleted the space.
throw new Error(
`deleteSearchSpace(${id}) failed (${response.status()}): ${await response.text()}`
`deleteWorkspace(${id}) failed (${response.status()}): ${await response.text()}`
);
}
}