mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
fix(frontend): anchor the mobile activity scanner just below the composer controls
This commit is contained in:
1 parent
648713268d
commit
32102cca3e
2 files changed
+8
-9
No files matched your search
@@ -41,15 +41,15 @@ describe('ComposerActivityBar', () => {
|
||||
expect(container).toBeEmptyDOMElement()
|
||||
})
|
||||
|
||||
it('pins a pointer-transparent progressbar across the screen bottom on mobile and below the composer on desktop', () => {
|
||||
it('anchors a pointer-transparent progressbar in the gap below the composer', () => {
|
||||
useSessionStatus.getState().setStatus('session-a', { type: 'busy' })
|
||||
|
||||
render(<ComposerActivityBar sessionID="session-a" />)
|
||||
|
||||
const bar = screen.getByRole('progressbar', { name: 'Session working' })
|
||||
expect(bar).toHaveClass('pointer-events-none', 'flex')
|
||||
expect(bar).toHaveClass('fixed', 'inset-x-0', 'bottom-0')
|
||||
expect(bar).toHaveClass('md:absolute', 'md:inset-x-3', 'md:-bottom-[11px]')
|
||||
expect(bar).toHaveClass('absolute', 'inset-x-3', '-bottom-[10px]', 'md:-bottom-[11px]')
|
||||
expect(bar).not.toHaveClass('fixed')
|
||||
})
|
||||
|
||||
it('renders a masked segment track with only the sweeping window', () => {
|
||||
|
||||
@@ -25,11 +25,10 @@ const ACTIVITY_PRESENTATION = {
|
||||
} as const satisfies Record<string, { label: string; tone: ScannerTone }>
|
||||
|
||||
/**
|
||||
* Session activity scanner. On mobile it spans the full width of the bottom screen edge; from the
|
||||
* `md` breakpoint it is anchored in the gap below the composer frame. A fading lit window of 4x8px
|
||||
* segments sweeps across the strip. Renders nothing while the
|
||||
* session is idle and has no background activity; otherwise announces the current activity through
|
||||
* an indeterminate progressbar.
|
||||
* Session activity scanner anchored in the gap below the composer frame. A fading lit window of
|
||||
* 4x8px segments sweeps across the strip. Renders nothing while the session is idle and has no
|
||||
* background activity; otherwise announces the current activity through an indeterminate
|
||||
* progressbar.
|
||||
*/
|
||||
export function ComposerActivityBar({ sessionID }: ComposerActivityBarProps) {
|
||||
const status = useSessionStatusForSession(sessionID)
|
||||
@@ -52,7 +51,7 @@ export function ComposerActivityBar({ sessionID }: ComposerActivityBarProps) {
|
||||
aria-label={label}
|
||||
aria-valuemin={0}
|
||||
aria-valuemax={100}
|
||||
className="pointer-events-none fixed inset-x-0 bottom-0 flex md:absolute md:inset-x-3 md:-bottom-[11px]"
|
||||
className="pointer-events-none absolute inset-x-3 -bottom-[10px] flex md:-bottom-[11px]"
|
||||
>
|
||||
<ScannerBars tone={activity.tone} />
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user