Skip to content

refactor(core): split out instance and route through workspaces - #19335

Merged
jlongster merged 3 commits into
devfrom
jlongster/workspace-router-better
Mar 27, 2026
Merged

refactor(core): split out instance and route through workspaces#19335
jlongster merged 3 commits into
devfrom
jlongster/workspace-router-better

Conversation

@jlongster

Copy link
Copy Markdown
Contributor
  • Separate instance-related routes into a separate router
  • Add control plane routes in front of it
  • Make everything go through the workspace router if the control plane doesn't handle it, using the workspace search param if it exists
  • By default if a workspace is not provided it falls back to a "local" instance
@jlongster
jlongster force-pushed the jlongster/workspace-router-better branch from d6ff5a9 to b16e2c4 Compare March 27, 2026 13:35
@jlongster
jlongster marked this pull request as ready for review March 27, 2026 13:36
@jlongster jlongster changed the title feat(core): integrate workspace routing into the server Mar 27, 2026
@jlongster
jlongster force-pushed the jlongster/workspace-router-better branch from b16e2c4 to d0c83f8 Compare March 27, 2026 13:41
@jlongster
jlongster force-pushed the jlongster/workspace-router-better branch from 1a55ae1 to 08109da Compare March 27, 2026 15:39
@jlongster
jlongster merged commit a76be69 into dev Mar 27, 2026
11 of 12 checks passed
@jlongster
jlongster deleted the jlongster/workspace-router-better branch March 27, 2026 15:51
Copilot AI pushed a commit to ian-morgan99/opencode that referenced this pull request Mar 28, 2026
…alyco#19335)

Co-authored-by: ian-morgan99 <106852423+ian-morgan99@users.noreply.github.com>
uve pushed a commit to uve/opencode that referenced this pull request Mar 28, 2026
BYK added a commit to BYK/opencode that referenced this pull request Mar 29, 2026
Build on anomalyco#19299 by @thdxr with production hardening for the new
server architecture (anomalyco#19335):

- Add pre-bootstrap static middleware in server.ts before
  WorkspaceRouterMiddleware to avoid Instance.provide() + DB migration
  checks on every CSS/JS/image/font request
- Add SPA fallback routing — page routes (no extension) get index.html,
  asset requests (.js, .woff2) fall through to CDN proxy
- Add OPENCODE_APP_DIR env var for explicit dev override
- Auto-detect packages/app/dist in monorepo dev mode
- Use explicit MIME type map for consistent content-type headers
- CDN proxy fallback for assets not found locally/embedded
BYK added a commit to BYK/opencode that referenced this pull request Mar 29, 2026
Build on anomalyco#19299 by @thdxr with production hardening for the new
server architecture (anomalyco#19335):

- Add pre-bootstrap static middleware in server.ts before
  WorkspaceRouterMiddleware to avoid Instance.provide() + DB migration
  checks on every CSS/JS/image/font request
- Add SPA fallback routing — page routes (no extension) get index.html,
  asset requests (.js, .woff2) fall through to CDN proxy
- Add OPENCODE_APP_DIR env var for explicit dev override
- Auto-detect packages/app/dist in monorepo dev mode
- Use explicit MIME type map for consistent content-type headers
- CDN proxy fallback for assets not found locally/embedded
BYK added a commit to BYK/opencode that referenced this pull request Apr 1, 2026
Build on anomalyco#19299 by @thdxr with production hardening for the new
server architecture (anomalyco#19335):

- Add pre-bootstrap static middleware in server.ts before
  WorkspaceRouterMiddleware to avoid Instance.provide() + DB migration
  checks on every CSS/JS/image/font request
- Add SPA fallback routing — page routes (no extension) get index.html,
  asset requests (.js, .woff2) fall through to CDN proxy
- Add OPENCODE_APP_DIR env var for explicit dev override
- Auto-detect packages/app/dist in monorepo dev mode
- Use explicit MIME type map for consistent content-type headers
- CDN proxy fallback for assets not found locally/embedded
BYK added a commit to BYK/opencode that referenced this pull request Apr 2, 2026
Build on anomalyco#19299 by @thdxr with production hardening for the new
server architecture (anomalyco#19335):

- Add pre-bootstrap static middleware in server.ts before
  WorkspaceRouterMiddleware to avoid Instance.provide() + DB migration
  checks on every CSS/JS/image/font request
- Add SPA fallback routing — page routes (no extension) get index.html,
  asset requests (.js, .woff2) fall through to CDN proxy
- Add OPENCODE_APP_DIR env var for explicit dev override
- Auto-detect packages/app/dist in monorepo dev mode
- Use explicit MIME type map for consistent content-type headers
- CDN proxy fallback for assets not found locally/embedded
balcsida pushed a commit to balcsida/opencode that referenced this pull request Apr 8, 2026
xywsxp pushed a commit to xywsxp/opencode that referenced this pull request Apr 24, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
avion23 pushed a commit to avion23/opencode that referenced this pull request Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

1 participant