Skip to content

fix(web): submit schedule picker on enter#703

Merged
tiann merged 2 commits into
tiann:mainfrom
swear01:fix/schedule-picker-enter
May 26, 2026
Merged

fix(web): submit schedule picker on enter#703
tiann merged 2 commits into
tiann:mainfrom
swear01:fix/schedule-picker-enter

Conversation

@swear01
Copy link
Copy Markdown
Contributor

@swear01 swear01 commented May 26, 2026

Summary

  • Prevent composer form default navigation on submit
  • Submit the ScheduleTimePicker Specific tab when Enter is pressed in the datetime input
  • Resize/recompute the schedule picker so Specific controls fit without unnecessary scrolling

Fixes #701

Testing

  • cd web && ../node_modules/.bin/tsc --noEmit
  • cd web && ../node_modules/.bin/vitest run src/components/AssistantChat/ScheduleTimePicker.test.ts src/components/AssistantChat/ScheduleTimePicker.test.tsx
  • Manual web test via isolated local hub/runner

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 added sm:inset-x-auto overrides inset-x-3, while the mobile inline style only supplies position: fixed and the class only supplies bottom; 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. Evidence web/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): bun is 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`
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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'

@swear01
Copy link
Copy Markdown
Contributor Author

swear01 commented May 26, 2026

Addressed the tablet/coarse-pointer positioning feedback in 8f0262c. The mobile bottom-sheet branch now keeps deterministic horizontal placement on wider touch viewports via sm:left-1/2 sm:right-auto sm:w-80 sm:-translate-x-1/2 instead of clearing both horizontal insets.\n\nValidation:\n- cd web && ../node_modules/.bin/tsc --noEmit\n- cd web && ../node_modules/.bin/vitest run src/components/AssistantChat/ScheduleTimePicker.test.ts src/components/AssistantChat/ScheduleTimePicker.test.tsx

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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): bun is not installed in this runner.

HAPI Bot

@tiann tiann merged commit 166b711 into tiann:main May 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(web): ScheduleTimePicker Specific tab — pressing Enter on datetime-local input does not submit schedule

2 participants