Skip to content

feat: add connection-scoped workspaces#139

Merged
ibourgeois merged 2 commits intomainfrom
codex/feat-133-workspaces
Mar 27, 2026
Merged

feat: add connection-scoped workspaces#139
ibourgeois merged 2 commits intomainfrom
codex/feat-133-workspaces

Conversation

@ibourgeois
Copy link
Copy Markdown
Contributor

@ibourgeois ibourgeois commented Mar 27, 2026

Summary

  • add durable workspaces scoped to each saved connection
  • persist and switch the active workspace per connection in the desktop shell
  • replace the placeholder shell workspace state with real workspace records and UI
  • repair legacy workspace upgrades so Surreal backfills also sync the workspace sequence

Testing

  • '/Users/ibourgeois/Library/Application Support/Herd/bin/php84' artisan test --compact tests/Feature/WorkspaceManagementTest.php tests/Feature/DesktopShellTest.php tests/Feature/InstanceConnectionManagementTest.php tests/Feature/SurrealWorkspaceModelTest.php
  • '/Users/ibourgeois/Library/Application Support/Herd/bin/php84' artisan test --compact tests/Feature/DesktopShellTest.php tests/Feature/DesktopUiFeatureFlagTest.php

Closes #133
Fixes #140

Copilot AI review requested due to automatic review settings March 27, 2026 13:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds durable, connection-scoped workspaces and wires them into the desktop shell so each saved connection can persist and switch its own active workspace.

Changes:

  • Introduces workspaces persistence (model, factory, migrations) and active_workspace_id on instance_connections.
  • Adds workspace create + activate endpoints and updates the home shell to resolve/render the active workspace per connection.
  • Updates UI and feature tests to reflect the new workspaces navigation/state (and splits Surreal “preview workspace” into SurrealWorkspace).

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/Feature/WorkspaceManagementTest.php New feature coverage for workspace creation, activation, and per-connection active workspace persistence.
tests/Feature/SurrealWorkspaceModelTest.php Updates Surreal-backed preview workspace test to use SurrealWorkspace / workspace_previews.
tests/Feature/InstanceConnectionManagementTest.php Adjusts expectations to show active workspace name + # general room placeholder.
tests/Feature/DesktopUiFeatureFlagTest.php Updates shell assertions to match the new workspace-driven UI.
tests/Feature/DesktopShellTest.php Seeds workspaces and validates new “Workspaces” section + active workspace display.
routes/web.php Registers workspaces.store and workspaces.activate routes under auth.
resources/views/welcome.blade.php Replaces placeholder shell “Favorites” with “Workspaces” list + create workspace modal; updates active header/input copy.
resources/views/components/desktop/nav-item.blade.php Adds form-backed action support for POST-based nav items (used for workspace activation).
database/migrations/2026_03_27_063640_create_workspaces_table.php Creates workspaces table (with driver-conditional FK behavior).
database/migrations/2026_03_27_063705_add_active_workspace_id_to_instance_connections_table.php Adds active_workspace_id (with FK for non-surreal drivers).
database/factories/WorkspaceFactory.php Factory for generating workspaces tied to an instance connection.
app/Support/Connections/InstanceConnectionManager.php Adds workspace listing/creation/activation + default workspace resolution.
app/Models/Workspace.php Converts Workspace to an Eloquent model related to InstanceConnection.
app/Models/SurrealWorkspace.php New Surreal-backed model for desktop preview records (workspace_previews).
app/Models/InstanceConnection.php Adds workspaces() and activeWorkspace() relationships + fillable active_workspace_id.
app/Http/Requests/StoreWorkspaceRequest.php Validates workspace creation input.
app/Http/Controllers/WorkspaceController.php Implements workspace create and activate actions with ownership checks.
app/Http/Controllers/HomeController.php Resolves active workspace + workspace links for the shell; uses SurrealWorkspace::desktopPreview() for Surreal preview seeding.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ibourgeois ibourgeois merged commit 420f3db into main Mar 27, 2026
2 checks passed
@ibourgeois ibourgeois deleted the codex/feat-133-workspaces branch March 27, 2026 13:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: sync Surreal workspace sequences after workspace backfill feat: add the workspace model and active workspace switching

2 participants