Repository navigation
#900 Session Chat: floating pill component - #908
Conversation
There was a problem hiding this comment.
Automated review: 2 finding(s) that 2+ of 3 passes agreed on.
Outside the diff lines:
ios/OpenCode Mobile/OpenCode Mobile/Components/Chrome/OpenCodeFloatingPill.swift:252low: Pulsing dot never starts pulsing if Reduce Motion is turned off while the pill is on screen
2 finding(s) from a single pass, not posted
AGENTS.md:195medium: Evidence workflow now relies on gh file upload that the documented command never invokes (deepseek-v4.1-flash)android/app/src/main/java/dev/opencode/mobile/ui/components/chrome/OpenCodeFloatingPill.kt:232low: Closable pill's dismiss button has a 28x36dp touch target (deepseek-v4.1-flash)
opencode pr-review · passes: muse-spark-1.3-contributor, glm-5.3-flash, deepseek-v4.1-flash · $0.076
ivanfenenko
left a comment
There was a problem hiding this comment.
Review of the floating pill base (#900) against the issue and the follow-ups #903–#906.
What's good: both platforms have the same four layouts and five states. Layout and state map to the drawn content through matching pure functions, and both test suites check the same rules. The pill matches the btw pill's height (36), 14/8 padding, button/labelLarge type, 16 pt icons and chrome (iOS reuses openCodeFloatingPillChrome, so it gets Liquid Glass on iOS 26). Colours come from tokens only, with no raw colour, type or radius overrides. Reduce Motion / Remove animations is handled for both the spinner and the dot on both platforms. I checked the gallery screenshots in the evidence comment: nothing private shows (status bars show only the time), and the code and tests use placeholder data only.
Tests: I re-ran OpenCodeFloatingPillStyleTests (iOS) and OpenCodeFloatingPillTest (Android) locally. Both pass: 6/6 on iOS (iPhone 17 simulator, iOS 26.5) and 6/6 on Android (JVM unit tests).
Findings: two should-fix API gaps, each with an inline comment on both platforms. Both are additive to fix now, but harder to retrofit once #903 and #904 build on this:
- The spoken label can't be overridden for layouts that show a label. Branch, ↓ / "3 new", todos and the migrated btw pill would be read badly.
- There is no compact (mark-only) presentation for counter and closable pills, which #903's keyboard-up collapse needs. There is also no plain label-only layout for
+N.
Plus two nits (updatesFrequently / live-region parity, Android ✕ hit target).
Housekeeping nit: the branch still includes the unmerged copy of "Attach PR evidence with gh instead of evidence branches", so the GitHub diff shows AGENTS.md, two skills and the deleted scripts/publish-evidence.sh. The content matches main (#896), so the merge is harmless. Rebasing onto main would leave only the pill files in the diff.
One Session Chat pill on iOS and Android in four layouts (icon + label, round icon only, live counter, label with close) and five states (live, ready, needs attention, error, done), on the btw pill's height, type and chrome. Gallery entries show every layout in every state. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… pill Review follow-ups on both platforms: - Optional accessibilityLabel on the pill replaces the "label, state" speech and feeds the close button's label. - compact keeps the leading mark (icon, spinner, dot or check; a state dot when there is none), hides text and close, and still speaks the label. - New plain label layout for the "+N" button. - Live and waiting counters announce updates on both platforms, tappable or not. - Close touch target is 44 pt on iOS and 48 dp on Android at the same visual size. - Android follows the Remove animations setting while the pill is shown. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2667e63 to
f1ac52f
Compare
Floating Pill gallery after review fixes (f1ac52f): iOSThese come from the real Component Gallery on the iPhone 17 simulator (iOS 26.5), shown through a temporary local root swap that isn't in the PR. New: the Label only rows ("+3") and the Compact (keyboard up) grid, which shows every layout × state reduced to its mark. The ✕ looks the same as before; its hit area is now 44 pt.
Android screenshots will follow in a separate comment once the shared emulator is free. |
|
@cursor review |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit f1ac52f. Configure here.
Floating Pill gallery after review fixes (f1ac52f): AndroidThese come from the real Component Gallery on the Pixel 9a emulator, shown through a temporary local start-screen swap that isn't in the PR. They cover every layout × state, the new Label only rows ("+3") and the Compact (keyboard up) grid. The ✕ looks the same as before; its touch target is now 48 dp.
|
The pulse started only in onAppear, so turning Reduce Motion off while the pill stayed on screen left the dot still. Drive it from task(id:) instead so it restarts (or stops) whenever the setting changes. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>

























Part of #899. Fixes #900
What
A shared Floating Pill design-system component on iOS (
OpenCodeFloatingPill) and Android (OpenCodeFloatingPill). Every Session Chat pill will use it. Placing pills on screen and migrating the existing pills are left to #903.iconLabel,iconOnly(round; its label is spoken),counter(live counter with a spinner;waiting: trueswaps the spinner for a pulsing amber dot in needs attention), andclosable(label with a trailing ✕ that callsonClose).live,ready,needsAttention(amber text and a thin amber ring),error, anddone(green check in every layout).button/labelLarge), icon size and chrome asOpenCodeSideQuestionPill. iOS reusesopenCodeFloatingPillChrome(Liquid Glass on iOS 26); Android uses the btw pill's raised surface, border and shadow.action/onClickandonClose, with no colour, type or radius overrides. Without an action the pill is a status, not a button.OpenCodeFloatingPillStyleon iOS,floatingPill*functions on Android), so both platforms test the same rules.Checks
OpenCodeFloatingPillStyleTests, 6/6 passed (iPhone 17 simulator, iOS 26.5).OpenCodeFloatingPillTest, 6/6 passed;:app:assembleDebugOK;ktlintCheckreports nothing in the changed files.gitleaks git --pre-commit --staged: no leaks.Risks / Follow-ups
publish-ui-snapshotsrenderers for evidence:ImageRenderercan't draw the UIKit-backedProgressViewspinner, and it shows a placeholder instead.:screenshot(Paparazzi) doesn't compile onmain:OpenCodeBottomSheetusesOpenCodeSkeletonIllustrationTopic, and the icon tables useR, neither of which the module includes.callSplit,arrowDownward) because the catalog has no branch or worktree icon yet. Session Chat: corner slots for floating pills #903 can add real ones.🤖 Generated with Claude Code
Need help on this PR? Tag
@codesmith-botwith what you need.Note
Low Risk
Additive UI library and gallery-only integration; no production Session Chat or data-path changes in this diff.
Overview
Introduces a cross-platform Floating Pill design-system component (
OpenCodeFloatingPillon Android Compose and iOS SwiftUI) meant to unify Session Chat overlay pills in a follow-up; this PR does not wire it into chat screens yet.The API is layout + state driven: six layouts (icon+label, icon-only, live counter with optional
waiting, closable with dismiss, plain label) and five states (live, ready, needs attention with amber ring, error, done with green check). Compact mode collapses to a round mark for keyboard-up layouts; optional tap and close handlers, with accessibility labels and live-region behavior for active counters. Layout/state → visuals and copy are encoded in testable pure helpers (floatingPill*on Android,OpenCodeFloatingPillStyleon iOS), with matching unit tests on both platforms.Component Gallery gains a Controls entry and demo screen showing every layout × state plus compact variants. Navigation/registry changes on Android and iOS are limited to that new route.
Reviewed by Cursor Bugbot for commit f1ac52f. Bugbot is set up for automated code reviews on this repo. Configure here.