Skip to content

Commit 6c4598c

Browse files
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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"colors" : [
3+
{ "color" : { "color-space" : "srgb", "components" : { "red" : "0x17", "green" : "0x83", "blue" : "0xFF", "alpha" : "1.000" } }, "idiom" : "universal" },
4+
{ "appearances" : [ { "appearance" : "luminosity", "value" : "dark" } ],
5+
"color" : { "color-space" : "srgb", "components" : { "red" : "0x1A", "green" : "0x88", "blue" : "0xFF", "alpha" : "1.000" } }, "idiom" : "universal" }
6+
],
7+
"info" : { "author" : "xcode", "version" : 1 }
8+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"images" : [
3+
{ "filename" : "icon-1024.png", "idiom" : "universal", "platform" : "ios", "size" : "1024x1024" }
4+
],
5+
"info" : { "author" : "xcode", "version" : 1 }
6+
}
130 KB
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"images" : [ { "filename" : "brand-robot@3x.png", "idiom" : "universal", "scale" : "3x" } ],
3+
"info" : { "author" : "xcode", "version" : 1 }
4+
}
36.9 KB
Loading
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "info" : { "author" : "xcode", "version" : 1 } }
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"images" : [ { "filename" : "mascot-failed@2x.png", "idiom" : "universal", "scale" : "2x" } ],
3+
"info" : { "author" : "xcode", "version" : 1 }
4+
}
103 KB
Loading
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"images" : [ { "filename" : "mascot-idle@2x.png", "idiom" : "universal", "scale" : "2x" } ],
3+
"info" : { "author" : "xcode", "version" : 1 }
4+
}
74.7 KB
Loading

0 commit comments

Comments
 (0)