DECISION: Replace the user's existing ChatGPT launcher entry with R0.3
DECISION: Keep the user's 8780/hand_launcher/#/chatgpt address and replace its old R0.1 destination with the reviewed R0.3 workspace. WHY: On 2026-11-17 the user showed the older launcher displaying 1011 parts and explicitly asked to update that exact entry. Providing the separate 8764 gallery address did not update the page they actually use. This follows the exterior-first decision in design-docs/lh20-r03-exterior-first.md. ALTERNATIVE CONSIDERED AND REJECTED: Asking the user to keep switching to another launcher would leave the stale bookmark unresolved. WHAT CHANGES: Record the existing previously untracked launcher while changing only the ChatGPT label, workspace, editor URL, preview, description and restart command. Preserve the Claude entry verbatim and the existing hash route. Checked: Served HTML matches the file, JavaScript syntax passes, preview and editor return HTTP 200, and the original browser route displays R0.3 with 146 parts. The Claude entry matches the before-edit copy. Co-Authored-By: Codex <noreply@openai.com>
This commit is contained in:
@@ -0,0 +1,154 @@
|
||||
<!doctype html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>灵巧手选择</title>
|
||||
<style>
|
||||
:root {
|
||||
--bg: #f4f4f2; --panel: #ffffff; --ink: #1c1d20; --muted: #6a6d74; --line: #dddcd7;
|
||||
--accent: #d9661f; --ok: #2f8a4c; --off: #a8a9ad;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root { --bg: #15161a; --panel: #1f2026; --ink: #ececea; --muted: #9a9ca3; --line: #2e3038; --accent: #ef8a45; --ok: #4fbf72; --off: #5c5e66; }
|
||||
}
|
||||
* { box-sizing: border-box; }
|
||||
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
|
||||
font: 15px/1.5 -apple-system, "PingFang SC", "Helvetica Neue", sans-serif; }
|
||||
header { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--line);
|
||||
background: var(--panel); position: sticky; top: 0; z-index: 2; flex-wrap: wrap; }
|
||||
header h1 { font-size: 16px; margin: 0 8px 0 0; font-weight: 600; }
|
||||
nav { display: flex; gap: 6px; flex-wrap: wrap; }
|
||||
nav a { text-decoration: none; color: var(--ink); padding: 6px 12px; border-radius: 6px; border: 1px solid var(--line); }
|
||||
nav a.active { background: var(--ink); color: var(--panel); border-color: var(--ink); }
|
||||
.spacer { flex: 1; }
|
||||
.ext { color: var(--muted); font-size: 13px; text-decoration: none; }
|
||||
.ext:hover { color: var(--accent); }
|
||||
main.home { max-width: 1100px; margin: 0 auto; padding: 24px 16px 40px; }
|
||||
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
|
||||
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
|
||||
display: flex; flex-direction: column; text-decoration: none; color: inherit; }
|
||||
.card:hover { border-color: var(--accent); }
|
||||
.thumb { aspect-ratio: 4 / 3; background: #0b0b0d; display: flex; align-items: center; justify-content: center; }
|
||||
.thumb img { width: 100%; height: 100%; object-fit: contain; }
|
||||
.body { padding: 14px 16px 16px; }
|
||||
.body h2 { margin: 0 0 4px; font-size: 17px; }
|
||||
.body p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
|
||||
.status { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
|
||||
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--off); }
|
||||
.dot.up { background: var(--ok); }
|
||||
.frame { position: fixed; inset: 49px 0 0 0; }
|
||||
.frame iframe { width: 100%; height: 100%; border: 0; background: var(--bg); }
|
||||
.down { max-width: 640px; margin: 60px auto; padding: 0 16px; }
|
||||
code { background: var(--line); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
|
||||
pre { background: var(--panel); border: 1px solid var(--line); padding: 10px 12px; border-radius: 6px; overflow-x: auto; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>灵巧手</h1>
|
||||
<nav id="nav"></nav>
|
||||
<span class="spacer"></span>
|
||||
<a class="ext" id="ext" target="_blank" rel="noopener"></a>
|
||||
</header>
|
||||
<div id="view"></div>
|
||||
|
||||
<script>
|
||||
// Each hand: its editor URL, a picture from its own renders, and how to start it.
|
||||
const HANDS = [
|
||||
{
|
||||
id: "claude", name: "Claude 做的手", tag: "dexterous_hand_20dof",
|
||||
url: "http://127.0.0.1:8771/",
|
||||
thumb: "../dexterous_hand_20dof/out/renders/hand_open_iso.png",
|
||||
text: "20 自由度、每关节空心轴模组直驱,运动学和 Wuji Hand 2 一致(指尖偏差 0.0018 mm)。54 个零件,20 个关节滑块。",
|
||||
start: ".venv-hand/bin/sca edit examples/dexterous_hand_20dof --port 8771 --no-browser",
|
||||
},
|
||||
{
|
||||
id: "chatgpt", name: "ChatGPT 做的手 · R0.3", tag: "lh20_hand_r03 (LH20 R0.3)",
|
||||
url: "http://127.0.0.1:8785/",
|
||||
thumb: "../lh20_hand_r03/out/hand_front.png",
|
||||
text: "LH20 R0.3 外形重设计:纤细指节、圆顶指尖、关节开口、收腰掌壳与虎口过渡。146 个外形零件、20 轴布局;内部驱动尚待适配。",
|
||||
start: ".venv/bin/sca edit examples/lh20_hand_r03/hand.py --host 127.0.0.1 --port 8785 --no-browser",
|
||||
},
|
||||
];
|
||||
|
||||
const up = {};
|
||||
|
||||
// An editor on another port answers an opaque no-cors request when it is running.
|
||||
async function probe(hand) {
|
||||
try {
|
||||
await fetch(hand.url, { mode: "no-cors", cache: "no-store" });
|
||||
up[hand.id] = true;
|
||||
} catch (e) {
|
||||
up[hand.id] = false;
|
||||
}
|
||||
}
|
||||
|
||||
function route() {
|
||||
const id = location.hash.replace(/^#\/?/, "");
|
||||
return HANDS.find(h => h.id === id) || null;
|
||||
}
|
||||
|
||||
function renderNav(current) {
|
||||
const nav = document.getElementById("nav");
|
||||
nav.innerHTML = "";
|
||||
const home = document.createElement("a");
|
||||
home.href = "#/"; home.textContent = "全部";
|
||||
if (!current) home.className = "active";
|
||||
nav.appendChild(home);
|
||||
for (const h of HANDS) {
|
||||
const a = document.createElement("a");
|
||||
a.href = "#/" + h.id; a.textContent = h.name;
|
||||
if (current && current.id === h.id) a.className = "active";
|
||||
nav.appendChild(a);
|
||||
}
|
||||
const ext = document.getElementById("ext");
|
||||
if (current) { ext.href = current.url; ext.textContent = "在新标签页打开 ↗"; ext.style.display = ""; }
|
||||
else { ext.style.display = "none"; }
|
||||
}
|
||||
|
||||
function statusHtml(h) {
|
||||
const state = up[h.id];
|
||||
const label = state === undefined ? "检查中…" : state ? "编辑器运行中" : "编辑器没有运行";
|
||||
return `<span class="status"><span class="dot ${state ? "up" : ""}"></span>${label} · ${h.url.replace("http://", "")}</span>`;
|
||||
}
|
||||
|
||||
function renderHome() {
|
||||
const view = document.getElementById("view");
|
||||
view.innerHTML = `<main class="home"><div class="cards">${HANDS.map(h => `
|
||||
<a class="card" href="#/${h.id}">
|
||||
<div class="thumb"><img src="${h.thumb}" alt="${h.name}" onerror="this.style.display='none'"></div>
|
||||
<div class="body">
|
||||
<h2>${h.name}</h2>
|
||||
${statusHtml(h)}
|
||||
<p>${h.text}</p>
|
||||
<p><code>examples/${h.tag.split(" ")[0]}</code></p>
|
||||
</div>
|
||||
</a>`).join("")}</div></main>`;
|
||||
}
|
||||
|
||||
function renderHand(h) {
|
||||
const view = document.getElementById("view");
|
||||
if (up[h.id] === false) {
|
||||
view.innerHTML = `<div class="down"><h2>${h.name}的编辑器没有运行</h2>
|
||||
<p>在仓库根目录运行下面的命令,再刷新这个页面:</p><pre>${h.start}</pre></div>`;
|
||||
return;
|
||||
}
|
||||
// keep the same iframe when re-rendering the same hand
|
||||
const existing = view.querySelector("iframe");
|
||||
if (existing && existing.dataset.id === h.id) return;
|
||||
view.innerHTML = `<div class="frame"><iframe data-id="${h.id}" src="${h.url}" title="${h.name}"></iframe></div>`;
|
||||
}
|
||||
|
||||
function render() {
|
||||
const current = route();
|
||||
renderNav(current);
|
||||
if (current) renderHand(current); else renderHome();
|
||||
}
|
||||
|
||||
window.addEventListener("hashchange", render);
|
||||
render();
|
||||
Promise.all(HANDS.map(probe)).then(render);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user