Skip to content

feat(workbot): add OpenWork for iPhone with Workbot sign-in - #7445

Merged
reachjalil merged 6 commits into
devfrom
feat/openwork-phone-app
Nov 17, 2026
Merged

reachjalil merged 6 commits into
devfrom
feat/openwork-phone-app

Conversation

@reachjalil

@reachjalil reachjalil commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

What is this about?

OpenWork for iPhone: a native app where a member signs in and talks to Workbot, plus the sign-in Workbot needs for it.

What problem does it solve?

Workbot is only a web page, so a phone has no app to come back to. This is a small first release, kept simple to review for the App Store.

What was the situation before?

No phone app, and no way for Workbot's server to sign a phone in.

How is this implemented?

  • ee/apps/workbot: /auth/app/login, /auth/app/token, /auth/app/refresh and bearer sessions. Sign-in returns only to an HTTPS address the app owns (WORKBOT_IOS_TEAM_ID). The phone never holds Den tokens.
  • A new workbotMobile feature, off everywhere. Without it a workspace's members cannot sign a phone in, and a signed-in phone is refused (workbot_mobile_not_enabled).
  • The phone never creates an account: its sign-in is marked openwork_sign_in_only=true, so Den's sign-in panel offers none.
  • ee/apps/openwork-ios: SwiftUI, iOS 26 and later, logic in OpenWorkKit. One conversation with live answers, Stop and Try again, and an AI-use notice first. No permission prompts, third-party code, purchases or web views.

What else changed?

  • ee/apps/openwork-ios/Tools/stand-in-server.mjs runs the screens in a simulator without a real Workbot.

Release note

none

Evidence

No E2E spec. ee/apps/workbot/scripts/app-auth.test.ts — before: Workbot cannot sign a phone in; after: a phone signs in with its own PKCE pair, asks for sign-in only, and is stopped while the feature is off. App side: swift test --package-path ee/apps/openwork-ios/OpenWorkKit.

Not tried yet: a real sign-in on a device (needs a deployed HTTPS Workbot and a signed build), and the sign-in page in a browser.

The phone app opens /auth/app/login with its own PKCE challenge. Den returns
the code to Workbot, which sends it to /auth/app/callback on its own HTTPS
address. iOS opens that address only in the app the server names in
/.well-known/apple-app-site-association. The app trades the code at
POST /auth/app/token for a sealed Workbot session and sends it as a bearer
token. It never holds Den tokens, and no cookies are read or written for it.

A new workbotMobile feature, off everywhere, gates it. Den reports it on
GET /v1/workbot/session, and while it is off Workbot refuses a phone's
requests with 403 workbot_mobile_not_enabled, except /v1/workbot/me, so the
app can say why.

Signed-off-by: Jalil <reachjalil@gmail.com>
A native SwiftUI app in ee/apps/openwork-ios. Its first release signs in
with OpenWork and holds one conversation with Workbot: earlier messages,
sending text, the answer arriving live, Stop, and Try again.

It asks for nothing that shows a permission prompt, has no third-party code
and no purchases, and shows a one-time notice about how Workbot uses AI
providers before the first message.

Logic lives in the OpenWorkKit package with its own tests. A stand-in server
lets the screens run in the simulator without a real Workbot.

Signed-off-by: Jalil <reachjalil@gmail.com>
@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Actions Updated
openwork-app Ignored Ignored Preview Nov 17, 2026 12:24am UTC
openwork-den Ignored Ignored Preview Nov 17, 2026 12:24am UTC
openwork-landing Ignored Ignored Preview Nov 17, 2026 12:24am UTC

Request Review

…eate one

App stores require an app that lets people create an account to let them
delete it too, and Den has no account deletion. So the phone app signs
existing accounts in only.

Workbot marks the phone's sign-in with openwork_sign_in_only=true. Den's
sign-in page then asks for the email first, treats an email with no account
like any other (the password step, without saying whether an account
exists), and shows no Google or GitHub button until the email is known to
use one. Creating an account on the web is unchanged.

Signed-off-by: Jalil <reachjalil@gmail.com>
…ance

The first screens drew their own colors, buttons and message field and
forced light appearance. They now use what iOS 26 provides:

- System colors and one accent with light, dark and high-contrast
  variants, so the app follows the phone's appearance and contrast.
- The navigation bar's own title and subtitle, a grouped form for
  Account, ContentUnavailableView for the locked, offline and failed
  states, and system button styles.
- The message field and its button float over the conversation as glass
  in a safeAreaBar, so the conversation fades under them. The conversation
  itself stays plain content.
- Dark and tinted app icons, and a mark that takes the accent color.
- Light haptics on send and on a failed send.

Signed-off-by: Jalil <reachjalil@gmail.com>
/auth/app/login and /auth/app/token answered on any HTTPS Workbot, so they
would have gone live with this change before any phone app exists. The
token route is unauthenticated and asks Den's token endpoint, which
Workbot shares one request budget for.

A deployment now has a phone return address only once it sets
WORKBOT_IOS_TEAM_ID (or the Android certificate). Until then both routes
refuse without asking Den, and nothing is served under /.well-known.

Signed-off-by: Jalil <reachjalil@gmail.com>
The feature gated what a signed-in phone could do, but any member could
still sign a phone in. Sign-in is now refused too: POST /auth/app/token
answers 403 workbot_mobile_not_enabled for a member whose workspace does
not have the feature, and revokes what Den issued for it. The app says an
admin can turn it on.

This replaces the deployment setting from the previous commit: the
feature, not WORKBOT_IOS_TEAM_ID, decides who can sign a phone in.

Signed-off-by: Jalil <reachjalil@gmail.com>
@reachjalil
reachjalil merged commit edd0299 into dev Nov 17, 2026
19 checks passed
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.

1 participant