Level up native mockups for r6 and add a first-run wizard
Shared theme now carries the web day tokens, one type scale per platform, status pills and a button style with hover, pressed, focus, disabled and loading states. The Mac transcript draws its own AppKit controls in place of square bezels, and the sidebar sits on the system sidebar material. Reworks the question card, step timeline, daily roll-up, notifications, menu bar popover, Connections & Usage and the list rows, and adds loading, empty and offline states. Adds a five-step first-run wizard for iPhone and Mac. Fixtures are unchanged. docs/native/r6 holds 86 captures and an index with before and after links and the open design choices.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
101 files changed,
+1,934
−507
docs/native/r6/index.md+101 −0docs/native/r6/iphone-connections-dark.pngbinarydocs/native/r6/iphone-connections-light.pngbinarydocs/native/r6/iphone-contra-dark.pngbinarydocs/native/r6/iphone-contra-light.pngbinarydocs/native/r6/iphone-control-states-dark.pngbinarydocs/native/r6/iphone-control-states-light.pngbinarydocs/native/r6/iphone-conversation-attachment-dark.pngbinarydocs/native/r6/iphone-conversation-attachment-light.pngbinarydocs/native/r6/iphone-conversation-dark.pngbinarydocs/native/r6/iphone-conversation-draft-dark.pngbinarydocs/native/r6/iphone-conversation-draft-light.pngbinarydocs/native/r6/iphone-conversation-error-dark.pngbinarydocs/native/r6/iphone-conversation-error-light.pngbinarydocs/native/r6/iphone-conversation-light.pngbinarydocs/native/r6/iphone-conversation-offline-dark.pngbinarydocs/native/r6/iphone-conversation-offline-light.pngbinarydocs/native/r6/iphone-conversation-uploading-dark.pngbinarydocs/native/r6/iphone-conversation-uploading-light.pngbinarydocs/native/r6/iphone-copy-hold-dark.pngbinarydocs/native/r6/iphone-copy-hold-light.pngbinarydocs/native/r6/iphone-exploration-dark.pngbinarydocs/native/r6/iphone-exploration-light.pngbinarydocs/native/r6/iphone-needs-accessibility-dark.pngbinarydocs/native/r6/iphone-needs-accessibility-light.pngbinarydocs/native/r6/iphone-needs-dark.pngbinarydocs/native/r6/iphone-needs-empty-dark.pngbinarydocs/native/r6/iphone-needs-empty-light.pngbinarydocs/native/r6/iphone-needs-light.pngbinarydocs/native/r6/iphone-notification-answered-dark.pngbinarydocs/native/r6/iphone-notification-answered-light.pngbinarydocs/native/r6/iphone-notification-compact-dark.pngbinarydocs/native/r6/iphone-notification-compact-light.pngbinarydocs/native/r6/iphone-notification-dark.pngbinarydocs/native/r6/iphone-notification-light.pngbinarydocs/native/r6/iphone-onboarding-message-dark.pngbinarydocs/native/r6/iphone-onboarding-message-light.pngbinarydocs/native/r6/iphone-onboarding-model-dark.pngbinarydocs/native/r6/iphone-onboarding-model-light.pngbinarydocs/native/r6/iphone-onboarding-pair-dark.pngbinarydocs/native/r6/iphone-onboarding-pair-light.pngbinarydocs/native/r6/iphone-onboarding-paired-dark.pngbinarydocs/native/r6/iphone-onboarding-paired-light.pngbinarydocs/native/r6/iphone-onboarding-project-dark.pngbinarydocs/native/r6/iphone-onboarding-project-light.pngbinarydocs/native/r6/iphone-onboarding-welcome-dark.pngbinarydocs/native/r6/iphone-onboarding-welcome-light.pngbinarydocs/native/r6/iphone-research-dark.pngbinarydocs/native/r6/iphone-research-light.pngbinarydocs/native/r6/iphone-task-dark.pngbinarydocs/native/r6/iphone-task-light.pngbinarydocs/native/r6/iphone-tasks-dark.pngbinarydocs/native/r6/iphone-tasks-light.pngbinarydocs/native/r6/iphone-tasks-loading-dark.pngbinarydocs/native/r6/iphone-tasks-loading-light.pngbinarydocs/native/r6/iphone-team-dark.pngbinarydocs/native/r6/iphone-team-light.pngbinarydocs/native/r6/iphone-teams-dark.pngbinarydocs/native/r6/iphone-teams-light.pngbinarydocs/native/r6/iphone-usage-concept-dark.pngbinarydocs/native/r6/iphone-usage-concept-light.pngbinarydocs/native/r6/mac-composer-states-dark.pngbinarydocs/native/r6/mac-composer-states-light.pngbinarydocs/native/r6/mac-control-states-dark.pngbinarydocs/native/r6/mac-control-states-light.pngbinarydocs/native/r6/mac-main-dark.pngbinarydocs/native/r6/mac-main-light.pngbinarydocs/native/r6/mac-menu-dark.pngbinarydocs/native/r6/mac-menu-light.pngbinarydocs/native/r6/mac-notification-answered-dark.pngbinarydocs/native/r6/mac-notification-answered-light.pngbinarydocs/native/r6/mac-notification-compact-dark.pngbinarydocs/native/r6/mac-notification-compact-light.pngbinarydocs/native/r6/mac-notification-dark.pngbinarydocs/native/r6/mac-notification-light.pngbinarydocs/native/r6/mac-onboarding-message-dark.pngbinarydocs/native/r6/mac-onboarding-message-light.pngbinarydocs/native/r6/mac-onboarding-model-dark.pngbinarydocs/native/r6/mac-onboarding-model-light.pngbinarydocs/native/r6/mac-onboarding-pair-dark.pngbinarydocs/native/r6/mac-onboarding-pair-light.pngbinarydocs/native/r6/mac-onboarding-paired-dark.pngbinarydocs/native/r6/mac-onboarding-paired-light.pngbinarydocs/native/r6/mac-onboarding-project-dark.pngbinarydocs/native/r6/mac-onboarding-project-light.pngbinarydocs/native/r6/mac-onboarding-welcome-dark.pngbinarydocs/native/r6/mac-onboarding-welcome-light.pngbinarynative/mockups/EquipoMockups.xcodeproj/project.pbxproj+29 −15native/mockups/Mac/ComposerVerification.swift+6 −3native/mockups/Mac/EquipoMacApp.swift+44 −18native/mockups/Mac/MacPanels.swift+191 −67native/mockups/Mac/NativeComposer.swift+44 −39native/mockups/Mac/NativeTranscript.swift+259 −84native/mockups/Shared/Components.swift+396 −134native/mockups/Shared/Controls.swift+110 −26native/mockups/Shared/Onboarding.swift+327 −0native/mockups/Shared/Theme.swift+191 −17native/mockups/iOS/EquipoPhoneApp.swift+223 −94native/mockups/iOS/PhoneComposer.swift+6 −3native/mockups/scripts/generate-project.py+1 −1native/mockups/scripts/studio.sh+6 −6
CI failed — run details
diff --git a/docs/native/r6/index.md b/docs/native/r6/index.md| new file mode 100644 |
| index 00000000..cfb4bc1b |
| --- /dev/null |
| +++ b/docs/native/r6/index.md |
| @@ -0,0 +1,101 @@ |
| +# Equipo native, revision 6 |
| + |
| +R6 is a levelling-up pass over r5, plus a first-run wizard for iPhone and Mac. The native project remains at [native/mockups](../../../native/mockups/). The web still leads on components and colour. All copy and data are placeholders; nothing here has been through copy review. No message, answer or file leaves the app. |
| + |
| +## The ten most visible improvements |
| + |
| +| # | Change | R5 | R6 | |
| +| --- | --- | --- | --- | |
| +| 1 | Mac answer buttons. The plain square bezels are replaced by custom AppKit controls that match the web face, border and corner, with hover, pressed, focus and disabled states. | [mac-main-light.png](../r5/mac-main-light.png) | [mac-main-light.png](mac-main-light.png), [mac-control-states-light.png](mac-control-states-light.png) | |
| +| 2 | Mac window. A sidebar on the system sidebar material with native 32-point rows, a quiet selection and live specialist status; a centred reading column; an inspector with a header band, a status pill and usage. | [mac-main-dark.png](../r5/mac-main-dark.png) | [mac-main-dark.png](mac-main-dark.png) | |
| +| 3 | Question cards. The asking specialist is named ("Copy asks"), the question is set as a title, the choices have a contact shadow and a pressed state, and a free-text route appears when the API allows it (`allow_text`). | [iphone-needs-light.png](../r5/iphone-needs-light.png) | [iphone-needs-light.png](iphone-needs-light.png) | |
| +| 4 | Task step timeline. Steps sit on a connected rail with a distinct node for done, waiting for you, running and queued, a status word on the right, and each finished step's real usage. | [iphone-task-dark.png](../r5/iphone-task-dark.png) | [iphone-task-dark.png](iphone-task-dark.png) | |
| +| 5 | Daily roll-up. One compact card: the day, three counted outcomes with icons, and a single disclosure row. | [iphone-conversation-light.png](../r5/iphone-conversation-light.png) | [iphone-conversation-light.png](iphone-conversation-light.png) | |
| +| 6 | Coordinator conversation. Hugging message bubbles, a timestamp on the coordinator line, a live activity spinner, and a composer on the system bar material. On the Mac the message is a right-aligned bubble, not a full-width panel. | [iphone-conversation-dark.png](../r5/iphone-conversation-dark.png) | [iphone-conversation-dark.png](iphone-conversation-dark.png) | |
| +| 7 | Notifications. Drawn as the system presents them: a material banner with the app icon, then the system's action list, on a lock screen (iPhone) or desktop (Mac). | [iphone-notification-dark.png](../r5/iphone-notification-dark.png) | [iphone-notification-dark.png](iphone-notification-dark.png), [mac-notification-light.png](mac-notification-light.png) | |
| +| 8 | Menu bar popover. A header with the team switcher, a counted Needs you section, the task with its step progress, and a footer row for work in progress. | [mac-menu-light.png](../r5/mac-menu-light.png) | [mac-menu-light.png](mac-menu-light.png) | |
| +| 9 | Connections & Usage. Accounts in one grouped card with an availability pill, the kind and runner, then the team budget as four stat tiles, including the period's hours of work. | [iphone-connections-dark.png](../r5/iphone-connections-dark.png) | [iphone-connections-dark.png](iphone-connections-dark.png) | |
| +| 10 | Lists and states. Task rows gain a step-progress strip and a status pill; Teams shows each origin and a Sign in affordance; new loading, empty and offline states. | [iphone-tasks-light.png](../r5/iphone-tasks-light.png) | [iphone-tasks-light.png](iphone-tasks-light.png), [iphone-tasks-loading-light.png](iphone-tasks-loading-light.png), [iphone-needs-empty-light.png](iphone-needs-empty-light.png), [iphone-conversation-offline-dark.png](iphone-conversation-offline-dark.png) | |
| + |
| +Smaller changes: one type scale per platform (text styles on iPhone so Dynamic Type still works, AppKit sizes on the Mac, nothing below 11 points); status colours from the web's tone tokens, so blue still means "this does something"; the specialist icons were re-chosen (Design is a brush, Checks a checked list); the Mac composer text is 14 points and its controls are drawn to match the pill. |
| + |
| +## First-run wizard |
| + |
| +Five steps, one action on each screen, following [docs/mockups/onboarding.html](../../mockups/onboarding.html) for content and the [sync proposal](../sync-proposal.md) for pairing. |
| + |
| +| Step | iPhone | Mac | |
| +| --- | --- | --- | |
| +| 1. Welcome | [Light](iphone-onboarding-welcome-light.png) · [Dark](iphone-onboarding-welcome-dark.png) | [Light](mac-onboarding-welcome-light.png) · [Dark](mac-onboarding-welcome-dark.png) | |
| +| 2. Pair, waiting for approval | [Light](iphone-onboarding-pair-light.png) · [Dark](iphone-onboarding-pair-dark.png) | [Light](mac-onboarding-pair-light.png) · [Dark](mac-onboarding-pair-dark.png) | |
| +| 2. Pair, approved | [Light](iphone-onboarding-paired-light.png) · [Dark](iphone-onboarding-paired-dark.png) | [Light](mac-onboarding-paired-light.png) · [Dark](mac-onboarding-paired-dark.png) | |
| +| 3. Model account | [Light](iphone-onboarding-model-light.png) · [Dark](iphone-onboarding-model-dark.png) | [Light](mac-onboarding-model-light.png) · [Dark](mac-onboarding-model-dark.png) | |
| +| 4. First project | [Light](iphone-onboarding-project-light.png) · [Dark](iphone-onboarding-project-dark.png) | [Light](mac-onboarding-project-light.png) · [Dark](mac-onboarding-project-dark.png) | |
| +| 5. First message | [Light](iphone-onboarding-message-light.png) · [Dark](iphone-onboarding-message-dark.png) | [Light](mac-onboarding-message-light.png) · [Dark](mac-onboarding-message-dark.png) | |
| + |
| +- **One action.** Each screen has exactly one primary button, and its label says what happens ("Continue with Claude", "Add Equipo"). The capture script still enforces at most one primary per phone screen. |
| +- **Smart defaults.** The team comes from the invite; Claude is preselected; the project's name, branch and kind are read from the repository; the first message is a safe, read-only suggestion. On the Mac, "Run work on this Mac" is ticked, which stands in for the web sketch's two runner set-ups. |
| +- **Pairing, not a token.** The device shows a code and opens the team in the browser, as runner enrolment does. The code, its ten-minute life and the thirty-day sign-in come from the sync proposal. Oficina ID can replace the browser step later without changing the screen. |
| +- **Skip and come back.** Model account, project and first message can each be skipped. Welcome and pairing cannot. Back is offered wherever it is safe. |
| +- The wizard leaves out the web sketch's "where work runs" and "specialists" steps, as the brief's five steps do. They would live in Settings. |
| + |
| +## Open design choices |
| + |
| +| Choice | Recommendation | |
| +| --- | --- | |
| +| Corner radius. The web is 4 and 6 pixels; r6 uses 10 and 14 points on iPhone and 6 and 10 on the Mac. | Keep the native radii. Crisp 4-point corners read as a web view on iOS. Keep the web's hairline, face and shadow, which carry the identity. | |
| +| App icon. The blue tile with two speech bubbles is a stand-in used in notifications, the popover and the wizard. | Commission a real icon before any build leaves the team. | |
| +| Notification answers. r6 shows the system action list with the choices. | Keep the list for two or three short options; open the app for anything longer, and for merges, approvals and Contra. | |
| +| "Answer in your own words". Shown on cards and in the notification because the question allows text. | Keep it on cards. In notifications, ship it only once the authenticated action path exists. | |
| +| Status colour. Done is green and a budget hold is amber, from the web tokens; r5 was blue only. | Keep. It makes the timeline readable at a glance and blue stays reserved for action. | |
| +| Mac sidebar material. Live windows use the system sidebar material; captures use a flat stand-in, because an offscreen capture has nothing behind it. | Keep the material. Check it on a real desktop before judging the grey. | |
| +| Specialist status in the Mac sidebar and iPhone team index. Now derived from the task fixtures (the running or waiting step), not invented lines. | Keep it derived; ask for a specialist activity field only if the web adds one. | |
| +| Wizard length. Five steps, three skippable. | Keep five. If joiners mostly arrive by invite into a team with projects, skip step 4 automatically. | |
| +| Oficina ID. Not shown in the wizard. | Add it as the primary pairing route when it exists; keep the code as the fallback. | |
| +| Mac wizard runner tick box. On by default. | Keep on for a Mac that stays awake; ask Paul whether laptops should default to off. | |
| +| Model account icons. A neutral account symbol, with no provider letters or logos. | Use the providers' own marks only if their brand terms allow it. | |
| + |
| +## Checks |
| + |
| +`bash scripts/studio.sh` passed on the Studio (Xcode 27.2, iOS 27.2 simulator, iPhone 17): 11 EquipoCore tests, 18 AppKit composer checks, and the measured control checks on every capture (equal answer widths, 44-point phone and 32-point Mac minimums, at most one primary per phone screen). `mutation-check.py`, `check-composer-mutations.py` and `check-fixtures.py` also pass. Fixtures are unchanged, and no field was added. Colours are the web day theme's measured pairs, so text keeps at least 4.5:1 in both appearances; disabled controls are exempt. |
| + |
| +Limits: the Mac images are offscreen captures of the content view, so they show no title bar, and the header band stands in for the toolbar area. Hover, pressed and focus are shown on the control-state sheets, not in the screen captures. The notifications are app-rendered concepts, not system notifications. |
| + |
| +## Captures |
| + |
| +86 PNGs: every r5 view again, in both appearances, plus the wizard and the new states. |
| + |
| +| View | Light | Dark | |
| +| --- | --- | --- | |
| +| Mac main window | [Light](mac-main-light.png) | [Dark](mac-main-dark.png) | |
| +| Mac menu bar | [Light](mac-menu-light.png) | [Dark](mac-menu-dark.png) | |
| +| Mac compact notification | [Light](mac-notification-compact-light.png) | [Dark](mac-notification-compact-dark.png) | |
| +| Mac expanded notification | [Light](mac-notification-light.png) | [Dark](mac-notification-dark.png) | |
| +| Mac answer receipt | [Light](mac-notification-answered-light.png) | [Dark](mac-notification-answered-dark.png) | |
| +| Mac composer states and add menu | [Light](mac-composer-states-light.png) | [Dark](mac-composer-states-dark.png) | |
| +| Mac and shared control states | [Light](mac-control-states-light.png) | [Dark](mac-control-states-dark.png) | |
| +| iPhone Teams | [Light](iphone-teams-light.png) | [Dark](iphone-teams-dark.png) | |
| +| iPhone team index | [Light](iphone-team-light.png) | [Dark](iphone-team-dark.png) | |
| +| iPhone conversation | [Light](iphone-conversation-light.png) | [Dark](iphone-conversation-dark.png) | |
| +| iPhone conversation, offline | [Light](iphone-conversation-offline-light.png) | [Dark](iphone-conversation-offline-dark.png) | |
| +| iPhone draft and send | [Light](iphone-conversation-draft-light.png) | [Dark](iphone-conversation-draft-dark.png) | |
| +| iPhone attachment | [Light](iphone-conversation-attachment-light.png) | [Dark](iphone-conversation-attachment-dark.png) | |
| +| iPhone uploading | [Light](iphone-conversation-uploading-light.png) | [Dark](iphone-conversation-uploading-dark.png) | |
| +| iPhone upload error | [Light](iphone-conversation-error-light.png) | [Dark](iphone-conversation-error-dark.png) | |
| +| iPhone Tasks | [Light](iphone-tasks-light.png) | [Dark](iphone-tasks-dark.png) | |
| +| iPhone Tasks, loading | [Light](iphone-tasks-loading-light.png) | [Dark](iphone-tasks-loading-dark.png) | |
| +| iPhone task and step timeline | [Light](iphone-task-light.png) | [Dark](iphone-task-dark.png) | |
| +| iPhone Needs you | [Light](iphone-needs-light.png) | [Dark](iphone-needs-dark.png) | |
| +| iPhone Needs you, empty | [Light](iphone-needs-empty-light.png) | [Dark](iphone-needs-empty-dark.png) | |
| +| iPhone large text | [Light](iphone-needs-accessibility-light.png) | [Dark](iphone-needs-accessibility-dark.png) | |
| +| iPhone compact notification | [Light](iphone-notification-compact-light.png) | [Dark](iphone-notification-compact-dark.png) | |
| +| iPhone expanded notification | [Light](iphone-notification-light.png) | [Dark](iphone-notification-dark.png) | |
| +| iPhone answer receipt | [Light](iphone-notification-answered-light.png) | [Dark](iphone-notification-answered-dark.png) | |
| +| iPhone Connections & Usage | [Light](iphone-connections-light.png) | [Dark](iphone-connections-dark.png) | |
| +| iPhone control states | [Light](iphone-control-states-light.png) | [Dark](iphone-control-states-dark.png) | |
| +| Exploration concept | [Light](iphone-exploration-light.png) | [Dark](iphone-exploration-dark.png) | |
| +| Research concept | [Light](iphone-research-light.png) | [Dark](iphone-research-dark.png) | |
| +| Usage concept | [Light](iphone-usage-concept-light.png) | [Dark](iphone-usage-concept-dark.png) | |
| +| Copy budget-hold concept | [Light](iphone-copy-hold-light.png) | [Dark](iphone-copy-hold-dark.png) | |
| +| Contra concept | [Light](iphone-contra-light.png) | [Dark](iphone-contra-dark.png) | |
| + |
| +Run `bash scripts/studio.sh` only after syncing into `~/.cache/equipo-native-r6/build` on the Studio. Its simulator uses a private device set inside that folder and is deleted on exit. API limits and the web-led sync proposal remain as described in [r4](../r4/index.md), [r5](../r5/index.md) and the [sync proposal](../sync-proposal.md). |
diff --git a/docs/native/r6/iphone-connections-dark.png b/docs/native/r6/iphone-connections-dark.png| new file mode 100644 |
| index 00000000..a0e65441 |
| Binary files /dev/null and b/docs/native/r6/iphone-connections-dark.png differ |
diff --git a/docs/native/r6/iphone-connections-light.png b/docs/native/r6/iphone-connections-light.png| new file mode 100644 |
| index 00000000..e6e5a78c |
| Binary files /dev/null and b/docs/native/r6/iphone-connections-light.png differ |
diff --git a/docs/native/r6/iphone-contra-dark.png b/docs/native/r6/iphone-contra-dark.png| new file mode 100644 |
| index 00000000..e6bb1dd0 |
| Binary files /dev/null and b/docs/native/r6/iphone-contra-dark.png differ |
diff --git a/docs/native/r6/iphone-contra-light.png b/docs/native/r6/iphone-contra-light.png| new file mode 100644 |
| index 00000000..9a1f19c1 |
| Binary files /dev/null and b/docs/native/r6/iphone-contra-light.png differ |
diff --git a/docs/native/r6/iphone-control-states-dark.png b/docs/native/r6/iphone-control-states-dark.png| new file mode 100644 |
| index 00000000..3e04813a |
| Binary files /dev/null and b/docs/native/r6/iphone-control-states-dark.png differ |
diff --git a/docs/native/r6/iphone-control-states-light.png b/docs/native/r6/iphone-control-states-light.png| new file mode 100644 |
| index 00000000..f13c9d2d |
| Binary files /dev/null and b/docs/native/r6/iphone-control-states-light.png differ |
diff --git a/docs/native/r6/iphone-conversation-attachment-dark.png b/docs/native/r6/iphone-conversation-attachment-dark.png| new file mode 100644 |
| index 00000000..47c96659 |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-attachment-dark.png differ |
diff --git a/docs/native/r6/iphone-conversation-attachment-light.png b/docs/native/r6/iphone-conversation-attachment-light.png| new file mode 100644 |
| index 00000000..6e8604a7 |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-attachment-light.png differ |
diff --git a/docs/native/r6/iphone-conversation-dark.png b/docs/native/r6/iphone-conversation-dark.png| new file mode 100644 |
| index 00000000..8110d5e7 |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-dark.png differ |
diff --git a/docs/native/r6/iphone-conversation-draft-dark.png b/docs/native/r6/iphone-conversation-draft-dark.png| new file mode 100644 |
| index 00000000..c90a7c8c |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-draft-dark.png differ |
diff --git a/docs/native/r6/iphone-conversation-draft-light.png b/docs/native/r6/iphone-conversation-draft-light.png| new file mode 100644 |
| index 00000000..15d435d5 |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-draft-light.png differ |
diff --git a/docs/native/r6/iphone-conversation-error-dark.png b/docs/native/r6/iphone-conversation-error-dark.png| new file mode 100644 |
| index 00000000..9b64a1bc |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-error-dark.png differ |
diff --git a/docs/native/r6/iphone-conversation-error-light.png b/docs/native/r6/iphone-conversation-error-light.png| new file mode 100644 |
| index 00000000..1896e49d |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-error-light.png differ |
diff --git a/docs/native/r6/iphone-conversation-light.png b/docs/native/r6/iphone-conversation-light.png| new file mode 100644 |
| index 00000000..ca307f45 |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-light.png differ |
diff --git a/docs/native/r6/iphone-conversation-offline-dark.png b/docs/native/r6/iphone-conversation-offline-dark.png| new file mode 100644 |
| index 00000000..bb61377a |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-offline-dark.png differ |
diff --git a/docs/native/r6/iphone-conversation-offline-light.png b/docs/native/r6/iphone-conversation-offline-light.png| new file mode 100644 |
| index 00000000..2a305272 |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-offline-light.png differ |
diff --git a/docs/native/r6/iphone-conversation-uploading-dark.png b/docs/native/r6/iphone-conversation-uploading-dark.png| new file mode 100644 |
| index 00000000..2da3fccd |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-uploading-dark.png differ |
diff --git a/docs/native/r6/iphone-conversation-uploading-light.png b/docs/native/r6/iphone-conversation-uploading-light.png| new file mode 100644 |
| index 00000000..f19a24ee |
| Binary files /dev/null and b/docs/native/r6/iphone-conversation-uploading-light.png differ |
diff --git a/docs/native/r6/iphone-copy-hold-dark.png b/docs/native/r6/iphone-copy-hold-dark.png| new file mode 100644 |
| index 00000000..df8b3a03 |
| Binary files /dev/null and b/docs/native/r6/iphone-copy-hold-dark.png differ |
diff --git a/docs/native/r6/iphone-copy-hold-light.png b/docs/native/r6/iphone-copy-hold-light.png| new file mode 100644 |
| index 00000000..c50a410d |
| Binary files /dev/null and b/docs/native/r6/iphone-copy-hold-light.png differ |
diff --git a/docs/native/r6/iphone-exploration-dark.png b/docs/native/r6/iphone-exploration-dark.png| new file mode 100644 |
| index 00000000..38d0fef8 |
| Binary files /dev/null and b/docs/native/r6/iphone-exploration-dark.png differ |
diff --git a/docs/native/r6/iphone-exploration-light.png b/docs/native/r6/iphone-exploration-light.png| new file mode 100644 |
| index 00000000..ee6db038 |
| Binary files /dev/null and b/docs/native/r6/iphone-exploration-light.png differ |
diff --git a/docs/native/r6/iphone-needs-accessibility-dark.png b/docs/native/r6/iphone-needs-accessibility-dark.png| new file mode 100644 |
| index 00000000..80f84332 |
| Binary files /dev/null and b/docs/native/r6/iphone-needs-accessibility-dark.png differ |
diff --git a/docs/native/r6/iphone-needs-accessibility-light.png b/docs/native/r6/iphone-needs-accessibility-light.png| new file mode 100644 |
| index 00000000..c81a84ae |
| Binary files /dev/null and b/docs/native/r6/iphone-needs-accessibility-light.png differ |
diff --git a/docs/native/r6/iphone-needs-dark.png b/docs/native/r6/iphone-needs-dark.png| new file mode 100644 |
| index 00000000..4c7f7377 |
| Binary files /dev/null and b/docs/native/r6/iphone-needs-dark.png differ |
diff --git a/docs/native/r6/iphone-needs-empty-dark.png b/docs/native/r6/iphone-needs-empty-dark.png| new file mode 100644 |
| index 00000000..2d2cb13a |
| Binary files /dev/null and b/docs/native/r6/iphone-needs-empty-dark.png differ |
diff --git a/docs/native/r6/iphone-needs-empty-light.png b/docs/native/r6/iphone-needs-empty-light.png| new file mode 100644 |
| index 00000000..d713b456 |
| Binary files /dev/null and b/docs/native/r6/iphone-needs-empty-light.png differ |
diff --git a/docs/native/r6/iphone-needs-light.png b/docs/native/r6/iphone-needs-light.png| new file mode 100644 |
| index 00000000..94095b2d |
| Binary files /dev/null and b/docs/native/r6/iphone-needs-light.png differ |
diff --git a/docs/native/r6/iphone-notification-answered-dark.png b/docs/native/r6/iphone-notification-answered-dark.png| new file mode 100644 |
| index 00000000..a1c74736 |
| Binary files /dev/null and b/docs/native/r6/iphone-notification-answered-dark.png differ |
diff --git a/docs/native/r6/iphone-notification-answered-light.png b/docs/native/r6/iphone-notification-answered-light.png| new file mode 100644 |
| index 00000000..586daae7 |
| Binary files /dev/null and b/docs/native/r6/iphone-notification-answered-light.png differ |
diff --git a/docs/native/r6/iphone-notification-compact-dark.png b/docs/native/r6/iphone-notification-compact-dark.png| new file mode 100644 |
| index 00000000..b70360e3 |
| Binary files /dev/null and b/docs/native/r6/iphone-notification-compact-dark.png differ |
diff --git a/docs/native/r6/iphone-notification-compact-light.png b/docs/native/r6/iphone-notification-compact-light.png| new file mode 100644 |
| index 00000000..92e83618 |
| Binary files /dev/null and b/docs/native/r6/iphone-notification-compact-light.png differ |
diff --git a/docs/native/r6/iphone-notification-dark.png b/docs/native/r6/iphone-notification-dark.png| new file mode 100644 |
| index 00000000..7ba5826a |
| Binary files /dev/null and b/docs/native/r6/iphone-notification-dark.png differ |
diff --git a/docs/native/r6/iphone-notification-light.png b/docs/native/r6/iphone-notification-light.png| new file mode 100644 |
| index 00000000..bb424e88 |
| Binary files /dev/null and b/docs/native/r6/iphone-notification-light.png differ |
diff --git a/docs/native/r6/iphone-onboarding-message-dark.png b/docs/native/r6/iphone-onboarding-message-dark.png| new file mode 100644 |
| index 00000000..9b094ef4 |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-message-dark.png differ |
diff --git a/docs/native/r6/iphone-onboarding-message-light.png b/docs/native/r6/iphone-onboarding-message-light.png| new file mode 100644 |
| index 00000000..b5f3c170 |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-message-light.png differ |
diff --git a/docs/native/r6/iphone-onboarding-model-dark.png b/docs/native/r6/iphone-onboarding-model-dark.png| new file mode 100644 |
| index 00000000..91d7f70a |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-model-dark.png differ |
diff --git a/docs/native/r6/iphone-onboarding-model-light.png b/docs/native/r6/iphone-onboarding-model-light.png| new file mode 100644 |
| index 00000000..d5e6a5f2 |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-model-light.png differ |
diff --git a/docs/native/r6/iphone-onboarding-pair-dark.png b/docs/native/r6/iphone-onboarding-pair-dark.png| new file mode 100644 |
| index 00000000..fed2d870 |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-pair-dark.png differ |
diff --git a/docs/native/r6/iphone-onboarding-pair-light.png b/docs/native/r6/iphone-onboarding-pair-light.png| new file mode 100644 |
| index 00000000..5b8c8bf8 |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-pair-light.png differ |
diff --git a/docs/native/r6/iphone-onboarding-paired-dark.png b/docs/native/r6/iphone-onboarding-paired-dark.png| new file mode 100644 |
| index 00000000..87d4d45a |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-paired-dark.png differ |
diff --git a/docs/native/r6/iphone-onboarding-paired-light.png b/docs/native/r6/iphone-onboarding-paired-light.png| new file mode 100644 |
| index 00000000..10474739 |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-paired-light.png differ |
diff --git a/docs/native/r6/iphone-onboarding-project-dark.png b/docs/native/r6/iphone-onboarding-project-dark.png| new file mode 100644 |
| index 00000000..caea1a36 |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-project-dark.png differ |
diff --git a/docs/native/r6/iphone-onboarding-project-light.png b/docs/native/r6/iphone-onboarding-project-light.png| new file mode 100644 |
| index 00000000..98a3e53c |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-project-light.png differ |
diff --git a/docs/native/r6/iphone-onboarding-welcome-dark.png b/docs/native/r6/iphone-onboarding-welcome-dark.png| new file mode 100644 |
| index 00000000..8f54e582 |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-welcome-dark.png differ |
diff --git a/docs/native/r6/iphone-onboarding-welcome-light.png b/docs/native/r6/iphone-onboarding-welcome-light.png| new file mode 100644 |
| index 00000000..23e6b235 |
| Binary files /dev/null and b/docs/native/r6/iphone-onboarding-welcome-light.png differ |
diff --git a/docs/native/r6/iphone-research-dark.png b/docs/native/r6/iphone-research-dark.png| new file mode 100644 |
| index 00000000..7b27bbef |
| Binary files /dev/null and b/docs/native/r6/iphone-research-dark.png differ |
diff --git a/docs/native/r6/iphone-research-light.png b/docs/native/r6/iphone-research-light.png| new file mode 100644 |
| index 00000000..cd3ae709 |
| Binary files /dev/null and b/docs/native/r6/iphone-research-light.png differ |
diff --git a/docs/native/r6/iphone-task-dark.png b/docs/native/r6/iphone-task-dark.png| new file mode 100644 |
| index 00000000..238126dc |
| Binary files /dev/null and b/docs/native/r6/iphone-task-dark.png differ |
diff --git a/docs/native/r6/iphone-task-light.png b/docs/native/r6/iphone-task-light.png| new file mode 100644 |
| index 00000000..358bb674 |
| Binary files /dev/null and b/docs/native/r6/iphone-task-light.png differ |
diff --git a/docs/native/r6/iphone-tasks-dark.png b/docs/native/r6/iphone-tasks-dark.png| new file mode 100644 |
| index 00000000..8f8506fc |
| Binary files /dev/null and b/docs/native/r6/iphone-tasks-dark.png differ |
diff --git a/docs/native/r6/iphone-tasks-light.png b/docs/native/r6/iphone-tasks-light.png| new file mode 100644 |
| index 00000000..f6f53526 |
| Binary files /dev/null and b/docs/native/r6/iphone-tasks-light.png differ |
diff --git a/docs/native/r6/iphone-tasks-loading-dark.png b/docs/native/r6/iphone-tasks-loading-dark.png| new file mode 100644 |
| index 00000000..d1534fc5 |
| Binary files /dev/null and b/docs/native/r6/iphone-tasks-loading-dark.png differ |
diff --git a/docs/native/r6/iphone-tasks-loading-light.png b/docs/native/r6/iphone-tasks-loading-light.png| new file mode 100644 |
| index 00000000..20674fa8 |
| Binary files /dev/null and b/docs/native/r6/iphone-tasks-loading-light.png differ |
diff --git a/docs/native/r6/iphone-team-dark.png b/docs/native/r6/iphone-team-dark.png| new file mode 100644 |
| index 00000000..0bfdabae |
| Binary files /dev/null and b/docs/native/r6/iphone-team-dark.png differ |
diff --git a/docs/native/r6/iphone-team-light.png b/docs/native/r6/iphone-team-light.png| new file mode 100644 |
| index 00000000..f9bc62c7 |
| Binary files /dev/null and b/docs/native/r6/iphone-team-light.png differ |
diff --git a/docs/native/r6/iphone-teams-dark.png b/docs/native/r6/iphone-teams-dark.png| new file mode 100644 |
| index 00000000..2edcc469 |
| Binary files /dev/null and b/docs/native/r6/iphone-teams-dark.png differ |
diff --git a/docs/native/r6/iphone-teams-light.png b/docs/native/r6/iphone-teams-light.png| new file mode 100644 |
| index 00000000..caac921c |
| Binary files /dev/null and b/docs/native/r6/iphone-teams-light.png differ |
diff --git a/docs/native/r6/iphone-usage-concept-dark.png b/docs/native/r6/iphone-usage-concept-dark.png| new file mode 100644 |
| index 00000000..f6cc00ed |
| Binary files /dev/null and b/docs/native/r6/iphone-usage-concept-dark.png differ |
diff --git a/docs/native/r6/iphone-usage-concept-light.png b/docs/native/r6/iphone-usage-concept-light.png| new file mode 100644 |
| index 00000000..3f59bf58 |
| Binary files /dev/null and b/docs/native/r6/iphone-usage-concept-light.png differ |
diff --git a/docs/native/r6/mac-composer-states-dark.png b/docs/native/r6/mac-composer-states-dark.png| new file mode 100644 |
| index 00000000..6de4e345 |
| Binary files /dev/null and b/docs/native/r6/mac-composer-states-dark.png differ |
diff --git a/docs/native/r6/mac-composer-states-light.png b/docs/native/r6/mac-composer-states-light.png| new file mode 100644 |
| index 00000000..a32d2686 |
| Binary files /dev/null and b/docs/native/r6/mac-composer-states-light.png differ |
diff --git a/docs/native/r6/mac-control-states-dark.png b/docs/native/r6/mac-control-states-dark.png| new file mode 100644 |
| index 00000000..19a3b12c |
| Binary files /dev/null and b/docs/native/r6/mac-control-states-dark.png differ |
diff --git a/docs/native/r6/mac-control-states-light.png b/docs/native/r6/mac-control-states-light.png| new file mode 100644 |
| index 00000000..cf16b9cc |
| Binary files /dev/null and b/docs/native/r6/mac-control-states-light.png differ |
diff --git a/docs/native/r6/mac-main-dark.png b/docs/native/r6/mac-main-dark.png| new file mode 100644 |
| index 00000000..37ead33d |
| Binary files /dev/null and b/docs/native/r6/mac-main-dark.png differ |
diff --git a/docs/native/r6/mac-main-light.png b/docs/native/r6/mac-main-light.png| new file mode 100644 |
| index 00000000..557e4edb |
| Binary files /dev/null and b/docs/native/r6/mac-main-light.png differ |
diff --git a/docs/native/r6/mac-menu-dark.png b/docs/native/r6/mac-menu-dark.png| new file mode 100644 |
| index 00000000..dc213233 |
| Binary files /dev/null and b/docs/native/r6/mac-menu-dark.png differ |
diff --git a/docs/native/r6/mac-menu-light.png b/docs/native/r6/mac-menu-light.png| new file mode 100644 |
| index 00000000..40c00be1 |
| Binary files /dev/null and b/docs/native/r6/mac-menu-light.png differ |
diff --git a/docs/native/r6/mac-notification-answered-dark.png b/docs/native/r6/mac-notification-answered-dark.png| new file mode 100644 |
| index 00000000..908613c1 |
| Binary files /dev/null and b/docs/native/r6/mac-notification-answered-dark.png differ |
diff --git a/docs/native/r6/mac-notification-answered-light.png b/docs/native/r6/mac-notification-answered-light.png| new file mode 100644 |
| index 00000000..eec41981 |
| Binary files /dev/null and b/docs/native/r6/mac-notification-answered-light.png differ |
diff --git a/docs/native/r6/mac-notification-compact-dark.png b/docs/native/r6/mac-notification-compact-dark.png| new file mode 100644 |
| index 00000000..7bbc7f3d |
| Binary files /dev/null and b/docs/native/r6/mac-notification-compact-dark.png differ |
diff --git a/docs/native/r6/mac-notification-compact-light.png b/docs/native/r6/mac-notification-compact-light.png| new file mode 100644 |
| index 00000000..544da71e |
| Binary files /dev/null and b/docs/native/r6/mac-notification-compact-light.png differ |
diff --git a/docs/native/r6/mac-notification-dark.png b/docs/native/r6/mac-notification-dark.png| new file mode 100644 |
| index 00000000..80932be5 |
| Binary files /dev/null and b/docs/native/r6/mac-notification-dark.png differ |
diff --git a/docs/native/r6/mac-notification-light.png b/docs/native/r6/mac-notification-light.png| new file mode 100644 |
| index 00000000..a6fa510b |
| Binary files /dev/null and b/docs/native/r6/mac-notification-light.png differ |
diff --git a/docs/native/r6/mac-onboarding-message-dark.png b/docs/native/r6/mac-onboarding-message-dark.png| new file mode 100644 |
| index 00000000..829362bb |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-message-dark.png differ |
diff --git a/docs/native/r6/mac-onboarding-message-light.png b/docs/native/r6/mac-onboarding-message-light.png| new file mode 100644 |
| index 00000000..785629c9 |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-message-light.png differ |
diff --git a/docs/native/r6/mac-onboarding-model-dark.png b/docs/native/r6/mac-onboarding-model-dark.png| new file mode 100644 |
| index 00000000..9f95daab |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-model-dark.png differ |
diff --git a/docs/native/r6/mac-onboarding-model-light.png b/docs/native/r6/mac-onboarding-model-light.png| new file mode 100644 |
| index 00000000..30480b98 |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-model-light.png differ |
diff --git a/docs/native/r6/mac-onboarding-pair-dark.png b/docs/native/r6/mac-onboarding-pair-dark.png| new file mode 100644 |
| index 00000000..444a290c |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-pair-dark.png differ |
diff --git a/docs/native/r6/mac-onboarding-pair-light.png b/docs/native/r6/mac-onboarding-pair-light.png| new file mode 100644 |
| index 00000000..188ce66c |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-pair-light.png differ |
diff --git a/docs/native/r6/mac-onboarding-paired-dark.png b/docs/native/r6/mac-onboarding-paired-dark.png| new file mode 100644 |
| index 00000000..2221ea45 |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-paired-dark.png differ |
diff --git a/docs/native/r6/mac-onboarding-paired-light.png b/docs/native/r6/mac-onboarding-paired-light.png| new file mode 100644 |
| index 00000000..a4852862 |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-paired-light.png differ |
diff --git a/docs/native/r6/mac-onboarding-project-dark.png b/docs/native/r6/mac-onboarding-project-dark.png| new file mode 100644 |
| index 00000000..e739edd9 |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-project-dark.png differ |
diff --git a/docs/native/r6/mac-onboarding-project-light.png b/docs/native/r6/mac-onboarding-project-light.png| new file mode 100644 |
| index 00000000..5dc3f37b |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-project-light.png differ |
diff --git a/docs/native/r6/mac-onboarding-welcome-dark.png b/docs/native/r6/mac-onboarding-welcome-dark.png| new file mode 100644 |
| index 00000000..e4aece66 |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-welcome-dark.png differ |
diff --git a/docs/native/r6/mac-onboarding-welcome-light.png b/docs/native/r6/mac-onboarding-welcome-light.png| new file mode 100644 |
| index 00000000..15584e9c |
| Binary files /dev/null and b/docs/native/r6/mac-onboarding-welcome-light.png differ |
diff --git a/native/mockups/EquipoMockups.xcodeproj/project.pbxproj b/native/mockups/EquipoMockups.xcodeproj/project.pbxproj| index 9cd6b5c1..4373a00f 100644 |
| --- a/native/mockups/EquipoMockups.xcodeproj/project.pbxproj |
| +++ b/native/mockups/EquipoMockups.xcodeproj/project.pbxproj |
| @@ -18,6 +18,12 @@ |
| "path" = "Shared/Controls.swift"; |
| "sourceTree" = "<group>"; |
| }; |
| +"B27CEFA00C13D305DC10CE96" = { |
| +"isa" = "PBXFileReference"; |
| +"lastKnownFileType" = "sourcecode.swift"; |
| +"path" = "Shared/Onboarding.swift"; |
| +"sourceTree" = "<group>"; |
| +}; |
| "4C88AE69E2BF7A63C18FC8DC" = { |
| "isa" = "PBXFileReference"; |
| "lastKnownFileType" = "sourcecode.swift"; |
| @@ -93,6 +99,10 @@ |
| "isa" = "PBXBuildFile"; |
| "fileRef" = "3319F20BF681E39D436EDC7B"; |
| }; |
| +"8BF8B0AEAA2B3B6EF36D50F2" = { |
| +"isa" = "PBXBuildFile"; |
| +"fileRef" = "B27CEFA00C13D305DC10CE96"; |
| +}; |
| "6343DE7DFCD06C16BAC44A8C" = { |
| "isa" = "PBXBuildFile"; |
| "fileRef" = "4C88AE69E2BF7A63C18FC8DC"; |
| @@ -108,7 +118,7 @@ |
| "C25567FF6C745D91FC82DCAA" = { |
| "isa" = "PBXSourcesBuildPhase"; |
| "buildActionMask" = 2147483647; |
| -"files" = ("3B681A9FC64AB7C81A713615", "DC5FECF8FD1FF144FFD93F77", "6343DE7DFCD06C16BAC44A8C", "BD7FFD04441E90C1615CB9FF", "0CC7A79F58EEDFC73C0DC724"); |
| +"files" = ("3B681A9FC64AB7C81A713615", "DC5FECF8FD1FF144FFD93F77", "8BF8B0AEAA2B3B6EF36D50F2", "6343DE7DFCD06C16BAC44A8C", "BD7FFD04441E90C1615CB9FF", "0CC7A79F58EEDFC73C0DC724"); |
| "runOnlyForDeploymentPostprocessing" = 0; |
| }; |
| "B5240689BD1A36088B8B12CF" = { |
| @@ -132,9 +142,9 @@ |
| "GENERATE_INFOPLIST_FILE" = "YES"; |
| "CODE_SIGNING_ALLOWED" = "NO"; |
| "SDKROOT" = "iphoneos"; |
| -"MARKETING_VERSION" = "0.5"; |
| -"CURRENT_PROJECT_VERSION" = "5"; |
| -"INFOPLIST_KEY_CFBundleDisplayName" = "Equipo R5"; |
| +"MARKETING_VERSION" = "0.6"; |
| +"CURRENT_PROJECT_VERSION" = "6"; |
| +"INFOPLIST_KEY_CFBundleDisplayName" = "Equipo R6"; |
| "ENABLE_USER_SCRIPT_SANDBOXING" = "YES"; |
| "IPHONEOS_DEPLOYMENT_TARGET" = "17.0"; |
| "TARGETED_DEVICE_FAMILY" = "1"; |
| @@ -156,9 +166,9 @@ |
| "GENERATE_INFOPLIST_FILE" = "YES"; |
| "CODE_SIGNING_ALLOWED" = "NO"; |
| "SDKROOT" = "iphoneos"; |
| -"MARKETING_VERSION" = "0.5"; |
| -"CURRENT_PROJECT_VERSION" = "5"; |
| -"INFOPLIST_KEY_CFBundleDisplayName" = "Equipo R5"; |
| +"MARKETING_VERSION" = "0.6"; |
| +"CURRENT_PROJECT_VERSION" = "6"; |
| +"INFOPLIST_KEY_CFBundleDisplayName" = "Equipo R6"; |
| "ENABLE_USER_SCRIPT_SANDBOXING" = "YES"; |
| "IPHONEOS_DEPLOYMENT_TARGET" = "17.0"; |
| "TARGETED_DEVICE_FAMILY" = "1"; |
| @@ -212,6 +222,10 @@ |
| "isa" = "PBXBuildFile"; |
| "fileRef" = "3319F20BF681E39D436EDC7B"; |
| }; |
| +"660BEE979D2866FB8781CA1C" = { |
| +"isa" = "PBXBuildFile"; |
| +"fileRef" = "B27CEFA00C13D305DC10CE96"; |
| +}; |
| "157DBD90D3BA7E416FDF7DF2" = { |
| "isa" = "PBXBuildFile"; |
| "fileRef" = "4C88AE69E2BF7A63C18FC8DC"; |
| @@ -239,7 +253,7 @@ |
| "970DDFB7275054EB69197FD9" = { |
| "isa" = "PBXSourcesBuildPhase"; |
| "buildActionMask" = 2147483647; |
| -"files" = ("9EC2DCD4EF73C1F55E3711A4", "876CE2DA62D1E42CE9C74556", "157DBD90D3BA7E416FDF7DF2", "271BD9F5A481364BCDB2DA7B", "84B5E38A4644C046B498A36D", "6528FBE13898B654F6FA2B99", "1F4D89A8682A68FCCF1A209B", "9CF224D8099DAEA88A7879D8"); |
| +"files" = ("9EC2DCD4EF73C1F55E3711A4", "876CE2DA62D1E42CE9C74556", "660BEE979D2866FB8781CA1C", "157DBD90D3BA7E416FDF7DF2", "271BD9F5A481364BCDB2DA7B", "84B5E38A4644C046B498A36D", "6528FBE13898B654F6FA2B99", "1F4D89A8682A68FCCF1A209B", "9CF224D8099DAEA88A7879D8"); |
| "runOnlyForDeploymentPostprocessing" = 0; |
| }; |
| "FC5C63BDA68734DFDE79CC76" = { |
| @@ -263,9 +277,9 @@ |
| "GENERATE_INFOPLIST_FILE" = "YES"; |
| "CODE_SIGNING_ALLOWED" = "NO"; |
| "SDKROOT" = "macosx"; |
| -"MARKETING_VERSION" = "0.5"; |
| -"CURRENT_PROJECT_VERSION" = "5"; |
| -"INFOPLIST_KEY_CFBundleDisplayName" = "Equipo R5"; |
| +"MARKETING_VERSION" = "0.6"; |
| +"CURRENT_PROJECT_VERSION" = "6"; |
| +"INFOPLIST_KEY_CFBundleDisplayName" = "Equipo R6"; |
| "ENABLE_USER_SCRIPT_SANDBOXING" = "YES"; |
| "MACOSX_DEPLOYMENT_TARGET" = "14.0"; |
| "SUPPORTED_PLATFORMS" = "macosx"; |
| @@ -283,9 +297,9 @@ |
| "GENERATE_INFOPLIST_FILE" = "YES"; |
| "CODE_SIGNING_ALLOWED" = "NO"; |
| "SDKROOT" = "macosx"; |
| -"MARKETING_VERSION" = "0.5"; |
| -"CURRENT_PROJECT_VERSION" = "5"; |
| -"INFOPLIST_KEY_CFBundleDisplayName" = "Equipo R5"; |
| +"MARKETING_VERSION" = "0.6"; |
| +"CURRENT_PROJECT_VERSION" = "6"; |
| +"INFOPLIST_KEY_CFBundleDisplayName" = "Equipo R6"; |
| "ENABLE_USER_SCRIPT_SANDBOXING" = "YES"; |
| "MACOSX_DEPLOYMENT_TARGET" = "14.0"; |
| "SUPPORTED_PLATFORMS" = "macosx"; |
| @@ -320,7 +334,7 @@ |
| }; |
| "325F10A6957A34D66CB8C0E4" = { |
| "isa" = "PBXGroup"; |
| -"children" = ("9A32F360C8C381165C453B09", "3319F20BF681E39D436EDC7B", "4C88AE69E2BF7A63C18FC8DC", "77D3D48B196F4CA8E45B435F", "020BE231A412CB119E1E74E2", "E8CB03EBFAA1DFCF0BED4217", "310624EC755027929E86A63C", "0BF32EF05DC119C2AF6FDCF2", "7A0ED739212444D1C1406197", "8AD34A7A0B76F4C31697F39A", "FBDC4F23F93125BBEEAE800C"); |
| +"children" = ("9A32F360C8C381165C453B09", "3319F20BF681E39D436EDC7B", "B27CEFA00C13D305DC10CE96", "4C88AE69E2BF7A63C18FC8DC", "77D3D48B196F4CA8E45B435F", "020BE231A412CB119E1E74E2", "E8CB03EBFAA1DFCF0BED4217", "310624EC755027929E86A63C", "0BF32EF05DC119C2AF6FDCF2", "7A0ED739212444D1C1406197", "8AD34A7A0B76F4C31697F39A", "FBDC4F23F93125BBEEAE800C"); |
| "sourceTree" = "<group>"; |
| }; |
| "89E1FD6268CC0F221A2BE178" = { |
diff --git a/native/mockups/Mac/ComposerVerification.swift b/native/mockups/Mac/ComposerVerification.swift| index bc8737b8..7f258cdd 100644 |
| --- a/native/mockups/Mac/ComposerVerification.swift |
| +++ b/native/mockups/Mac/ComposerVerification.swift |
| @@ -71,9 +71,12 @@ final class ComposerGallery: NSView { |
| } |
| let menuOwner = NativeComposer() |
| let menu = menuOwner.attachmentMenuContent() |
| - menu.frame = NSRect(x: 28, y: y, width: 220, height: 104) |
| - addSubview(menu) |
| - frame.size.height = y + 130 |
| + let menuCard = CardView(fill: .webFace, stroke: .webLine, radius: 10) |
| + menuCard.frame = NSRect(x: 28, y: y, width: 220, height: 76) |
| + menu.frame = menuCard.bounds |
| + menuCard.addSubview(menu) |
| + addSubview(menuCard) |
| + frame.size.height = y + 104 |
| } |
| required init?(coder: NSCoder) { fatalError() } |
| override func draw(_ dirtyRect: NSRect) { NSColor.webBackground.setFill(); bounds.fill() } |
diff --git a/native/mockups/Mac/EquipoMacApp.swift b/native/mockups/Mac/EquipoMacApp.swift| index e3408f4b..8b7a1127 100644 |
| --- a/native/mockups/Mac/EquipoMacApp.swift |
| +++ b/native/mockups/Mac/EquipoMacApp.swift |
| @@ -4,26 +4,43 @@ import EquipoCore |
| final class MainContent: NSView { |
| override var isFlipped: Bool { true } |
| - let sidebar = NSHostingView(rootView: MacSidebar()) |
| + static let sidebarWidth: CGFloat = 240 |
| + static let inspectorWidth: CGFloat = 300 |
| + let sidebarMaterial = NSVisualEffectView() |
| + let sidebar: NSHostingView<MacSidebar> |
| let transcript: NativeTranscript |
| let inspector: NSHostingView<MacInspector> |
| - init(store: MockStore) { |
| + /// Offscreen captures cannot sample what is behind the window, so they |
| + /// stand in a flat colour close to the sidebar material over a plain desktop. |
| + var flatMaterial = false { didSet { sidebarMaterial.isHidden = flatMaterial; needsDisplay = true } } |
| + init(store: MockStore, titlebarInset: CGFloat = 0) { |
| + sidebar = NSHostingView(rootView: MacSidebar(store: store, titlebarInset: titlebarInset)) |
| transcript = NativeTranscript(store: store) |
| inspector = NSHostingView(rootView: MacInspector(store: store)) |
| super.init(frame: NSRect(x: 0, y: 0, width: 1400, height: 900)) |
| - [sidebar, transcript, inspector].forEach { addSubview($0) } |
| + // The sidebar sits on the system sidebar material; content stays opaque. |
| + sidebarMaterial.material = .sidebar |
| + sidebarMaterial.blendingMode = .behindWindow |
| + sidebarMaterial.state = .active |
| + [sidebarMaterial, sidebar, transcript, inspector].forEach { addSubview($0) } |
| } |
| required init?(coder: NSCoder) { fatalError() } |
| override func layout() { |
| super.layout() |
| - sidebar.frame = NSRect(x: 0, y: 0, width: 256, height: bounds.height) |
| - transcript.frame = NSRect(x: 257, y: 0, width: bounds.width - 598, height: bounds.height) |
| - inspector.frame = NSRect(x: bounds.width - 340, y: 0, width: 340, height: bounds.height) |
| + let side = MainContent.sidebarWidth, inspect = MainContent.inspectorWidth |
| + sidebarMaterial.frame = NSRect(x: 0, y: 0, width: side, height: bounds.height) |
| + sidebar.frame = sidebarMaterial.frame |
| + transcript.frame = NSRect(x: side + 1, y: 0, width: bounds.width - side - inspect - 2, height: bounds.height) |
| + inspector.frame = NSRect(x: bounds.width - inspect, y: 0, width: inspect, height: bounds.height) |
| } |
| override func draw(_ rect: NSRect) { |
| - NSColor.separatorColor.setFill() |
| - NSRect(x: 256, y: 0, width: 1, height: bounds.height).fill() |
| - NSRect(x: bounds.width - 341, y: 0, width: 1, height: bounds.height).fill() |
| + if flatMaterial { |
| + NSColor.web(0xF1F1F4, 0x1B1C20).setFill() |
| + NSRect(x: 0, y: 0, width: MainContent.sidebarWidth, height: bounds.height).fill() |
| + } |
| + NSColor.webLine.setFill() |
| + NSRect(x: MainContent.sidebarWidth, y: 0, width: 1, height: bounds.height).fill() |
| + NSRect(x: bounds.width - MainContent.inspectorWidth - 1, y: 0, width: 1, height: bounds.height).fill() |
| } |
| } |
| @main |
| @@ -51,14 +68,17 @@ final class EquipoMacApp: NSObject, NSApplicationDelegate { |
| return |
| } |
| NSApp.setActivationPolicy(.regular) |
| - let window = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 1400, height: 900), styleMask: [.titled, .closable, .miniaturizable, .resizable], backing: .buffered, defer: false) |
| + let window = NSWindow(contentRect: NSRect(x: 0, y: 0, width: 1400, height: 900), styleMask: [.titled, .closable, .miniaturizable, .resizable, .fullSizeContentView], backing: .buffered, defer: false) |
| window.title = "Equipo" |
| - window.contentView = MainContent(store: store) |
| + window.titleVisibility = .hidden |
| + window.titlebarAppearsTransparent = true |
| + window.minSize = NSSize(width: 980, height: 600) |
| + window.contentView = MainContent(store: store, titlebarInset: 24) |
| window.center() |
| window.makeKeyAndOrderFront(nil) |
| self.window = window |
| let item = NSStatusBar.system.statusItem(withLength: NSStatusItem.variableLength) |
| - item.button?.image = NSImage(systemSymbolName: "hand.raised", accessibilityDescription: "Needs you") |
| + item.button?.image = NSImage(systemSymbolName: "hand.raised.fill", accessibilityDescription: "Needs you") |
| item.button?.title = " 1" |
| item.button?.target = self |
| item.button?.action = #selector(togglePopover) |
| @@ -74,7 +94,7 @@ final class EquipoMacApp: NSObject, NSApplicationDelegate { |
| if popover?.isShown == true { popover?.close(); return } |
| let p = NSPopover() |
| p.behavior = .transient |
| - p.contentSize = NSSize(width: 390, height: 500) |
| + p.contentSize = NSSize(width: 360, height: 430) |
| p.contentViewController = NSHostingController(rootView: MenuBarPanel(store: store)) |
| p.show(relativeTo: button.bounds, of: button, preferredEdge: .minY) |
| popover = p |
| @@ -87,11 +107,17 @@ final class EquipoMacApp: NSObject, NSApplicationDelegate { |
| let theme = dark ? "dark" : "light" |
| let gallery = ComposerGallery() |
| capture(gallery, size: gallery.frame.size, appearance: appearance, path: directory + "/mac-composer-states-\(theme).png") |
| - capture(MainContent(store: store), size: NSSize(width: 1400, height: 900), appearance: appearance, path: directory + "/mac-main-\(theme).png") |
| - capture(host(rootView: MenuBarPanel(store: store)), size: NSSize(width: 410, height: 520), appearance: appearance, path: directory + "/mac-menu-\(theme).png") |
| - capture(host(rootView: NotificationAnswerView(store: store, answer: nil, compact: true)), size: NSSize(width: 440, height: 570), appearance: appearance, path: directory + "/mac-notification-compact-\(theme).png") |
| - capture(host(rootView: NotificationAnswerView(store: store, answer: nil)), size: NSSize(width: 440, height: 570), appearance: appearance, path: directory + "/mac-notification-\(theme).png") |
| - capture(host(rootView: NotificationAnswerView(store: store, answer: "VAT")), size: NSSize(width: 440, height: 570), appearance: appearance, path: directory + "/mac-notification-answered-\(theme).png") |
| + let main = MainContent(store: store) |
| + main.flatMaterial = true |
| + capture(main, size: NSSize(width: 1400, height: 900), appearance: appearance, path: directory + "/mac-main-\(theme).png") |
| + capture(host(rootView: MenuBarPanel(store: store)), size: NSSize(width: 360, height: 430), appearance: appearance, path: directory + "/mac-menu-\(theme).png") |
| + capture(host(rootView: NotificationAnswerView(store: store, answer: nil, compact: true)), size: NSSize(width: 440, height: 400), appearance: appearance, path: directory + "/mac-notification-compact-\(theme).png") |
| + capture(host(rootView: NotificationAnswerView(store: store, answer: nil)), size: NSSize(width: 440, height: 400), appearance: appearance, path: directory + "/mac-notification-\(theme).png") |
| + capture(host(rootView: ControlStatesGallery()), size: NSSize(width: 560, height: 560), appearance: appearance, path: directory + "/mac-control-states-\(theme).png") |
| + for step in OnboardingStep.allCases { |
| + capture(host(rootView: OnboardingView(store: store, step: step)), size: NSSize(width: 720, height: 540), appearance: appearance, path: directory + "/mac-onboarding-\(step.rawValue)-\(theme).png") |
| + } |
| + capture(host(rootView: NotificationAnswerView(store: store, answer: "VAT")), size: NSSize(width: 440, height: 400), appearance: appearance, path: directory + "/mac-notification-answered-\(theme).png") |
| } |
| } |
| func host<V: View>(rootView: V) -> NSHostingView<V> { |
diff --git a/native/mockups/Mac/MacPanels.swift b/native/mockups/Mac/MacPanels.swift| index 7479bf88..01f6e800 100644 |
| --- a/native/mockups/Mac/MacPanels.swift |
| +++ b/native/mockups/Mac/MacPanels.swift |
| @@ -1,95 +1,219 @@ |
| import SwiftUI |
| import EquipoCore |
| +struct VisualEffect: NSViewRepresentable { |
| + let material: NSVisualEffectView.Material |
| + func makeNSView(context: Context) -> NSVisualEffectView { |
| + let view = NSVisualEffectView() |
| + view.material = material |
| + view.blendingMode = .behindWindow |
| + view.state = .active |
| + return view |
| + } |
| + func updateNSView(_ view: NSVisualEffectView, context: Context) { view.material = material } |
| +} |
| +/// A sidebar row with the system's quiet selection and a hover state. |
| +struct SidebarRow<Trailing: View>: View { |
| + let title: String |
| + let icon: String |
| + var selected = false |
| + var action: () -> Void = {} |
| + @ViewBuilder var trailing: Trailing |
| + @State private var hovering = false |
| + var body: some View { |
| + Button(action: action) { |
| + HStack(spacing: 8) { |
| + Image(systemName: icon).font(.system(size: 14)).foregroundStyle(Palette.accent).frame(width: 20) |
| + Text(title).font(.system(size: 13, weight: selected ? .semibold : .regular)).foregroundStyle(Palette.text) |
| + Spacer(minLength: 4) |
| + trailing |
| + } |
| + .padding(.horizontal, 8).frame(height: 32) |
| + .background(RoundedRectangle(cornerRadius: 6, style: .continuous).fill(Color.primary.opacity(selected ? 0.10 : hovering ? 0.05 : 0))) |
| + .contentShape(Rectangle()) |
| + } |
| + .buttonStyle(.plain).onHover { hovering = $0 } |
| + .accessibilityAddTraits(selected ? .isSelected : []) |
| + } |
| +} |
| struct MacSidebar: View { |
| + let store: MockStore |
| + var titlebarInset: CGFloat = 0 |
| @State private var selection = "Conversation" |
| var body: some View { |
| VStack(alignment: .leading, spacing: 0) { |
| - HStack { |
| - Image(systemName: "person.2").foregroundStyle(Palette.accent) |
| - Text("Oficina").font(.title2.weight(.semibold)) |
| + HStack(spacing: 8) { |
| + Image(systemName: "person.2.fill").font(.system(size: 14)).foregroundStyle(Palette.accent).frame(width: 20) |
| + Text(store.teams[0].name).font(.system(size: 15, weight: .semibold)).foregroundStyle(Palette.text) |
| Spacer() |
| - Image(systemName: "chevron.up.chevron.down").font(.caption) |
| - }.padding(22) |
| - VStack(spacing: 4) { |
| - sidebarRow("Conversation", "bubble.left.and.bubble.right", "") |
| - sidebarRow("Needs you", "hand.raised", "1") |
| - sidebarRow("Tasks", "checklist", "4") |
| - sidebarRow("Projects", "folder", "2") |
| - }.padding(.horizontal, 12) |
| - Text("Specialists").font(.subheadline.weight(.semibold)).foregroundStyle(Palette.secondary).padding(.horizontal, 22).padding(.top, 32).padding(.bottom, 12) |
| - VStack(alignment: .leading, spacing: 23) { |
| - specialist("Engineering", "Check sign-in recovery", "Reading the session tests") |
| - specialist("Design", "Explore a shorter setup", "Comparing two flows") |
| - specialist("Copy", "Fix VAT on invoice PDFs", "Waiting for your answer") |
| - specialist("Research", "Calendar connections", "Finished") |
| - specialist("Review", "", "No current task") |
| - }.padding(.horizontal, 22) |
| - Spacer() |
| - Divider().padding(.horizontal, 18) |
| - sidebarRow("Connections & Usage", "point.3.connected.trianglepath.dotted", "").padding(12) |
| - HStack { Image(systemName: "person.crop.circle"); Text("Paul"); Spacer(); Image(systemName: "gearshape") } |
| - .font(.subheadline).foregroundStyle(Palette.secondary).padding(.horizontal, 22).padding(.bottom, 20) |
| - }.background(Palette.background).tint(Palette.accent) |
| + Image(systemName: "chevron.up.chevron.down").font(.system(size: 10, weight: .semibold)).foregroundStyle(Palette.secondary) |
| + } |
| + .padding(.horizontal, 16).frame(height: 52).padding(.top, titlebarInset) |
| + .contentShape(Rectangle()).accessibilityLabel("Team: \(store.teams[0].name). Switch team") |
| + VStack(spacing: 1) { |
| + row("Conversation", "bubble.left.and.bubble.right") { EmptyView() } |
| + row("Needs you", "hand.raised") { CountBadge(count: store.tasks.filter(\.needs_you).count) } |
| + row("Tasks", "checklist") { count(store.tasks.count) } |
| + row("Projects", "folder") { count(store.projects.count) } |
| + }.padding(.horizontal, 8) |
| + Text("Specialists").font(.system(size: 11, weight: .semibold)).foregroundStyle(Palette.secondary) |
| + .padding(.horizontal, 16).padding(.top, 22).padding(.bottom, 6) |
| + VStack(spacing: 2) { |
| + ForEach(["engineering", "design", "copy", "research", "review"], id: \.self) { category in |
| + MacSpecialistRow(category: category, task: store.activeTask(for: category)) |
| + } |
| + }.padding(.horizontal, 8) |
| + Spacer(minLength: 12) |
| + VStack(spacing: 1) { |
| + row("Connections & Usage", "gauge.with.dots.needle.33percent") { EmptyView() } |
| + }.padding(.horizontal, 8).padding(.bottom, 8) |
| + Rectangle().fill(Color.primary.opacity(0.08)).frame(height: 1) |
| + HStack(spacing: 8) { |
| + Image(systemName: "person.crop.circle.fill").font(.system(size: 20)).foregroundStyle(Palette.secondary) |
| + VStack(alignment: .leading, spacing: 1) { |
| + Text("Paul").font(.system(size: 13, weight: .medium)).foregroundStyle(Palette.text) |
| + Text(store.conversation.messages?.first?.author_id ?? "").font(.system(size: 11)).foregroundStyle(Palette.secondary) |
| + } |
| + Spacer() |
| + Image(systemName: "gearshape").font(.system(size: 14)).foregroundStyle(Palette.secondary) |
| + .frame(width: 32, height: 32).contentShape(Rectangle()).accessibilityLabel("Settings") |
| + }.padding(.leading, 16).padding(.trailing, 8).frame(height: 52) |
| + }.tint(Palette.accent) |
| + } |
| + private func row<T: View>(_ title: String, _ icon: String, @ViewBuilder trailing: () -> T) -> some View { |
| + SidebarRow(title: title, icon: icon, selected: selection == title, action: { selection = title }, trailing: trailing) |
| } |
| - func sidebarRow(_ title: String, _ icon: String, _ count: String) -> some View { |
| - Button { selection = title } label: { |
| - HStack(spacing: 11) { Image(systemName: icon).frame(width: 19); Text(title); Spacer(minLength: 0); Text(count).monospacedDigit() } |
| - .font(.system(size: 13, weight: selection == title ? .semibold : .regular)) |
| - .padding(.horizontal, 11).padding(.vertical, 10) |
| - .foregroundStyle(selection == title ? Palette.accent : Color.primary) |
| - .background(selection == title ? Palette.soft : .clear) |
| - .clipShape(RoundedRectangle(cornerRadius: 8)) |
| - }.buttonStyle(.plain) |
| + private func count(_ value: Int) -> some View { |
| + Text(value.formatted()).font(.system(size: 12)).monospacedDigit().foregroundStyle(Palette.secondary).padding(.trailing, 6) |
| } |
| - func specialist(_ name: String, _ task: String, _ activity: String) -> some View { |
| - VStack(alignment: .leading, spacing: 6) { |
| - Label(name, systemImage: specialistIcon(name)).font(.system(size: 13, weight: .semibold)) |
| - if !task.isEmpty { Text(task).font(.system(size: 12)).lineLimit(1) } |
| - Text(activity).font(.system(size: 11)).foregroundStyle(Palette.secondary) |
| +} |
| +struct MacSpecialistRow: View { |
| + let category: String |
| + let task: EquipoTask? |
| + @State private var hovering = false |
| + var body: some View { |
| + let step = task?.steps?.first { $0.category == category && ["running", "waiting"].contains($0.state) } |
| + let needsYou = step?.state == "waiting" && task?.needs_you == true |
| + HStack(alignment: .top, spacing: 8) { |
| + Image(systemName: specialistIcon(category)).font(.system(size: 13)) |
| + .foregroundStyle(task == nil ? Palette.faint : Palette.accent).frame(width: 20).padding(.top, 1) |
| + VStack(alignment: .leading, spacing: 2) { |
| + Text(category.capitalized).font(.system(size: 13, weight: .medium)).foregroundStyle(Palette.text) |
| + if let task, let step { |
| + Text(task.description).font(.system(size: 12)).foregroundStyle(Palette.text).lineLimit(1) |
| + Text(needsYou ? "Waiting for your answer" : (step.actual.isEmpty ? step.action : step.actual)) |
| + .font(.system(size: 11)).foregroundStyle(needsYou ? Palette.accent : Palette.secondary).lineLimit(1) |
| + } else { |
| + Text("No current task").font(.system(size: 11)).foregroundStyle(Palette.secondary) |
| + } |
| + } |
| + Spacer(minLength: 4) |
| + if needsYou { Image(systemName: "hand.raised.fill").font(.system(size: 11)).foregroundStyle(Palette.accent).padding(.top, 3) } |
| + else if step != nil { Circle().fill(Palette.positive).frame(width: 7, height: 7).padding(.top, 6).accessibilityLabel("Working") } |
| } |
| + .padding(.horizontal, 8).padding(.vertical, 6).frame(minHeight: 32) |
| + .background(RoundedRectangle(cornerRadius: 6, style: .continuous).fill(Color.primary.opacity(hovering ? 0.05 : 0))) |
| + .contentShape(Rectangle()).onHover { hovering = $0 } |
| + .accessibilityElement(children: .combine) |
| } |
| } |
| struct MacInspector: View { |
| let store: MockStore |
| var body: some View { |
| - ScrollView { |
| - VStack(alignment: .leading, spacing: 20) { |
| - HStack { Text("Task").font(.headline); Spacer(); Image(systemName: "sidebar.right") } |
| - Divider() |
| - Text(store.tasks[0].description).font(.title2.weight(.semibold)) |
| - Label("Equipo", systemImage: "folder").font(.subheadline).foregroundStyle(Palette.secondary) |
| - Label("Needs your answer", systemImage: "hand.raised").font(.subheadline).foregroundStyle(Palette.accent) |
| - Divider() |
| - Text("Steps").font(.headline) |
| - StepsView(task: store.tasks[0]) |
| - Divider() |
| - Text("Copy is waiting").font(.headline) |
| - QuietLabel(text: "Answer the question in the conversation to continue this task.") |
| - QuietLabel(text: "Specialist activity is a web parity concept awaiting API support.") |
| - }.padding(22) |
| + let task = store.tasks[0] |
| + let status = TaskStatus(task) |
| + VStack(spacing: 0) { |
| + HStack { |
| + Text("Task").font(.system(size: 13, weight: .semibold)).foregroundStyle(Palette.text) |
| + Spacer() |
| + Image(systemName: "xmark").font(.system(size: 11, weight: .semibold)).foregroundStyle(Palette.secondary) |
| + .frame(width: 32, height: 32).contentShape(Rectangle()).accessibilityLabel("Close inspector") |
| + }.padding(.leading, 16).padding(.trailing, 8).frame(height: 51) |
| + Hairline() |
| + ScrollView { |
| + VStack(alignment: .leading, spacing: 16) { |
| + VStack(alignment: .leading, spacing: 8) { |
| + Text(task.description).font(.system(size: 17, weight: .semibold)).foregroundStyle(Palette.text) |
| + .fixedSize(horizontal: false, vertical: true) |
| + HStack(spacing: 8) { |
| + StatusPill(text: status.label, tone: status.tone, icon: status.icon) |
| + Label(store.project(for: task), systemImage: "folder").font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + } |
| + } |
| + Hairline() |
| + SectionTitle(text: "Steps") |
| + StepsView(task: task) |
| + if let usage = task.usage { |
| + Hairline() |
| + SectionTitle(text: "Used so far") |
| + HStack(spacing: 8) { |
| + StatTile(label: "Calls", value: Int(usage.calls).formatted()) |
| + StatTile(label: "Tokens in", value: compact(usage.input_tokens)) |
| + StatTile(label: "Tokens out", value: compact(usage.output_tokens)) |
| + } |
| + } |
| + if task.can_cancel { |
| + Hairline() |
| + EquipoButton(title: "Cancel task") {} |
| + } |
| + QuietLabel(text: "Specialist activity in the sidebar is a web parity concept awaiting API support.") |
| + }.padding(16) |
| + } |
| }.background(Palette.surface).tint(Palette.accent) |
| } |
| } |
| struct MenuBarPanel: View { |
| let store: MockStore |
| @State private var answer: String? |
| + @State private var hoveringTasks = false |
| var body: some View { |
| - VStack(alignment: .leading, spacing: 18) { |
| - HStack { |
| - Label("Equipo", systemImage: "bubble.left.and.bubble.right").font(.headline) |
| + let task = store.tasks[0] |
| + let running = store.tasks.filter { !$0.needs_you && $0.state != "done" }.count |
| + VStack(alignment: .leading, spacing: 0) { |
| + HStack(spacing: 8) { |
| + AppGlyph(size: 22) |
| + Text("Equipo").font(.system(size: 13, weight: .semibold)).foregroundStyle(Palette.text) |
| + Spacer() |
| + Text(store.teams[0].name).font(.system(size: 12)).foregroundStyle(Palette.secondary) |
| + Image(systemName: "chevron.up.chevron.down").font(.system(size: 9, weight: .semibold)).foregroundStyle(Palette.secondary) |
| + }.padding(.horizontal, 14).frame(height: 44) |
| + Hairline() |
| + VStack(alignment: .leading, spacing: 12) { |
| + HStack(spacing: 8) { |
| + SectionTitle(text: "Needs you") |
| + if answer == nil { CountBadge(count: 1) } |
| + Spacer() |
| + } |
| + VStack(alignment: .leading, spacing: 4) { |
| + Text(task.description).font(.system(size: 15, weight: .semibold)).foregroundStyle(Palette.text) |
| + HStack(spacing: 8) { |
| + StepProgress(task: task) |
| + Text(store.project(for: task)).font(Typo.caption).foregroundStyle(Palette.secondary) |
| + } |
| + } |
| + QuestionCard(question: store.question, category: store.askingCategory(for: store.question), answer: $answer) |
| + }.padding(14) |
| + Hairline() |
| + HStack(spacing: 8) { |
| + Image(systemName: "checklist").font(.system(size: 13)).foregroundStyle(Palette.accent).frame(width: 20) |
| + Text("\(running) tasks in progress").font(.system(size: 13)).foregroundStyle(Palette.text) |
| Spacer() |
| - Text("Oficina").foregroundStyle(Palette.secondary) |
| + Image(systemName: "chevron.right").font(.system(size: 10, weight: .semibold)).foregroundStyle(Palette.faint) |
| } |
| - Divider() |
| - HStack { Text("Needs you").font(.title2.weight(.semibold)); Spacer(); Text(answer == nil ? "1" : "0").foregroundStyle(Palette.accent) } |
| - Text("Fix VAT on invoice PDFs").font(.headline) |
| - QuietLabel(text: "Equipo · Copy") |
| - QuestionCard(question: store.question, answer: $answer) |
| - Divider() |
| - HStack { Text("2 tasks in progress").foregroundStyle(Palette.secondary); Spacer(); Image(systemName: "arrow.up.right") }.font(.subheadline) |
| - EquipoButton(title: "Open Equipo") { NSApp.windows.first(where: { $0.title == "Equipo" })?.makeKeyAndOrderFront(nil) } |
| + .padding(.horizontal, 8).frame(height: 32) |
| + .background(RoundedRectangle(cornerRadius: 6, style: .continuous).fill(Color.primary.opacity(hoveringTasks ? 0.06 : 0))) |
| + .contentShape(Rectangle()).onHover { hoveringTasks = $0 } |
| + .padding(.horizontal, 6).padding(.vertical, 6) |
| + Hairline() |
| + HStack(spacing: 10) { |
| + EquipoButton(title: "Open Equipo") { NSApp.windows.first(where: { $0.title == "Equipo" })?.makeKeyAndOrderFront(nil) } |
| + Spacer() |
| + Text("⌘O").font(.system(size: 12)).foregroundStyle(Palette.secondary).accessibilityHidden(true) |
| + }.padding(14) |
| Spacer(minLength: 0) |
| - }.padding(22).background(Palette.background).tint(Palette.accent) |
| + } |
| + .background(Palette.background.opacity(0.82)) |
| + .background(VisualEffect(material: .popover)) |
| + .tint(Palette.accent) |
| } |
| } |
diff --git a/native/mockups/Mac/NativeComposer.swift b/native/mockups/Mac/NativeComposer.swift| index de77cb64..49c9c07f 100644 |
| --- a/native/mockups/Mac/NativeComposer.swift |
| +++ b/native/mockups/Mac/NativeComposer.swift |
| @@ -14,6 +14,18 @@ extension NSColor { |
| static let webPrimary = web(WebControls.primary(false), WebControls.primary(true)) |
| static let webBorder = web(0xD0D4DC, 0x343843) |
| static let webBackground = web(0xFBFBFC, 0x0C0D0F) |
| + static let webSecondary = web(0x52525C, 0xA1A1AA) |
| + static let webAccent = web(0x1F56D6, 0x7AA2FF) |
| + static let webSoft = web(0xECF1FF, 0x16234A) |
| + static let webSoftBorder = web(0xC9D7FA, 0x27397A) |
| + static let webLine = web(0xE6E6EA, 0x26282E) |
| + static let webSurface2 = web(0xF3F3F5, 0x18191D) |
| + static let webFaceHover = web(0xF4F5F8, 0x1B1D22) |
| + static let webFacePressed = web(0xE9EBEF, 0x22242B) |
| + static let webPrimaryHover = web(0x1D4DC8, 0x2956D0) |
| + static let webPrimaryEdge = web(0x153CA0, 0x1F43A6) |
| + static let webPositive = web(0x166534, 0x6EE7A8) |
| + static let webNegative = web(0xB91C1C, 0xF79AA0) |
| } |
| final class ComposerEditor: NSTextView { |
| @@ -21,7 +33,9 @@ final class ComposerEditor: NSTextView { |
| override func draw(_ dirtyRect: NSRect) { |
| super.draw(dirtyRect) |
| if string.isEmpty { |
| - ("Message" as NSString).draw(at: NSPoint(x: 18, y: 1), withAttributes: [.font: NSFont.systemFont(ofSize: 16), .foregroundColor: NSColor.webPlaceholder]) |
| + var attributes = typingAttributes |
| + attributes[.foregroundColor] = NSColor.webPlaceholder |
| + ("Message" as NSString).draw(in: NSRect(x: 18, y: 0, width: max(0, bounds.width - 36), height: 24), withAttributes: attributes) |
| } |
| } |
| override func didChangeText() { super.didChangeText(); needsDisplay = true } |
| @@ -36,16 +50,16 @@ final class ComposerPill: NSView { |
| override func draw(_ dirtyRect: NSRect) { |
| let path = NSBezierPath(roundedRect: bounds.insetBy(dx: 0.5, dy: 0.5), xRadius: 22, yRadius: 22) |
| NSColor.webFace.setFill(); path.fill() |
| - let focused = window?.firstResponder is ComposerEditor |
| - (focused ? NSColor.webBorder.blended(withFraction: 0.10, of: .webText)! : NSColor.webBorder).setStroke() |
| + let focused = window?.firstResponder is ComposerEditor && window?.isKeyWindow == true |
| + (focused ? NSColor.webAccent : NSColor.webBorder).setStroke() |
| path.lineWidth = 1; path.stroke() |
| } |
| } |
| final class NativeComposer: NSView, NSTextViewDelegate { |
| override var isFlipped: Bool { true } |
| let editor = ComposerEditor() |
| - let plus = ActionButton("") {} |
| - let send = ActionButton("") {} |
| + let plus = ActionButton("", style: .round, symbol: "plus") {} |
| + let send = ActionButton("", style: .send, symbol: "arrow.up") {} |
| let pill = ComposerPill() |
| let textScroll = NSScrollView() |
| let chips = FlippedView() |
| @@ -64,7 +78,7 @@ final class NativeComposer: NSView, NSTextViewDelegate { |
| textScroll.hasVerticalScroller = false |
| textScroll.borderType = .noBorder |
| editor.isRichText = false; editor.drawsBackground = false |
| - editor.font = .systemFont(ofSize: 16) |
| + editor.font = .systemFont(ofSize: 14) |
| editor.textColor = .webText |
| editor.insertionPointColor = .webText |
| editor.textContainerInset = NSSize(width: 18, height: 0) |
| @@ -76,19 +90,12 @@ final class NativeComposer: NSView, NSTextViewDelegate { |
| let paragraph = NSMutableParagraphStyle() |
| paragraph.minimumLineHeight = 24; paragraph.maximumLineHeight = 24 |
| editor.defaultParagraphStyle = paragraph |
| - editor.typingAttributes = [.font: NSFont.systemFont(ofSize: 16), .paragraphStyle: paragraph, .foregroundColor: NSColor.webText] |
| + editor.typingAttributes = [.font: NSFont.systemFont(ofSize: 14), .paragraphStyle: paragraph, .foregroundColor: NSColor.webText, .baselineOffset: 3] |
| editor.setAccessibilityLabel("Message") |
| - plus.bezelStyle = .circular; plus.controlSize = .large |
| - plus.image = NSImage(systemSymbolName: "plus", accessibilityDescription: "Add attachment") |
| - plus.imagePosition = .imageOnly; plus.contentTintColor = .webPlaceholder |
| plus.setAccessibilityLabel("Add attachment") |
| + plus.toolTip = "Add attachment" |
| plus.actionBlock = { [weak self] in self?.showMenu() } |
| - send.bezelStyle = .circular; send.controlSize = .large |
| - send.isBordered = false |
| - let sendConfiguration = NSImage.SymbolConfiguration(paletteColors: [.white, .webPrimary]).applying(NSImage.SymbolConfiguration(pointSize: 32, weight: .regular)) |
| - send.image = NSImage(systemSymbolName: "arrow.up.circle.fill", accessibilityDescription: "Send")?.withSymbolConfiguration(sendConfiguration) |
| - send.imageScaling = .scaleNone |
| - send.imagePosition = .imageOnly |
| + send.toolTip = "Send" |
| send.setAccessibilityLabel("Send") |
| send.actionBlock = { [weak self] in self?.submit() } |
| editor.onSubmit = { [weak self] in self?.submit() } |
| @@ -116,15 +123,10 @@ final class NativeComposer: NSView, NSTextViewDelegate { |
| popover?.close(); rebuildChips(); refresh() |
| } |
| func attachmentMenuContent() -> NSView { |
| - let view = FlippedView(frame: NSRect(x: 0, y: 0, width: 220, height: 104)) |
| + let view = FlippedView(frame: NSRect(x: 0, y: 0, width: 220, height: 76)) |
| for (index, item) in [("Photo or image", "photo"), ("File", "doc")].enumerated() { |
| - let button = ActionButton(item.0) { [weak self] in self?.addAttachment(index == 0 ? "preview.png" : "invoice.pdf") } |
| - button.bezelStyle = .smallSquare; button.controlSize = .large |
| - button.attributedTitle = NSAttributedString(string: item.0, attributes: [.font: NSFont.systemFont(ofSize: 14), .foregroundColor: NSColor.webText]) |
| - button.alignment = .left |
| - button.image = NSImage(systemSymbolName: item.1, accessibilityDescription: nil) |
| - button.imagePosition = .imageLeading |
| - button.frame = NSRect(x: 8, y: 8 + index * 44, width: 204, height: 44) |
| + let button = ActionButton(item.0, style: .row, symbol: item.1) { [weak self] in self?.addAttachment(index == 0 ? "preview.png" : "invoice.pdf") } |
| + button.frame = NSRect(x: 6, y: 6 + index * 32, width: 208, height: 32) |
| view.addSubview(button) |
| } |
| return view |
| @@ -132,7 +134,7 @@ final class NativeComposer: NSView, NSTextViewDelegate { |
| func showMenu() { |
| let controller = NSViewController(); controller.view = attachmentMenuContent() |
| let menu = NSPopover(); menu.behavior = .transient |
| - menu.contentViewController = controller; menu.contentSize = NSSize(width: 220, height: 104) |
| + menu.contentViewController = controller; menu.contentSize = NSSize(width: 220, height: 76) |
| popover = menu; menu.show(relativeTo: plus.bounds, of: plus, preferredEdge: .minY) |
| } |
| func configure(_ state: String) { |
| @@ -184,23 +186,26 @@ final class NativeComposer: NSView, NSTextViewDelegate { |
| chips.subviews.forEach { $0.removeFromSuperview() } |
| for attachment in draft.attachments { |
| let chip = AttachmentChipView(failed: attachment.state == .failed) |
| + let icon = NSImageView(frame: NSRect(x: 12, y: 12, width: 20, height: 22)) |
| + icon.image = symbolImage(attachment.name.hasSuffix("png") ? "photo" : "doc", size: 15, weight: .regular, color: .webSecondary) |
| + chip.addSubview(icon) |
| let label = NSTextField(labelWithString: attachment.name) |
| - label.font = .systemFont(ofSize: 13); label.textColor = .webText |
| - label.frame = NSRect(x: 12, y: 8, width: 148, height: 18) |
| + label.font = .systemFont(ofSize: 13, weight: .medium); label.textColor = .webText |
| + label.lineBreakMode = .byTruncatingMiddle |
| + label.frame = NSRect(x: 40, y: 9, width: 124, height: 18) |
| chip.addSubview(label) |
| - let note = NSTextField(labelWithString: attachment.state == .failed ? "Could not upload. Try again." : attachment.state == .uploading ? "Uploading…" : (attachment.name.hasSuffix("png") ? "Image · 24 KB" : "PDF · 24 KB")) |
| - note.font = .systemFont(ofSize: 11); note.textColor = attachment.state == .failed ? .web(0xB91C1C, 0xF79AA0) : .webPlaceholder |
| - note.frame = NSRect(x: 12, y: 29, width: 170, height: 17); chip.addSubview(note) |
| - let remove = ActionButton("") { [weak self] in |
| + let note = NSTextField(labelWithString: attachment.state == .failed ? "Could not upload" : attachment.state == .uploading ? "Uploading…" : (attachment.name.hasSuffix("png") ? "Image · 24 KB" : "PDF · 24 KB")) |
| + note.font = .systemFont(ofSize: 11); note.textColor = attachment.state == .failed ? .webNegative : .webPlaceholder |
| + note.frame = NSRect(x: 40, y: 28, width: 124, height: 15); chip.addSubview(note) |
| + let remove = ActionButton("", style: .glyph, symbol: "xmark") { [weak self] in |
| self?.draft.attachments.removeAll { $0.id == attachment.id }; self?.rebuildChips(); self?.refresh() |
| } |
| - remove.bezelStyle = .circular; remove.controlSize = .large; remove.isBordered = false |
| - remove.image = NSImage(systemSymbolName: "xmark", accessibilityDescription: "Remove \(attachment.name)")?.withSymbolConfiguration(NSImage.SymbolConfiguration(pointSize: 12, weight: .medium)) |
| - remove.imagePosition = .imageOnly; remove.setAccessibilityLabel("Remove \(attachment.name)") |
| - remove.frame = NSRect(x: 164, y: 0, width: 44, height: 44); chip.addSubview(remove) |
| + remove.setAccessibilityLabel("Remove \(attachment.name)") |
| + remove.toolTip = "Remove" |
| + remove.frame = NSRect(x: 164, y: 8, width: 44, height: 44); chip.addSubview(remove) |
| if attachment.state == .uploading { |
| - let progress = NSProgressIndicator(frame: NSRect(x: 12, y: 51, width: 184, height: 4)) |
| - progress.isIndeterminate = false; progress.doubleValue = 45; chip.addSubview(progress) |
| + let progress = NSProgressIndicator(frame: NSRect(x: 40, y: 46, width: 124, height: 6)) |
| + progress.isIndeterminate = false; progress.controlSize = .small; progress.doubleValue = 45; chip.addSubview(progress) |
| } |
| chips.addSubview(chip) |
| } |
| @@ -214,7 +219,7 @@ final class AttachmentChipView: NSView { |
| required init?(coder: NSCoder) { fatalError() } |
| override func draw(_ dirtyRect: NSRect) { |
| let path = NSBezierPath(roundedRect: bounds.insetBy(dx: 0.5, dy: 0.5), xRadius: 10, yRadius: 10) |
| - (failed ? NSColor.web(0xFEE2E2, 0x331819) : NSColor.web(0xF3F3F5, 0x18191D)).setFill(); path.fill() |
| - NSColor.webBorder.setStroke(); path.lineWidth = 1; path.stroke() |
| + (failed ? NSColor.web(0xFEE2E2, 0x331819) : NSColor.webSurface2).setFill(); path.fill() |
| + (failed ? NSColor.webNegative.withAlphaComponent(0.35) : NSColor.webLine).setStroke(); path.lineWidth = 1; path.stroke() |
| } |
| } |
diff --git a/native/mockups/Mac/NativeTranscript.swift b/native/mockups/Mac/NativeTranscript.swift| index ae2d5e9d..638c139e 100644 |
| --- a/native/mockups/Mac/NativeTranscript.swift |
| +++ b/native/mockups/Mac/NativeTranscript.swift |
| @@ -1,26 +1,154 @@ |
| import AppKit |
| import EquipoCore |
| +func symbolImage(_ name: String, size: CGFloat, weight: NSFont.Weight = .medium, color: NSColor) -> NSImage? { |
| + NSImage(systemSymbolName: name, accessibilityDescription: nil)? |
| + .withSymbolConfiguration(NSImage.SymbolConfiguration(pointSize: size, weight: weight).applying(NSImage.SymbolConfiguration(paletteColors: [color]))) |
| +} |
| + |
| +/// The web's controls, drawn in AppKit: rest, hover, pressed, focus and disabled. |
| final class ActionButton: NSButton { |
| + enum Style { case choice, primary, quiet, round, send, glyph, row } |
| + var style: Style { didSet { needsDisplay = true } } |
| + var symbol: String? { didSet { needsDisplay = true } } |
| + var forced: ControlState? |
| var actionBlock: (() -> Void)? |
| - init(_ title: String, action: @escaping () -> Void) { |
| + private var hovering = false |
| + private var tracking: NSTrackingArea? |
| + init(_ title: String, style: Style = .choice, symbol: String? = nil, action: @escaping () -> Void) { |
| + self.style = style |
| + self.symbol = symbol |
| super.init(frame: .zero) |
| self.title = title |
| - self.actionBlock = action |
| - bezelStyle = .smallSquare |
| - controlSize = .large |
| - font = .systemFont(ofSize: 14) |
| - contentTintColor = .webText |
| + actionBlock = action |
| + isBordered = false |
| + setButtonType(.momentaryPushIn) |
| + focusRingType = .exterior |
| target = self |
| self.action = #selector(performAction) |
| + if !title.isEmpty { setAccessibilityLabel(title) } |
| } |
| required init?(coder: NSCoder) { fatalError() } |
| @objc private func performAction() { actionBlock?() } |
| + override var wantsUpdateLayer: Bool { false } |
| + override func updateTrackingAreas() { |
| + super.updateTrackingAreas() |
| + if let tracking { removeTrackingArea(tracking) } |
| + let area = NSTrackingArea(rect: .zero, options: [.mouseEnteredAndExited, .activeAlways, .inVisibleRect], owner: self) |
| + addTrackingArea(area) |
| + tracking = area |
| + } |
| + override func mouseEntered(with event: NSEvent) { hovering = true; needsDisplay = true } |
| + override func mouseExited(with event: NSEvent) { hovering = false; needsDisplay = true } |
| + private var shapePath: NSBezierPath { |
| + switch style { |
| + case .choice, .primary: return NSBezierPath(roundedRect: bounds.insetBy(dx: 0.5, dy: 0.5), xRadius: 6, yRadius: 6) |
| + case .round: return NSBezierPath(ovalIn: bounds.insetBy(dx: 0.5, dy: 0.5)) |
| + case .send: return NSBezierPath(ovalIn: bounds.insetBy(dx: 6, dy: 6)) |
| + case .glyph: return NSBezierPath(ovalIn: bounds.insetBy(dx: 9, dy: 9)) |
| + case .quiet, .row: return NSBezierPath(roundedRect: bounds, xRadius: 6, yRadius: 6) |
| + } |
| + } |
| + override var focusRingMaskBounds: NSRect { bounds } |
| + override func drawFocusRingMask() { shapePath.fill() } |
| + override func draw(_ dirtyRect: NSRect) { |
| + let enabled = isEnabled && forced != .disabled |
| + let pressed = (isHighlighted || forced == .pressed) && enabled |
| + let hover = (hovering || forced == .hover) && enabled |
| + let path = shapePath |
| + NSGraphicsContext.current?.cgContext.setAlpha(enabled ? 1 : 0.45) |
| + var textColor = NSColor.webText |
| + var symbolColor = NSColor.webSecondary |
| + switch style { |
| + case .choice, .round: |
| + (pressed ? NSColor.webFacePressed : hover ? NSColor.webFaceHover : NSColor.webFace).setFill(); path.fill() |
| + NSColor.webBorder.setStroke(); path.lineWidth = 1; path.stroke() |
| + case .primary, .send: |
| + (pressed ? NSColor.webPrimaryEdge : hover ? NSColor.webPrimaryHover : NSColor.webPrimary).setFill(); path.fill() |
| + if style == .primary { NSColor.webPrimaryEdge.setStroke(); path.lineWidth = 1; path.stroke() } |
| + textColor = .white; symbolColor = .white |
| + case .glyph, .row: |
| + if hover || pressed { (pressed ? NSColor.webFacePressed : NSColor.webFaceHover).setFill(); path.fill() } |
| + case .quiet: |
| + textColor = .webAccent |
| + } |
| + if forced == .focus { |
| + let ring = NSBezierPath(roundedRect: bounds.insetBy(dx: -2, dy: -2), xRadius: 8, yRadius: 8) |
| + NSColor.keyboardFocusIndicatorColor.setStroke(); ring.lineWidth = 3; ring.stroke() |
| + } |
| + var attributes: [NSAttributedString.Key: Any] = [ |
| + .font: NSFont.systemFont(ofSize: 13, weight: style == .quiet || style == .row ? .regular : .medium), |
| + .foregroundColor: textColor, |
| + ] |
| + if style == .quiet && hover { attributes[.underlineStyle] = NSUnderlineStyle.single.rawValue } |
| + let text = NSAttributedString(string: title, attributes: attributes) |
| + let textSize = title.isEmpty ? NSSize.zero : text.size() |
| + let image = symbol.flatMap { symbolImage($0, size: style == .send ? 14 : style == .glyph ? 11 : 15, weight: style == .send ? .bold : .medium, color: symbolColor) } |
| + let imageSize = image?.size ?? .zero |
| + let gap: CGFloat = image != nil && !title.isEmpty ? 8 : 0 |
| + var x: CGFloat |
| + switch style { |
| + case .quiet: x = 0 |
| + case .row: x = 10 |
| + default: x = (bounds.width - textSize.width - imageSize.width - gap) / 2 |
| + } |
| + if let image { |
| + image.draw(in: NSRect(x: x.rounded(), y: ((bounds.height - imageSize.height) / 2).rounded(), width: imageSize.width, height: imageSize.height), from: .zero, operation: .sourceOver, fraction: 1, respectFlipped: true, hints: nil) |
| + x += imageSize.width + gap |
| + } |
| + if !title.isEmpty { text.draw(at: NSPoint(x: x.rounded(), y: ((bounds.height - textSize.height) / 2).rounded())) } |
| + } |
| } |
| final class FlippedView: NSView { override var isFlipped: Bool { true } } |
| -private let transcriptAccent = NSColor.web(0x1F56D6, 0x7AA2FF) |
| +final class CardView: NSView { |
| + override var isFlipped: Bool { true } |
| + let fill: NSColor |
| + let stroke: NSColor? |
| + let radius: CGFloat |
| + init(fill: NSColor, stroke: NSColor? = nil, radius: CGFloat = 10) { |
| + self.fill = fill; self.stroke = stroke; self.radius = radius |
| + super.init(frame: .zero) |
| + } |
| + required init?(coder: NSCoder) { fatalError() } |
| + override func draw(_ dirtyRect: NSRect) { |
| + let path = NSBezierPath(roundedRect: bounds.insetBy(dx: 0.5, dy: 0.5), xRadius: radius, yRadius: radius) |
| + fill.setFill(); path.fill() |
| + if let stroke { stroke.setStroke(); path.lineWidth = 1; path.stroke() } |
| + } |
| +} |
| +private func makeLabel(_ value: String, size: CGFloat, weight: NSFont.Weight = .regular, color: NSColor = .webText, lineSpacing: CGFloat = 0, width: CGFloat) -> NSTextField { |
| + let field = NSTextField(wrappingLabelWithString: value) |
| + let paragraph = NSMutableParagraphStyle() |
| + paragraph.lineSpacing = lineSpacing |
| + field.attributedStringValue = NSAttributedString(string: value, attributes: [.font: NSFont.systemFont(ofSize: size, weight: weight), .foregroundColor: color, .paragraphStyle: paragraph]) |
| + field.isSelectable = true |
| + let fitted = field.cell?.cellSize(forBounds: NSRect(x: 0, y: 0, width: width, height: 10000)) ?? NSSize(width: width, height: size + 5) |
| + field.frame.size = NSSize(width: min(width, ceil(fitted.width)), height: ceil(fitted.height)) |
| + return field |
| +} |
| +private func makeIcon(_ name: String, size: CGFloat, color: NSColor, weight: NSFont.Weight = .medium) -> NSImageView { |
| + let view = NSImageView() |
| + view.image = NSImage(systemSymbolName: name, accessibilityDescription: nil)?.withSymbolConfiguration(NSImage.SymbolConfiguration(pointSize: size, weight: weight)) |
| + view.contentTintColor = color |
| + view.frame.size = view.image?.size ?? .zero |
| + return view |
| +} |
| +private func macSpecialistIcon(_ category: String) -> String { |
| + switch category { |
| + case "engineering": return "hammer" |
| + case "copy": return "pencil.line" |
| + case "review": return "checkmark.shield" |
| + case "checks": return "checklist.checked" |
| + case "research": return "magnifyingglass" |
| + case "design": return "paintbrush.pointed" |
| + default: return "sparkle" |
| + } |
| +} |
| + |
| final class NativeTranscript: NSView { |
| override var isFlipped: Bool { true } |
| + /// Captures draw a header where the live window has its toolbar. |
| + var showsHeader = true { didSet { needsLayout = true; needsDisplay = true } } |
| private let store: MockStore |
| private let scroll = NSScrollView() |
| private let document = FlippedView() |
| @@ -29,13 +157,14 @@ final class NativeTranscript: NSView { |
| private var transcriptOpen = false |
| private var localMessages: [String] = [] |
| private var contentWidth: CGFloat = 0 |
| + private var headerHeight: CGFloat { showsHeader ? 52 : 0 } |
| init(store: MockStore) { |
| self.store = store |
| super.init(frame: .zero) |
| - wantsLayer = true |
| scroll.documentView = document |
| scroll.hasVerticalScroller = true |
| scroll.drawsBackground = false |
| + scroll.automaticallyAdjustsContentInsets = false |
| addSubview(scroll) |
| addSubview(composer) |
| // This fixture already has an active coordinator turn. |
| @@ -47,101 +176,147 @@ final class NativeTranscript: NSView { |
| self.localMessages.append(message.text + (files.isEmpty ? "" : "\n" + files) + (message.waitingForUploads ? "\nUploading…" : message.queued ? "\nWaiting its turn" : "")) |
| self.rebuild() |
| } |
| - |
| } |
| required init?(coder: NSCoder) { fatalError() } |
| + private var column: (x: CGFloat, width: CGFloat) { |
| + let width = min(max(bounds.width - 56, 260), 720) |
| + return (floor((bounds.width - width) / 2), width) |
| + } |
| override func layout() { |
| super.layout() |
| - layer?.backgroundColor = NSColor.webBackground.cgColor |
| let height = composer.desiredHeight |
| - composer.frame = NSRect(x: 28, y: bounds.height - height - 20, width: bounds.width - 56, height: height) |
| - scroll.frame = NSRect(x: 0, y: 68, width: bounds.width, height: bounds.height - height - 112) |
| + let column = self.column |
| + composer.frame = NSRect(x: column.x, y: bounds.height - height - 18, width: column.width, height: height) |
| + scroll.frame = NSRect(x: 0, y: headerHeight, width: bounds.width, height: bounds.height - headerHeight - height - 30) |
| if contentWidth != bounds.width { contentWidth = bounds.width; rebuild() } |
| } |
| override func draw(_ dirtyRect: NSRect) { |
| - super.draw(dirtyRect) |
| - let title = "Conversation" as NSString |
| - title.draw(at: NSPoint(x: 28, y: 21), withAttributes: [.font: NSFont.systemFont(ofSize: 18, weight: .semibold), .foregroundColor: NSColor.labelColor]) |
| - ("Your coordinator" as NSString).draw(at: NSPoint(x: bounds.width - 139, y: 26), withAttributes: [.font: NSFont.systemFont(ofSize: 12), .foregroundColor: NSColor.secondaryLabelColor]) |
| - NSColor.separatorColor.setFill() |
| - NSRect(x: 0, y: 67, width: bounds.width, height: 0.5).fill() |
| - |
| - |
| + NSColor.webBackground.setFill(); bounds.fill() |
| + guard showsHeader else { return } |
| + ("Conversation" as NSString).draw(at: NSPoint(x: 20, y: 16), withAttributes: [.font: NSFont.systemFont(ofSize: 15, weight: .semibold), .foregroundColor: NSColor.webText]) |
| + if let image = symbolImage("sidebar.right", size: 15, weight: .regular, color: .webSecondary) { |
| + image.draw(in: NSRect(x: bounds.width - 20 - image.size.width, y: (52 - image.size.height) / 2, width: image.size.width, height: image.size.height), from: .zero, operation: .sourceOver, fraction: 1, respectFlipped: true, hints: nil) |
| + } |
| + NSColor.webLine.setFill() |
| + NSRect(x: 0, y: 51, width: bounds.width, height: 1).fill() |
| } |
| func rebuild() { |
| document.subviews.forEach { $0.removeFromSuperview() } |
| - let width = max(bounds.width - 64, 260) |
| - var y: CGFloat = 22 |
| - func text(_ value: String, size: CGFloat = 14, weight: NSFont.Weight = .regular, color: NSColor = .labelColor, x: CGFloat = 32, inset: CGFloat = 0) { |
| - let field = NSTextField(wrappingLabelWithString: value) |
| - field.font = .systemFont(ofSize: size, weight: weight) |
| - field.textColor = color |
| - field.isSelectable = true |
| - let w = width - inset |
| - let h = max(field.cell?.cellSize(forBounds: NSRect(x: 0, y: 0, width: w, height: 10000)).height ?? 20, size + 5) |
| - field.frame = NSRect(x: x, y: y, width: w, height: h) |
| - document.addSubview(field) |
| - y += h + 10 |
| + let column = self.column |
| + let x0 = column.x, width = column.width |
| + var y: CGFloat = 20 |
| + |
| + // Yesterday's roll-up. |
| + let rollup = CardView(fill: .webFace, stroke: .webLine) |
| + let day = makeLabel("Yesterday", size: 13, weight: .semibold, width: 200) |
| + day.frame.origin = NSPoint(x: 16, y: 14); rollup.addSubview(day) |
| + let date = makeLabel("12 November", size: 12, color: .webSecondary, width: 200) |
| + date.frame.origin = NSPoint(x: day.frame.maxX + 8, y: 15); rollup.addSubview(date) |
| + var statX: CGFloat = 16 |
| + for (symbol, text, color) in [("checkmark.circle.fill", "2 finished", NSColor.webPositive), ("hand.raised.fill", "1 decision", NSColor.webAccent), ("circle.dashed", "1 still open", NSColor.webSecondary)] { |
| + let icon = makeIcon(symbol, size: 12, color: color) |
| + icon.frame.origin = NSPoint(x: statX, y: 40 + (16 - icon.frame.height) / 2); rollup.addSubview(icon) |
| + let label = makeLabel(text, size: 12, width: 200) |
| + label.frame.origin = NSPoint(x: icon.frame.maxX + 5, y: 40); rollup.addSubview(label) |
| + statX = label.frame.maxX + 18 |
| } |
| - func panel(start: CGFloat, end: CGFloat, tinted: Bool = false) { |
| - let box = NSView(frame: NSRect(x: 26, y: start, width: width + 12, height: end - start)) |
| - box.wantsLayer = true |
| - box.layer?.cornerRadius = 12 |
| - box.layer?.borderWidth = 0.5 |
| - box.layer?.borderColor = NSColor.separatorColor.cgColor |
| - box.layer?.backgroundColor = (tinted ? transcriptAccent.withAlphaComponent(0.08) : NSColor.controlBackgroundColor).cgColor |
| - document.addSubview(box, positioned: .below, relativeTo: nil) |
| + let toggle = ActionButton(transcriptOpen ? "Hide the conversation" : "Show the conversation", style: .quiet) { [weak self] in self?.transcriptOpen.toggle(); self?.rebuild() } |
| + toggle.frame = NSRect(x: width - 16 - 150, y: 19, width: 150, height: 32) |
| + rollup.addSubview(toggle) |
| + var rollupHeight: CGFloat = 70 |
| + if transcriptOpen { |
| + let rule = CardView(fill: .webLine, radius: 0) |
| + rule.frame = NSRect(x: 1, y: 70, width: width - 2, height: 1); rollup.addSubview(rule) |
| + let body = makeLabel("You chose the shorter setup. Engineering will investigate it next.", size: 13, lineSpacing: 2, width: width - 32) |
| + body.frame.origin = NSPoint(x: 16, y: 84); rollup.addSubview(body) |
| + rollupHeight = body.frame.maxY + 14 |
| + } |
| + rollup.frame = NSRect(x: x0, y: y, width: width, height: rollupHeight) |
| + document.addSubview(rollup) |
| + y += rollupHeight + 22 |
| + |
| + let today = makeLabel("Today", size: 11, weight: .medium, color: .webSecondary, width: 200) |
| + today.frame.origin = NSPoint(x: x0 + (width - today.frame.width) / 2, y: y) |
| + document.addSubview(today) |
| + y += today.frame.height + 18 |
| + |
| + func bubble(_ value: String) { |
| + let label = makeLabel(value, size: 14, lineSpacing: 2, width: min(width * 0.72, 520) - 28) |
| + let card = CardView(fill: .webSoft, radius: 16) |
| + card.frame = NSRect(x: x0 + width - label.frame.width - 28, y: y, width: label.frame.width + 28, height: label.frame.height + 18) |
| + label.frame.origin = NSPoint(x: 14, y: 9) |
| + card.addSubview(label) |
| + document.addSubview(card) |
| + y += card.frame.height + 22 |
| } |
| - let dayStart = y |
| - y += 16 |
| - text("Yesterday, 12 November", size: 13, weight: .semibold, x: 44, inset: 24) |
| - text("2 finished · 1 decision · 1 still open", size: 12, color: .secondaryLabelColor, x: 44, inset: 24) |
| - let transcript = ActionButton(transcriptOpen ? "Hide the conversation" : "Show the conversation") { [weak self] in self?.transcriptOpen.toggle(); self?.rebuild() } |
| - transcript.bezelStyle = .smallSquare |
| - transcript.isBordered = false |
| - transcript.alignment = .left |
| - transcript.attributedTitle = NSAttributedString(string: transcript.title, attributes: [.font: NSFont.systemFont(ofSize: 14), .foregroundColor: transcriptAccent]) |
| - transcript.frame = NSRect(x: 42, y: y, width: 192, height: 32) |
| - document.addSubview(transcript) |
| - y += 42 |
| - if transcriptOpen { text("You chose the shorter setup. Engineering will investigate it next.", size: 13, x: 44, inset: 24) } |
| - panel(start: dayStart, end: y) |
| - y += 26 |
| - text("Today · 09:41", size: 11, color: .secondaryLabelColor) |
| for message in store.conversation.messages ?? [] { |
| - if message.author_kind == "person" { |
| - let start = y |
| - y += 14 |
| - text(message.body, x: 48, inset: 34) |
| - y += 4 |
| - panel(start: start, end: y, tinted: true) |
| - } else { |
| - text("Coordinator", size: 13, weight: .semibold, color: transcriptAccent) |
| - text(message.body) |
| - } |
| - y += 23 |
| + if message.author_kind == "person" { bubble(message.body); continue } |
| + let icon = makeIcon("sparkle", size: 12, color: .webAccent) |
| + icon.frame.origin = NSPoint(x: x0, y: y + (16 - icon.frame.height) / 2); document.addSubview(icon) |
| + let name = makeLabel("Coordinator", size: 12, weight: .semibold, width: 200) |
| + name.frame.origin = NSPoint(x: icon.frame.maxX + 6, y: y); document.addSubview(name) |
| + let time = makeLabel(String(message.created_at.dropFirst(11).prefix(5)), size: 11, color: .webPlaceholder, width: 80) |
| + time.frame.origin = NSPoint(x: name.frame.maxX + 8, y: y + 1); document.addSubview(time) |
| + y += 24 |
| + let body = makeLabel(message.body, size: 14, lineSpacing: 3, width: min(width, 620)) |
| + body.frame.origin = NSPoint(x: x0, y: y); document.addSubview(body) |
| + y += body.frame.height + 20 |
| } |
| - let questionStart = y |
| - y += 17 |
| - text("Copy", size: 12, weight: .semibold, color: transcriptAccent, x: 44, inset: 24) |
| - text(store.question.text, size: 15, weight: .semibold, x: 44, inset: 24) |
| + |
| + // The question card: full hairline border plus a tint. |
| + let cardWidth = min(width, 520) |
| + let inner = cardWidth - 32 |
| + let card = CardView(fill: .webSoft, stroke: .webSoftBorder) |
| + let category = store.tasks.first { $0.id == store.question.task_id }?.steps?.first { $0.state == "waiting" }?.category ?? "coordinator" |
| + let asker = makeIcon(macSpecialistIcon(category), size: 12, color: .webAccent) |
| + asker.frame.origin = NSPoint(x: 16, y: 16 + (16 - asker.frame.height) / 2); card.addSubview(asker) |
| + let askerName = makeLabel(category.capitalized, size: 12, weight: .semibold, color: .webAccent, width: 200) |
| + askerName.frame.origin = NSPoint(x: asker.frame.maxX + 6, y: 16); card.addSubview(askerName) |
| + let asks = makeLabel("asks", size: 12, color: .webSecondary, width: 80) |
| + asks.frame.origin = NSPoint(x: askerName.frame.maxX + 5, y: 16); card.addSubview(asks) |
| + let question = makeLabel(store.question.text, size: 15, weight: .semibold, lineSpacing: 2, width: inner) |
| + question.frame.origin = NSPoint(x: 16, y: 42); card.addSubview(question) |
| + var cardY = question.frame.maxY + 14 |
| if let answer { |
| - text("Answered: \(answer) · saved in this preview", size: 13, color: .secondaryLabelColor, x: 44, inset: 24) |
| + let check = makeIcon("checkmark.circle.fill", size: 14, color: .webPositive) |
| + check.frame.origin = NSPoint(x: 16, y: cardY + 1); card.addSubview(check) |
| + let said = makeLabel("You answered \(answer)", size: 13, weight: .medium, width: inner - 24) |
| + said.frame.origin = NSPoint(x: check.frame.maxX + 7, y: cardY); card.addSubview(said) |
| + let note = makeLabel("Saved in this preview. No answer was sent.", size: 11, color: .webSecondary, width: inner - 24) |
| + note.frame.origin = NSPoint(x: said.frame.minX, y: said.frame.maxY + 3); card.addSubview(note) |
| + cardY = note.frame.maxY + 16 |
| } else { |
| - for (i, option) in (store.question.options ?? []).enumerated() { |
| + let options = store.question.options ?? [] |
| + let gap: CGFloat = 10 |
| + let buttonWidth = floor((inner - gap * CGFloat(max(options.count, 1) - 1)) / CGFloat(max(options.count, 1))) |
| + for (index, option) in options.enumerated() { |
| let button = ActionButton(option.label) { [weak self] in self?.answer = option.label; self?.rebuild() } |
| - button.frame = NSRect(x: 42 + CGFloat(i) * 112, y: y, width: 100, height: 32) |
| - document.addSubview(button) |
| + button.isEnabled = store.question.canSubmit(currentRevision: 7) |
| + button.frame = NSRect(x: 16 + CGFloat(index) * (buttonWidth + gap), y: cardY, width: buttonWidth, height: 32) |
| + card.addSubview(button) |
| } |
| - y += 42 |
| + cardY += 32 |
| + if store.question.allow_text { |
| + let own = ActionButton("Answer in your own words", style: .quiet) {} |
| + own.frame = NSRect(x: 16, y: cardY + 4, width: 170, height: 32) |
| + card.addSubview(own) |
| + cardY += 40 |
| + } else { cardY += 16 } |
| } |
| - y += 6 |
| - panel(start: questionStart, end: y, tinted: true) |
| - y += 24 |
| - text("Checking the next step", size: 12, color: .secondaryLabelColor) |
| - for message in localMessages { text(message); y += 12 } |
| - y += 15 |
| - text("Roll-up and activity line are web parity concepts. All content is fixture data.", size: 11, color: .secondaryLabelColor) |
| - document.frame = NSRect(x: 0, y: 0, width: bounds.width, height: max(y + 18, scroll.bounds.height)) |
| + card.frame = NSRect(x: x0, y: y, width: cardWidth, height: cardY) |
| + document.addSubview(card) |
| + y += cardY + 22 |
| + |
| + for message in localMessages { bubble(message) } |
| + let spinner = NSProgressIndicator(frame: NSRect(x: x0, y: y, width: 16, height: 16)) |
| + spinner.style = .spinning; spinner.controlSize = .small; spinner.isDisplayedWhenStopped = true |
| + document.addSubview(spinner) |
| + let activity = makeLabel("Checking the next step", size: 12, color: .webSecondary, width: 300) |
| + activity.frame.origin = NSPoint(x: x0 + 24, y: y); document.addSubview(activity) |
| + y += 34 |
| + let footnote = makeLabel("The roll-up and the activity line are web parity concepts. All content is fixture data.", size: 11, color: .webPlaceholder, width: width) |
| + footnote.frame.origin = NSPoint(x: x0, y: y); document.addSubview(footnote) |
| + y += footnote.frame.height |
| + document.frame = NSRect(x: 0, y: 0, width: bounds.width, height: max(y + 20, scroll.bounds.height)) |
| } |
| } |
diff --git a/native/mockups/Shared/Components.swift b/native/mockups/Shared/Components.swift| index 0a13512f..85261c40 100644 |
| --- a/native/mockups/Shared/Components.swift |
| +++ b/native/mockups/Shared/Components.swift |
| @@ -1,152 +1,390 @@ |
| import SwiftUI |
| import EquipoCore |
| +struct Hairline: View { |
| + var body: some View { Rectangle().fill(Palette.border).frame(height: 1) } |
| +} |
| +struct StepProgress: View { |
| + let task: EquipoTask |
| + var body: some View { |
| + let steps = task.steps ?? [] |
| + HStack(spacing: 3) { |
| + ForEach(steps, id: \.key) { step in |
| + Capsule().fill(step.state == "done" ? Palette.positive : (step.state == "queued" ? Palette.controlBorder : Palette.accent)) |
| + .frame(width: 16, height: 4) |
| + } |
| + } |
| + .accessibilityElement() |
| + .accessibilityLabel("\(steps.filter { $0.state == "done" }.count) of \(steps.count) steps done") |
| + } |
| +} |
| struct TaskRow: View { |
| let task: EquipoTask |
| let store: MockStore |
| var body: some View { |
| + let status = TaskStatus(task) |
| VStack(alignment: .leading, spacing: 8) { |
| - HStack(alignment: .firstTextBaseline) { |
| - Text(task.description).font(.headline) |
| - Spacer(minLength: 8) |
| - if task.needs_you { Image(systemName: "hand.raised").foregroundStyle(Palette.accent) } |
| + HStack(alignment: .firstTextBaseline, spacing: 8) { |
| + Text(task.description).font(Typo.cardTitle).foregroundStyle(Palette.text) |
| + Spacer(minLength: 0) |
| } |
| - HStack(spacing: 6) { |
| - Image(systemName: "folder").font(.caption) |
| - Text(store.project(for: task)) |
| - Text("·") |
| - Text(task.needs_you ? "Needs you" : task.state.capitalized) |
| - }.font(.subheadline).foregroundStyle(Palette.secondary) |
| if let step = task.steps?.first(where: { $0.state == "running" || $0.state == "waiting" }) { |
| - Label(step.action, systemImage: specialistIcon(step.category)) |
| - .font(.footnote).foregroundStyle(Palette.secondary).lineLimit(2) |
| + HStack(alignment: .firstTextBaseline, spacing: 6) { |
| + Image(systemName: specialistIcon(step.category)).foregroundStyle(Palette.accent) |
| + Text(step.category.capitalized).fontWeight(.semibold).foregroundStyle(Palette.text) |
| + Text(step.actual.isEmpty ? step.action : step.actual).lineLimit(1) |
| + }.font(Typo.secondary).foregroundStyle(Palette.secondary) |
| } |
| - }.padding(.vertical, 9) |
| + HStack(spacing: 8) { |
| + StepProgress(task: task) |
| + Text(store.project(for: task)).font(Typo.caption).foregroundStyle(Palette.faint) |
| + Spacer(minLength: 8) |
| + StatusPill(text: status.label, tone: status.tone, icon: status.icon) |
| + } |
| + }.padding(.vertical, 6) |
| } |
| } |
| struct QuestionCard: View { |
| let question: Question |
| + var category = "copy" |
| @Binding var answer: String? |
| + @Environment(\.dynamicTypeSize) private var typeSize |
| var body: some View { |
| - Panel(tinted: true) { |
| - Label("Copy", systemImage: "pencil.line").font(.subheadline.weight(.semibold)).foregroundStyle(Palette.accent) |
| - Text(question.text).font(.headline).fixedSize(horizontal: false, vertical: true) |
| + Panel(tinted: true, spacing: 14) { |
| + HStack(spacing: 6) { |
| + SpecialistLabel(category: category, tone: Palette.accent) |
| + Text("asks").font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + } |
| + Text(question.text).font(Typo.question).foregroundStyle(Palette.text) |
| + .fixedSize(horizontal: false, vertical: true) |
| if let answer { |
| - Label("Answered: \(answer)", systemImage: "checkmark.circle.fill") |
| - .font(.subheadline).foregroundStyle(Palette.accent) |
| - QuietLabel(text: "Saved in this preview. No answer was sent.") |
| + HStack(alignment: .firstTextBaseline, spacing: 8) { |
| + Image(systemName: "checkmark.circle.fill").foregroundStyle(Palette.positive) |
| + VStack(alignment: .leading, spacing: 3) { |
| + Text("You answered \(answer)").font(Typo.secondaryStrong).foregroundStyle(Palette.text) |
| + QuietLabel(text: "Saved in this preview. No answer was sent.") |
| + } |
| + } |
| } else { |
| AnswerChoices(question: question) { answer = $0 } |
| + if question.allow_text { |
| + QuietAction(title: "Answer in your own words", icon: "chevron.right") {} |
| + .padding(.vertical, typeSize.isAccessibilitySize ? 0 : -8) |
| + } |
| } |
| } |
| } |
| } |
| +struct StepNode: View { |
| + let state: String |
| + let needsYou: Bool |
| + var body: some View { |
| + ZStack { |
| + switch state { |
| + case "done": |
| + Image(systemName: "checkmark.circle.fill").resizable().foregroundStyle(Palette.positive) |
| + case "waiting": |
| + Image(systemName: needsYou ? "hand.raised.circle.fill" : "pause.circle.fill").resizable() |
| + .foregroundStyle(needsYou ? Palette.accent : Palette.warning) |
| + case "running": |
| + Circle().strokeBorder(Palette.accent, lineWidth: 2) |
| + Circle().fill(Palette.accent).padding(6) |
| + default: |
| + Circle().strokeBorder(Palette.controlBorder, style: StrokeStyle(lineWidth: 1.5, dash: [3, 3])) |
| + } |
| + }.frame(width: 22, height: 22) |
| + } |
| +} |
| +/// The task's steps as a connected timeline, in plan order. |
| struct StepsView: View { |
| let task: EquipoTask |
| var body: some View { |
| + let steps = task.steps ?? [] |
| VStack(alignment: .leading, spacing: 0) { |
| - ForEach(task.steps ?? [], id: \.key) { step in |
| + ForEach(Array(steps.enumerated()), id: \.element.key) { index, step in |
| + let last = index == steps.count - 1 |
| + let needsYou = step.state == "waiting" && task.needs_you |
| HStack(alignment: .top, spacing: 12) { |
| - Image(systemName: step.state == "done" ? "checkmark.circle.fill" : (step.state == "waiting" ? "pause.circle" : "circle")) |
| - .foregroundStyle(step.state == "queued" ? Palette.secondary : Palette.accent) |
| - .font(.title3).frame(width: 24) |
| - VStack(alignment: .leading, spacing: 6) { |
| - Label(step.category.capitalized, systemImage: specialistIcon(step.category)).font(.subheadline.weight(.semibold)) |
| - Text(step.action).font(.subheadline).fixedSize(horizontal: false, vertical: true) |
| - QuietLabel(text: step.state == "done" ? step.actual : step.state.capitalized) |
| - } |
| - Spacer(minLength: 0) |
| - }.padding(.vertical, 13) |
| - if step.key != task.steps?.last?.key { Divider().padding(.leading, 36) } |
| + VStack(spacing: 4) { |
| + StepNode(state: step.state, needsYou: needsYou) |
| + if !last { |
| + Capsule().fill(step.state == "done" ? Palette.positive.opacity(0.55) : Palette.border) |
| + .frame(width: 2).frame(maxHeight: .infinity) |
| + } |
| + }.padding(.bottom, last ? 0 : 4) |
| + VStack(alignment: .leading, spacing: 4) { |
| + HStack(alignment: .firstTextBaseline) { |
| + SpecialistLabel(category: step.category, tone: step.state == "queued" ? Palette.secondary : Palette.text) |
| + Spacer(minLength: 8) |
| + Text(label(step, needsYou: needsYou)).font(Typo.caption) |
| + .foregroundStyle(needsYou ? Palette.accent : step.state == "done" ? Palette.positive : Palette.secondary) |
| + } |
| + Text(step.action).font(Typo.secondary) |
| + .foregroundStyle(step.state == "queued" ? Palette.secondary : Palette.text) |
| + .fixedSize(horizontal: false, vertical: true) |
| + if !step.actual.isEmpty { QuietLabel(text: step.actual) } |
| + if let usage = step.usage { |
| + Text("\(usage.calls) calls · \(compact(usage.input_tokens)) in · \(compact(usage.output_tokens)) out") |
| + .font(Typo.caption).monospacedDigit().foregroundStyle(Palette.faint) |
| + } |
| + }.padding(.bottom, last ? 0 : 20) |
| + }.fixedSize(horizontal: false, vertical: true) |
| + .accessibilityElement(children: .combine) |
| } |
| } |
| } |
| + private func label(_ step: Step, needsYou: Bool) -> String { |
| + if needsYou { return "Waiting for you" } |
| + switch step.state { |
| + case "done": return "Done" |
| + case "running": return "Running" |
| + case "waiting": return "Waiting" |
| + default: return "Queued" |
| + } |
| + } |
| } |
| +/// Yesterday in one glance; the transcript is one tap away. |
| struct RollupCard: View { |
| @State private var expanded = false |
| var body: some View { |
| - Panel { |
| - HStack { |
| - Image(systemName: "calendar") |
| - Text("Yesterday, 12 November").font(.subheadline.weight(.semibold)) |
| - Spacer() |
| - Image(systemName: "chevron.down").font(.caption) |
| + Panel(padding: 0, spacing: 0) { |
| + VStack(alignment: .leading, spacing: 10) { |
| + HStack(alignment: .firstTextBaseline, spacing: 8) { |
| + Text("Yesterday").font(Typo.cardTitle).foregroundStyle(Palette.text) |
| + Text("12 November").font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + } |
| + ViewThatFits(in: .horizontal) { |
| + HStack(spacing: 16) { stats } |
| + VStack(alignment: .leading, spacing: 6) { stats } |
| + } |
| + }.padding(Metric.cardPadding) |
| + Hairline() |
| + Button { expanded.toggle() } label: { |
| + HStack { |
| + Text(expanded ? "Hide the conversation" : "Show the conversation") |
| + Spacer() |
| + Image(systemName: "chevron.down").imageScale(.small).rotationEffect(.degrees(expanded ? 180 : 0)) |
| + } |
| + .font(Typo.secondary).foregroundStyle(Palette.accent) |
| + .padding(.horizontal, Metric.cardPadding).frame(minHeight: Metric.target).contentShape(Rectangle()) |
| + }.buttonStyle(.plain) |
| + if expanded { |
| + Hairline() |
| + Text("You chose the shorter setup. Engineering will investigate it next.") |
| + .font(Typo.secondary).foregroundStyle(Palette.text).padding(Metric.cardPadding) |
| } |
| - QuietLabel(text: "2 finished · 1 decision · 1 still open") |
| - QuietAction(title: expanded ? "Hide the conversation" : "Show the conversation") { expanded.toggle() } |
| - if expanded { Text("You chose the shorter setup. Engineering will investigate it next.").font(.subheadline) } |
| } |
| } |
| + @ViewBuilder private var stats: some View { |
| + stat("checkmark.circle.fill", "2 finished", Palette.positive) |
| + stat("hand.raised.fill", "1 decision", Palette.accent) |
| + stat("circle.dashed", "1 still open", Palette.secondary) |
| + } |
| + private func stat(_ icon: String, _ text: String, _ color: Color) -> some View { |
| + HStack(spacing: 5) { |
| + Image(systemName: icon).foregroundStyle(color) |
| + Text(text).foregroundStyle(Palette.text) |
| + }.font(Typo.secondary) |
| + } |
| +} |
| +struct AppGlyph: View { |
| + var size: CGFloat = 38 |
| + var body: some View { |
| + RoundedRectangle(cornerRadius: size * 0.225, style: .continuous) |
| + .fill(LinearGradient(colors: [Color(light: 0x3A6FF0, dark: 0x3A6FF0), Color(light: 0x1A46B8, dark: 0x1A46B8)], startPoint: .top, endPoint: .bottom)) |
| + .frame(width: size, height: size) |
| + .overlay(Image(systemName: "bubble.left.and.bubble.right.fill").font(.system(size: size * 0.42, weight: .semibold)).foregroundStyle(.white)) |
| + .accessibilityHidden(true) |
| + } |
| +} |
| +struct Wallpaper: View { |
| + var body: some View { |
| + LinearGradient(colors: [Palette.soft, Palette.background, Palette.surface2], startPoint: .topLeading, endPoint: .bottomTrailing) |
| + .ignoresSafeArea() |
| + } |
| } |
| +/// A notification as the system would present it: a material banner, then the |
| +/// actions the system lists when it is expanded. |
| struct NotificationAnswerView: View { |
| let store: MockStore |
| @State var answer: String? |
| var compact = false |
| @State private var expanded = false |
| + private var showsActions: Bool { answer == nil && (!compact || expanded) } |
| + #if os(iOS) |
| + private let bannerRadius: CGFloat = 24 |
| + private let rowHeight: CGFloat = 48 |
| + private let stackWidth: CGFloat? = nil |
| + #else |
| + private let stackWidth: CGFloat? = 344 |
| + private let bannerRadius: CGFloat = 16 |
| + private let rowHeight: CGFloat = 34 |
| + #endif |
| var body: some View { |
| - VStack(alignment: .leading, spacing: 24) { |
| - Text(compact && !expanded ? "Compact notification" : "Expanded notification").font(.title2.weight(.semibold)) |
| - QuietLabel(text: "Notification design concept") |
| - Panel { |
| - HStack { |
| - Label("Equipo · Oficina", systemImage: "bubble.left.and.bubble.right").font(.subheadline.weight(.semibold)) |
| - Spacer() |
| - QuietLabel(text: "now") |
| - }.foregroundStyle(Palette.accent) |
| - Divider() |
| - Text("Copy needs you").font(.headline) |
| - Text(store.tasks[0].description).font(.subheadline).foregroundStyle(Palette.secondary) |
| - Text(store.question.text).font(.headline).fixedSize(horizontal: false, vertical: true) |
| - if let answer { |
| - Label("Answered: \(answer)", systemImage: "checkmark.circle.fill").foregroundStyle(Palette.accent) |
| - QuietLabel(text: "Saved in this preview. No answer was sent.") |
| - } else if compact && !expanded { |
| - EquipoButton(title: "Expand to answer") { expanded = true } |
| + ZStack { |
| + Wallpaper() |
| + VStack(alignment: .trailing, spacing: 10) { |
| + #if os(iOS) |
| + VStack(spacing: 2) { |
| + Image(systemName: "lock.fill").font(.footnote).foregroundStyle(Palette.secondary) |
| + Text("Friday 13 November").font(.title3.weight(.medium)).foregroundStyle(Palette.text).padding(.top, 10) |
| + Text("9:41").font(.system(size: 88, weight: .semibold, design: .rounded)).foregroundStyle(Palette.text) |
| + }.frame(maxWidth: .infinity).padding(.top, 24).accessibilityHidden(true) |
| + Spacer(minLength: 12) |
| + #endif |
| + VStack(alignment: .trailing, spacing: 10) { |
| + banner |
| + if showsActions { actions } |
| + hint |
| + }.frame(width: stackWidth) |
| + #if os(macOS) |
| + Spacer(minLength: 12) |
| + #endif |
| + QuietLabel(text: "App-rendered concept. A real action must authenticate and refresh the question. Apple push delivery is not connected.") |
| + .frame(maxWidth: .infinity, alignment: .leading) |
| + }.padding(16) |
| + }.tint(Palette.accent) |
| + } |
| + private var banner: some View { |
| + let shape = RoundedRectangle(cornerRadius: bannerRadius, style: .continuous) |
| + return HStack(alignment: .top, spacing: 12) { |
| + AppGlyph(size: 38) |
| + VStack(alignment: .leading, spacing: 2) { |
| + HStack(alignment: .firstTextBaseline) { |
| + Text(answer == nil ? "\(store.askingCategory(for: store.question).capitalized) needs you" : "You answered \(answer ?? "")") |
| + .font(Typo.cardTitle).foregroundStyle(Palette.text) |
| + Spacer(minLength: 8) |
| + Text("now").font(Typo.caption).foregroundStyle(Palette.secondary) |
| + } |
| + Text(store.tasks[0].description).font(Typo.secondary).foregroundStyle(Palette.text) |
| + if answer == nil { |
| + Text(store.question.text).font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + .fixedSize(horizontal: false, vertical: true) |
| } else { |
| - AnswerChoices(question: store.question) { answer = $0 } |
| - Label("Unlock to answer", systemImage: "lock").font(.footnote).foregroundStyle(Palette.secondary) |
| + Label("Checks can continue", systemImage: "checkmark.circle.fill") |
| + .font(Typo.secondary).foregroundStyle(Palette.positive).padding(.top, 2) |
| } |
| } |
| - if answer != nil { Label("Checks can continue", systemImage: "arrow.right.circle").font(.headline) } |
| - Spacer(minLength: 0) |
| - QuietLabel(text: "App-rendered notification concept. A real action must authenticate and refresh the question. Apple push delivery is not connected.") |
| - }.padding(24).background(Palette.background).tint(Palette.accent) |
| + } |
| + .padding(14) |
| + .background(.regularMaterial, in: shape) |
| + .overlay(shape.strokeBorder(Palette.border.opacity(0.7), lineWidth: 1)) |
| + .shadow(color: Palette.contactShadow.opacity(0.10), radius: 12, y: 6) |
| + .contentShape(shape) |
| + .onTapGesture { expanded = true } |
| + .accessibilityElement(children: .combine) |
| + } |
| + private var actions: some View { |
| + let shape = RoundedRectangle(cornerRadius: bannerRadius * 0.7, style: .continuous) |
| + let options = store.question.options ?? [] |
| + return VStack(spacing: 0) { |
| + ForEach(options) { option in |
| + Button { answer = option.label } label: { |
| + HStack { Text(option.label); Spacer() } |
| + .font(Typo.body).foregroundStyle(Palette.text) |
| + .padding(.horizontal, 16).frame(minHeight: rowHeight).contentShape(Rectangle()) |
| + } |
| + .buttonStyle(.plain) |
| + .modifier(ControlMeasurement(title: option.label, primary: false)) |
| + Rectangle().fill(Color.primary.opacity(0.12)).frame(height: 1) |
| + } |
| + HStack { Text("Answer in your own words"); Spacer(); Image(systemName: "keyboard") } |
| + .font(Typo.body).foregroundStyle(Palette.text) |
| + .padding(.horizontal, 16).frame(minHeight: rowHeight) |
| + } |
| + .background(.regularMaterial, in: shape) |
| + .overlay(shape.strokeBorder(Palette.border.opacity(0.7), lineWidth: 1)) |
| + .clipShape(shape) |
| + } |
| + @ViewBuilder private var hint: some View { |
| + if answer != nil { |
| + QuietLabel(text: "Saved in this preview. No answer was sent.").frame(maxWidth: .infinity, alignment: .center) |
| + } else if showsActions { |
| + Label("Unlock to answer", systemImage: "lock.fill").font(Typo.caption).foregroundStyle(Palette.secondary) |
| + .frame(maxWidth: .infinity, alignment: .center) |
| + } else { |
| + #if os(iOS) |
| + QuietLabel(text: "Touch and hold to answer").frame(maxWidth: .infinity, alignment: .center) |
| + #else |
| + QuietLabel(text: "Options appear when the pointer is over the banner").frame(maxWidth: .infinity, alignment: .center) |
| + #endif |
| + } |
| + } |
| +} |
| +struct StatTile: View { |
| + let label: String |
| + let value: String |
| + var body: some View { |
| + VStack(alignment: .leading, spacing: 4) { |
| + Text(value).font(Typo.stat).monospacedDigit().foregroundStyle(Palette.text) |
| + Text(label).font(Typo.caption).foregroundStyle(Palette.secondary) |
| + } |
| + .frame(maxWidth: .infinity, alignment: .leading) |
| + .padding(Metric.cardPadding - 2) |
| + .background(Palette.surface, in: RoundedRectangle(cornerRadius: Metric.card, style: .continuous)) |
| + .overlay(RoundedRectangle(cornerRadius: Metric.card, style: .continuous).strokeBorder(Palette.border, lineWidth: 1)) |
| + .accessibilityElement(children: .combine) |
| } |
| } |
| struct ConnectionsContent: View { |
| let store: MockStore |
| var body: some View { |
| - VStack(alignment: .leading, spacing: 22) { |
| - ForEach(store.connections) { connection in |
| - Panel { |
| - HStack { |
| - Image(systemName: connection.id.contains("claude") ? "sun.max" : "circle.hexagongrid") |
| - .font(.title2).foregroundStyle(Palette.accent) |
| - Text(connection.label).font(.headline) |
| - Spacer() |
| - Image(systemName: "checkmark.circle").foregroundStyle(Palette.accent) |
| - } |
| - ForEach(connection.models ?? [], id: \.model) { model in |
| - HStack { |
| - Text(model.available ? "Available" : "Unavailable").font(.subheadline) |
| - Spacer() |
| - Text(model.allowance_remaining == nil ? "Allowance not reported" : "\(model.allowanceLabel) remaining").font(.footnote).foregroundStyle(Palette.secondary) |
| + VStack(alignment: .leading, spacing: 12) { |
| + SectionTitle(text: "Model accounts") |
| + Panel(padding: 0, spacing: 0) { |
| + ForEach(Array(store.connections.enumerated()), id: \.element.id) { index, connection in |
| + if index > 0 { Hairline().padding(.leading, Metric.cardPadding) } |
| + let model = connection.models?.first |
| + HStack(alignment: .top, spacing: 12) { |
| + Image(systemName: "person.badge.key.fill").font(.title3) |
| + .foregroundStyle(Palette.accent).frame(width: 28) |
| + VStack(alignment: .leading, spacing: 4) { |
| + Text(connection.label).font(Typo.cardTitle).foregroundStyle(Palette.text) |
| + Text("\((model?.kind ?? "").capitalized) · \(connection.runner_id)") |
| + .font(Typo.caption).foregroundStyle(Palette.secondary).lineLimit(1) |
| + Text(model?.allowance_remaining == nil ? "Allowance not reported" : "\(Int(model?.allowance_remaining ?? 0).formatted()) remaining") |
| + .font(Typo.secondary).monospacedDigit() |
| + .foregroundStyle(model?.allowance_remaining == nil ? Palette.secondary : Palette.text) |
| } |
| - } |
| + Spacer(minLength: 8) |
| + if connection.revoked_at != nil { StatusPill(text: "Revoked", tone: .negative) } |
| + else if model?.available == true { StatusPill(text: "Available", tone: .positive, icon: "checkmark") } |
| + else { StatusPill(text: "Unavailable", tone: .warning) } |
| + }.padding(Metric.cardPadding) |
| } |
| } |
| - Text("Team budget").font(.title3.weight(.semibold)) |
| - Panel { |
| - LabeledContent("Input tokens", value: store.budgets.team.input_tokens.formatted()) |
| - Divider() |
| - LabeledContent("Output tokens", value: store.budgets.team.output_tokens.formatted()) |
| - Divider() |
| - LabeledContent("Calls", value: store.budgets.team.calls.formatted()) |
| - }.font(.subheadline) |
| - QuietLabel(text: "Configured limits. Remaining budget and reset times are not available in the person API.") |
| + SectionTitle(text: "Team budget").padding(.top, 14) |
| + LazyVGrid(columns: [GridItem(.flexible(), spacing: 10), GridItem(.flexible(), spacing: 10)], spacing: 10) { |
| + StatTile(label: "Input tokens", value: compact(store.budgets.team.input_tokens)) |
| + StatTile(label: "Output tokens", value: compact(store.budgets.team.output_tokens)) |
| + StatTile(label: "Calls", value: Int(store.budgets.team.calls).formatted()) |
| + StatTile(label: "Hours of work", value: (Double(store.budgets.team.seconds) / 3600).formatted(.number.precision(.fractionLength(0...1)))) |
| + } |
| + QuietLabel(text: "These are the configured limits for each period. What is left, and when it resets, is not in the person API yet.") |
| NavigationLink(value: "usage-concept") { |
| - Label("Preview web Usage parity", systemImage: "arrow.up.right").frame(minHeight: 44, alignment: .leading).contentShape(Rectangle()) |
| - }.font(.subheadline) |
| + HStack { |
| + Label("Preview web Usage parity", systemImage: "chart.bar") |
| + Spacer() |
| + Image(systemName: "chevron.right").imageScale(.small).foregroundStyle(Palette.faint) |
| + }.font(Typo.secondary).frame(minHeight: Metric.target).contentShape(Rectangle()) |
| + }.padding(.top, 6) |
| + } |
| + } |
| +} |
| +struct ConceptHeader: View { |
| + let title: String |
| + let project: String |
| + let category: String |
| + var note: String? |
| + var body: some View { |
| + VStack(alignment: .leading, spacing: 8) { |
| + StatusPill(text: "Design concept · awaiting person API support") |
| + Text(title).font(Typo.screenTitle).foregroundStyle(Palette.text) |
| + HStack(spacing: 8) { |
| + Label(project, systemImage: "folder").font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + SpecialistLabel(category: category, tone: Palette.secondary) |
| + if let note { Text(note).font(Typo.secondary).foregroundStyle(Palette.secondary) } |
| + } |
| } |
| } |
| } |
| @@ -155,81 +393,105 @@ struct WebConceptView: View { |
| @State private var choice: String? |
| var body: some View { |
| ScrollView { |
| - VStack(alignment: .leading, spacing: 20) { |
| - QuietLabel(text: "Design concept · awaiting person API support") |
| + VStack(alignment: .leading, spacing: 18) { |
| if screen == "exploration" { |
| - Text("Explore a shorter setup").font(.title2.weight(.semibold)) |
| - Label("Equipo · Design", systemImage: "pencil.and.outline").foregroundStyle(Palette.secondary) |
| + ConceptHeader(title: "Explore a shorter setup", project: "Equipo", category: "design") |
| Panel { |
| - Label("Preview ready", systemImage: "macwindow").font(.headline) |
| + Label("Preview ready", systemImage: "macwindow").font(Typo.cardTitle).foregroundStyle(Palette.text) |
| Text("Two steps instead of five. Connect a runner, then choose your first project.") |
| - EquipoButton(title: "Open preview") { choice = "Preview selected" } |
| + .font(Typo.body).foregroundStyle(Palette.text) |
| + EquipoButton(title: "Open preview", icon: "arrow.up.forward.square") { choice = "Preview selected" } |
| } |
| Panel(tinted: true) { |
| - Text("What next?").font(.headline) |
| - Text("Keep exploring, build this direction, or leave it here.") |
| - ForEach(["Build this", "Keep exploring", "Leave it here"], id: \.self) { text in |
| - EquipoButton(title: text, primary: text == "Build this", expanded: true) { choice = text } |
| + Text("What next?").font(Typo.question).foregroundStyle(Palette.text) |
| + Text("Keep exploring, build this direction, or leave it here.").font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + VStack(spacing: 10) { |
| + ForEach(["Build this", "Keep exploring", "Leave it here"], id: \.self) { text in |
| + EquipoButton(title: text, primary: text == "Build this", expanded: true) { choice = text } |
| + } |
| } |
| } |
| QuietLabel(text: "An exploration ends at its preview. Building requires a new decision.") |
| } else if screen == "copy-hold" { |
| - Text("Refresh the welcome page").font(.title2.weight(.semibold)) |
| - Label("Equipo · Copy", systemImage: "pencil.line").foregroundStyle(Palette.secondary) |
| - Panel(tinted: true) { |
| - Text("Copy cannot start").font(.headline) |
| + ConceptHeader(title: "Refresh the welcome page", project: "Equipo", category: "copy") |
| + Panel(tinted: true, tone: .warning) { |
| + Label("Copy cannot start", systemImage: "pause.circle.fill").font(Typo.cardTitle).foregroundStyle(Palette.warning) |
| Text("There is not enough room in this task’s token allowance to review the changed wording.") |
| + .font(Typo.body).foregroundStyle(Palette.text) |
| EquipoButton(title: "Continue without Copy") { choice = "Continued in this preview. Checks and Review can resume." } |
| } |
| Text("Only the task creator can continue. This applies to the current candidate and leaves its wording unaccepted.") |
| + .font(Typo.secondary).foregroundStyle(Palette.text) |
| QuietLabel(text: "The release copy gate still applies. This is a separate budget-hold scenario, not a way to skip an open question.") |
| } else if screen == "research" { |
| - Text("Calendar connections").font(.title2.weight(.semibold)) |
| - Label("Woodstar · Research finished", systemImage: "magnifyingglass").foregroundStyle(Palette.secondary) |
| + ConceptHeader(title: "Calendar connections", project: "Woodstar", category: "research", note: "· Finished") |
| Panel { |
| - Text("What Research found").font(.headline) |
| + Text("What Research found").font(Typo.cardTitle).foregroundStyle(Palette.text) |
| Text("Calendar access needs a separate permission. Read-only access is enough for the first version.") |
| - Divider() |
| - Label("Sources", systemImage: "link").font(.subheadline.weight(.semibold)) |
| - Text("Calendar API guide\nAuthorization guide").foregroundStyle(Palette.accent) |
| + .font(Typo.body).foregroundStyle(Palette.text) |
| + Hairline() |
| + SectionTitle(text: "Sources") |
| + VStack(alignment: .leading, spacing: 0) { |
| + ForEach(["Calendar API guide", "Authorization guide"], id: \.self) { source in |
| + Label(source, systemImage: "link").font(Typo.secondary).foregroundStyle(Palette.accent) |
| + .frame(minHeight: Metric.target, alignment: .leading) |
| + } |
| + }.padding(.vertical, -6) |
| } |
| - Panel { |
| - Text("Still unknown").font(.headline) |
| - Text("Whether shared calendars need an administrator’s approval.") |
| + Panel(tinted: true, tone: .warning) { |
| + Label("Still unknown", systemImage: "questionmark.circle.fill").font(Typo.cardTitle).foregroundStyle(Palette.warning) |
| + Text("Whether shared calendars need an administrator’s approval.").font(Typo.body).foregroundStyle(Palette.text) |
| + } |
| + DisclosureGroup { QuietLabel(text: "Two pages read. No images kept.").frame(maxWidth: .infinity, alignment: .leading) } label: { |
| + Text("Fetch log and kept images").font(Typo.secondary).frame(minHeight: Metric.target, alignment: .leading).contentShape(Rectangle()) |
| } |
| - DisclosureGroup { QuietLabel(text: "Two pages read. No images kept.") } label: { Text("Fetch log and kept images").frame(minHeight: 44, alignment: .leading).contentShape(Rectangle()) } |
| } else if screen == "usage-concept" { |
| - Text("Usage").font(.title2.weight(.semibold)) |
| + StatusPill(text: "Design concept · awaiting person API support") |
| + Text("Usage").font(Typo.screenTitle).foregroundStyle(Palette.text) |
| Panel { |
| - Label("Claude · Work", systemImage: "sun.max").font(.headline) |
| - LabeledContent("Session used", value: "38%") |
| - ProgressView(value: 0.38).tint(Palette.accent) |
| - QuietLabel(text: "Resets in 2 hours · read 1 minute ago") |
| + HStack(alignment: .firstTextBaseline) { |
| + Text("Claude · Work").font(Typo.cardTitle).foregroundStyle(Palette.text) |
| + Spacer() |
| + Text("38%").font(Typo.stat).monospacedDigit().foregroundStyle(Palette.text) |
| + } |
| + Meter(value: 0.38) |
| + QuietLabel(text: "Session used · resets in 2 hours · read 1 minute ago") |
| } |
| Panel { |
| - Label("Codex · Personal", systemImage: "circle.hexagongrid").font(.headline) |
| + HStack(alignment: .firstTextBaseline) { |
| + Text("Codex · Personal").font(Typo.cardTitle).foregroundStyle(Palette.text) |
| + Spacer() |
| + StatusPill(text: "Unknown") |
| + } |
| QuietLabel(text: "Headroom unknown. No recent reading.") |
| } |
| - Text("Waiting for headroom").font(.headline) |
| - Panel(tinted: true) { |
| - Text("Check sign-in recovery").font(.headline) |
| - QuietLabel(text: "Woodstar · Engineering") |
| - Text("The preferred connection is near its limit. Equipo recommends waiting.") |
| - EquipoButton(title: "Mark urgent") { choice = "Marked urgent in this preview" } |
| + SectionTitle(text: "Waiting for headroom").padding(.top, 6) |
| + Panel(tinted: true, tone: .warning) { |
| + Text("Check sign-in recovery").font(Typo.cardTitle).foregroundStyle(Palette.text) |
| + HStack(spacing: 8) { |
| + Label("Woodstar", systemImage: "folder").font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + SpecialistLabel(category: "engineering", tone: Palette.secondary) |
| + } |
| + Text("The preferred connection is near its limit. Equipo recommends waiting.").font(Typo.secondary).foregroundStyle(Palette.text) |
| + EquipoButton(title: "Mark urgent", icon: "bolt") { choice = "Marked urgent in this preview" } |
| } |
| QuietLabel(text: "Illustrative provider readings. These fields and the priority action need an API addition.") |
| } else { |
| - Text("A secure handoff").font(.title2.weight(.semibold)) |
| + StatusPill(text: "Design concept · no Contra contract yet") |
| + Text("A secure handoff").font(Typo.screenTitle).foregroundStyle(Palette.text) |
| Panel(tinted: true) { |
| - Label("Contra", systemImage: "key.horizontal").font(.headline) |
| - Text("Engineering needs a deployment credential.") |
| - QuietLabel(text: "Equipo · Preview environment") |
| - EquipoButton(title: "Open Contra") { choice = "Secure handoff selected" } |
| + Label("Contra", systemImage: "key.horizontal.fill").font(Typo.cardTitle).foregroundStyle(Palette.accent) |
| + Text("Engineering needs a deployment credential.").font(Typo.question).foregroundStyle(Palette.text) |
| + Label("Equipo · Preview environment", systemImage: "folder").font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + EquipoButton(title: "Open Contra", icon: "arrow.up.forward.app", expanded: true) { choice = "Secure handoff selected" } |
| } |
| - Text("Enter the secret in Contra. Keep it out of the conversation and notification.") |
| + Label("Enter the secret in Contra. Keep it out of the conversation and notification.", systemImage: "lock.shield") |
| + .font(Typo.secondary).foregroundStyle(Palette.text) |
| QuietLabel(text: "Proposed interaction only. No Contra contract or secret-request endpoint exists in this checkout.") |
| } |
| - if let choice { Label(choice, systemImage: "checkmark.circle").foregroundStyle(Palette.accent) } |
| + if let choice { |
| + Label(choice, systemImage: "checkmark.circle.fill").font(Typo.secondaryStrong).foregroundStyle(Palette.positive) |
| + } |
| }.padding(20) |
| }.background(Palette.background).tint(Palette.accent) |
| } |
diff --git a/native/mockups/Shared/Controls.swift b/native/mockups/Shared/Controls.swift| index 7c0b7b13..e621fc2a 100644 |
| --- a/native/mockups/Shared/Controls.swift |
| +++ b/native/mockups/Shared/Controls.swift |
| @@ -1,29 +1,72 @@ |
| import SwiftUI |
| import EquipoCore |
| +enum ControlState: String, CaseIterable { case rest, hover, pressed, focus, disabled, loading } |
| + |
| +/// The web's button, drawn natively: a face, a full hairline border and a |
| +/// short contact shadow that goes away when the control is pressed in. |
| +struct EquipoButtonStyle: ButtonStyle { |
| + var primary = false |
| + var loading = false |
| + var forced: ControlState? |
| + func makeBody(configuration: Configuration) -> some View { |
| + Face(configuration: configuration, primary: primary, loading: loading || forced == .loading, forced: forced) |
| + } |
| + private struct Face: View { |
| + let configuration: ButtonStyleConfiguration |
| + let primary: Bool |
| + let loading: Bool |
| + let forced: ControlState? |
| + @Environment(\.isEnabled) private var isEnabled |
| + @Environment(\.colorScheme) private var scheme |
| + @State private var hovering = false |
| + var body: some View { |
| + let enabled = isEnabled && forced != .disabled |
| + let pressed = configuration.isPressed || forced == .pressed |
| + let hover = (hovering || forced == .hover) && enabled |
| + let shape = RoundedRectangle(cornerRadius: Metric.control, style: .continuous) |
| + ZStack { |
| + configuration.label.opacity(loading ? 0 : 1) |
| + if loading { ProgressView().controlSize(.small).tint(primary ? Color.white : Palette.secondary).environment(\.colorScheme, primary ? .dark : scheme) } |
| + } |
| + .font(Typo.button) |
| + .foregroundStyle(primary ? Color.white : Palette.controlText) |
| + .padding(.horizontal, 16).padding(.vertical, 6) |
| + .frame(minHeight: Metric.buttonHeight) |
| + .background(shape.fill(fill(pressed: pressed, hover: hover))) |
| + .overlay(shape.strokeBorder(primary ? Palette.primaryEdge : Palette.controlBorder, lineWidth: 1)) |
| + .shadow(color: Palette.contactShadow.opacity(pressed || !enabled ? 0 : 0.08), radius: 1, y: 1) |
| + .overlay { if forced == .focus { shape.inset(by: -3).stroke(Palette.accent.opacity(0.55), lineWidth: 3) } } |
| + .opacity(enabled ? 1 : 0.45) |
| + .contentShape(shape) |
| + .onHover { hovering = $0 } |
| + .animation(.easeOut(duration: 0.12), value: pressed) |
| + .animation(.easeOut(duration: 0.12), value: hover) |
| + } |
| + private func fill(pressed: Bool, hover: Bool) -> Color { |
| + if primary { return pressed ? Palette.primaryEdge : hover ? Palette.primaryFillHover : Palette.primaryFill } |
| + return pressed ? Palette.controlFacePressed : hover ? Palette.controlFaceHover : Palette.controlFace |
| + } |
| + } |
| +} |
| struct EquipoButton: View { |
| let title: String |
| + var icon: String? |
| var primary = false |
| var expanded = false |
| + var loading = false |
| let action: () -> Void |
| var body: some View { |
| - Group { |
| - if primary { button.buttonStyle(.borderedProminent) } |
| - else { button.buttonStyle(.bordered) } |
| - } |
| - .controlSize(.large) |
| - .buttonBorderShape(.roundedRectangle(radius: 4)) |
| - .tint(primary ? Palette.primaryFill : Palette.controlFace) |
| - .foregroundStyle(primary ? Color.white : Palette.controlText) |
| - .overlay(RoundedRectangle(cornerRadius: 4).stroke(primary ? Palette.primaryFill : Palette.controlBorder, lineWidth: 1).allowsHitTesting(false)) |
| - .modifier(ControlMeasurement(title: title, primary: primary)) |
| - } |
| - private var button: some View { |
| Button(action: action) { |
| - Text(title).font(.body.weight(.medium)) |
| - .frame(maxWidth: expanded ? .infinity : nil, minHeight: 20) |
| - .fixedSize(horizontal: false, vertical: true) |
| + HStack(spacing: 7) { |
| + if let icon { Image(systemName: icon) } |
| + Text(title).multilineTextAlignment(.center) |
| + } |
| + .frame(maxWidth: expanded ? .infinity : nil) |
| + .fixedSize(horizontal: false, vertical: true) |
| } |
| + .buttonStyle(EquipoButtonStyle(primary: primary, loading: loading)) |
| + .modifier(ControlMeasurement(title: title, primary: primary)) |
| } |
| } |
| struct AnswerChoices: View { |
| @@ -31,9 +74,11 @@ struct AnswerChoices: View { |
| let onAnswer: (String) -> Void |
| @Environment(\.dynamicTypeSize) private var typeSize |
| var body: some View { |
| - let columns = typeSize.isAccessibilitySize ? 1 : min(2, max(1, question.options?.count ?? 1)) |
| + let options = question.options ?? [] |
| + let long = options.contains { $0.label.count > 18 } |
| + let columns = typeSize.isAccessibilitySize || long || options.count > 2 ? 1 : max(1, options.count) |
| LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 10), count: columns), spacing: 10) { |
| - ForEach(question.options ?? []) { option in |
| + ForEach(options) { option in |
| EquipoButton(title: option.label, expanded: true) { onAnswer(option.label) } |
| .disabled(!question.canSubmit(currentRevision: 7)) |
| } |
| @@ -42,19 +87,58 @@ struct AnswerChoices: View { |
| } |
| struct QuietAction: View { |
| let title: String |
| + var icon: String? |
| let action: () -> Void |
| + @State private var hovering = false |
| var body: some View { |
| Button(action: action) { |
| - Text(title).font(.subheadline).foregroundStyle(Palette.accent) |
| - .frame(minHeight: target).contentShape(Rectangle()) |
| - }.buttonStyle(.borderless).controlSize(.regular) |
| + HStack(spacing: 5) { |
| + Text(title).underline(hovering) |
| + if let icon { Image(systemName: icon).imageScale(.small) } |
| + } |
| + .font(Typo.secondary).foregroundStyle(Palette.accent) |
| + .frame(minHeight: Metric.target).contentShape(Rectangle()) |
| + }.buttonStyle(.plain).onHover { hovering = $0 } |
| } |
| - private var target: CGFloat { |
| - #if os(iOS) |
| - return WebControls.touchTarget |
| - #else |
| - return WebControls.pointerTarget |
| - #endif |
| +} |
| + |
| +/// Every state of the two button kinds on one sheet, for review. |
| +struct ControlStatesGallery: View { |
| + var body: some View { |
| + VStack(alignment: .leading, spacing: 22) { |
| + Text("Control states").font(Typo.screenTitle).foregroundStyle(Palette.text) |
| + ForEach([false, true], id: \.self) { primary in |
| + VStack(alignment: .leading, spacing: 10) { |
| + SectionTitle(text: primary ? "Primary" : "Choice and secondary") |
| + LazyVGrid(columns: Array(repeating: GridItem(.flexible(), spacing: 10), count: 3), spacing: 14) { |
| + ForEach(ControlState.allCases, id: \.self) { state in |
| + VStack(spacing: 6) { |
| + Button {} label: { Text(primary ? "Build this" : "VAT").frame(maxWidth: .infinity) } |
| + .buttonStyle(EquipoButtonStyle(primary: primary, forced: state)) |
| + Text(state.rawValue.capitalized).font(Typo.caption).foregroundStyle(Palette.secondary) |
| + } |
| + } |
| + } |
| + } |
| + } |
| + VStack(alignment: .leading, spacing: 10) { |
| + SectionTitle(text: "Status") |
| + HStack(spacing: 8) { |
| + StatusPill(text: "Needs you", tone: .accent, icon: "hand.raised.fill") |
| + StatusPill(text: "Running") |
| + StatusPill(text: "Waiting", tone: .warning) |
| + StatusPill(text: "Done", tone: .positive, icon: "checkmark") |
| + } |
| + HStack(spacing: 8) { |
| + StatusPill(text: "Could not upload", tone: .negative, icon: "exclamationmark.triangle.fill") |
| + CountBadge(count: 1) |
| + } |
| + } |
| + QuietLabel(text: "Hover applies to pointer devices. Focus uses the system ring in the running apps; it is drawn here so the sheet can show it.") |
| + Spacer(minLength: 0) |
| + } |
| + .padding(24).frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading) |
| + .background(Palette.background.ignoresSafeArea()) |
| } |
| } |
diff --git a/native/mockups/Shared/Onboarding.swift b/native/mockups/Shared/Onboarding.swift| new file mode 100644 |
| index 00000000..ce2aba8c |
| --- /dev/null |
| +++ b/native/mockups/Shared/Onboarding.swift |
| @@ -0,0 +1,327 @@ |
| +import SwiftUI |
| +import EquipoCore |
| + |
| +/// First run: five steps, one action each. Content follows |
| +/// docs/mockups/onboarding.html; pairing follows docs/native/sync-proposal.md. |
| +enum OnboardingStep: String, CaseIterable { |
| + case welcome, pair, paired, model, project, message |
| + /// Position among the five steps; "paired" is the end of step two. |
| + var index: Int { |
| + switch self { |
| + case .welcome: return 0 |
| + case .pair, .paired: return 1 |
| + case .model: return 2 |
| + case .project: return 3 |
| + case .message: return 4 |
| + } |
| + } |
| + var canSkip: Bool { self == .model || self == .project || self == .message } |
| + var next: OnboardingStep? { |
| + let all = OnboardingStep.allCases |
| + let position = all.firstIndex(of: self)! |
| + return position + 1 < all.count ? all[position + 1] : nil |
| + } |
| + var previous: OnboardingStep? { |
| + switch self { |
| + case .welcome: return nil |
| + case .pair: return .welcome |
| + case .paired: return nil |
| + case .model: return nil |
| + case .project: return .model |
| + case .message: return .project |
| + } |
| + } |
| +} |
| +struct ProgressDots: View { |
| + let index: Int |
| + var count = 5 |
| + var body: some View { |
| + HStack(spacing: 6) { |
| + ForEach(0..<count, id: \.self) { item in |
| + Capsule().fill(item == index ? Palette.accent : (item < index ? Palette.accent.opacity(0.45) : Palette.controlBorder)) |
| + .frame(width: item == index ? 22 : 7, height: 7) |
| + } |
| + } |
| + .accessibilityElement().accessibilityLabel("Step \(index + 1) of \(count)") |
| + } |
| +} |
| +struct SelectRow: View { |
| + let title: String |
| + let detail: String |
| + var icon: String? |
| + let selected: Bool |
| + let action: () -> Void |
| + var body: some View { |
| + let shape = RoundedRectangle(cornerRadius: Metric.card, style: .continuous) |
| + Button(action: action) { |
| + HStack(alignment: .center, spacing: 12) { |
| + if let icon { Image(systemName: icon).font(.title3).foregroundStyle(Palette.accent).frame(width: 28) } |
| + VStack(alignment: .leading, spacing: 3) { |
| + Text(title).font(Typo.cardTitle).foregroundStyle(Palette.text).multilineTextAlignment(.leading) |
| + Text(detail).font(Typo.caption).foregroundStyle(Palette.secondary).multilineTextAlignment(.leading) |
| + } |
| + Spacer(minLength: 8) |
| + Image(systemName: selected ? "checkmark.circle.fill" : "circle").font(.title3) |
| + .foregroundStyle(selected ? Palette.accent : Palette.controlBorder) |
| + } |
| + .padding(.horizontal, Metric.cardPadding).padding(.vertical, 12) |
| + .frame(minHeight: Metric.target + 12) |
| + .background(shape.fill(selected ? Palette.soft : Palette.surface)) |
| + .overlay(shape.strokeBorder(selected ? Palette.softBorder : Palette.border, lineWidth: 1)) |
| + .contentShape(shape) |
| + } |
| + .buttonStyle(.plain) |
| + .accessibilityAddTraits(selected ? .isSelected : []) |
| + } |
| +} |
| +struct OnboardingView: View { |
| + let store: MockStore |
| + @State var step: OnboardingStep |
| + @State private var provider = "Claude" |
| + @State private var suggestion = 0 |
| + @State private var runHere = true |
| + @State private var finished = false |
| + private var project: Project { store.projects[0] } |
| + private var team: TeamLink { store.teams[0] } |
| + private var host: String { team.origin.replacingOccurrences(of: "https://", with: "") } |
| + #if os(iOS) |
| + private let deviceName = "Paul’s iPhone" |
| + #else |
| + private let deviceName = "Paul’s Mac" |
| + #endif |
| + |
| + var body: some View { |
| + chrome.background(Palette.background).tint(Palette.accent) |
| + } |
| + private func advance() { if let next = step.next { step = next } else { finished = true } } |
| + |
| + // MARK: Platform chrome |
| + #if os(iOS) |
| + private var chrome: some View { |
| + VStack(spacing: 0) { |
| + ZStack { |
| + ProgressDots(index: step.index) |
| + HStack { |
| + if let previous = step.previous { |
| + Button { step = previous } label: { |
| + Image(systemName: "chevron.left").font(.body.weight(.semibold)) |
| + .frame(width: 44, height: 44).contentShape(Rectangle()) |
| + }.accessibilityLabel("Back") |
| + } |
| + Spacer() |
| + if step.canSkip { |
| + Button("Skip") { advance() }.font(.body).frame(minWidth: 44, minHeight: 44) |
| + } |
| + } |
| + }.frame(height: 44).padding(.horizontal, 12) |
| + ScrollView { |
| + VStack(alignment: .leading, spacing: 22) { |
| + hero.padding(.top, step == .welcome ? 56 : 20) |
| + VStack(alignment: .leading, spacing: 8) { |
| + Text(title).font(.largeTitle.weight(.bold)).foregroundStyle(Palette.text) |
| + .fixedSize(horizontal: false, vertical: true) |
| + Text(subtitle).font(.body).foregroundStyle(Palette.secondary) |
| + .fixedSize(horizontal: false, vertical: true) |
| + } |
| + content |
| + }.padding(.horizontal, 24).padding(.bottom, 16) |
| + } |
| + VStack(spacing: 10) { |
| + if let footnote { QuietLabel(text: footnote).multilineTextAlignment(.center) } |
| + EquipoButton(title: primaryTitle, icon: primaryIcon, primary: true, expanded: true) { advance() } |
| + }.padding(.horizontal, 24).padding(.top, 10).padding(.bottom, 12) |
| + } |
| + } |
| + #else |
| + private var chrome: some View { |
| + VStack(spacing: 0) { |
| + ProgressDots(index: step.index).padding(.top, 22) |
| + Spacer(minLength: 12) |
| + VStack(alignment: .leading, spacing: 18) { |
| + hero |
| + VStack(alignment: .leading, spacing: 6) { |
| + Text(title).font(.system(size: 26, weight: .bold)).foregroundStyle(Palette.text) |
| + Text(subtitle).font(.system(size: 13)).foregroundStyle(Palette.secondary) |
| + .fixedSize(horizontal: false, vertical: true) |
| + } |
| + content |
| + }.frame(width: 420) |
| + Spacer(minLength: 12) |
| + Hairline() |
| + HStack(spacing: 12) { |
| + if let previous = step.previous { EquipoButton(title: "Back") { step = previous } } |
| + if let footnote { QuietLabel(text: footnote) } |
| + Spacer() |
| + if step.canSkip { QuietAction(title: "Skip for now") { advance() } } |
| + EquipoButton(title: primaryTitle, icon: primaryIcon, primary: true) { advance() } |
| + .keyboardShortcut(.defaultAction) |
| + }.padding(.horizontal, 20).padding(.vertical, 14).background(Palette.surface) |
| + } |
| + } |
| + #endif |
| + |
| + // MARK: Words |
| + private var title: String { |
| + switch step { |
| + case .welcome: return "Welcome to Equipo" |
| + case .pair: return "Pair with your Equipo" |
| + case .paired: return "Paired with \(team.name)" |
| + case .model: return "Connect a model account" |
| + case .project: return "Add your first project" |
| + case .message: return "Say hello to your coordinator" |
| + } |
| + } |
| + private var subtitle: String { |
| + switch step { |
| + case .welcome: return "A coordinator and a team of AI specialists that work on your apps and bring back reviewed changes." |
| + case .pair: return "Approve this device in your browser. There is no password or token to paste." |
| + case .paired: return "This device stays signed in for 30 days. You can remove it at any time." |
| + case .model: return "Your coordinator and your tasks use your own account." |
| + case .project: return "Paste a repository address. Equipo works out the rest." |
| + case .message: return "Start with something safe. This first task reads and recommends, and changes nothing." |
| + } |
| + } |
| + private var primaryTitle: String { |
| + if finished { return "Sent in this preview" } |
| + switch step { |
| + case .welcome: return "Get started" |
| + case .pair: return "Open \(team.name) to approve" |
| + case .paired: return "Continue" |
| + case .model: return "Continue with \(provider)" |
| + case .project: return "Add \(project.name)" |
| + case .message: return "Ask the coordinator" |
| + } |
| + } |
| + private var primaryIcon: String? { |
| + switch step { |
| + case .pair: return "arrow.up.forward" |
| + case .message: return "arrow.up" |
| + default: return nil |
| + } |
| + } |
| + private var footnote: String? { |
| + switch step { |
| + case .welcome: return "About two minutes. You can skip a step and come back." |
| + default: return nil |
| + } |
| + } |
| + |
| + // MARK: Content |
| + @ViewBuilder private var hero: some View { |
| + switch step { |
| + case .welcome: AppGlyph(size: 64) |
| + case .paired: Image(systemName: "checkmark.circle.fill").font(.system(size: 52)).foregroundStyle(Palette.positive) |
| + default: EmptyView() |
| + } |
| + } |
| + @ViewBuilder private var content: some View { |
| + switch step { |
| + case .welcome: |
| + VStack(alignment: .leading, spacing: 14) { |
| + point("bubble.left.and.bubble.right", "Ask in plain words") |
| + point("person.3", "Specialists do the work") |
| + point("hand.raised", "You make the decisions") |
| + }.padding(.top, 4) |
| + case .pair: |
| + Panel(padding: 0, spacing: 0) { |
| + HStack(spacing: 12) { |
| + Image(systemName: "person.2.fill").foregroundStyle(Palette.accent).frame(width: 28) |
| + VStack(alignment: .leading, spacing: 2) { |
| + Text(team.name).font(Typo.cardTitle).foregroundStyle(Palette.text) |
| + Text(host).font(Typo.caption).foregroundStyle(Palette.secondary) |
| + } |
| + Spacer() |
| + QuietAction(title: "Change") {} |
| + }.padding(.horizontal, Metric.cardPadding).padding(.vertical, 6) |
| + Hairline() |
| + VStack(spacing: 8) { |
| + Text("Your code").font(Typo.caption).foregroundStyle(Palette.secondary) |
| + Text("K7QM-4XTR").font(.system(size: 32, weight: .semibold, design: .monospaced)).kerning(2) |
| + .foregroundStyle(Palette.text).textSelection(.enabled) |
| + .accessibilityLabel("Code K 7 Q M 4 X T R") |
| + Text("Shown in your browser as \(deviceName)").font(Typo.caption).foregroundStyle(Palette.secondary) |
| + }.frame(maxWidth: .infinity).padding(.vertical, 20) |
| + } |
| + HStack(spacing: 10) { |
| + ProgressView().controlSize(.small) |
| + Text("Waiting for you to approve. The code lasts 10 minutes.").font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + } |
| + case .paired: |
| + Panel { |
| + HStack(spacing: 12) { |
| + Image(systemName: "person.crop.circle.fill").font(.title).foregroundStyle(Palette.secondary) |
| + VStack(alignment: .leading, spacing: 2) { |
| + Text("Signed in as").font(Typo.caption).foregroundStyle(Palette.secondary) |
| + Text(store.conversation.messages?.first?.author_id ?? "").font(Typo.cardTitle).foregroundStyle(Palette.text).lineLimit(1) |
| + } |
| + Spacer() |
| + } |
| + Hairline() |
| + HStack { |
| + Text("This device").font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + Spacer() |
| + StatusPill(text: deviceName, tone: .positive, icon: "checkmark") |
| + } |
| + } |
| + case .model: |
| + VStack(spacing: 10) { |
| + SelectRow(title: "Claude", detail: "Sign in with your Claude plan, or use an API key", icon: "person.badge.key.fill", selected: provider == "Claude") { provider = "Claude" } |
| + SelectRow(title: "Codex", detail: "Sign in with ChatGPT, or use an API key", icon: "person.badge.key.fill", selected: provider == "Codex") { provider = "Codex" } |
| + } |
| + #if os(macOS) |
| + Toggle(isOn: $runHere) { |
| + VStack(alignment: .leading, spacing: 2) { |
| + Text("Run work on this Mac").font(Typo.body).foregroundStyle(Palette.text) |
| + Text("Equipo sets up the runner for you. No Terminal needed.").font(Typo.caption).foregroundStyle(Palette.secondary) |
| + } |
| + }.toggleStyle(.checkbox) |
| + #endif |
| + QuietLabel(text: "One account is enough to start. Review asks for a second one before your first change is reviewed.") |
| + case .project: |
| + let shape = RoundedRectangle(cornerRadius: Metric.control, style: .continuous) |
| + VStack(alignment: .leading, spacing: 6) { |
| + Text("Repository").font(Typo.captionStrong).foregroundStyle(Palette.secondary) |
| + HStack(spacing: 8) { |
| + Text(project.repository.replacingOccurrences(of: "https://", with: "")) |
| + .font(Typo.body).foregroundStyle(Palette.text).lineLimit(1).truncationMode(.middle) |
| + Spacer(minLength: 4) |
| + Image(systemName: "checkmark.circle.fill").foregroundStyle(Palette.positive).accessibilityLabel("Found") |
| + } |
| + .padding(.horizontal, 12).frame(minHeight: Metric.target) |
| + .background(shape.fill(Palette.controlFace)) |
| + .overlay(shape.strokeBorder(Palette.controlBorder, lineWidth: 1)) |
| + } |
| + Panel(padding: 0, spacing: 0) { |
| + detected("Name", project.name) |
| + Hairline().padding(.leading, Metric.cardPadding) |
| + detected("Default branch", project.default_branch) |
| + Hairline().padding(.leading, Metric.cardPadding) |
| + detected("Kind", project.kind.capitalized) |
| + } |
| + QuietLabel(text: "Found from the repository. You can change these later in Projects.") |
| + case .message: |
| + VStack(spacing: 10) { |
| + SelectRow(title: "What should we work on next in \(project.name)?", detail: "Product ranks open bugs and errors and explains why", selected: suggestion == 0) { suggestion = 0 } |
| + SelectRow(title: "Fix a bug I know about", detail: "Engineering fixes it, Review checks it, you merge", selected: suggestion == 1) { suggestion = 1 } |
| + SelectRow(title: "Something else", detail: "Describe it in your own words", selected: suggestion == 2) { suggestion = 2 } |
| + } |
| + if finished { |
| + Label("Your coordinator has it. No message was sent in this preview.", systemImage: "checkmark.circle.fill") |
| + .font(Typo.secondary).foregroundStyle(Palette.positive) |
| + } |
| + } |
| + } |
| + private func point(_ icon: String, _ text: String) -> some View { |
| + HStack(spacing: 14) { |
| + Image(systemName: icon).font(.title3).foregroundStyle(Palette.accent).frame(width: 32) |
| + Text(text).font(Typo.body.weight(.medium)).foregroundStyle(Palette.text) |
| + } |
| + } |
| + private func detected(_ label: String, _ value: String) -> some View { |
| + HStack { |
| + Text(label).font(Typo.secondary).foregroundStyle(Palette.secondary) |
| + Spacer() |
| + Text(value).font(Typo.secondary).foregroundStyle(Palette.text) |
| + }.padding(.horizontal, Metric.cardPadding).frame(minHeight: Metric.target) |
| + } |
| +} |
diff --git a/native/mockups/Shared/Theme.swift b/native/mockups/Shared/Theme.swift| index a717a24b..3424959e 100644 |
| --- a/native/mockups/Shared/Theme.swift |
| +++ b/native/mockups/Shared/Theme.swift |
| @@ -6,20 +6,36 @@ import AppKit |
| import UIKit |
| #endif |
| +// Colours transcribed from the web day theme (internal/equipo/static/theme.css). |
| enum Palette { |
| - static let negative = Color(light: 0xB91C1C, dark: 0xF79AA0) |
| - static let negativeBackground = Color(light: 0xFEE2E2, dark: 0x331819) |
| + static let text = Color(light: WebControls.text(false), dark: WebControls.text(true)) |
| + static let secondary = Color(light: 0x52525C, dark: 0xA1A1AA) |
| + static let faint = Color(light: 0x6B6B75, dark: 0x8C8C96) |
| + static let background = Color(light: 0xFBFBFC, dark: 0x0C0D0F) |
| + static let surface = Color(light: 0xFFFFFF, dark: 0x141518) |
| + static let surface2 = Color(light: 0xF3F3F5, dark: 0x18191D) |
| + static let border = Color(light: 0xE6E6EA, dark: 0x26282E) |
| + static let accent = Color(light: 0x1F56D6, dark: 0x7AA2FF) |
| + static let soft = Color(light: 0xECF1FF, dark: 0x16234A) |
| + static let softBorder = Color(light: 0xC9D7FA, dark: 0x27397A) |
| static let controlFace = Color(light: WebControls.face(false), dark: WebControls.face(true)) |
| + static let controlFaceHover = Color(light: 0xF4F5F8, dark: 0x1B1D22) |
| + static let controlFacePressed = Color(light: 0xE9EBEF, dark: 0x22242B) |
| static let controlText = Color(light: WebControls.text(false), dark: WebControls.text(true)) |
| + static let controlBorder = Color(light: 0xD0D4DC, dark: 0x343843) |
| static let placeholder = Color(light: WebControls.placeholder(false), dark: WebControls.placeholder(true)) |
| static let primaryFill = Color(light: WebControls.primary(false), dark: WebControls.primary(true)) |
| - static let controlBorder = Color(light: 0xD0D4DC, dark: 0x343843) |
| - static let accent = Color(light: 0x1F56D6, dark: 0x7AA2FF) |
| - static let background = Color(light: 0xFBFBFC, dark: 0x0C0D0F) |
| - static let surface = Color(light: 0xFFFFFF, dark: 0x141518) |
| - static let soft = Color(light: 0xECF1FF, dark: 0x16234A) |
| - static let border = Color(light: 0xE6E6EA, dark: 0x26282E) |
| - static let secondary = Color(light: 0x52525C, dark: 0xA1A1AA) |
| + static let primaryFillHover = Color(light: 0x1D4DC8, dark: 0x2956D0) |
| + static let primaryEdge = Color(light: 0x153CA0, dark: 0x1F43A6) |
| + static let positive = Color(light: 0x166534, dark: 0x6EE7A8) |
| + static let positiveBackground = Color(light: 0xDCFCE7, dark: 0x10281C) |
| + static let warning = Color(light: 0x854D0E, dark: 0xF0C46A) |
| + static let warningBackground = Color(light: 0xFEF3C7, dark: 0x2C2110) |
| + static let negative = Color(light: 0xB91C1C, dark: 0xF79AA0) |
| + static let negativeBackground = Color(light: 0xFEE2E2, dark: 0x331819) |
| + static let neutral = Color(light: 0x374151, dark: 0xC3C9D1) |
| + static let neutralBackground = Color(light: 0xEEF0F2, dark: 0x262C34) |
| + static let contactShadow = Color(light: 0x101828, dark: 0x000000) |
| } |
| extension Color { |
| init(light: UInt32, dark: UInt32) { |
| @@ -36,30 +52,188 @@ extension Color { |
| #endif |
| } |
| } |
| + |
| +// One scale per platform: text styles on iPhone so Dynamic Type works, |
| +// fixed AppKit-sized type on the Mac. |
| +enum Typo { |
| + #if os(iOS) |
| + static let screenTitle = Font.title2.weight(.bold) |
| + static let question = Font.title3.weight(.semibold) |
| + static let cardTitle = Font.headline |
| + static let body = Font.body |
| + static let secondary = Font.subheadline |
| + static let secondaryStrong = Font.subheadline.weight(.semibold) |
| + static let caption = Font.footnote |
| + static let captionStrong = Font.footnote.weight(.semibold) |
| + static let button = Font.body.weight(.medium) |
| + static let stat = Font.system(.title2, design: .rounded).weight(.semibold) |
| + #else |
| + static let screenTitle = Font.system(size: 20, weight: .bold) |
| + static let question = Font.system(size: 15, weight: .semibold) |
| + static let cardTitle = Font.system(size: 13, weight: .semibold) |
| + static let body = Font.system(size: 13) |
| + static let secondary = Font.system(size: 12) |
| + static let secondaryStrong = Font.system(size: 12, weight: .semibold) |
| + static let caption = Font.system(size: 11) |
| + static let captionStrong = Font.system(size: 11, weight: .semibold) |
| + static let button = Font.system(size: 13, weight: .medium) |
| + static let stat = Font.system(size: 20, weight: .semibold, design: .rounded) |
| + #endif |
| +} |
| +enum Metric { |
| + #if os(iOS) |
| + static let card: CGFloat = 14 |
| + static let control: CGFloat = 10 |
| + static let buttonHeight: CGFloat = 48 |
| + static let cardPadding: CGFloat = 16 |
| + static let target: CGFloat = WebControls.touchTarget |
| + #else |
| + static let card: CGFloat = 10 |
| + static let control: CGFloat = 6 |
| + static let buttonHeight: CGFloat = 32 |
| + static let cardPadding: CGFloat = 14 |
| + static let target: CGFloat = WebControls.pointerTarget |
| + #endif |
| +} |
| + |
| +enum Tone { |
| + case neutral, accent, positive, warning, negative |
| + var foreground: Color { |
| + switch self { |
| + case .neutral: return Palette.neutral |
| + case .accent: return Palette.accent |
| + case .positive: return Palette.positive |
| + case .warning: return Palette.warning |
| + case .negative: return Palette.negative |
| + } |
| + } |
| + var background: Color { |
| + switch self { |
| + case .neutral: return Palette.neutralBackground |
| + case .accent: return Palette.soft |
| + case .positive: return Palette.positiveBackground |
| + case .warning: return Palette.warningBackground |
| + case .negative: return Palette.negativeBackground |
| + } |
| + } |
| +} |
| + |
| +/// A card: surface, full hairline border, and an optional tint. Never a coloured edge. |
| struct Panel<Content: View>: View { |
| var tinted = false |
| + var tone: Tone = .accent |
| + var padding: CGFloat = Metric.cardPadding |
| + var spacing: CGFloat = 12 |
| @ViewBuilder var content: Content |
| var body: some View { |
| - VStack(alignment: .leading, spacing: 12) { content } |
| + let shape = RoundedRectangle(cornerRadius: Metric.card, style: .continuous) |
| + VStack(alignment: .leading, spacing: spacing) { content } |
| .frame(maxWidth: .infinity, alignment: .leading) |
| - .padding(16) |
| - .background(tinted ? Palette.soft : Palette.surface) |
| - .clipShape(RoundedRectangle(cornerRadius: 14)) |
| - .overlay(RoundedRectangle(cornerRadius: 14).stroke(Palette.border, lineWidth: 0.5)) |
| + .padding(padding) |
| + .background(shape.fill(tinted ? tone.background : Palette.surface)) |
| + .overlay(shape.strokeBorder(tinted ? (tone == .accent ? Palette.softBorder : tone.foreground.opacity(0.25)) : Palette.border, lineWidth: 1)) |
| } |
| } |
| struct QuietLabel: View { |
| let text: String |
| - var body: some View { Text(text).font(.footnote).foregroundStyle(Palette.secondary) } |
| + var body: some View { Text(text).font(Typo.caption).foregroundStyle(Palette.secondary).fixedSize(horizontal: false, vertical: true) } |
| +} |
| +struct SectionTitle: View { |
| + let text: String |
| + var body: some View { |
| + Text(text).font(Typo.captionStrong).textCase(.uppercase).kerning(0.4) |
| + .foregroundStyle(Palette.secondary).accessibilityAddTraits(.isHeader) |
| + } |
| +} |
| +struct StatusPill: View { |
| + let text: String |
| + var tone: Tone = .neutral |
| + var icon: String? |
| + var body: some View { |
| + HStack(spacing: 4) { |
| + if let icon { Image(systemName: icon).imageScale(.small) } |
| + Text(text) |
| + } |
| + .font(Typo.captionStrong) |
| + .foregroundStyle(tone.foreground) |
| + .padding(.horizontal, 8).padding(.vertical, 3) |
| + .background(tone.background, in: Capsule()) |
| + } |
| +} |
| +struct CountBadge: View { |
| + let count: Int |
| + var body: some View { |
| + Text(count.formatted()).font(Typo.captionStrong).monospacedDigit() |
| + .foregroundStyle(.white) |
| + .padding(.horizontal, 7).frame(minWidth: 22, minHeight: 20) |
| + .background(Palette.primaryFill, in: Capsule()) |
| + .accessibilityLabel("\(count) waiting") |
| + } |
| +} |
| +/// A specialist is always an icon beside its name. No lettered squares. |
| +struct SpecialistLabel: View { |
| + let category: String |
| + var tone: Color = Palette.text |
| + var body: some View { |
| + HStack(spacing: 6) { |
| + Image(systemName: specialistIcon(category)).foregroundStyle(Palette.accent) |
| + Text(category.capitalized).foregroundStyle(tone) |
| + }.font(Typo.secondaryStrong) |
| + } |
| +} |
| +struct Meter: View { |
| + let value: Double |
| + var tone: Tone = .accent |
| + var body: some View { |
| + GeometryReader { proxy in |
| + ZStack(alignment: .leading) { |
| + Capsule().fill(Palette.neutralBackground) |
| + Capsule().fill(tone == .accent ? Palette.primaryFill : tone.foreground) |
| + .frame(width: max(6, proxy.size.width * min(1, max(0, value)))) |
| + } |
| + }.frame(height: 6).accessibilityElement().accessibilityValue("\(Int(value * 100)) percent") |
| + } |
| } |
| func specialistIcon(_ category: String) -> String { |
| switch category.lowercased() { |
| case "engineering": return "hammer" |
| case "copy": return "pencil.line" |
| case "review": return "checkmark.shield" |
| - case "checks": return "checkmark.circle" |
| + case "checks": return "checklist.checked" |
| case "research": return "magnifyingglass" |
| - case "design": return "pencil.and.outline" |
| + case "design": return "paintbrush.pointed" |
| + case "product": return "list.star" |
| default: return "sparkle" |
| } |
| } |
| +func compact(_ value: Int64) -> String { |
| + Int(value).formatted(.number.notation(.compactName).precision(.fractionLength(0...1))) |
| +} |
| +func clock(_ iso: String) -> String { |
| + guard iso.count >= 16 else { return "" } |
| + let start = iso.index(iso.startIndex, offsetBy: 11) |
| + return String(iso[start..<iso.index(start, offsetBy: 5)]) |
| +} |
| +struct TaskStatus { |
| + let label: String |
| + let tone: Tone |
| + let icon: String? |
| + init(_ task: EquipoTask) { |
| + if task.needs_you { label = "Needs you"; tone = .accent; icon = "hand.raised.fill" } |
| + else { |
| + switch task.state { |
| + case "done": label = "Done"; tone = .positive; icon = "checkmark" |
| + case "running": label = "Running"; tone = .neutral; icon = nil |
| + case "waiting": label = "Waiting"; tone = .warning; icon = nil |
| + default: label = task.state.capitalized; tone = .neutral; icon = nil |
| + } |
| + } |
| + } |
| +} |
| +extension MockStore { |
| + /// The specialist whose step is waiting on this question. |
| + func askingCategory(for question: Question) -> String { |
| + tasks.first { $0.id == question.task_id }?.steps?.first { $0.state == "waiting" }?.category ?? "coordinator" |
| + } |
| + func task(for question: Question) -> EquipoTask? { tasks.first { $0.id == question.task_id } } |
| +} |
diff --git a/native/mockups/iOS/EquipoPhoneApp.swift b/native/mockups/iOS/EquipoPhoneApp.swift| index 264270c1..5d437527 100644 |
| --- a/native/mockups/iOS/EquipoPhoneApp.swift |
| +++ b/native/mockups/iOS/EquipoPhoneApp.swift |
| @@ -18,53 +18,64 @@ struct EquipoPhoneApp: App { |
| struct PhoneRoot: View { |
| let store = MockStore() |
| @State private var path: [String] |
| + private let onboarding: OnboardingStep? |
| init() { |
| let args = ProcessInfo.processInfo.arguments |
| let index = args.firstIndex(of: "--screen") |
| let screen = index.flatMap { args.indices.contains($0 + 1) ? args[$0 + 1] : nil } ?? "teams" |
| + onboarding = screen.hasPrefix("onboarding-") ? OnboardingStep(rawValue: String(screen.dropFirst(11))) : nil |
| _path = State(initialValue: screen == "teams" ? [] : (screen == "team" ? ["team"] : ["team", screen])) |
| } |
| var body: some View { |
| + if let onboarding { OnboardingView(store: store, step: onboarding) } else { stack } |
| + } |
| + private var stack: some View { |
| NavigationStack(path: $path) { |
| List { |
| Section { |
| ForEach(store.teams) { team in |
| - NavigationLink(value: "team") { |
| - HStack(spacing: 14) { |
| - Image(systemName: "person.2").font(.title2).foregroundStyle(Palette.accent) |
| - VStack(alignment: .leading, spacing: 5) { |
| - Text(team.name).font(.headline) |
| - Text(team.needs_you == nil ? "Sign in to check" : "\(team.needsLabel) decision needs you") |
| - .font(.subheadline).foregroundStyle(Palette.secondary) |
| - } |
| - }.padding(.vertical, 10) |
| - }.disabled(team.needs_you == nil) |
| - } |
| + if team.needs_you == nil { |
| + Button {} label: { TeamRow(team: team) } |
| + } else { |
| + NavigationLink(value: "team") { TeamRow(team: team) } |
| + } |
| + }.listRowBackground(Palette.surface) |
| } footer: { |
| Text("Each team has its own sign-in. Remembering a team does not grant access.") |
| } |
| Section { |
| - NavigationLink(value: "needs") { Label("Needs you in Oficina", systemImage: "hand.raised") } |
| + NavigationLink(value: "needs") { |
| + HStack { |
| + Label("Needs you in Oficina", systemImage: "hand.raised") |
| + Spacer() |
| + CountBadge(count: Int(store.teams.first?.needs_you ?? 0)) |
| + } |
| + }.listRowBackground(Palette.surface) |
| } |
| } |
| + .scrollContentBackground(.hidden).background(Palette.background) |
| .navigationTitle("Teams") |
| + .toolbar { ToolbarItem(placement: .topBarTrailing) { Button {} label: { Image(systemName: "plus") }.accessibilityLabel("Pair with another team") } } |
| .navigationDestination(for: String.self) { screen in |
| destination(screen) |
| } |
| } |
| .tint(Palette.accent) |
| - |
| } |
| @ViewBuilder func destination(_ screen: String) -> some View { |
| switch screen { |
| case "team": TeamIndex(store: store) |
| case "conversation": PhoneConversation(store: store) |
| + case "conversation-offline": PhoneConversation(store: store, offline: true) |
| case "conversation-draft", "conversation-attachment", "conversation-uploading", "conversation-error": PhoneConversation(store: store, composerState: String(screen.dropFirst(13))) |
| case "tasks": PhoneTasks(store: store) |
| + case "tasks-loading": PhoneTasks(store: store, loading: true) |
| case "task": PhoneTask(store: store, task: store.tasks[0]) |
| case "needs": PhoneNeeds(store: store) |
| + case "needs-empty": PhoneNeeds(store: store, empty: true) |
| + case "control-states": ScrollView { ControlStatesGallery() }.background(Palette.background).navigationTitle("Controls").navigationBarTitleDisplayMode(.inline) |
| case "connections": ScrollView { ConnectionsContent(store: store).padding(20) }.background(Palette.background).navigationTitle("Connections & Usage").navigationBarTitleDisplayMode(.inline) |
| - case "notification", "notification-answered", "notification-compact": NotificationAnswerView(store: store, answer: screen == "notification-answered" ? "VAT" : nil, compact: screen == "notification-compact").navigationTitle("Notification preview").navigationBarTitleDisplayMode(.inline) |
| + case "notification", "notification-answered", "notification-compact": NotificationAnswerView(store: store, answer: screen == "notification-answered" ? "VAT" : nil, compact: screen == "notification-compact").toolbar(.hidden, for: .navigationBar) |
| default: |
| if screen.hasPrefix("task:"), let task = store.tasks.first(where: { $0.id == String(screen.dropFirst(5)) }) { |
| PhoneTask(store: store, task: task) |
| @@ -72,75 +83,132 @@ struct PhoneRoot: View { |
| } |
| } |
| } |
| +struct TeamRow: View { |
| + let team: TeamLink |
| + var body: some View { |
| + HStack(spacing: 14) { |
| + Image(systemName: "person.2.fill").font(.title3).foregroundStyle(Palette.accent).frame(width: 32) |
| + VStack(alignment: .leading, spacing: 3) { |
| + Text(team.name).font(.headline).foregroundStyle(Palette.text) |
| + Text(team.origin.replacingOccurrences(of: "https://", with: "")).font(.footnote).foregroundStyle(Palette.secondary) |
| + } |
| + Spacer(minLength: 8) |
| + if let count = team.needs_you { |
| + if count > 0 { CountBadge(count: Int(count)) } |
| + } else { |
| + Label("Sign in", systemImage: "lock.fill").font(.subheadline).foregroundStyle(Palette.accent) |
| + } |
| + }.padding(.vertical, 6) |
| + } |
| +} |
| struct TeamIndex: View { |
| let store: MockStore |
| var body: some View { |
| List { |
| Section { |
| NavigationLink(value: "conversation") { Label("Conversation", systemImage: "bubble.left.and.bubble.right") } |
| - NavigationLink(value: "needs") { HStack { Label("Needs you", systemImage: "hand.raised"); Spacer(); Text("1").foregroundStyle(Palette.accent) } } |
| - NavigationLink(value: "tasks") { Label("Tasks", systemImage: "checklist") } |
| - NavigationLink(value: "connections") { Label("Connections & Usage", systemImage: "point.3.connected.trianglepath.dotted") } |
| - } |
| + NavigationLink(value: "needs") { HStack { Label("Needs you", systemImage: "hand.raised"); Spacer(); CountBadge(count: store.tasks.filter(\.needs_you).count) } } |
| + NavigationLink(value: "tasks") { HStack { Label("Tasks", systemImage: "checklist"); Spacer(); Text(store.tasks.count.formatted()).foregroundStyle(Palette.secondary).monospacedDigit() } } |
| + NavigationLink(value: "connections") { Label("Connections & Usage", systemImage: "gauge.with.dots.needle.33percent") } |
| + }.listRowBackground(Palette.surface) |
| Section("Specialists") { |
| - ForEach(["Engineering", "Design", "Copy", "Research", "Review"], id: \.self) { name in |
| - HStack(spacing: 13) { |
| - Image(systemName: specialistIcon(name)).foregroundStyle(Palette.accent).frame(width: 22) |
| - VStack(alignment: .leading, spacing: 5) { |
| - Text(name).font(.headline) |
| - if let task = store.activeTask(for: name.lowercased()) { |
| - Text(task.description).font(.subheadline).foregroundStyle(Palette.secondary) |
| - if let step = task.steps?.first(where: { $0.category == name.lowercased() }) { |
| - Text(step.actual.isEmpty ? step.action : step.actual).font(.footnote).foregroundStyle(Palette.secondary) |
| - } |
| - } else { Text("No current task").font(.subheadline).foregroundStyle(Palette.secondary) } |
| - } |
| - }.padding(.vertical, 5) |
| + ForEach(["engineering", "design", "copy", "research", "review"], id: \.self) { category in |
| + SpecialistRow(category: category, task: store.activeTask(for: category)) |
| } |
| - } |
| + }.listRowBackground(Palette.surface) |
| Section("Web parity previews") { |
| NavigationLink("Exploration and What next", value: "exploration") |
| NavigationLink("Research findings", value: "research") |
| NavigationLink("Contra request", value: "contra") |
| + }.listRowBackground(Palette.surface) |
| + } |
| + .scrollContentBackground(.hidden).background(Palette.background) |
| + .navigationTitle("Oficina") |
| + } |
| +} |
| +struct SpecialistRow: View { |
| + let category: String |
| + let task: EquipoTask? |
| + var body: some View { |
| + let step = task?.steps?.first { $0.category == category && ["running", "waiting"].contains($0.state) } |
| + let needsYou = step?.state == "waiting" && task?.needs_you == true |
| + HStack(alignment: .top, spacing: 14) { |
| + Image(systemName: specialistIcon(category)).font(.body.weight(.medium)) |
| + .foregroundStyle(task == nil ? Palette.faint : Palette.accent).frame(width: 28).padding(.top, 2) |
| + VStack(alignment: .leading, spacing: 3) { |
| + Text(category.capitalized).font(.headline).foregroundStyle(Palette.text) |
| + if let task, let step { |
| + Text(task.description).font(.subheadline).foregroundStyle(Palette.text) |
| + Text(needsYou ? "Waiting for your answer" : (step.actual.isEmpty ? step.action : step.actual)) |
| + .font(.footnote).foregroundStyle(needsYou ? Palette.accent : Palette.secondary) |
| + } else { |
| + Text("No current task").font(.subheadline).foregroundStyle(Palette.secondary) |
| + } |
| } |
| - }.navigationTitle("Oficina") |
| + Spacer(minLength: 8) |
| + if needsYou { Image(systemName: "hand.raised.fill").foregroundStyle(Palette.accent).accessibilityHidden(true) } |
| + else if step != nil { ProgressView().controlSize(.small).accessibilityLabel("Working") } |
| + }.padding(.vertical, 4) |
| + } |
| +} |
| +struct MessageBubble: View { |
| + let text: String |
| + var body: some View { |
| + Text(text).font(.body).foregroundStyle(Palette.text).fixedSize(horizontal: false, vertical: true) |
| + .padding(.horizontal, 14).padding(.vertical, 10) |
| + .background(Palette.soft, in: RoundedRectangle(cornerRadius: 20, style: .continuous)) |
| + .padding(.leading, 44) |
| + .frame(maxWidth: .infinity, alignment: .trailing) |
| } |
| } |
| struct PhoneConversation: View { |
| let store: MockStore |
| @State private var answer: String? |
| var composerState = "" |
| + var offline = false |
| @State private var sent: [String] = [] |
| var body: some View { |
| ScrollView { |
| - VStack(alignment: .leading, spacing: 22) { |
| + VStack(alignment: .leading, spacing: 20) { |
| + if offline { |
| + Panel(tinted: true, tone: .warning, spacing: 4) { |
| + Label("Can’t reach Oficina", systemImage: "wifi.slash").font(Typo.cardTitle).foregroundStyle(Palette.warning) |
| + Text("Showing what was loaded at 09:42. Messages you send will wait here.").font(Typo.secondary).foregroundStyle(Palette.text) |
| + QuietAction(title: "Try again", icon: "arrow.clockwise") {}.padding(.bottom, -10) |
| + } |
| + } |
| RollupCard() |
| - Text("Today").font(.footnote).foregroundStyle(Palette.secondary).frame(maxWidth: .infinity) |
| + Text("Today").font(.footnote.weight(.medium)).foregroundStyle(Palette.secondary).frame(maxWidth: .infinity) |
| ForEach(store.conversation.messages ?? []) { item in |
| - VStack(alignment: .leading, spacing: 7) { |
| - if item.author_kind != "person" { |
| - Label("Coordinator", systemImage: "sparkle").font(.subheadline.weight(.semibold)).foregroundStyle(Palette.accent) |
| - } |
| - if item.author_kind == "person" { |
| - Text(item.body).font(.body).fixedSize(horizontal: false, vertical: true) |
| - .padding(14).background(Palette.soft) |
| - .clipShape(RoundedRectangle(cornerRadius: 16)) |
| - } else { |
| - Text(item.body).font(.body).fixedSize(horizontal: false, vertical: true) |
| + if item.author_kind == "person" { |
| + MessageBubble(text: item.body) |
| + } else { |
| + VStack(alignment: .leading, spacing: 6) { |
| + HStack(alignment: .firstTextBaseline, spacing: 6) { |
| + Image(systemName: "sparkle").foregroundStyle(Palette.accent) |
| + Text("Coordinator").foregroundStyle(Palette.text) |
| + Text(clock(item.created_at)).fontWeight(.regular).foregroundStyle(Palette.faint) |
| + }.font(.subheadline.weight(.semibold)) |
| + Text(item.body).font(.body).foregroundStyle(Palette.text).lineSpacing(2) |
| + .fixedSize(horizontal: false, vertical: true) |
| .frame(maxWidth: .infinity, alignment: .leading) |
| - .padding(.horizontal, 2) |
| } |
| - }.frame(maxWidth: .infinity, alignment: item.author_kind == "person" ? .trailing : .leading) |
| + } |
| } |
| - QuestionCard(question: store.question, answer: $answer) |
| - ForEach(sent, id: \.self) { text in Text(text).padding(14).background(Palette.soft).clipShape(RoundedRectangle(cornerRadius: 16)) } |
| - Label("Checking the next step", systemImage: "sparkle") |
| - .font(.footnote).foregroundStyle(Palette.secondary) |
| - QuietLabel(text: "Roll-up and activity line preview web features awaiting API support.") |
| - }.padding(20) |
| + QuestionCard(question: store.question, category: store.askingCategory(for: store.question), answer: $answer) |
| + ForEach(sent, id: \.self) { text in MessageBubble(text: text) } |
| + if !offline { |
| + HStack(spacing: 8) { |
| + ProgressView().controlSize(.small) |
| + Text("Checking the next step").font(.footnote).foregroundStyle(Palette.secondary) |
| + }.accessibilityElement(children: .combine) |
| + } |
| + Text("The roll-up and the activity line preview web features awaiting API support.") |
| + .font(.caption2).foregroundStyle(Palette.faint) |
| + }.padding(.horizontal, 20).padding(.vertical, 16) |
| } |
| .background(Palette.background) |
| - .safeAreaInset(edge: .bottom) { |
| + .safeAreaInset(edge: .bottom, spacing: 0) { |
| PhoneComposer(state: composerState) { message in |
| let files = message.attachments.map(\.name).joined(separator: ", ") |
| sent.append(message.text + (files.isEmpty ? "" : "\n" + files) + (message.waitingForUploads ? "\nUploading…" : message.queued ? "\nWaiting its turn" : "")) |
| @@ -152,32 +220,47 @@ struct PhoneConversation: View { |
| } |
| struct PhoneTasks: View { |
| let store: MockStore |
| + var loading = false |
| @State private var filter = "All projects" |
| var body: some View { |
| List { |
| - Section { |
| - Picker("Project", selection: $filter) { |
| - Text("All projects").tag("All projects") |
| - Text("Equipo").tag("Equipo") |
| - Text("Woodstar").tag("Woodstar") |
| - } |
| - } |
| - Section("Needs you") { |
| - ForEach(store.tasks.filter { $0.needs_you && (filter == "All projects" || store.project(for: $0) == filter) }) { task in |
| - NavigationLink(value: "task") { TaskRow(task: task, store: store) } |
| - } |
| + if loading { |
| + Section { |
| + ForEach(store.tasks) { task in TaskRow(task: task, store: store) } |
| + .redacted(reason: .placeholder).listRowBackground(Palette.surface) |
| + } header: { |
| + HStack(spacing: 8) { ProgressView().controlSize(.small); Text("Loading tasks") } |
| + }.accessibilityLabel("Loading tasks") |
| + } else { |
| + section("Needs you") { $0.needs_you } link: { _ in "task" } |
| + section("In progress") { !$0.needs_you && $0.state != "done" } link: { $0.id == "task-onboarding" ? "exploration" : "task:\($0.id)" } |
| + section("Finished") { $0.state == "done" } link: { _ in "research" } |
| } |
| - Section("In progress") { |
| - ForEach(store.tasks.filter { !$0.needs_you && $0.state != "done" && (filter == "All projects" || store.project(for: $0) == filter) }) { task in |
| - NavigationLink(value: task.id == "task-onboarding" ? "exploration" : "task:\(task.id)") { TaskRow(task: task, store: store) } |
| - } |
| + } |
| + .scrollContentBackground(.hidden).background(Palette.background) |
| + .navigationTitle("Tasks") |
| + .toolbar { |
| + ToolbarItem(placement: .topBarTrailing) { |
| + Menu { |
| + Picker("Project", selection: $filter) { |
| + Text("All projects").tag("All projects") |
| + ForEach(store.projects) { Text($0.name).tag($0.name) } |
| + } |
| + } label: { |
| + Image(systemName: filter == "All projects" ? "line.3.horizontal.decrease" : "line.3.horizontal.decrease.circle.fill") |
| + }.accessibilityLabel("Filter by project") |
| } |
| - Section("Finished") { |
| - ForEach(store.tasks.filter { $0.state == "done" && (filter == "All projects" || store.project(for: $0) == filter) }) { task in |
| - NavigationLink(value: "research") { TaskRow(task: task, store: store) } |
| + } |
| + } |
| + @ViewBuilder private func section(_ title: String, where include: @escaping (EquipoTask) -> Bool, link: @escaping (EquipoTask) -> String) -> some View { |
| + let tasks = store.tasks.filter { include($0) && (filter == "All projects" || store.project(for: $0) == filter) } |
| + if !tasks.isEmpty { |
| + Section(title) { |
| + ForEach(tasks) { task in |
| + NavigationLink(value: link(task)) { TaskRow(task: task, store: store) } |
| } |
| - } |
| - }.navigationTitle("Tasks") |
| + }.listRowBackground(Palette.surface) |
| + } |
| } |
| } |
| struct PhoneTask: View { |
| @@ -185,36 +268,82 @@ struct PhoneTask: View { |
| let task: EquipoTask |
| @State private var answer: String? |
| var body: some View { |
| + let status = TaskStatus(task) |
| ScrollView { |
| - VStack(alignment: .leading, spacing: 22) { |
| - Text(task.description).font(.title2.weight(.semibold)) |
| - Label("\(store.project(for: task)) · \(task.needs_you ? "Needs you" : task.state.capitalized)", systemImage: "folder").font(.subheadline).foregroundStyle(Palette.secondary) |
| - if task.needs_you { QuestionCard(question: store.question, answer: $answer) } |
| - Text("Steps").font(.headline) |
| - StepsView(task: task) |
| - NavigationLink(value: "copy-hold") { Text("Preview a Copy budget hold").frame(minHeight: 44, alignment: .leading).contentShape(Rectangle()) } |
| - |
| + VStack(alignment: .leading, spacing: 14) { |
| + VStack(alignment: .leading, spacing: 10) { |
| + Text(task.description).font(Typo.screenTitle).foregroundStyle(Palette.text) |
| + .fixedSize(horizontal: false, vertical: true) |
| + HStack(spacing: 10) { |
| + StatusPill(text: status.label, tone: status.tone, icon: status.icon) |
| + Label(store.project(for: task), systemImage: "folder").font(.subheadline).foregroundStyle(Palette.secondary) |
| + } |
| + }.padding(.bottom, 6) |
| + if task.needs_you { |
| + QuestionCard(question: store.question, category: store.askingCategory(for: store.question), answer: $answer) |
| + } |
| + SectionTitle(text: "Steps").padding(.top, 12) |
| + Panel { StepsView(task: task) } |
| + if let usage = task.usage { |
| + SectionTitle(text: "Used so far").padding(.top, 12) |
| + HStack(spacing: 10) { |
| + StatTile(label: "Calls", value: Int(usage.calls).formatted()) |
| + StatTile(label: "Tokens in", value: compact(usage.input_tokens)) |
| + StatTile(label: "Tokens out", value: compact(usage.output_tokens)) |
| + } |
| + } |
| + NavigationLink(value: "copy-hold") { |
| + HStack { |
| + Text("Preview a Copy budget hold") |
| + Spacer() |
| + Image(systemName: "chevron.right").imageScale(.small).foregroundStyle(Palette.faint) |
| + }.font(.subheadline).frame(minHeight: 44).contentShape(Rectangle()) |
| + }.padding(.top, 6) |
| }.padding(20) |
| }.background(Palette.background).navigationTitle("Task").navigationBarTitleDisplayMode(.inline) |
| } |
| } |
| struct PhoneNeeds: View { |
| let store: MockStore |
| + var empty = false |
| @State private var answer: String? |
| var body: some View { |
| - ScrollView { |
| - VStack(alignment: .leading, spacing: 24) { |
| - Text(answer == nil ? "One decision is waiting for you." : "You are caught up in this preview.") |
| - .font(.body).foregroundStyle(Palette.secondary) |
| - VStack(alignment: .leading, spacing: 10) { |
| - Text(store.tasks[0].description).font(.headline) |
| - Label("Equipo", systemImage: "folder").font(.subheadline).foregroundStyle(Palette.secondary) |
| + Group { |
| + if empty { |
| + ContentUnavailableView { |
| + Label("You’re all caught up", systemImage: "checkmark.circle") |
| + } description: { |
| + Text("When a specialist needs a decision, it appears here.") |
| + } actions: { |
| + NavigationLink(value: "tasks") { Text("See tasks in progress").frame(minHeight: 44) } |
| } |
| - QuestionCard(question: store.question, answer: $answer) |
| - NavigationLink(value: "task") { Label("Open task and steps", systemImage: "arrow.right").frame(minHeight: 44, alignment: .leading).contentShape(Rectangle()) } |
| - Divider() |
| - QuietLabel(text: "Work that is running or waiting for a runner stays in Tasks.") |
| - }.padding(20) |
| + .frame(maxWidth: .infinity, maxHeight: .infinity) |
| + } else { |
| + ScrollView { |
| + VStack(alignment: .leading, spacing: 14) { |
| + Text(answer == nil ? "One decision is waiting for you." : "You’re all caught up in this preview.") |
| + .font(.body).foregroundStyle(Palette.secondary) |
| + Panel(padding: 0, spacing: 0) { |
| + NavigationLink(value: "task") { |
| + HStack(spacing: 12) { |
| + VStack(alignment: .leading, spacing: 4) { |
| + Text(store.tasks[0].description).font(.headline).foregroundStyle(Palette.text) |
| + .multilineTextAlignment(.leading) |
| + HStack(spacing: 8) { |
| + StepProgress(task: store.tasks[0]) |
| + Text(store.project(for: store.tasks[0])).font(.footnote).foregroundStyle(Palette.secondary) |
| + } |
| + } |
| + Spacer(minLength: 8) |
| + Image(systemName: "chevron.right").imageScale(.small).foregroundStyle(Palette.faint) |
| + }.padding(Metric.cardPadding).frame(minHeight: 44).contentShape(Rectangle()) |
| + }.buttonStyle(.plain).accessibilityHint("Opens the task and its steps") |
| + } |
| + QuestionCard(question: store.question, category: store.askingCategory(for: store.question), answer: $answer) |
| + QuietLabel(text: "Work that is running or waiting for a runner stays in Tasks.").padding(.top, 6) |
| + }.padding(20) |
| + } |
| + } |
| }.background(Palette.background).navigationTitle("Needs you") |
| } |
| } |
diff --git a/native/mockups/iOS/PhoneComposer.swift b/native/mockups/iOS/PhoneComposer.swift| index 8fbff254..13f12a91 100644 |
| --- a/native/mockups/iOS/PhoneComposer.swift |
| +++ b/native/mockups/iOS/PhoneComposer.swift |
| @@ -23,7 +23,7 @@ struct PhoneComposer: View { |
| Button("Photo or image", systemImage: "photo") { add("preview.png") } |
| Button("File", systemImage: "doc") { add("invoice.pdf") } |
| } label: { |
| - Image(systemName: "plus").font(.system(size: 20)) |
| + Image(systemName: "plus").font(.system(size: 18, weight: .medium)) |
| .foregroundStyle(Palette.secondary) |
| .frame(width: 44, height: 44) |
| .background(Palette.surface, in: Circle()) |
| @@ -62,7 +62,7 @@ struct PhoneComposer: View { |
| Button { |
| if let message = draft.take() { onSend(message) } |
| } label: { |
| - Image(systemName: "arrow.up").font(.system(size: 18, weight: .semibold)) |
| + Image(systemName: "arrow.up").font(.system(size: 16, weight: .bold)) |
| .foregroundStyle(.white).frame(width: 32, height: 32) |
| .background(Palette.primaryFill, in: Circle()) |
| .frame(width: 44, height: 44).contentShape(Circle()) |
| @@ -72,7 +72,10 @@ struct PhoneComposer: View { |
| } |
| .background(Palette.surface, in: RoundedRectangle(cornerRadius: 22)) |
| .overlay(RoundedRectangle(cornerRadius: 22).stroke(Palette.controlBorder, lineWidth: 1)) |
| - }.padding(.horizontal, 16).padding(.vertical, 12).background(Palette.background) |
| + } |
| + .padding(.horizontal, 16).padding(.top, 10).padding(.bottom, 8) |
| + .background(.bar) |
| + .overlay(alignment: .top) { Hairline().opacity(0.6) } |
| } |
| private func add(_ name: String) { |
| guard draft.attachments.count < 5 else { return } |
diff --git a/native/mockups/scripts/generate-project.py b/native/mockups/scripts/generate-project.py| index 36f92967..dd21b7f6 100644 |
| --- a/native/mockups/scripts/generate-project.py |
| +++ b/native/mockups/scripts/generate-project.py |
| @@ -30,7 +30,7 @@ for name,folder,sdk in [('EquipoPhone','iOS','iphoneos'),('EquipoMac','Mac','mac |
| sources=add(name+'sources',isa='PBXSourcesBuildPhase',buildActionMask=2147483647,files=sourceids,runOnlyForDeploymentPostprocessing=0) |
| frameworks=add(name+'frameworks',isa='PBXFrameworksBuildPhase',buildActionMask=2147483647,files=[framework],runOnlyForDeploymentPostprocessing=0) |
| resources=add(name+'resources',isa='PBXResourcesBuildPhase',buildActionMask=2147483647,files=[],runOnlyForDeploymentPostprocessing=0) |
| - settings=dict(PRODUCT_NAME='$(TARGET_NAME)',PRODUCT_BUNDLE_IDENTIFIER='net.oficina.equipo.r4.'+folder.lower(),SWIFT_VERSION='5.0',GENERATE_INFOPLIST_FILE='YES',CODE_SIGNING_ALLOWED='NO',SDKROOT=sdk,MARKETING_VERSION='0.5',CURRENT_PROJECT_VERSION='5',INFOPLIST_KEY_CFBundleDisplayName='Equipo R5',ENABLE_USER_SCRIPT_SANDBOXING='YES') |
| + settings=dict(PRODUCT_NAME='$(TARGET_NAME)',PRODUCT_BUNDLE_IDENTIFIER='net.oficina.equipo.r4.'+folder.lower(),SWIFT_VERSION='5.0',GENERATE_INFOPLIST_FILE='YES',CODE_SIGNING_ALLOWED='NO',SDKROOT=sdk,MARKETING_VERSION='0.6',CURRENT_PROJECT_VERSION='6',INFOPLIST_KEY_CFBundleDisplayName='Equipo R6',ENABLE_USER_SCRIPT_SANDBOXING='YES') |
| if folder=='iOS':settings.update(IPHONEOS_DEPLOYMENT_TARGET='17.0',TARGETED_DEVICE_FAMILY='1',SUPPORTED_PLATFORMS='iphoneos iphonesimulator',INFOPLIST_KEY_UILaunchScreen_Generation='YES',INFOPLIST_KEY_UIApplicationSceneManifest_Generation='YES',INFOPLIST_KEY_UISupportedInterfaceOrientations='UIInterfaceOrientationPortrait') |
| else:settings.update(MACOSX_DEPLOYMENT_TARGET='14.0',SUPPORTED_PLATFORMS='macosx') |
| targets.append(add(name,isa='PBXNativeTarget',buildConfigurationList=configs(name,settings),buildPhases=[sources,frameworks,resources],buildRules=[],dependencies=[],name=name,productName=name,productReference=product,productType='com.apple.product-type.application',packageProductDependencies=[dep])) |
diff --git a/native/mockups/scripts/studio.sh b/native/mockups/scripts/studio.sh| index 7d149c84..bbd891c4 100755 |
| --- a/native/mockups/scripts/studio.sh |
| +++ b/native/mockups/scripts/studio.sh |
| @@ -1,8 +1,8 @@ |
| #!/bin/bash |
| set -euo pipefail |
| cd "$(dirname "$0")/.." |
| -if [ "$PWD" != "$HOME/.cache/equipo-native-r4/build" ]; then |
| - echo 'Run only inside ~/.cache/equipo-native-r4/build on the Studio.' >&2 |
| +if [ "$PWD" != "$HOME/.cache/equipo-native-r6/build" ]; then |
| + echo 'Run only inside ~/.cache/equipo-native-r6/build on the Studio.' >&2 |
| exit 1 |
| fi |
| sim='' |
| @@ -31,18 +31,18 @@ controls = json.load(open('Captures/mac-control-measurements.json')) |
| assert all(v['height'] >= 32 for v in controls.values()), controls |
| assert abs(controls['VAT']['width'] - controls['Sales tax']['width']) < 1, controls |
| PYTEST |
| -if simctl list devices -j | python3 -c 'import json,sys; sys.exit(0 if any(d["name"]=="equipo-r4" for ds in json.load(sys.stdin)["devices"].values() for d in ds) else 1)'; then |
| - echo 'An equipo-r4 simulator already exists; leave it untouched.' >&2 |
| +if simctl list devices -j | python3 -c 'import json,sys; sys.exit(0 if any(d["name"]=="equipo-r6" for ds in json.load(sys.stdin)["devices"].values() for d in ds) else 1)'; then |
| + echo 'An equipo-r6 simulator already exists; leave it untouched.' >&2 |
| exit 1 |
| fi |
| -sim=$(simctl create equipo-r4 com.apple.CoreSimulator.SimDeviceType.iPhone-17 com.apple.CoreSimulator.SimRuntime.iOS-27-2) |
| +sim=$(simctl create equipo-r6 com.apple.CoreSimulator.SimDeviceType.iPhone-17 com.apple.CoreSimulator.SimRuntime.iOS-27-2) |
| simctl boot "$sim" |
| simctl bootstatus "$sim" -b > simulator-boot.log 2>&1 |
| simctl status_bar "$sim" override --time '9:41' --dataNetwork wifi --wifiMode active --wifiBars 3 --batteryState charged --batteryLevel 100 |
| simctl install "$sim" DerivedData/Phone/Build/Products/Debug-iphonesimulator/EquipoPhone.app |
| for theme in light dark; do |
| simctl ui "$sim" appearance "$theme" |
| - for screen in teams team conversation conversation-draft conversation-attachment conversation-uploading conversation-error tasks task needs connections notification-compact notification notification-answered exploration research usage-concept contra copy-hold; do |
| + for screen in teams team conversation conversation-draft conversation-attachment conversation-uploading conversation-error tasks task needs connections notification-compact notification notification-answered exploration research usage-concept contra copy-hold needs-empty tasks-loading conversation-offline control-states onboarding-welcome onboarding-pair onboarding-paired onboarding-model onboarding-project onboarding-message; do |
| simctl terminate "$sim" net.oficina.equipo.r4.ios >/dev/null 2>&1 || true |
| simctl launch "$sim" net.oficina.equipo.r4.ios --screen "$screen" --theme "$theme" >/dev/null |
| sleep 3 |