mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-12-03 11:47:42 +01:00
Fix mobile scrolling inside chat and task cards (#23538)
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - People review pending requests in agent chats and tasks. > - The request card sits above the composer in both views. > - On mobile, a long card can extend beyond the visible screen and cannot scroll. > - This pull request limits the card height to part of the visible viewport. > - People can scroll the card to read the details and reach its buttons. ## Linked Issues or Issue Description Fixes: #21626 ## What Changed - Give mobile composer takeover cards their own vertical scrolling and contain their scroll at the edges. - Size the mobile card against the visible chat viewport, including when the keyboard shrinks it. Keep the desktop limit and Inbox behavior unchanged. - Add browser regression tests for touch scrolling through a long confirmation card in Chat and Tasks. ## Verification - On master at `4db307d53c`, both regressions reproduced at 390 × 664 with emulated touch. The card extended past the viewport and a swipe did not move its scroll position. - Both patched Chromium regressions passed. A touch swipe scrolled the card, and subsequent swipes brought the approval button into view. - `pnpm --filter @paperclipai/ui typecheck` passed. - The isolated mobile preview also loaded the Inbox without changing it. Physical iPhone and keyboard testing were not performed. ## Risks - Low risk. The change is limited to the shared composer card layout and does not change how requests are accepted or stored. The composer is already above the 1,000-line threshold; changing its existing card classes keeps the fix local. - A long card uses part of the available height, so its contents scroll instead of pushing the controls offscreen. ## Model Used - OpenAI GPT, in Codex with repository and Chromium tools. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #123` / `Closes #123` / `Refs #123` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [ ] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [ ] All Paperclip CI gates are green - [ ] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Scott Tong <1504818+scotttong@users.noreply.github.com>
This commit is contained in:
1 parent
4db307d53c
commit
c655f38b72
3 files changed
+99
-1
No files matched your search
@@ -1322,7 +1322,8 @@ export function TaskChatComposer({
|
||||
className={cn(
|
||||
"relative rounded-xl border border-border bg-card p-(--sz-18px) shadow-sm",
|
||||
onWelcomeChoicesRevealed && (revealChoices ? "tc-onboarding-choices" : "invisible"),
|
||||
mobile ? "overflow-visible" : "max-h-(--tc-interaction-card-max-h) overflow-y-auto scrollbar-auto-hide",
|
||||
"overflow-y-auto scrollbar-auto-hide",
|
||||
mobile ? "max-h-(--tc-mobile-interaction-card-max-h) overscroll-y-contain" : "max-h-(--tc-interaction-card-max-h)",
|
||||
)}
|
||||
ref={takeoverElement}
|
||||
inert={Boolean(onWelcomeChoicesRevealed) && !revealChoices}
|
||||
|
||||
Reference in new issue
Block a user