oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1# Native composer polish
2
3Branch: `native/composer`, based on main `c74fd0ac`.
4
5## Reference and changes
6
7Read Base's `origin/main:native/apple/Sources/BaseKit/Ask/Composer.swift`
8and `origin/main:native/apple/Sources/BaseKit/Phone/PhoneAskScreen.swift`
9with `git show`. The composer uses the screen background, a tinted field
10with a 10-point corner and a focus edge in Equipo's accent. No new copy.
11
12Conversation, task detail (including its thread), and Needs you (which can
13contain a reply field) dismiss the keyboard interactively. The attachment
14menu is a separate round 44-point target to the field's left, with thumbnails
15above. Photos continues to present from the picker owner outside the Menu.
16Mac keeps paste and drop and adds a file panel via the same round add button.
17
18## Verification
19
20Test-first: `swift test --package-path native/apple --filter ComposerPolishTests`
21failed on the original production code: three missing scroll-dismissal
22modifiers and no separate Mac attachment button. There is no ViewInspector
23in this package; source contracts follow ProjectsReviewTests. Actual phone
24dragging, menu and Photos presentation are exercised by AttachmentSourceUITests.
25
26Results, mutation commands, screenshot manifest and final gates follow below.
27
28Mutation command for each: `swift test --package-path native/apple --filter ComposerPolishTests`.
29All six compiled and were killed by assertions, then restored:
30
311. Conversation `.interactively` replaced with `.never`.
322. Task detail `.interactively` replaced with `.never`.
333. Needs you `.interactively` replaced with `.never`.
344. Mac attachment button moved inside the field view.
355. Mac attachment target reduced from 44 to 32 points.
366. Mac field's 52-point attachment offset removed (overlap).
37
38Simulator baseline: `xcodebuild -project native/ios/EquipoPhone.xcodeproj
39-scheme AttachmentSources -configuration Debug -destination
40'platform=iOS Simulator,id=9B363AD0-4B74-46BD-AEEC-24241419BF65'
41-derivedDataPath native/build/Phone -resultBundlePath "$TMPDIR/composer-before-fixed.xcresult"
42CODE_SIGNING_ALLOWED=NO test`.
43The original production code failed `testConversationDragDismissesKeyboard`
44at the keyboard-disappeared assertion; the appearance and Photos-menu tests
45passed. The fixture uses production ConversationScreen with a fake transport.
46An initial harness attempt used `textViews`; the current simulator exposes
47SwiftUI's vertical field as `textFields`, so the query was corrected before
48collecting the baseline. No production workaround was needed.
49
50The definitive simulator regression uses a swipe beginning on a rendered
51message. It passed with interactive dismissal, and replacing it with `.never`
52failed at the keyboard-disappeared assertion (`composer-ui-mutation.xcresult`).
53This is the seventh killed mutation, in addition to the six native checks.
54The modifier lives on the containing screen, as in Base, covering the scroll
55and the composer in its bottom inset. The test also verifies the typed draft
56survives dismissal.
57
58An isolated AppKit probe clicked the real add button, observed its file panel,
59and cancelled without changing the draft. Presenting a modal panel in the
60concurrent full test process caused an early clean process exit, so the gate
61tests the production panel factory without presenting it: files allowed,
62directories excluded and multiple selection allowed. The existing paste/drop
63tests also run in the native gate.
64
65The extra empty-padding gesture initially queried `app.scrollViews.firstMatch`,
66which is ambiguous while the keyboard's prediction scroller is present. A
67stable `conversation-scroll` identifier fixes that test target. Both the message
68swipe and padding swipe pass (`composer-scroller-id.xcresult`); no gesture
69workaround or content-shape change is shipped. Temporary runtime diagnostics
70confirmed the UIKit scroller had interactive dismissal and vertical bouncing,
71and were removed.
72
73Three further panel mutations also compiled and failed assertions using the
74same filtered test command: files disabled, folders enabled, and multiple
75selection disabled. All ten mutations were restored; the filtered suite
76passes again.
77
78Final native gate: `native/scripts/check-native.sh` passed: 346 tests in 46
79suites (one existing known issue), 330 parity strings, schema/markdown checks,
80reference scan, Mac build and iPhone Simulator build. No server changes.
81
82Screenshots are under `site/build/composer/` in the daily-driver audit:
83`iphone-{before,after}-{light,dark}-keyboard-{up,down}.png`,
84`mac-{before,after}-{light,dark}.png`, and menu/Photos-picker captures.
85They are actual simulator/AppKit captures from production views with the
86existing attachment fake server. No new strings or copy questions.
87
88Final simulator command is the same AttachmentSources invocation above with
89`-resultBundlePath "$TMPDIR/composer-final.xcresult"`. All three UI tests passed:
90light/dark captures, message and padding dismissal with draft preservation,
91and the 44-point attachment menu opening the private Photos picker.
92