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,217 +838,205 @@ 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",
borderBottom: "1px solid #333",
paddingBottom: "8px",
}}
>
<div style={{ marginBottom: "5px" }}> <div style={{ marginBottom: "5px" }}>
<div style={{ color: "#ffff00", marginBottom: "2px" }}> <span style={{ color: "#ffff00" }}>isDeepLink:</span>{" "}
📊 Current:
</div>
<div>
isDeepLink:{" "}
<span <span
style={{ style={{ color: deepLinkInfo.isDeepLink ? "#00ff00" : "#ff6666" }}
color: deepLinkInfo.isDeepLink ? "#00ff00" : "#ff6666",
}}
> >
{deepLinkInfo.isDeepLink ? "" : ""} {deepLinkInfo.isDeepLink ? "true" : "false"}
</span> </span>
</div> </div>
<div> <div>
contentTarget:{" "} <span style={{ color: "#ffff00" }}>contentTarget:</span>{" "}
<span <span style={{ color: "#ffffff", wordBreak: "break-all" }}>
style={{ {deepLinkInfo.contentTarget || "(empty)"}
color: deepLinkInfo.contentTarget ? "#00ff00" : "#ff6666",
}}
>
{deepLinkInfo.contentTarget || "MISSING"}
</span> </span>
</div> </div>
<div> </div>
panels: {panels.length}, top:{" "}
{panels.length > 0 ? panels[panels.length - 1].name : "none"} {/* Launch Params Check */}
<div
style={{
marginBottom: "10px",
borderBottom: "1px solid #333",
paddingBottom: "8px",
}}
>
<div style={{ color: "#00ff00", marginBottom: "5px" }}>
📱 Launch Params:
</div>
<div style={{ fontSize: "10px", color: "#cccccc" }}>
{(() => {
try {
const getLaunchParams = () => {
if (
typeof window === "object" &&
window.PalmSystem &&
window.PalmSystem.launchParams
) {
try {
let params = JSON.parse(window.PalmSystem.launchParams);
if (params["x-webos-app-container-launch"] === true) {
params = params.details;
}
return params;
} catch (e) {
return { error: "Parse failed: " + e.message };
}
} else {
return { debug: "Not on webOS or no launchParams" };
}
};
const params = getLaunchParams();
return JSON.stringify(params, null, 2);
} catch (e) {
return "Error: " + e.message;
}
})()}
</div> </div>
</div> </div>
{/* App Status */} {/* App Status */}
<div style={{ marginBottom: "5px" }}> <div
<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>
{/* Right Column */}
<div style={{ flex: 1, fontSize: "11px" }}>
{/* Launch Params */}
<div style={{ marginBottom: "5px" }}>
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
📱 Launch Params:
</div>
{(() => {
try {
if (
!(
typeof window === "object" &&
window.PalmSystem &&
window.PalmSystem.launchParams
)
) {
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={{ style={{
color: contentTarget ? "#00ff00" : "#ff6666", marginBottom: "10px",
borderBottom: "1px solid #333",
paddingBottom: "8px",
}} }}
> >
{contentTarget || "MISSING"} <div style={{ color: "#00ff00", marginBottom: "5px" }}>
</span> 📊 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>
</>
);
} catch (e) {
return (
<div style={{ color: "#ff6666" }}>Error: {e.message}</div>
);
}
})()}
</div> </div>
{/* Real-time Check */} {/* Panel Stack */}
<div> <div
<div style={{ color: "#ffff00", marginBottom: "2px" }}>
🔄 Real-time:
</div>
{(() => {
try {
let currentParams = {};
if (
typeof window === "object" &&
window.PalmSystem &&
window.PalmSystem.launchParams
) {
currentParams = JSON.parse(window.PalmSystem.launchParams);
if (
currentParams["x-webos-app-container-launch"] === true
) {
currentParams = currentParams.details;
}
}
return (
<>
<div>time: {new Date().toLocaleTimeString()}</div>
<div>
current:{" "}
<span
style={{ style={{
color: currentParams.contentTarget marginBottom: "10px",
? "#00ff00" borderBottom: "1px solid #333",
: "#ff6666", paddingBottom: "8px",
}} }}
> >
{currentParams.contentTarget || "MISSING"} <div style={{ color: "#00ff00", marginBottom: "5px" }}>
</span> 📚 Panel Stack ({panels.length}):
</div> </div>
</> <div style={{ fontSize: "10px" }}>
); {panels.map((panel, index) => (
} catch (e) { <div
return ( key={index}
<div style={{ color: "#ff6666" }}>Error: {e.message}</div> style={{
); color: index === panels.length - 1 ? "#00ff00" : "#cccccc",
} }}
})()} >
{index}: {panel.name}{" "}
{index === panels.length - 1 ? "(current)" : ""}
</div>
))}
</div> </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>
<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("_"); const tokens = deepLinkInfo.contentTarget.split("_");
if (tokens[0] === "V2" || tokens[0] === "V3") { if (tokens[0] === "V2" || tokens[0] === "V3") {
return ( return (
<> <>
<div> <div>
Version: {tokens[0]}, Code: {tokens[1]}, Name: {tokens[2]} <span style={{ color: "#ffff00" }}>Version:</span>{" "}
, Type: {tokens[3]} {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> </div>
{tokens.length > 4 && ( {tokens.length > 4 && (
<div>Extra: {tokens.slice(4).join("_")}</div> <div>
<span style={{ color: "#ffff00" }}>
Extra Params:
</span>{" "}
{tokens.slice(4).join("_")}
</div>
)} )}
</> </>
); );
} }
return ( return (
<div style={{ color: "#ff6666" }}> Not V2/V3 format</div> <div style={{ color: "#ff6666" }}>
Raw format (not V2/V3)
</div>
); );
})()} })()}
</div> </div>
</div>
)} )}
</div> </div>
</div> </div>