FN-5836: fix mailbox mobile scroll-to-bottom behavior

Ensure mailbox content can scroll to the latest agent-to-agent email on mobile layouts.

- Add `min-height: 0` to `.mailbox-view .mailbox-content` to keep the flex child bounded and scrollable.
- Strengthen mobile mailbox scrolling with `overflow-y: auto`, `overscroll-behavior: contain`, and `-webkit-overflow-scrolling: touch`.
- Extend MailboxView CSS tests to assert the new bounded flex and mobile scrolling rules.

Files changed:
 packages/dashboard/app/components/MailboxModal.css        |  4 ++++
 .../app/components/__tests__/MailboxView.test.tsx         | 15 +++++++++++++++
 2 files changed, 19 insertions(+)

Fusion-Task-Id: FN-5836

Fusion-Task-Lineage: 41ce03bf-d788-4de9-9dc1-db8ad443048e
This commit is contained in:
gsxdsm
2026-06-01 10:31:27 -07:00
parent 1610cd5757
commit 05c7e448a1
2 changed files with 19 additions and 0 deletions

View File

@@ -651,6 +651,7 @@
.mailbox-view .mailbox-content {
flex: 1;
min-height: 0;
overflow: hidden;
padding: var(--space-xl);
max-height: none;
@@ -868,8 +869,11 @@
}
.mailbox-view .mailbox-content {
min-height: 0;
max-height: none;
overflow-y: auto;
overscroll-behavior: contain;
-webkit-overflow-scrolling: touch;
padding: var(--space-md);
/* Account for mobile nav bar at bottom */
padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom, 0) + var(--standalone-bottom-gap) + var(--space-lg));

View File

@@ -1805,6 +1805,17 @@ describe("MailboxView", () => {
expect(viewBlock).toContain("overflow: hidden;");
});
it("defines .mailbox-view .mailbox-content as a bounded flex child", async () => {
const css = loadAllAppCss();
const contentBlockMatch = css.match(/\.mailbox-view\s+\.mailbox-content\s*\{([^}]*)\}/);
expect(contentBlockMatch).toBeTruthy();
const contentBlock = contentBlockMatch![1];
expect(contentBlock).toContain("flex: 1;");
expect(contentBlock).toContain("min-height: 0;");
expect(contentBlock).toContain("max-height: none;");
});
it("defines desktop/tablet split-pane selectors under .mailbox-view scope", async () => {
const css = loadAllAppCss();
@@ -1871,6 +1882,10 @@ describe("MailboxView", () => {
const contentRuleMatch = mailboxMobileSection.match(/\.mailbox-view\s+\.mailbox-content\s*\{[^}]*\}/);
expect(contentRuleMatch).toBeTruthy();
expect(contentRuleMatch![0]).toContain("max-height: none");
expect(contentRuleMatch![0]).toContain("overflow-y: auto");
expect(contentRuleMatch![0]).toContain("min-height: 0");
expect(contentRuleMatch![0]).toContain("overscroll-behavior: contain");
expect(contentRuleMatch![0]).toContain("-webkit-overflow-scrolling: touch");
// Content should have padding-bottom accounting for mobile nav
expect(contentRuleMatch![0]).toContain("padding-bottom");