Repro: GIFOCUS fetch() CSV Export Failure in Menlo Isolation

Why your previous test did not reproduce the issue:
In your initial test, the page ran in a standard browser session where gifocus_create_csv.php returned the actual CSV with Content-Disposition: attachment.
Because Content-Disposition was present, the script took the if (disposition) branch, constructed an in-memory Blob, and triggered an anchor download (a.click()). In Menlo, clicking a blob download link automatically opens a new tab and scans the file normally without errors.

What happened in customer's production (Fujitsu TID 3991):
The customer connects through Menlo Squid Proxy with ICAP File Download Inspection. When the backend responded to fetch() with a CSV file, Menlo Proxy intercepted the response and substituted it with Menlo's HTML download page (Content-Type: text/html, NO Content-Disposition header).
Because Content-Disposition was null, GIFOCUS executed its fallback error branch:
const doc = new DOMParser().parseFromString(await res.text(), 'text/html');
document.body.innerHTML = doc.body.innerHTML; // Strips Menlo's <head> CSS & JS!

Bilingual Translation Glossary (Japanese → English)

Here is what all Japanese terms in the customer's portal and error screens mean:

Japanese Text (Customer View) English Translation Context
CSV出力 (絞り込み) CSV Export (Filter) Screen title of mg03d01 dialog
指定された条件によりユーザデータよりCSVファイルの出力を行います。 Exports CSV file from user data based on specified conditions. Dialog description
対象ユーザデータ Target User Data Form dropdown (e.g. IT-116)
検索項目 Search Filter Item Filter criteria input fields
ファイルダウンロード中 File download in progress / Contacting server Menlo status #loading (should be hidden)
ドキュメントを読み込んでいます... Loading document... Menlo status #transfer (should be hidden)
エラーが発生しました
以下のファイル処理中に問題が発生しました:
ファイル名 : IT-116_...csv
リトライしてください。
An error occurred
A problem occurred while processing the following file:
File Name: IT-116_...csv
Please retry.
Menlo block-error #block-error. Not a real error! Renders only because Menlo's .hidden { display: none } CSS was lost!
コンテンツのスキャンが完了しました Content scan completed (Clean) Menlo SafeDocs status inside the viewer iframe
ファイルダウンロードでiframeの使用が要求されています。 An iframe is required for file download. Fallback text inside #download_monitor iframe

How to Reproduce and Test in the Dialog Below

  1. Step 1: Reproduce the Customer Failure
    • In the dialog below, make sure Simulation Mode is set to ⚠️ Repro Customer Issue.
    • Click CSV Export / CSV出力.
    • Visible Failure:
      • The entire GIFOCUS dialog UI is wiped out and replaced with Menlo's raw HTML wrapper.
      • Because Menlo's <head> was discarded, file-download.css is missing: .hidden does not work in Bootstrap 5, so "ファイルダウンロード中", "ドキュメントを読み込んでいます...", and "エラーが発生しました" are all shown at the same time!
      • The Menlo SafeDocs viewer iframe (#download_monitor) collapses to the browser default 300×150 pixels.
      • Inside the tiny 300×150 box, the scan actually succeeded (Clean), and clicking "Download Original" delivers the clean CSV.
      • The user cannot go back to the original export form (must reload the page or click Reset below).
    • Step 2: Reset Screen
      • Click the blue "🔄 Reset Export Dialog" button below to restore the initial export form.
    • Step 3: Test Baseline (Menlo Policy = "Allow" / Bypass)
      • Switch Simulation Mode to ✔ Baseline: Normal Direct CSV.
      • Click CSV Export / CSV出力.
      • Expected Result: The response returns Content-Disposition: attachment. The script executes the blob download path and saves the CSV directly without destroying the UI.
    • Step 4: Test Control (Native Form Navigation)
      • Click Control: Native Form Submit. This bypasses fetch() and navigates the iframe natively, demonstrating that Menlo's full HTML page loads with its <head> and styles intact when not intercepted via AJAX.

GIFOCUS Export Dialog Frame (mg03d01 inside md01d01)