Skip to content

feat(me): add public endpoint to ensure the user's default workspace - #1712

Merged
realcodesiman merged 2 commits into
mainfrom
feat/mobile-ensure-default-workspace
Nov 13, 2026
Merged

realcodesiman merged 2 commits into
mainfrom
feat/mobile-ensure-default-workspace

Conversation

@realcodesiman

Copy link
Copy Markdown
Contributor

Summary

  • Adds POST /v1/me/workspaces/default (ensureDefaultWorkspace) to the mobile me public router.
  • Idempotent: creates the user's first workspace (same path as the web home page, via ensureFirstWorkspace) when they belong to none; returns workspace: null when memberships already exist or plan limits block creation.
  • Optional name input; defaults to "<name>'s workspace".
  • Registered as a mobile-app-token-only path in public-spec.ts and the spec snapshot.

Test plan

  • mobile-me-api.test.ts: first-workspace creation, default name, existing memberships, plan-limit block
  • public-spec-operations.test.ts + snapshot updated
  • check-types (pre-commit hook)
  • pnpm lint

POST /v1/me/workspaces/default creates the first workspace for a mobile
user who belongs to none, mirroring the web home page. It is idempotent:
returns workspace null when memberships exist or plan limits block it.
@github-actions github-actions Bot added the feature New feature or request label Nov 13, 2026
@realcodesiman
realcodesiman merged commit 14c5adb into main Nov 13, 2026
14 checks passed
@realcodesiman
realcodesiman deleted the feat/mobile-ensure-default-workspace branch November 13, 2026 09:07
hello-jackytruong referenced this pull request in hello-jackytruong/ChatWorkAI Nov 22, 2026
…(#1712)

* feat(me): add public endpoint to ensure the user's default workspace

POST /v1/me/workspaces/default creates the first workspace for a mobile
user who belongs to none, mirroring the web home page. It is idempotent:
returns workspace null when memberships exist or plan limits block it.

* chore: add root db:migrate and db:seed scripts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant