Files
orca/mobile/src/components/MobileEdgeFade.tsx
Brennan Benson de0c5c1a24 Show agent message cards in phone chats (#36162)
* Show agent message cards in phone chats

* test: type the phone markdown mock with its component props

* Fix phone agent message cards and sender navigation

* Open native chats on the phone in place

* Preserve desktop host and agent when opening chats

* Separate phone cards from shared chat opening foundation

* Show phone agent cards through shared sender opening

* Preserve chat opening and captured lifecycle contracts

* test: cover sender focus and unconfirmed chat close outcomes

* test: exercise structured worker CLI lifecycle through runtime socket

* test: use checked parked mail observation in CLI integration

* test: validate provider notification correlation identities

* test: construct checked lifecycle and navigation fixtures

* Keep cross-program session proofs in their test program

* Localize mobile chat opening feedback and complete runtime contracts

* Use the mocked text component identity in History feedback proof

* Temporarily expose grown E2E type diagnostics

* Keep E2E timer and fetch fixtures in their runtime domains

* Reconcile decreased E2E wait pattern counts

* Preserve live test clocks and expose remaining type diagnostics

* Keep mobile session data types independent of native views

* Complete structured session wire surface fixtures

* Expose existing grown E2E type diagnostics temporarily

* Preserve checked wire fixture tab mock signatures

* Preserve worker redrive when automatic close is refused

* Honor automatic close admission before settlement and retirement

* test: retain History reveal and close publication race

* Match automation reveal callback to activation result

* Align CLI integration fixture with current settings and output

* Prevent retained chats from reopening removed workspaces

* Import notification types directly from their owner

* Unify local removal fences for accepted worktree aliases

* Keep cross-surface authority tests in the combined test project

* Initialize coordinator mail test workspace ownership

* Register the retained automation chat test workspace

* Use checked inputs in worker start failure test

* Preserve the automation test repository host literal

* Open phone card senders through shared caller navigation

* Carry the phone sender deadline through shared admission

* Finish empty phone card measurement and consumer coverage

* test(mobile): target native hosts in image-only card regression

* fix(mobile): fade folded agent message edges
2026-10-31 19:31:38 -07:00

37 lines
1.2 KiB
TypeScript

import { useId } from 'react'
import { StyleSheet, View } from 'react-native'
import Svg, { Defs, LinearGradient, Rect, Stop } from 'react-native-svg'
import { colors, spacing } from '../theme/mobile-theme'
import { useMobileColorScheme } from '../theme/use-mobile-color-scheme'
export function MobileEdgeFade({
edge,
height = spacing.lg
}: {
edge: 'top' | 'bottom'
height?: number
}): React.JSX.Element {
useMobileColorScheme()
const id = `edge-fade-${useId().replace(/[^a-zA-Z0-9_-]/g, '')}`
const top = edge === 'top'
return (
<View pointerEvents="none" style={[styles.fade, top ? styles.top : styles.bottom, { height }]}>
<Svg width="100%" height="100%">
<Defs>
<LinearGradient id={id} x1="0" y1="0" x2="0" y2="1">
<Stop offset="0" stopColor={colors.bgPanel} stopOpacity={top ? 1 : 0} />
<Stop offset="1" stopColor={colors.bgPanel} stopOpacity={top ? 0 : 1} />
</LinearGradient>
</Defs>
<Rect width="100%" height="100%" fill={`url(#${id})`} />
</Svg>
</View>
)
}
const styles = StyleSheet.create({
fade: { position: 'absolute', left: 0, right: 0 },
top: { top: 0 },
bottom: { bottom: 0 }
})