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
|
|
@ -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"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -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}
|
||||
/>
|
||||
))}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue