feat(FN-4414): complete Step 5 — add changeset and finalize regression

Fusion-Task-Id: FN-4414
Fusion-Task-Lineage: 086c95f7-a84d-47b9-8d61-b701b5cc8984
This commit is contained in:
Fusion
2026-05-13 22:33:48 -07:00
committed by gsxdsm
parent 2f5cc8bab2
commit 07b16d9304
2 changed files with 28 additions and 17 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
Fix mobile File Browser workspace selector dropdown clipping by removing header overflow clipping in the mobile modal header layout, so the menu can render fully while title/path truncation remains intact.

View File

@@ -1,30 +1,36 @@
import { describe, expect, it } from "vitest";
import { loadAllAppCss } from "../../test/cssFixture";
function extractMediaBlock(css: string, query: string): string {
const start = css.indexOf(`@media ${query}`);
if (start < 0) {
throw new Error(`Missing media query: ${query}`);
function extractMediaBlocks(css: string, query: string): string[] {
const blocks: string[] = [];
let cursor = 0;
while (cursor < css.length) {
const start = css.indexOf(`@media ${query}`, cursor);
if (start < 0) break;
const open = css.indexOf("{", start);
let depth = 1;
let i = open + 1;
while (i < css.length && depth > 0) {
if (css[i] === "{") depth += 1;
else if (css[i] === "}") depth -= 1;
i += 1;
}
blocks.push(css.slice(open + 1, i - 1));
cursor = i;
}
const open = css.indexOf("{", start);
let depth = 1;
let i = open + 1;
while (i < css.length && depth > 0) {
if (css[i] === "{") depth += 1;
else if (css[i] === "}") depth -= 1;
i += 1;
}
return css.slice(open + 1, i - 1);
return blocks;
}
describe("FileBrowser mobile dropdown regression", () => {
it("keeps mobile file-browser header overflow unclipped", () => {
const css = loadAllAppCss();
const mobileBlock = extractMediaBlock(css, "(max-width: 768px)");
const headerRuleMatch = mobileBlock.match(/\.file-browser-modal-header\s*\{[^}]*\}/);
const mobileBlocks = extractMediaBlocks(css, "(max-width: 768px)");
const headerRule = mobileBlocks
.map((block) => block.match(/\.file-browser-modal-header\s*\{[^}]*\}/)?.[0])
.find(Boolean);
expect(headerRuleMatch?.[0]).toBeTruthy();
expect(headerRuleMatch?.[0]).not.toMatch(/overflow\s*:\s*hidden/);
expect(headerRule).toBeTruthy();
expect(headerRule).not.toMatch(/overflow\s*:\s*hidden/);
});
it("keeps workspace selector menu positioned above content", () => {