# Workspaces

## Overview

GoFigr's improved Workspace Management features make organizing and navigating your research projects more intuitive than ever. Create new workspaces on the fly, switch between projects instantly, and enjoy seamless navigation with persistent workspace memory. Whether you're managing a single project or juggling multiple collaborations, workspace management now stays out of your way.

## Key Benefits for Users

### Faster Navigation

* **Persistent Workspace Selection**: GoFigr remembers your last workspace across sessions
* **Quick Switching**: Change workspaces with a single click from the navigation bar
* **URL-Based Context**: Share links that automatically open in the right workspace

### Streamlined Organization

* **Create Workspaces Anywhere**: Add new workspaces directly from the workspace dropdown
* **Organization Branding**: See your organization's logo in the workspace selector
* **Direct Management Access**: Jump to workspace settings from the dropdown menu

### Better Team Collaboration

* **Organization Logos**: Visual identification of which organization owns each workspace
* **Workspace Overview**: Aggregated counts show activity at a glance
* **Consistent Context**: Everyone sees the same workspace structure

## Features

### Workspace Selector in Navigation

The new workspace selector sits prominently in the navigation bar:

**Display Elements:**

* Current workspace name
* Organization logo (if applicable)
* Grid icon for visual identification
* Dropdown indicator

**Dropdown Options:**

* List of all accessible workspaces
* Active workspace highlighted
* "Manage" link to workspace settings
* "Create new workspace" option

### Persistent Workspace Memory

GoFigr remembers your workspace preference:

**How It Works:**

1. When you select a workspace, it's saved to local storage
2. On your next visit, GoFigr automatically selects that workspace
3. URL parameters override stored preference when provided
4. Workspace context follows you across page navigations

**Priority Order:**

1. URL parameter `?workspace=xxx` (highest)
2. Local storage saved preference
3. First available workspace (fallback)

### Create Workspace from Dropdown

Add new workspaces without navigating away:

1. Click the workspace dropdown
2. Select "Create new workspace"
3. Enter a workspace name
4. Optionally select an organization
5. Click "Create"
6. New workspace is immediately selected

**Organization Selection:**

* If you belong to multiple organizations, choose which one owns the new workspace
* Organization determines logo, billing, and team access
* Personal workspaces have no organization

### Workspace Overview API

Get a quick summary of workspace contents:

**Aggregated Counts:**

* Total analyses
* Total figures
* Total assets
* Total stories
* Recent activity count

**Use Cases:**

* Dashboard widgets
* Activity monitoring
* Workspace selection previews

## How to Access

### From Navigation Bar

1. Look for the workspace selector (labeled "Workspace:")
2. Click to open the dropdown
3. Select a workspace to switch
4. Or click "Create new workspace" to add one

### From URL

Navigate directly with workspace parameter:

```
https://app.gofigr.io/home?workspace=ws_abc123
```

Links containing workspace IDs automatically set context.

### From Workspace Settings

1. Click the workspace name in dropdown
2. Select "Manage \[workspace name]"
3. Opens workspace settings page
4. Configure members, permissions, and details

## Organization Logos

### Where Logos Appear

Organization logos display in:

* Workspace selector dropdown
* Workspace header on main views
* Story exports (PowerPoint/Word)
* Shared figure views

### Logo Requirements

* Supported formats: PNG, JPEG, SVG
* Recommended size: 200x200 pixels
* Background: Transparent preferred

### Setting Up Logos

Organization administrators can:

1. Go to Organization Settings
2. Upload logo image
3. Logo automatically appears across the platform

## Workspace Switching

### Quick Switch

1. Click workspace name in navigation
2. Click any workspace in the list
3. Page reloads with new workspace context
4. All views update to show new workspace content

### What Changes

When you switch workspaces:

* Analysis list updates
* Figure library updates
* Activity feed shows new workspace
* URL updates with workspace parameter
* Recent items clear and reload

### What Persists

Across workspace switches:

* User preferences
* Search history (global)
* Navigation state

## URL Parameters

### Workspace in URLs

GoFigr uses URL parameters for workspace context:

**Pattern:**

```
https://app.gofigr.io/[view]?workspace=[workspace_id]
```

**Examples:**

* `/home?workspace=ws_abc123` - Home with specific workspace
* `/import?workspace=ws_abc123` - Import into specific workspace
* `/story/story_id?workspace=ws_abc123` - Story with workspace context

### Sharing Links

When sharing links:

* Workspace parameter is included
* Recipients see content in correct context
* Works even if recipient has different default workspace

## Best Practices

### Workspace Organization

1. **One Project Per Workspace**: Keep related figures together
2. **Meaningful Names**: Use descriptive names that identify the project
3. **Organization Assignment**: Use organizations for team workspaces
4. **Archive Old Workspaces**: Remove or archive completed projects

### For Teams

1. **Consistent Naming Conventions**: Team-wide standards help navigation
2. **Shared Workspaces**: Use organization workspaces for collaboration
3. **Permission Management**: Control access through workspace settings
4. **Document Purpose**: Add workspace descriptions for clarity

### Switching Contexts

1. **Bookmark Important Workspaces**: Save direct links with workspace params
2. **Use Keyboard Shortcuts**: Quick access to workspace switcher
3. **Check Context Before Actions**: Verify correct workspace for uploads

## Technical Details

### Storage

**Local Storage Key:** `gofigr_selected_workspace`

* Stores workspace API ID
* Persists across sessions
* Cleared on logout (optional)

### API Endpoints

**Workspace Overview:**

```
GET /api/v4/workspace/{id}/overview/
```

Returns aggregated counts and metadata.

**Create Workspace:**

```
POST /api/v4/workspace/
{
  "name": "New Project",
  "organization": "org_id" // optional
}
```

### URL Routing

* Workspace parameter read on page load
* Stored preference used as fallback
* Context propagates to child views
* API calls include workspace filter

### Performance

* Workspace list cached locally
* Overview counts cached with short TTL
* Lazy loading for workspace details
* Optimistic UI updates

## Troubleshooting

### Wrong Workspace Selected

If you're seeing the wrong workspace:

1. Check URL for workspace parameter
2. Clear local storage and refresh
3. Verify workspace access permissions
4. Try selecting workspace manually

### Can't Create Workspace

If workspace creation fails:

1. Check organization membership
2. Verify account permissions
3. Ensure workspace name is unique
4. Check network connectivity

### Logo Not Showing

If organization logo doesn't appear:

1. Verify logo is uploaded in org settings
2. Check image format and size
3. Clear browser cache
4. Verify organization assignment


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gofigr.io/features/workspaces.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
