Repository navigation
Commit 6c4598c
authored
feat(ios): brand the phone app and add workspace selection (#386)
## Requirement or Bug
The iPhone app should look like Pythinker, and a user should be able to
pick which workspace on the Mac to work in and start sessions there.
## Bug Reproduction Steps
N/A (feature).
## Root Cause
N/A (feature).
## Code Changes
- Brand: app icon from the Pythinker robot on the web app's light blue,
the web accent color (`#1783FF` / `#1A88FF` dark), and the robot poses
on the pair, confirm, empty, stopped, and approval screens. Generated
launch screen.
- Screens: pair screen with a large "Scan QR code" button; sessions list
with status chips (Running, Needs approval, Has a question, Failed,
Idle), pull to refresh, Online/Offline badge, and a ••• menu (Refresh,
Forget link); each session on its own screen with tool steps, the reply,
a message box, and Stop. Approve/Reject/Answer/Dismiss buttons moved out
of the main screen into the sheets that already open for them.
- Workspaces: the sessions screen loads `GET /api/v1/workspaces`, shows
a picker ("All workspaces" or one workspace with its session count), and
filters on the server with `GET /api/v1/sessions?workspace_id=`. "New
session" posts `POST /api/v1/sessions` with `workspace_id` and opens the
new session; with "All workspaces" selected it asks which workspace. A
selected workspace that disappears falls back to all sessions.
## Behavior Changes and Affected Users
| Behavior | Before | After | Who relies on the old behavior | Escape
hatch |
| --- | --- | --- | --- | --- |
| Session list | All sessions, one list | Workspace picker; server-side
filter | Phone app users (unreleased app) | Pick "All workspaces" |
| Start a session | Only on the Mac | Also from the phone, in a chosen
workspace | None | n/a |
| Decision buttons | Duplicated on the main screen | Only in the
approval/question sheets, which open on their own | None | n/a |
| Look | Plain forms | Pythinker brand | None | n/a |
The iOS app is not a published package and has no released users. Server
contracts used are unchanged.
Coverage: `swift test` 75 pass, including new tests for workspace
loading, server-side filtering, a vanished workspace, creating a session
in the chosen workspace, the "choose a workspace" message, and a refused
create. Simulator build passes; installed and launched on a physical
iPhone. Screens were checked on the simulator; the workspace flow still
needs a check on the device against a live Mac.
## Checklist
- [x] I have read the
[CONTRIBUTING](https://github.com/PyModel/pythinker-code/blob/main/CONTRIBUTING.md)
document.
- [ ] I have linked a related issue (external PRs: issue must have a
maintainer's `/approve`).
- [x] I have added tests that prove my feature works.
- [x] The behavior-change table above is complete, and every removed
behavior or flipped default is named in the changeset and either has an
escape hatch or was explicitly approved by a maintainer in this PR.
- [x] Ran `gen-changesets` skill, or this PR needs no changeset.
- [x] Ran `gen-docs` skill, or this PR needs no doc update.1 parent 59e2383 commit 6c4598c
22 files changed
Lines changed: 855 additions & 122 deletions
File tree
- ios
- Pythinker
- App
- Assets.xcassets
- AccentColor.colorset
- AppIcon.appiconset
- BrandRobot.imageset
- MascotFailed.imageset
- MascotIdle.imageset
- MascotReview.imageset
- MascotWaving.imageset
- Pythinker.xcodeproj
- Sources/PythinkerKit
- Tests/PythinkerKitTests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
0 commit comments