oficina / equipo Public

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

Plain git — no account needed to clone.

Download

Download this file

Native composer polish

Branch: native/composer, based on main c74fd0ac.

Reference and changes

Read Base's origin/main:native/apple/Sources/BaseKit/Ask/Composer.swift and origin/main:native/apple/Sources/BaseKit/Phone/PhoneAskScreen.swift with git show. The composer uses the screen background, a tinted field with a 10-point corner and a focus edge in Equipo's accent. No new copy.

Conversation, task detail (including its thread), and Needs you (which can contain a reply field) dismiss the keyboard interactively. The attachment menu is a separate round 44-point target to the field's left, with thumbnails above. Photos continues to present from the picker owner outside the Menu. Mac keeps paste and drop and adds a file panel via the same round add button.

Verification

Test-first: swift test --package-path native/apple --filter ComposerPolishTests failed on the original production code: three missing scroll-dismissal modifiers and no separate Mac attachment button. There is no ViewInspector in this package; source contracts follow ProjectsReviewTests. Actual phone dragging, menu and Photos presentation are exercised by AttachmentSourceUITests.

Results, mutation commands, screenshot manifest and final gates follow below.

Mutation command for each: swift test --package-path native/apple --filter ComposerPolishTests. All six compiled and were killed by assertions, then restored:

  1. Conversation .interactively replaced with .never.
  2. Task detail .interactively replaced with .never.
  3. Needs you .interactively replaced with .never.
  4. Mac attachment button moved inside the field view.
  5. Mac attachment target reduced from 44 to 32 points.
  6. Mac field's 52-point attachment offset removed (overlap).

Simulator baseline: xcodebuild -project native/ios/EquipoPhone.xcodeproj -scheme AttachmentSources -configuration Debug -destination 'platform=iOS Simulator,id=9B363AD0-4B74-46BD-AEEC-24241419BF65' -derivedDataPath native/build/Phone -resultBundlePath "$TMPDIR/composer-before-fixed.xcresult" CODE_SIGNING_ALLOWED=NO test. The original production code failed testConversationDragDismissesKeyboard at the keyboard-disappeared assertion; the appearance and Photos-menu tests passed. The fixture uses production ConversationScreen with a fake transport. An initial harness attempt used textViews; the current simulator exposes SwiftUI's vertical field as textFields, so the query was corrected before collecting the baseline. No production workaround was needed.

The definitive simulator regression uses a swipe beginning on a rendered message. It passed with interactive dismissal, and replacing it with .never failed at the keyboard-disappeared assertion (composer-ui-mutation.xcresult). This is the seventh killed mutation, in addition to the six native checks. The modifier lives on the containing screen, as in Base, covering the scroll and the composer in its bottom inset. The test also verifies the typed draft survives dismissal.

An isolated AppKit probe clicked the real add button, observed its file panel, and cancelled without changing the draft. Presenting a modal panel in the concurrent full test process caused an early clean process exit, so the gate tests the production panel factory without presenting it: files allowed, directories excluded and multiple selection allowed. The existing paste/drop tests also run in the native gate.

The extra empty-padding gesture initially queried app.scrollViews.firstMatch, which is ambiguous while the keyboard's prediction scroller is present. A stable conversation-scroll identifier fixes that test target. Both the message swipe and padding swipe pass (composer-scroller-id.xcresult); no gesture workaround or content-shape change is shipped. Temporary runtime diagnostics confirmed the UIKit scroller had interactive dismissal and vertical bouncing, and were removed.

Three further panel mutations also compiled and failed assertions using the same filtered test command: files disabled, folders enabled, and multiple selection disabled. All ten mutations were restored; the filtered suite passes again.

Final native gate: native/scripts/check-native.sh passed: 346 tests in 46 suites (one existing known issue), 330 parity strings, schema/markdown checks, reference scan, Mac build and iPhone Simulator build. No server changes.

Screenshots are under site/build/composer/ in the daily-driver audit: iphone-{before,after}-{light,dark}-keyboard-{up,down}.png, mac-{before,after}-{light,dark}.png, and menu/Photos-picker captures. They are actual simulator/AppKit captures from production views with the existing attachment fake server. No new strings or copy questions.

Final simulator command is the same AttachmentSources invocation above with -resultBundlePath "$TMPDIR/composer-final.xcresult". All three UI tests passed: light/dark captures, message and padding dismissal with draft preservation, and the 44-point attachment menu opening the private Photos picker.