Revert "mainview 디버그 수정"

This reverts commit 2210a82027.
This commit is contained in:
opacity@t-win.kr
2025-08-27 18:25:00 +09:00
parent fef5b0f2fb
commit b174681e3f

View File

@@ -838,216 +838,204 @@ export default function MainView({ className, initService }) {
fontSize: "11px", fontSize: "11px",
opacity: ".9", opacity: ".9",
zIndex: "999", zIndex: "999",
backgroundColor: "rgba(0,0,0,0.7)", backgroundColor: "rgba(0,0,0,0.9)",
padding: "8px", padding: "15px",
width: "700px", maxWidth: "600px",
height: "550px",
borderRadius: "5px", borderRadius: "5px",
fontFamily: "monospace", fontFamily: "monospace",
overflow: "hidden", maxHeight: "400px",
boxSizing: "border-box", overflowY: "auto",
display: "flex",
flexDirection: "column",
}} }}
> >
<div <div
style={{ style={{ fontWeight: "bold", marginBottom: "10px", color: "#00ff00" }}
fontWeight: "bold",
marginBottom: "5px",
color: "#00ff00",
fontSize: "10px",
}}
> >
🔗 Deep Link Debug Info 🔗 Deep Link Debug Info
</div> </div>
<div style={{ display: "flex", gap: "5px", height: "100%" }}> {/* Deep Link Info */}
{/* Left Column */} <div
<div style={{ flex: 1, fontSize: "11px" }}> style={{
{/* Current State */} marginBottom: "10px",
<div style={{ marginBottom: "5px" }}> borderBottom: "1px solid #333",
<div style={{ color: "#ffff00", marginBottom: "2px" }}> paddingBottom: "8px",
📊 Current: }}
</div> >
<div> <div style={{ marginBottom: "5px" }}>
isDeepLink:{" "} <span style={{ color: "#ffff00" }}>isDeepLink:</span>{" "}
<span <span
style={{ style={{ color: deepLinkInfo.isDeepLink ? "#00ff00" : "#ff6666" }}
color: deepLinkInfo.isDeepLink ? "#00ff00" : "#ff6666", >
}} {deepLinkInfo.isDeepLink ? "true" : "false"}
> </span>
{deepLinkInfo.isDeepLink ? "✓" : "✗"}
</span>
</div>
<div>
contentTarget:{" "}
<span
style={{
color: deepLinkInfo.contentTarget ? "#00ff00" : "#ff6666",
}}
>
{deepLinkInfo.contentTarget || "MISSING"}
</span>
</div>
<div>
panels: {panels.length}, top:{" "}
{panels.length > 0 ? panels[panels.length - 1].name : "none"}
</div>
</div>
{/* App Status */}
<div style={{ marginBottom: "5px" }}>
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
📱 System:
</div>
<div>webOS: {appStatus.webOSVersion || "unknown"}</div>
<div>
deviceId:{" "}
{appStatus.deviceId
? appStatus.deviceId.substring(0, 8) + "..."
: "unknown"}
</div>
<div>server: {appStatus.serverHOST || "unknown"}</div>
</div>
{/* Redux State */}
<div>
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
🏪 Redux:
</div>
<div>deepLink: {JSON.stringify(deepLinkInfo)}</div>
<div>secondLayer: {JSON.stringify(secondLayerInfo)}</div>
</div>
</div> </div>
<div>
<span style={{ color: "#ffff00" }}>contentTarget:</span>{" "}
<span style={{ color: "#ffffff", wordBreak: "break-all" }}>
{deepLinkInfo.contentTarget || "(empty)"}
</span>
</div>
</div>
{/* Right Column */} {/* Launch Params Check */}
<div style={{ flex: 1, fontSize: "11px" }}> <div
{/* Launch Params */} style={{
<div style={{ marginBottom: "5px" }}> marginBottom: "10px",
<div style={{ color: "#ffff00", marginBottom: "2px" }}> borderBottom: "1px solid #333",
📱 Launch Params: paddingBottom: "8px",
</div> }}
{(() => { >
try { <div style={{ color: "#00ff00", marginBottom: "5px" }}>
if ( 📱 Launch Params:
!( </div>
typeof window === "object" && <div style={{ fontSize: "10px", color: "#cccccc" }}>
window.PalmSystem && {(() => {
window.PalmSystem.launchParams try {
) const getLaunchParams = () => {
) {
return (
<div style={{ color: "#ff6666" }}>
No webOS environment
</div>
);
}
const raw = window.PalmSystem.launchParams;
const parsed = JSON.parse(raw);
const containerFlag = parsed["x-webos-app-container-launch"];
const finalParams =
containerFlag === true ? parsed.details : parsed;
const contentTarget = finalParams.contentTarget;
return (
<>
<div>raw: {raw.substring(0, 50)}...</div>
<div>containerFlag: {String(containerFlag)}</div>
<div>
contentTarget:{" "}
<span
style={{
color: contentTarget ? "#00ff00" : "#ff6666",
}}
>
{contentTarget || "MISSING"}
</span>
</div>
</>
);
} catch (e) {
return (
<div style={{ color: "#ff6666" }}>Error: {e.message}</div>
);
}
})()}
</div>
{/* Real-time Check */}
<div>
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
🔄 Real-time:
</div>
{(() => {
try {
let currentParams = {};
if ( if (
typeof window === "object" && typeof window === "object" &&
window.PalmSystem && window.PalmSystem &&
window.PalmSystem.launchParams window.PalmSystem.launchParams
) { ) {
currentParams = JSON.parse(window.PalmSystem.launchParams); try {
if ( let params = JSON.parse(window.PalmSystem.launchParams);
currentParams["x-webos-app-container-launch"] === true if (params["x-webos-app-container-launch"] === true) {
) { params = params.details;
currentParams = currentParams.details; }
return params;
} catch (e) {
return { error: "Parse failed: " + e.message };
} }
} else {
return { debug: "Not on webOS or no launchParams" };
} }
return ( };
<> const params = getLaunchParams();
<div>time: {new Date().toLocaleTimeString()}</div> return JSON.stringify(params, null, 2);
<div> } catch (e) {
current:{" "} return "Error: " + e.message;
<span }
style={{ })()}
color: currentParams.contentTarget </div>
? "#00ff00" </div>
: "#ff6666",
}} {/* App Status */}
> <div
{currentParams.contentTarget || "MISSING"} style={{
</span> marginBottom: "10px",
</div> borderBottom: "1px solid #333",
</> paddingBottom: "8px",
); }}
} catch (e) { >
return ( <div style={{ color: "#00ff00", marginBottom: "5px" }}>
<div style={{ color: "#ff6666" }}>Error: {e.message}</div> 📊 App Status:
); </div>
} <div style={{ fontSize: "10px" }}>
})()} <div>
<span style={{ color: "#ffff00" }}>webOSVersion:</span>{" "}
{appStatus.webOSVersion || "unknown"}
</div>
<div>
<span style={{ color: "#ffff00" }}>deviceId:</span>{" "}
{appStatus.deviceId || "unknown"}
</div>
<div>
<span style={{ color: "#ffff00" }}>serverHOST:</span>{" "}
{appStatus.serverHOST || "unknown"}
</div> </div>
</div> </div>
</div> </div>
{/* Panel Stack */}
<div
style={{
marginBottom: "10px",
borderBottom: "1px solid #333",
paddingBottom: "8px",
}}
>
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
📚 Panel Stack ({panels.length}):
</div>
<div style={{ fontSize: "10px" }}>
{panels.map((panel, index) => (
<div
key={index}
style={{
color: index === panels.length - 1 ? "#00ff00" : "#cccccc",
}}
>
{index}: {panel.name}{" "}
{index === panels.length - 1 ? "(current)" : ""}
</div>
))}
</div>
</div>
{/* Second Layer Info */}
{secondLayerInfo && Object.keys(secondLayerInfo).length > 0 && (
<div
style={{
marginBottom: "10px",
borderBottom: "1px solid #333",
paddingBottom: "8px",
}}
>
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
🔗 Second Layer Info:
</div>
<div style={{ fontSize: "10px", color: "#cccccc" }}>
{JSON.stringify(secondLayerInfo, null, 2)}
</div>
</div>
)}
{/* Parsed Deep Link */} {/* Parsed Deep Link */}
{deepLinkInfo.contentTarget && ( {deepLinkInfo.contentTarget && (
<div <div style={{ marginTop: "10px" }}>
style={{ marginTop: "8px", fontSize: "8px", paddingBottom: "5px" }} <div style={{ color: "#00ff00", marginBottom: "5px" }}>
> 🔍 Parsed Deep Link:
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
🔍 Parsed:
</div> </div>
{(() => { <div style={{ marginLeft: "10px", fontSize: "10px" }}>
const tokens = deepLinkInfo.contentTarget.split("_"); {(() => {
if (tokens[0] === "V2" || tokens[0] === "V3") { const tokens = deepLinkInfo.contentTarget.split("_");
if (tokens[0] === "V2" || tokens[0] === "V3") {
return (
<>
<div>
<span style={{ color: "#ffff00" }}>Version:</span>{" "}
{tokens[0]}
</div>
<div>
<span style={{ color: "#ffff00" }}>Link Code:</span>{" "}
{tokens[1]}
</div>
<div>
<span style={{ color: "#ffff00" }}>Link Name:</span>{" "}
{tokens[2]}
</div>
<div>
<span style={{ color: "#ffff00" }}>Type:</span>{" "}
{tokens[3]}
</div>
{tokens.length > 4 && (
<div>
<span style={{ color: "#ffff00" }}>
Extra Params:
</span>{" "}
{tokens.slice(4).join("_")}
</div>
)}
</>
);
}
return ( return (
<> <div style={{ color: "#ff6666" }}>
<div> Raw format (not V2/V3)
Version: {tokens[0]}, Code: {tokens[1]}, Name: {tokens[2]} </div>
, Type: {tokens[3]}
</div>
{tokens.length > 4 && (
<div>Extra: {tokens.slice(4).join("_")}</div>
)}
</>
); );
} })()}
return ( </div>
<div style={{ color: "#ff6666" }}> Not V2/V3 format</div>
);
})()}
</div> </div>
)} )}
</div> </div>