Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/parity/composer.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Status values: `todo`, `partial: <what is missing>`, `done`, `n/a: <reason and w
| `OpenCode/Composer/ModelPicker/OnePickerIntegrityMonitor.swift` | 386 | | n/a: `#if DEBUG` UIKit view-hierarchy scanner for `-lab-glass-trace`; no Android counterpart | New (218348b5): split out of OnePickerController; holds `OnePickerIntegrityMonitor`, which Android never ported (see `modelpicker/OnePickerController.kt`'s KDoc), so there is no `OnePickerIntegrityMonitor.kt`. |
| `OpenCode/Composer/ModelPicker/OnePickerListView.swift` | 935 | `modelpicker/OnePickerListView.kt` | done | `OnePickerRowItem` (`diffID`, `accessibilityValue`), `OnePickerSectionSnapshot`, `OnePickerScrollEdges`, `OnePickerFooterSnapshot`, `OnePickerListActions` (refreshed every composition). UITableView → sectioned `LazyColumn` with animated item placement (none while searching): section headers (footnote semibold, 22 dp spine, `model-section-…`), rows (provider mark 20, short name body / semibold current, provider subtitle when the section mixes providers or names repeat, favourite star badge outside Favourites, pressed/current highlight with the high-contrast border), the level button (≥ 48 dp, `DropdownMenu` of levels highest first with arcs and a check, Higher/Lower custom actions), tap picks, 0.35 s long press toggles the favourite with the 0.98 bounce, Favorite/Unfavorite swipe both ways (`FavoriteSwipeBox`), the Show All/Show Fewer footer with “N hidden”. `OnePickerPullDown` (nested scroll): a pull starting at the top anchors at 0 and drives the sheet drag, ends on release, settles at (0, 0) once on cancel; a new `openGeneration` scrolls to the top. Edge overflow reported through `snapshotFlow`. Android divergence: a ripple in the row's rounded inset answers the press (iOS tints it). Sync 01eef583 (258a9424): a held row releases on `Motion.press`'s exit. |
| `OpenCode/Composer/ModelPicker/OnePickerSimulation.swift` | 678 | `modelpicker/OnePickerSimulation.kt` | done | New (9594471b, e0ade6f4, c5fb498b). `OnePickerCatalog` (`sections`: Favorites, frozen Recent with the current model on top, providers in server order unless curated; search ranks with `ModelSearch.rank` and parses level words; `parsedSearchLevel`) and `OnePickerSimulation` (closed/armed/open/closing phases, `Metrics`, `FramePose`; top/bottom/side/reveal/reduce-fade `SpringSolver`s; arm/launchOpen/updateKeyboardTop/retargetClose/setDetent, rubber-banded drag with `DragOutcome`, `pinClosingToComposer` with the 3-frame rest and 12-frame hold after a retarget, `drawnFrame` on the 1/64 grid). Pure model, same constants. Sync 01eef583 (258a9424): the rubber band through `MotionRubberBand(36, 0.3)`. |
| `OpenCode/Composer/ModelPicker/OnePickerSurface.swift` | 1044 | `modelpicker/OnePickerSurface.kt` | done | `OnePickerGlassBackdrop` (the pose's rounded rect in the composer's `surfaceContainerHigh` with its 3 dp shadow, at `glassOpacity`; Liquid Glass → M3 surface, no blur, as `backdropDim`/`Blur` are 0), `OnePickerSurface` (frame driver, window space/viewport sync, resting bottom composer, keyboard via `imeAnimationTarget` → `handleKeyboardFrameChange`, tap-catcher), `OnePickerPanelPlacement`/`OnePickerPanelMorph` (scaleX layout, clip to the visible height above the live composer, reveal, hit testing only when open), `OnePickerSheetHost` (fallback controller in a `ModelPickerDetentsSheet` when the composer is covered), the catalogue cache (`OnePickerCatalogKey`; iOS's `modelsRevision` → the models list itself, compared by identity first) and `onePickerSnapshotSections`, `OnePickerPanelContent` (grabber 36×5 with tap/drag/adjust semantics, list with edge fades and the curtain, spinner, `ModelListEmptyState`, `model-list`, threshold haptic, Escape closes), `OnePickerSearchBar` (`Search Models`, submit via `ModelSearch.resolvePick`, Clear / Hide Keyboard, its own drag). n/a: the DEBUG probes (`WindowSpaceProbe`, `OnePickerComposerProbe`, `OnePickerGlassProbe`, `OnePickerChipProbe`), Dynamic Type cap → font scale cap as the Fused panel. Sync 71e84d71 (4fa1d99e): n/a, SwiftUI body-skipping (equatable panel, callback box) for iOS 26 redraws; Compose skips the panel through stable parameters already. Sync 03adf07a (d0b24aaa, bb4e47f7, 25174297, 8aad7be1): `OnePickerCatalogCache` (`Key(state, recents, frozen)`, `matchesIgnoringFrozen`, `shownSections`, `catalog(key, build)` keeps the built value when only the freeze changed to what it already shows, `build(key, state)`) replaces the panel's private catalogue; `OnePickerCatalogPrewarm` builds it 0.5 s after the list shuts (a `LaunchedEffect` delay stands in for the run-loop timer); the surface builds `OnePickerPanelContent` outside `OnePickerPanelPlacement`, which only reads the per-frame pose, and the panel reads its morph through a lambda inside `BoxWithConstraints`, so a morph frame doesn't rebuild the list. `OnePickerSheetHost` is the only sheet (the plain picker is gone). Sync 01eef583 (258a9424): the keyboard ride's duration from `Motion.keyboard`.Android divergence (QA F-59): the grabber's hint is TalkBack's click label, read “Double-tap to …”, so it's a verb phrase (“Make the picker compact” / “Expand the picker”). |
| `OpenCode/Composer/ModelPicker/OnePickerSurface.swift` | 1044 | `modelpicker/OnePickerSurface.kt` | done | `OnePickerGlassBackdrop` (the pose's rounded rect in the composer's `surfaceContainerHigh` with its 3 dp shadow, at `glassOpacity`; Liquid Glass → M3 surface, no blur, as `backdropDim`/`Blur` are 0), `OnePickerSurface` (frame driver, window space/viewport sync, resting bottom composer, keyboard via `imeAnimationTarget` → `handleKeyboardFrameChange`, tap-catcher), `OnePickerPanelPlacement`/`OnePickerPanelMorph` (scaleX layout, clip to the visible height above the live composer, reveal, hit testing only when open), `OnePickerSheetHost` (fallback controller in a `ModelPickerDetentsSheet` when the composer is covered), the catalogue cache (`OnePickerCatalogKey`; iOS's `modelsRevision` → the models list itself, compared by identity first) and `onePickerSnapshotSections`, `OnePickerPanelContent` (grabber 36×5 with tap/drag/adjust semantics, list with edge fades and the curtain, spinner, `ModelListEmptyState`, `model-list`, threshold haptic, Escape closes), `OnePickerSearchBar` (`Search Models`, submit via `ModelSearch.resolvePick`, Clear / Hide Keyboard, its own drag). Android differs on purpose: the session box is full-screen, so `OnePickerSurface`'s viewport ends above the navigation bar and the panel's floor (and its Search Models bar) rests above it, as the composer does. n/a: the DEBUG probes (`WindowSpaceProbe`, `OnePickerComposerProbe`, `OnePickerGlassProbe`, `OnePickerChipProbe`), Dynamic Type cap → font scale cap as the Fused panel. Sync 71e84d71 (4fa1d99e): n/a, SwiftUI body-skipping (equatable panel, callback box) for iOS 26 redraws; Compose skips the panel through stable parameters already. Sync 03adf07a (d0b24aaa, bb4e47f7, 25174297, 8aad7be1): `OnePickerCatalogCache` (`Key(state, recents, frozen)`, `matchesIgnoringFrozen`, `shownSections`, `catalog(key, build)` keeps the built value when only the freeze changed to what it already shows, `build(key, state)`) replaces the panel's private catalogue; `OnePickerCatalogPrewarm` builds it 0.5 s after the list shuts (a `LaunchedEffect` delay stands in for the run-loop timer); the surface builds `OnePickerPanelContent` outside `OnePickerPanelPlacement`, which only reads the per-frame pose, and the panel reads its morph through a lambda inside `BoxWithConstraints`, so a morph frame doesn't rebuild the list. `OnePickerSheetHost` is the only sheet (the plain picker is gone). Sync 01eef583 (258a9424): the keyboard ride's duration from `Motion.keyboard`.Android divergence (QA F-59): the grabber's hint is TalkBack's click label, read “Double-tap to …”, so it's a verb phrase (“Make the picker compact” / “Expand the picker”). |
| `OpenCode/Composer/ModelPicker/OnePickerTunables.swift` | 355 | `modelpicker/OnePickerTunables.kt` | done | New. `OnePickerTunables` at the shipped defaults (geometry, row height, recents, drag/throw closes, chip/row display switches); the Tuning Panel registration and presets are n/a (Android tuning is `:devtools`). `OnePickerProviderMark` (`resolvedAssetName` with the vendor aliases and `console-` prefix against `BrandAssets.exists`, `fallbackInitial`, the filled monogram with its initial knocked out) and `AnimatedLevelArc` (on the existing `LevelArc`). Sync 01eef583 (258a9424): the springs dropped (roles own them); `OnePickerTiming.widthDuration` = `panelOpen` / `widthLead`; the level arc on `microIn`. |
| `OpenCode/Composer/OneShotRequestGate.swift` | 86 | — | n/a | Android divergence: no gate. It served the photo library, which Android no longer has; map snapshots are cancellable OkHttp calls and need no bridge. |
| `OpenCode/Composer/PastedText.swift` | 180 | `:server` `model/Composer.kt` (`PastedText`, `PastedTextSummary`) | done | Everything but the DEBUG `PastedTextSummary.Tally` test counter (n/a: test scaffolding) is the wire half already in `:server`; no composer file needed. `isLong` counts code points where iOS counts grapheme clusters (only differs for combined emoji at the 1,000 limit). |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.ime
import androidx.compose.foundation.layout.imeAnimationTarget
import androidx.compose.foundation.layout.navigationBars
import androidx.compose.foundation.layout.offset
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.requiredHeight
Expand Down Expand Up @@ -211,7 +212,10 @@ fun OnePickerSurface(
)
},
) {
val viewport = Rect(0f, 0f, maxWidth.value, maxHeight.value)
// The overlay is the full-screen session box; the panel's floor belongs above the
// navigation bar, as the composer's does.
val navigationBottom = WindowInsets.navigationBars.getBottom(density) / density.density
val viewport = Rect(0f, 0f, maxWidth.value, max(0f, maxHeight.value - navigationBottom))
LaunchedEffect(viewport, ceiling) {
controller.latestViewportInSpace = viewport
controller.syncViewport(viewport, ceiling, liveComposer)
Expand Down
Loading