mainview 디버그 수정

This commit is contained in:
opacity@t-win.kr
2025-08-27 16:05:36 +09:00
parent 1338f336d8
commit 2210a82027

View File

@@ -838,204 +838,216 @@ export default function MainView({ className, initService }) {
fontSize: "11px", fontSize: "11px",
opacity: ".9", opacity: ".9",
zIndex: "999", zIndex: "999",
backgroundColor: "rgba(0,0,0,0.9)", backgroundColor: "rgba(0,0,0,0.7)",
padding: "15px", padding: "8px",
maxWidth: "600px", width: "700px",
height: "550px",
borderRadius: "5px", borderRadius: "5px",
fontFamily: "monospace", fontFamily: "monospace",
maxHeight: "400px", overflow: "hidden",
overflowY: "auto", boxSizing: "border-box",
display: "flex",
flexDirection: "column",
}} }}
> >
<div <div
style={{ fontWeight: "bold", marginBottom: "10px", color: "#00ff00" }} style={{
fontWeight: "bold",
marginBottom: "5px",
color: "#00ff00",
fontSize: "10px",
}}
> >
🔗 Deep Link Debug Info 🔗 Deep Link Debug Info
</div> </div>
{/* Deep Link Info */} <div style={{ display: "flex", gap: "5px", height: "100%" }}>
<div {/* Left Column */}
style={{ <div style={{ flex: 1, fontSize: "11px" }}>
marginBottom: "10px", {/* Current State */}
borderBottom: "1px solid #333", <div style={{ marginBottom: "5px" }}>
paddingBottom: "8px", <div style={{ color: "#ffff00", marginBottom: "2px" }}>
}} 📊 Current:
> </div>
<div style={{ marginBottom: "5px" }}> <div>
<span style={{ color: "#ffff00" }}>isDeepLink:</span>{" "} isDeepLink:{" "}
<span <span
style={{ color: deepLinkInfo.isDeepLink ? "#00ff00" : "#ff6666" }} style={{
> color: deepLinkInfo.isDeepLink ? "#00ff00" : "#ff6666",
{deepLinkInfo.isDeepLink ? "true" : "false"} }}
</span> >
</div> {deepLinkInfo.isDeepLink ? "✓" : "✗"}
<div> </span>
<span style={{ color: "#ffff00" }}>contentTarget:</span>{" "} </div>
<span style={{ color: "#ffffff", wordBreak: "break-all" }}> <div>
{deepLinkInfo.contentTarget || "(empty)"} contentTarget:{" "}
</span> <span
</div> style={{
</div> 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>
{/* Launch Params Check */} {/* App Status */}
<div <div style={{ marginBottom: "5px" }}>
style={{ <div style={{ color: "#ffff00", marginBottom: "2px" }}>
marginBottom: "10px", 📱 System:
borderBottom: "1px solid #333", </div>
paddingBottom: "8px", <div>webOS: {appStatus.webOSVersion || "unknown"}</div>
}} <div>
> deviceId:{" "}
<div style={{ color: "#00ff00", marginBottom: "5px" }}> {appStatus.deviceId
📱 Launch Params: ? 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 style={{ fontSize: "10px", color: "#cccccc" }}>
{(() => { {/* Right Column */}
try { <div style={{ flex: 1, fontSize: "11px" }}>
const getLaunchParams = () => { {/* 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={{
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
) { ) {
try { currentParams = JSON.parse(window.PalmSystem.launchParams);
let params = JSON.parse(window.PalmSystem.launchParams); if (
if (params["x-webos-app-container-launch"] === true) { currentParams["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(); <>
return JSON.stringify(params, null, 2); <div>time: {new Date().toLocaleTimeString()}</div>
} catch (e) { <div>
return "Error: " + e.message; current:{" "}
} <span
})()} style={{
</div> color: currentParams.contentTarget
</div> ? "#00ff00"
: "#ff6666",
{/* App Status */} }}
<div >
style={{ {currentParams.contentTarget || "MISSING"}
marginBottom: "10px", </span>
borderBottom: "1px solid #333", </div>
paddingBottom: "8px", </>
}} );
> } catch (e) {
<div style={{ color: "#00ff00", marginBottom: "5px" }}> return (
📊 App Status: <div style={{ color: "#ff6666" }}>Error: {e.message}</div>
</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 style={{ marginTop: "10px" }}> <div
<div style={{ color: "#00ff00", marginBottom: "5px" }}> style={{ marginTop: "8px", fontSize: "8px", paddingBottom: "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 (
<>
<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" }}> <>
Raw format (not V2/V3) <div>
</div> Version: {tokens[0]}, Code: {tokens[1]}, Name: {tokens[2]}
, Type: {tokens[3]}
</div>
{tokens.length > 4 && (
<div>Extra: {tokens.slice(4).join("_")}</div>
)}
</>
); );
})()} }
</div> return (
<div style={{ color: "#ff6666" }}> Not V2/V3 format</div>
);
})()}
</div> </div>
)} )}
</div> </div>