fix(web): submit schedule picker on enter#703
Conversation
There was a problem hiding this comment.
Findings
- [Minor] Coarse-pointer wide viewports lose horizontal positioning — The mobile branch is selected for any
(pointer: coarse)viewport, not only screens under 640px. On tablets/touch laptops, the addedsm:inset-x-autooverridesinset-x-3, while the mobile inline style only suppliesposition: fixedand the class only suppliesbottom; no deterministic left/right/transform remains for the panel. That can place the picker at its static flex position instead of a stable bottom panel. Evidenceweb/src/components/AssistantChat/ScheduleTimePicker.tsx:301.
Suggested fix:const mobilePanelPosition = 'fixed inset-x-3 bottom-[calc(env(safe-area-inset-bottom)+12px)] sm:left-1/2 sm:right-auto sm:w-80 sm:-translate-x-1/2'
Summary
- Review mode: initial
- Found one tablet/touch-viewport positioning regression in the schedule picker changes. No other high-confidence issues found in the modified lines.
Testing
- Not run (automation):
bunis not installed in this runner.
HAPI Bot
| isMobilePanel | ||
| ? 'z-50 box-border max-h-[min(60dvh,calc(var(--app-viewport-height,100dvh)-24px))] overflow-y-auto rounded-xl border border-[var(--app-border)] bg-[var(--app-bg)] shadow-lg fixed inset-x-3 bottom-[calc(env(safe-area-inset-bottom)+12px)]' | ||
| : 'z-50 box-border w-72 overflow-y-auto rounded-xl border border-[var(--app-border)] bg-[var(--app-bg)] shadow-lg' | ||
| ? `z-50 box-border max-h-[min(85dvh,calc(var(--app-viewport-height,100dvh)-24px))] ${isContentConstrained ? 'overflow-y-auto' : 'overflow-y-visible'} rounded-xl border border-[var(--app-border)] bg-[var(--app-bg)] shadow-lg fixed inset-x-3 bottom-[calc(env(safe-area-inset-bottom)+12px)] sm:inset-x-auto sm:w-80` |
There was a problem hiding this comment.
[Minor] The mobile branch is selected for any (pointer: coarse) viewport, not only screens under 640px. On tablets/touch laptops, sm:inset-x-auto overrides inset-x-3, but this branch only sets position: fixed inline and only keeps bottom in the class, so there is no deterministic horizontal position left for the panel. That can place the picker at its static flex position instead of a stable bottom panel.
Suggested fix:
const mobilePanelPosition = 'fixed inset-x-3 bottom-[calc(env(safe-area-inset-bottom)+12px)] sm:left-1/2 sm:right-auto sm:w-80 sm:-translate-x-1/2'|
Addressed the tablet/coarse-pointer positioning feedback in |
There was a problem hiding this comment.
Findings
- No issues found in the added or modified lines.
Summary
- Review mode: follow-up after new commits
- The prior schedule picker positioning finding is addressed in the latest head. Full diff reviewed; no remaining high-confidence correctness, security, regression, performance, or maintainability issues found.
Testing
- Not run (automation):
bunis not installed in this runner.
HAPI Bot
Summary
Fixes #701
Testing
cd web && ../node_modules/.bin/tsc --noEmitcd web && ../node_modules/.bin/vitest run src/components/AssistantChat/ScheduleTimePicker.test.ts src/components/AssistantChat/ScheduleTimePicker.test.tsx