Skip to content

fix: load workspace templates on initial connect - #199

Merged
benjaminshafii merged 1 commit into
different-ai:devfrom
JiahaoZhu11:fix/template-initial-loading
Jan 23, 2026
Merged

benjaminshafii merged 1 commit into
different-ai:devfrom
JiahaoZhu11:fix/template-initial-loading

Conversation

@JiahaoZhu11

Copy link
Copy Markdown
Contributor

Summary

  • Fix workspace templates not loading on initial connect for local workspaces

Problem

Workspace templates were only loaded during connect() when workspaceType === "remote". This caused templates in local workspaces to not appear until a new template was created (which triggered a reload via saveTemplate()).

Solution

Removed the workspaceType === "remote" restriction so templates load for all workspace types.

Test plan

  • Open a local workspace with existing templates in .openwork/templates/
  • Verify templates appear immediately after connecting
  • Verify remote workspace template loading still works

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@JiahaoZhu11
JiahaoZhu11 marked this pull request as ready for review January 22, 2026 23:42
@JiahaoZhu11

Copy link
Copy Markdown
Contributor Author

@benjaminshafii @OmarMcAdam Guys sorry for the ping! I’d like to get this merged since it fixes the issue where templates don’t load on restart. It’s a very small change—would you mind doing a quick review so I can get this wrapped up? Thanks!

@benjaminshafii

Copy link
Copy Markdown
Member

Automated message: this fix is minimal and matches the parity goal (templates load consistently for local + remote). No security concerns from this change.

CI is showing UNSTABLE; please rerun checks or rebase on dev so we can merge cleanly.

Previously, workspace templates were only loaded when connecting to remote
workspaces due to a `workspaceType === "remote"` condition. This caused
templates in local workspaces to not appear until a new template was created,
which triggered a reload via saveTemplate().

Removed the restriction so loadWorkspaceTemplates() is called for all workspace
types when a valid targetRoot exists.
@JiahaoZhu11
JiahaoZhu11 force-pushed the fix/template-initial-loading branch from 8605737 to b7d98be Compare January 23, 2026 11:04
@JiahaoZhu11

Copy link
Copy Markdown
Contributor Author

Automated message: this fix is minimal and matches the parity goal (templates load consistently for local + remote). No security concerns from this change.

CI is showing UNSTABLE; please rerun checks or rebase on dev so we can merge cleanly.

All set! I’ve rebased the branch on the latest dev branch to resolve the CI instability. Should be ready for a clean merge now!

@benjaminshafii
benjaminshafii merged commit 4348fe5 into different-ai:dev Jan 23, 2026
@benjaminshafii

Copy link
Copy Markdown
Member

done thx @JiahaoZhu11 appreciate

@JiahaoZhu11
JiahaoZhu11 deleted the fix/template-initial-loading branch January 25, 2026 21:11
benjaminshafii pushed a commit that referenced this pull request May 15, 2026
Previously, workspace templates were only loaded when connecting to remote
workspaces due to a `workspaceType === "remote"` condition. This caused
templates in local workspaces to not appear until a new template was created,
which triggered a reload via saveTemplate().

Removed the restriction so loadWorkspaceTemplates() is called for all workspace
types when a valid targetRoot exists.
benjaminshafii pushed a commit that referenced this pull request May 15, 2026
Previously, workspace templates were only loaded when connecting to remote
workspaces due to a `workspaceType === "remote"` condition. This caused
templates in local workspaces to not appear until a new template was created,
which triggered a reload via saveTemplate().

Removed the restriction so loadWorkspaceTemplates() is called for all workspace
types when a valid targetRoot exists.
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.

2 participants