mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-10 22:32:16 +02:00
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:
parent
2a020629c5
commit
a8c1fb660d
259 changed files with 5480 additions and 2285 deletions
|
|
@ -7,7 +7,7 @@ import type {
|
|||
NotePayload,
|
||||
RenameAck,
|
||||
RenameItem,
|
||||
SearchSpace,
|
||||
Workspace,
|
||||
SyncAck,
|
||||
} from "./types";
|
||||
|
||||
|
|
@ -94,14 +94,14 @@ export class SurfSenseApiClient {
|
|||
return await this.request<HealthResponse>("GET", "/api/v1/obsidian/health");
|
||||
}
|
||||
|
||||
async listSearchSpaces(): Promise<SearchSpace[]> {
|
||||
const resp = await this.request<SearchSpace[] | { items: SearchSpace[] }>(
|
||||
async listWorkspaces(): Promise<Workspace[]> {
|
||||
const resp = await this.request<Workspace[] | { items: Workspace[] }>(
|
||||
"GET",
|
||||
"/api/v1/searchspaces/"
|
||||
"/api/v1/workspaces/"
|
||||
);
|
||||
if (Array.isArray(resp)) return resp;
|
||||
if (resp && Array.isArray((resp as { items?: SearchSpace[] }).items)) {
|
||||
return (resp as { items: SearchSpace[] }).items;
|
||||
if (resp && Array.isArray((resp as { items?: Workspace[] }).items)) {
|
||||
return (resp as { items: Workspace[] }).items;
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@ export class SurfSenseApiClient {
|
|||
}
|
||||
|
||||
async connect(input: {
|
||||
searchSpaceId: number;
|
||||
workspaceId: number;
|
||||
vaultId: string;
|
||||
vaultName: string;
|
||||
vaultFingerprint: string;
|
||||
|
|
@ -125,7 +125,7 @@ export class SurfSenseApiClient {
|
|||
{
|
||||
vault_id: input.vaultId,
|
||||
vault_name: input.vaultName,
|
||||
search_space_id: input.searchSpaceId,
|
||||
workspace_id: input.workspaceId,
|
||||
vault_fingerprint: input.vaultFingerprint,
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue