Root-caused directory-picker's directory-row-frontend failure: all four
in-app @gorhom/bottom-sheet sheets (DirectoryBrowserSheet, DirectorySwitcher,
ModelPicker, VariantPicker) provide static percentage snapPoints but rely on
v5's enableDynamicSizing default (true), which never resolves without content
wrapped in a size-reporting component — so useAnimatedDetents() permanently
early-exits and the sheets can never actually open. Set
enableDynamicSizing={false} on all four (they already have explicit
snapPoints, so dynamic sizing was never needed).
variant-picker's chip failure was a stale test assumption: src/lib/
model-selection.ts's chooseModelSelection() deliberately returns null for a
fresh session (issue #37/#35 — the provider registry default is unreliable),
so a brand-new session has no model selected and the reasoning-effort chip
has nothing to key off of. Added testIDs (model-chip, model-option-*) and
updated the flow to explicitly pick a model first, matching real usage.
diff-scroll's missing markdown text: switched src/components/markdown/
Markdown.tsx from react-native-marked's FlatList-based default export to its
useMarkdown() hook rendered into a plain View. The chat screen already nests
this inside its own *inverted* FlatList (one row per message) — a nested
VirtualizedList inside an inverted outer list is a known RN footgun where the
inner content can render at zero height instead of just warning. We already
forced scrollEnabled:false + a large initialNumToRender, defeating
virtualization anyway, so rendering the parsed blocks directly loses nothing.
Extended the existing react-native-marked .d.ts shim (added for a React
18/19 ReactNode mismatch) to also declare useMarkdown/useMarkdownHookOptions.
Added diagnostic screenshots to directory-picker.yaml and diff-scroll.yaml
at the previously-failing steps for faster triage if these regress again.
Closes #104.
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
123 lines
4.0 KiB
YAML
123 lines
4.0 KiB
YAML
appId: cc.agentlabs.opencode
|
|
name: Variant picker - reasoning-effort chip renders, selects, and still sends
|
|
---
|
|
# New-feature regression coverage for VariantPicker
|
|
# (src/components/chat/VariantPicker.tsx): the reasoning-effort chip only
|
|
# renders when the selected model's provider entry carries `variants`
|
|
# (src/stores/catalog.ts / GET /provider), selecting an option updates the
|
|
# chip label, and sending a message afterwards still works end-to-end
|
|
# (variant flows into sendMessage -> client.session.prompt's `variant` field
|
|
# — see src/stores/sessions.ts sendMessage).
|
|
#
|
|
# The CI job starts `node tests/fixtures/mock-opencode-server.ts --port 4099`
|
|
# on the runner host BEFORE this flow runs (same fresh, non-seeded normal-mode
|
|
# server used by directory-picker.yaml — GET /provider's mock-model carries
|
|
# low/medium/high variants; see tests/fixtures/mock-opencode-server.ts).
|
|
#
|
|
# A brand-new session has NO explicit model selection: src/lib/model-selection.ts
|
|
# chooseModelSelection() deliberately returns null until the user picks one
|
|
# (issue #37/#35 — the provider registry's "default" model is unreliable), so
|
|
# app/session/[id].tsx's currentModelVariants is undefined and the chip does
|
|
# NOT render on session open. This flow explicitly opens the model picker and
|
|
# selects the mock provider's model first, which is what actually makes
|
|
# variants available — matching how a real user reaches this chip.
|
|
|
|
- launchApp:
|
|
clearState: true
|
|
- assertVisible:
|
|
id: "telemetry-consent-card"
|
|
- tapOn:
|
|
id: "telemetry-decline-button"
|
|
|
|
- assertVisible:
|
|
text: "No Connection"
|
|
- tapOn:
|
|
id: "add-connection-button"
|
|
- tapOn:
|
|
id: "connect-ip-input"
|
|
- inputText: "127.0.0.1:4099"
|
|
- hideKeyboard
|
|
- tapOn:
|
|
id: "connect-submit-button"
|
|
|
|
# 40s margin: see activation-positive.yaml — the connect handshake's own
|
|
# fetches are individually capped at 30s (src/lib/sdk.ts REQUEST_TIMEOUT_MS).
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: "connection-status-dot"
|
|
timeout: 40000
|
|
- takeScreenshot: variant-S1_connected
|
|
|
|
- tapOn:
|
|
id: "new-session-fab"
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: "chat-message-input"
|
|
timeout: 15000
|
|
|
|
# Explicitly pick the mock provider's model — a fresh session has no model
|
|
# selection yet (see comment above), so the variant chip has nothing to key
|
|
# off of until this happens.
|
|
- tapOn:
|
|
id: "model-chip"
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: "model-option-mock-mock-model"
|
|
timeout: 10000
|
|
- tapOn:
|
|
id: "model-option-mock-mock-model"
|
|
|
|
# The chip only appears once catalog.load() (triggered on connect, see
|
|
# app/_layout.tsx) has resolved GET /provider and found variants for the
|
|
# selected model — wait rather than assert immediately.
|
|
- extendedWaitUntil:
|
|
visible:
|
|
id: "variant-chip"
|
|
timeout: 15000
|
|
- assertVisible:
|
|
text: "Auto"
|
|
- takeScreenshot: variant-S2_chip_default_auto
|
|
|
|
- tapOn:
|
|
id: "variant-chip"
|
|
- assertVisible:
|
|
text: "Reasoning Effort"
|
|
- assertVisible:
|
|
id: "variant-option-low"
|
|
- assertVisible:
|
|
id: "variant-option-medium"
|
|
- assertVisible:
|
|
id: "variant-option-high"
|
|
- takeScreenshot: variant-S3_picker_options
|
|
|
|
- tapOn:
|
|
id: "variant-option-high"
|
|
# Sheet closes and the chip label reflects the new selection.
|
|
- assertVisible:
|
|
text: "High"
|
|
- takeScreenshot: variant-S4_chip_shows_high
|
|
|
|
# Sending a message must still work with a variant selected (regression: the
|
|
# variant chip must not break the send path).
|
|
- tapOn:
|
|
id: "chat-message-input"
|
|
- inputText: "Message with reasoning effort set to high"
|
|
- hideKeyboard
|
|
- takeScreenshot: variant-S5_message_typed
|
|
- tapOn:
|
|
id: "chat-send-button"
|
|
|
|
- extendedWaitUntil:
|
|
visible:
|
|
text: "Hello from the mock opencode server"
|
|
timeout: 20000
|
|
- assertVisible:
|
|
id: "chat-bubble-assistant"
|
|
- assertVisible:
|
|
text: "Message with reasoning effort set to high"
|
|
# The chip must still read "High" after the round trip (selection persists
|
|
# across a send, it isn't reset by the reply landing).
|
|
- assertVisible:
|
|
text: "High"
|
|
- takeScreenshot: variant-S6_reply_received_variant_still_high
|