[PR #4261] [MERGED] Fix mobile chat behavior and add recent media history #6306

Closed
opened 2026-10-23 04:09:10 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4261
Author: @SpicyMarinara
Created: 7/29/2026
Status: ✅ Merged
Merged: 7/29/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/issue-sweep-4253-4259-4260


📝 Commits (5)

  • 3b6b2b1 fix: stabilize iOS Safari chat viewport
  • e921e20 feat: add recent media history and mobile parity
  • a9e1eb8 fix: address review edge cases
  • a3123a5 fix: isolate iOS viewport transforms from overlays
  • fd56082 fix: recognize internal pull request branches

📊 Changes

15 files changed (+782 additions, -171 deletions)

View changed files

📝 .github/workflows/pull-request-triage.yml (+4 -2)
📝 e2e/core-flows.e2e.ts (+298 -51)
📝 packages/client/src/App.tsx (+19 -6)
📝 packages/client/src/components/chat/ChatRoleplaySurface.tsx (+16 -28)
📝 packages/client/src/components/chat/ConversationMediaPickerPanel.tsx (+20 -2)
📝 packages/client/src/components/chat/ConversationView.tsx (+28 -32)
📝 packages/client/src/components/chat/StickerPicker.tsx (+73 -22)
📝 packages/client/src/components/layout/AppShell.tsx (+30 -16)
📝 packages/client/src/components/ui/EmojiPicker.tsx (+27 -0)
📝 packages/client/src/components/ui/GifPicker.tsx (+62 -7)
📝 packages/client/src/components/ui/KaomojiPicker.tsx (+31 -1)
➕ packages/client/src/hooks/use-recent-media.ts (+139 -0)
📝 packages/client/src/hooks/use-visual-viewport-chat-bottom.ts (+27 -0)
📝 packages/client/src/localization/locales/en.json (+1 -0)
📝 packages/client/src/styles/globals.css (+7 -4)

📄 Description

Linked issues

Closes #4253
Closes #4259
Closes #4260

Why

This sweep addresses three user-facing interaction gaps: frequently reused media remains buried in long picker lists, Roleplay mobile composer behavior still diverges from Conversation mode while reading older history, and iOS Safari can shift the app or paint incorrect space around the software keyboard.

What changed

  • add persisted, most-recent-first history rows to the emoji, kaomoji, GIF, and sticker pickers
  • keep recent GIFs available even when live GIPHY search is not configured
  • share direct composer-focus ownership across Conversation and Roleplay so either mobile composer remains open while reading older history
  • apply the iOS scrolling and safe-area patches supplied by eiriol in #4260
  • keep the literal iOS backing color synchronized with the active app background and compensate WebKit layout-viewport drift only on chat surfaces
  • recognize same-repository PR branches as internal contributions even when the restricted Actions token cannot see private organization membership

Validation

  • Run pnpm check (completed locally; existing NoodleHome hook warning only)
  • Run pnpm localization:check (completed locally)
  • Run focused Playwright coverage for both mobile chat modes and all media pickers (6 passed, 2 mobile-only desktop skips)
  • Review git diff --check (completed locally)

Manual verification

  • Manually verify Conversation and Roleplay history can be scrolled while the mobile composer is open
  • Manually verify iOS Safari keyboard opening and closing does not shift the page or leave extra bottom space
  • Manually verify the safe area follows dark, light, and custom app backgrounds
  • Manually verify recent emoji, kaomoji, GIF, and sticker rows on desktop and mobile

Attribution

The original iOS scrolling and safe-area patches were supplied by Discord user eiriol and attached to #4260.

Summary by CodeRabbit

  • New Features
    • Media pickers now show a “Recently used” section for emojis, kaomoji, GIFs, and stickers, with local persistence and a capped history.
    • Recent items are updated when you select new emojis or send stickers.
  • Bug Fixes
    • Improved iOS background-color syncing and more stable virtual-viewport/scroll compensation for layout during mobile keyboard use.
    • Mobile chat/composer behavior is more reliable while scrolling transcript history.
    • Refined roleplay UI styling for Firefox.
  • Tests
    • Expanded and stabilized end-to-end coverage for editor/media flows and mobile geometry/composer focus behavior.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4261 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/29/2026 **Status:** ✅ Merged **Merged:** 7/29/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/issue-sweep-4253-4259-4260` --- ### 📝 Commits (5) - [`3b6b2b1`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3b6b2b14909a9de5b48f4330e80a36e387324cf5) fix: stabilize iOS Safari chat viewport - [`e921e20`](https://github.com/Pasta-Devs/Marinara-Engine/commit/e921e20a706a3a08cfabb56f88c58cc8d498a081) feat: add recent media history and mobile parity - [`a9e1eb8`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a9e1eb812f39d15b1b4498e5de93ebe86101cacd) fix: address review edge cases - [`a3123a5`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a3123a568b9db08e671f15b8e203dcec9102d3a7) fix: isolate iOS viewport transforms from overlays - [`fd56082`](https://github.com/Pasta-Devs/Marinara-Engine/commit/fd56082a330365ee395747bb11dde4c7d237e02e) fix: recognize internal pull request branches ### 📊 Changes **15 files changed** (+782 additions, -171 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/pull-request-triage.yml` (+4 -2) 📝 `e2e/core-flows.e2e.ts` (+298 -51) 📝 `packages/client/src/App.tsx` (+19 -6) 📝 `packages/client/src/components/chat/ChatRoleplaySurface.tsx` (+16 -28) 📝 `packages/client/src/components/chat/ConversationMediaPickerPanel.tsx` (+20 -2) 📝 `packages/client/src/components/chat/ConversationView.tsx` (+28 -32) 📝 `packages/client/src/components/chat/StickerPicker.tsx` (+73 -22) 📝 `packages/client/src/components/layout/AppShell.tsx` (+30 -16) 📝 `packages/client/src/components/ui/EmojiPicker.tsx` (+27 -0) 📝 `packages/client/src/components/ui/GifPicker.tsx` (+62 -7) 📝 `packages/client/src/components/ui/KaomojiPicker.tsx` (+31 -1) ➕ `packages/client/src/hooks/use-recent-media.ts` (+139 -0) 📝 `packages/client/src/hooks/use-visual-viewport-chat-bottom.ts` (+27 -0) 📝 `packages/client/src/localization/locales/en.json` (+1 -0) 📝 `packages/client/src/styles/globals.css` (+7 -4) </details> ### 📄 Description ## Linked issues Closes #4253 Closes #4259 Closes #4260 ## Why This sweep addresses three user-facing interaction gaps: frequently reused media remains buried in long picker lists, Roleplay mobile composer behavior still diverges from Conversation mode while reading older history, and iOS Safari can shift the app or paint incorrect space around the software keyboard. ## What changed - add persisted, most-recent-first history rows to the emoji, kaomoji, GIF, and sticker pickers - keep recent GIFs available even when live GIPHY search is not configured - share direct composer-focus ownership across Conversation and Roleplay so either mobile composer remains open while reading older history - apply the iOS scrolling and safe-area patches supplied by eiriol in #4260 - keep the literal iOS backing color synchronized with the active app background and compensate WebKit layout-viewport drift only on chat surfaces - recognize same-repository PR branches as internal contributions even when the restricted Actions token cannot see private organization membership ## Validation - [ ] Run `pnpm check` (completed locally; existing NoodleHome hook warning only) - [ ] Run `pnpm localization:check` (completed locally) - [ ] Run focused Playwright coverage for both mobile chat modes and all media pickers (6 passed, 2 mobile-only desktop skips) - [ ] Review `git diff --check` (completed locally) ## Manual verification - [ ] Manually verify Conversation and Roleplay history can be scrolled while the mobile composer is open - [ ] Manually verify iOS Safari keyboard opening and closing does not shift the page or leave extra bottom space - [ ] Manually verify the safe area follows dark, light, and custom app backgrounds - [ ] Manually verify recent emoji, kaomoji, GIF, and sticker rows on desktop and mobile ## Attribution The original iOS scrolling and safe-area patches were supplied by Discord user eiriol and attached to #4260. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Media pickers now show a “Recently used” section for emojis, kaomoji, GIFs, and stickers, with local persistence and a capped history. - Recent items are updated when you select new emojis or send stickers. - **Bug Fixes** - Improved iOS background-color syncing and more stable virtual-viewport/scroll compensation for layout during mobile keyboard use. - Mobile chat/composer behavior is more reliable while scrolling transcript history. - Refined roleplay UI styling for Firefox. - **Tests** - Expanded and stabilized end-to-end coverage for editor/media flows and mobile geometry/composer focus behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:09:10 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6306
No description provided.