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

@ -6,11 +6,11 @@ import { KIND_META } from "./kind-meta";
export function ArtifactCard({
artifact,
searchSpaceId,
workspaceId,
onOpen,
}: {
artifact: LibraryArtifact;
searchSpaceId: number;
workspaceId: number;
onOpen: (artifact: LibraryArtifact) => void;
}) {
const meta = KIND_META[artifact.kind];
@ -50,7 +50,7 @@ export function ArtifactCard({
{artifact.sourceThreadId ? (
<Link
href={`/dashboard/${searchSpaceId}/new-chat/${artifact.sourceThreadId}`}
href={`/dashboard/${workspaceId}/new-chat/${artifact.sourceThreadId}`}
title="Open source chat"
className="relative z-10 flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground opacity-0 transition-opacity hover:bg-muted hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100"
>

View file

@ -33,7 +33,7 @@ function ErrorState({ onRetry }: { onRetry: () => void }) {
<div>
<p className="font-medium text-foreground">Couldn't load artifacts</p>
<p className="mt-1 text-sm text-muted-foreground">
Something went wrong fetching this search space's deliverables.
Something went wrong fetching this workspace's deliverables.
</p>
</div>
<Button variant="outline" size="sm" onClick={onRetry}>
@ -53,8 +53,7 @@ function EmptyState() {
}
export function ArtifactsLibrary({ workspaceId }: { workspaceId: number }) {
const searchSpaceId = workspaceId;
const { artifacts, loading, error, refresh } = useLibraryArtifacts(searchSpaceId);
const { artifacts, loading, error, refresh } = useLibraryArtifacts(workspaceId);
const openReportPanel = useSetAtom(openReportPanelAtom);
const [selectedMedia, setSelectedMedia] = useState<LibraryArtifact | null>(null);
@ -114,7 +113,7 @@ export function ArtifactsLibrary({ workspaceId }: { workspaceId: number }) {
<ArtifactCard
key={artifact.key}
artifact={artifact}
searchSpaceId={searchSpaceId}
workspaceId={workspaceId}
onOpen={handleOpen}
/>
))}