rig-review 0.25.0 → 0.25.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/docs/DESIGN.md CHANGED
@@ -58,7 +58,7 @@ The single review page is one inspection workspace: a left column, the stage, th
58
58
 
59
59
  - **Left column.** A fixed header row (Parts title and slot search on one line; the search's name, *Find slot*, is its `aria-label`) and one scrolling body. Nothing sits above the header and it never scrolls. The body holds, in order, the checkpoints/reference strip (current checkpoint title, checkpoints and the reference select, folded into a compact strip that opens when the package supplies checkpoints or references), the part list and browser Settings; it is the column's only scroll container. Settings opens and closes from its own header (`#settings-toggle`, `aria-expanded`, controlling `#settings-body`); it starts collapsed and the state is a browser preference.
60
60
  - **Header.** The **Setup** / **Animate** mode switch sits next to the package title and is the Inspector's only section control: its buttons carry `data-inspector` and `aria-pressed`, and every section change (click, `showInspector` from a part selection or a tool, a restored bookmark) goes through them. On the right, **Write review** (primary) opens the review dialog. The top bar has no feedback export buttons; `rig-review feedback --format json|issue` is the export path.
61
- - **View bar.** One row: the persistent image / mesh edges / bone points layer toggles (keys `I`, `M`, `B`), camera sync and zoom, then the **View** menu (a `<details>` holding Side by side, Reference and Rig, labelled with the effective choice) at the right end. The toggles stay native checkboxes, so their checked state is the pressed state, the draft input and the `layers` control value. A disabled toggle names the footer's layer reason as its tooltip. Turning images off leaves the mesh/bone overlay alone. Appearance lives only in Settings (its Theme select shows the inspection's current appearance and drives it), the per-inspection Repeat idle toggle lives in the Animate transport row, and there is no Copy view link button: the persisted `#review=` fragment stays in the address bar and the numeric region stays behind **View region**.
61
+ - **View bar.** The persistent image / mesh edges / bone points layer toggles (keys `I`, `M`, `B`), camera sync and zoom, then the **View** menu (a `<details>` holding Side by side, Reference and Rig, labelled with the effective choice) at the right end, wrapping when the stage is narrow so every control stays in reach. The toggles stay native checkboxes, so their checked state is the pressed state, the draft input and the `layers` control value. A disabled toggle names the footer's layer reason as its tooltip. Turning images off leaves the mesh/bone overlay alone. Appearance lives only in Settings (its Theme select shows the inspection's current appearance and drives it), the per-inspection Repeat idle toggle lives in the Animate transport row, and there is no Copy view link button: the persisted `#review=` fragment stays in the address bar and the numeric region stays behind **View region**.
62
62
  - **Panel headers and scrolling.** The left column's header is a fixed row outside its scrolling body. The Inspector heading, the Settings title and each drawer's header (title and close) carry `.sticky-header` and are their panel's first child, so the body scrolls beneath them. Every scrolling region shares one thin scrollbar rule on `*` whose colours are the `--rv-scrollbar-*` tokens. Resize separators are drawn 4px with a 16px transparent hit area (22px on coarse pointers) and use `--rv-separator` / `--rv-separator-hover`, never a scrollbar colour.
63
63
  - **Chest-region editor.** In Setup only, the view bar's **Chest regions** toggle (`#chest-edit`, `aria-pressed`) opens `#chest-editor-bar` under the view bar: R / L groups (X, Y, R, Band), Mirror R → L, Download JSON, **Apply · Rebuild** and **Reset**. Apply sends the rows to the installed producer (`rig-parts remesh` on that part, then `rigc build`) through `POST /api/rebuild` (`src/rebuild.ts`, `src/producer.ts`) and loads the compiled scratch build in place; the producer's lines stream into `#chest-editor-status` and `#chest-editor-log`, a refusal shows its first named line verbatim, and Reset returns to the inspected build (README, *Chest regions*). The circles, their centre / core / band handles and labels are drawn on `#rig-overlay` through the crop → world mapping; handle drags (move, r, band) are clamped live with the example rebuild script's non-overlap rule (`CHEST_REGIONS_CLAMPED`) and never move the camera, while other drags and Space-drags pan. The values are the Setup **Chest regions · detail** block's fields, so its draft, export and binding apply unchanged; the block keeps names, bones, semi-axes, clip and the contour. Review builds no mesh: the rebuild is the producer's, into scratch under the state directory, never into the package. A **Circles** / **Landmarks** switch (`#bust-mode`, a hidden input the draft keeps) selects what Apply sends: Landmarks (#105) places the right apex, left apex and cleavage with draggable markers (`#lm-*`), alpha and clearance sliders and optional bone names, draws the producer's derived `bust_r` / `bust_l` live (`src/chest-landmarks.ts`, a transcription of parts' `deriveBustRegions`) and sends `{part, bust, configHash}`; review pre-checks only `CONFIG_BUST_CLEARANCE` and leaves bones and names to the producer.
64
64
  - **Mesh panel.** In Setup, after Chest regions · detail: `#mesh-panel` for the selected mesh part — mode-specific sliders with number fields (`#mesh-params`), regions (`#mesh-regions`; **Add circle**, **Draw polygon** and **Drag on stage** with `aria-pressed`), segments (`#mesh-segments`, bones from the loaded model, ribs stations per chain), the pending diff (`#mesh-diff`), the pre-check (`#mesh-precheck`), **Apply** / **Reset** / **Folds reading**, the status (`#mesh-status`), the counts (`#mesh-counts`) and the `TEXTURE_STRETCH` readout (`#mesh-readout`). Region colours are theme tokens (`--rv-mesh-region`, `--rv-mesh-region-fill`, `--rv-mesh-handle`).
package/docs/PANELS.md CHANGED
@@ -197,7 +197,7 @@ verbatim. A kind the rig spec cannot offer (no mesh slot, no ik or transform
197
197
  constraint, fewer than two slots) is disabled with the reason. The file rides
198
198
  submitted feedback by hash and content as `context.requirements`.
199
199
 
200
- The view bar is one row and keeps the layer toggles in reach in every section: **Images**
200
+ The view bar wraps when the stage is narrow and keeps every control and the layer toggles in reach in every section: **Images**
201
201
  (`I`), **Mesh edges** (`M`) and **Bone points** (`B`). The keys do nothing while
202
202
  a text field, textarea, select or editable text has focus, with Ctrl/Alt/Cmd
203
203
  held, or on key repeat; Space stays pan and Enter stays frame entry. A disabled
@@ -422,7 +422,7 @@ remains independent, temporary and unrecorded.
422
422
 
423
423
  ## Stage comments
424
424
 
425
- The visible **Comment · C (n)** stage button is the single comment control on both the review and compare toolbars (rig, compare A/B and reference video). Turning it on enters comment mode and opens the **Comments** list; turning it off, or pressing Escape, leaves both. In comment mode, drag a rectangle (or click a point), type in the inline composer, and press Enter. Playback pauses, turn is held, and the composer receives focus; Escape cancels and leaves comment mode and the list. Text is the only required input. An active Edit Mesh keeps its Create shortcut C; leave the editor before using Comment. With Comment off, selection, turn and camera gestures keep their normal behavior.
425
+ The visible **Comment · C (n)** stage button is the single comment control on both the review and compare toolbars (rig, compare A/B and reference video). Turning it on enters comment mode and opens the **Comments** list below the view bar at any width, so an open list covers no bar control; turning it off, or pressing Escape, leaves both. In comment mode, drag a rectangle (or click a point), type in the inline composer, and press Enter. Playback pauses, turn is held, and the composer receives focus; Escape cancels and leaves comment mode and the list. Text is the only required input. An active Edit Mesh keeps its Create shortcut C; leave the editor before using Comment. With Comment off, selection, turn and camera gestures keep their normal behavior.
426
426
 
427
427
  The **Comments** list shows numbered marks with their placement mode. Setup and Animate marks appear on the stage only in that mode; the compare page always records Compare. Returning to a mode shows its marks again at their captured pose. Pins stay visible on the stage when comment mode is off, and clicking a pin enters comment mode and opens the list. Clicking either a pin or a list row restores its captured mode before its exact frame/time, camera and turn and opens that comment in the same inline composer. Rows have no separate Edit button; **Delete** lives inside the composer for unsubmitted comments, and submitted marks open read-only in the composer and list. Placement mode is captured when the gesture begins, before asynchronous crop/save; changing mode cancels the pending drag or composer and never rebinds it. Pins and rectangles use world coordinates (reference pixels, Y down, for the video), follow zoom and pan, and appear only at the captured frame/time and dial state. Reference letterboxing is included in its camera mapping. The list is also a way back to a mark hidden in another mode or pose. JSON exports index every canonical feedback comment by mode; Markdown places the full comments under their mode headings. Missing mode refuses `COMMENT_MODE_MISSING`, unknown mode refuses `COMMENT_MODE_UNKNOWN`, and a mode incompatible with the saved page/inspector refuses `COMMENT_MODE_MISMATCH`; no missing-mode guess or migration is made. Ordinary feedback and legacy text context are unchanged.
428
428
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rig-review",
3
- "version": "0.25.0",
3
+ "version": "0.25.2",
4
4
  "type": "module",
5
5
  "description": "Local human rig inspection and structured feedback export",
6
6
  "license": "MIT",
package/web/compare.css CHANGED
@@ -133,7 +133,7 @@ body{display:grid;grid-template-rows:auto minmax(0,1fr) auto}.layout{grid-templa
133
133
  #turn-pad-host>p{margin:0 12px 6px}
134
134
 
135
135
  /* Source-bound stage comments; the layer never intercepts ordinary inspection. */
136
- main{position:relative}.stage-comment-mode{cursor:crosshair}.stage-comment-mode video{pointer-events:none}.stage-comment-layer{position:absolute;inset:0;pointer-events:none;z-index:20;overflow:hidden}.stage-comment-region{position:absolute;border:2px solid var(--link);pointer-events:none}.stage-comment-pin{position:absolute;transform:translate(-50%,-50%);border-radius:50%;min-width:26px;height:26px;padding:2px 5px;background:var(--link);color:var(--btn-fg);pointer-events:auto}.stage-comment-composer{position:absolute;z-index:30;width:286px;padding:10px;background:var(--rv-panel);border:1px solid var(--link);border-radius:6px;box-shadow:0 4px 20px var(--rv-backdrop)}.stage-comment-composer input{width:100%}.stage-comment-composer small{display:block;margin-top:6px;color:var(--fg-muted)}.stage-comment-composer p{color:var(--fail);margin:4px 0}.stage-comment-list{position:absolute;z-index:40;right:8px;top:55px;width:310px;max-width:90%;max-height:60%;overflow:auto;background:var(--rv-panel);border:1px solid var(--border-strong);padding:12px;border-radius:6px}.stage-comment-item{padding:8px 0;border-bottom:1px solid var(--border)}.stage-comment-item>button:first-child{display:block;width:100%;text-align:left;overflow-wrap:anywhere}.stage-comment-item span{display:block;color:var(--fg-muted)}
136
+ main{position:relative}.viewbar,.toolbar{anchor-name:--stage-comment-bar}#stage-comment{white-space:nowrap;flex:none}#stage-comment-refusal{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.stage-comment-refusal-note{display:block;margin-top:4px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:var(--fg-muted)}.stage-comment-mode{cursor:crosshair}.stage-comment-mode video{pointer-events:none}.stage-comment-layer{position:absolute;inset:0;pointer-events:none;z-index:20;overflow:hidden}.stage-comment-region{position:absolute;border:2px solid var(--link);pointer-events:none}.stage-comment-pin{position:absolute;transform:translate(-50%,-50%);border-radius:50%;min-width:26px;height:26px;padding:2px 5px;background:var(--link);color:var(--btn-fg);pointer-events:auto}.stage-comment-composer{position:absolute;z-index:30;width:286px;padding:10px;background:var(--rv-panel);border:1px solid var(--link);border-radius:6px;box-shadow:0 4px 20px var(--rv-backdrop)}.stage-comment-composer input{width:100%}.stage-comment-composer small{display:block;margin-top:6px;color:var(--fg-muted)}.stage-comment-composer p{color:var(--fail);margin:4px 0}.stage-comment-list{position:absolute;position-anchor:--stage-comment-bar;z-index:40;right:8px;top:calc(anchor(bottom,50px) + 5px);width:310px;max-width:90%;max-height:60%;overflow:auto;background:var(--rv-panel);border:1px solid var(--border-strong);padding:12px;border-radius:6px}.stage-comment-item{padding:8px 0;border-bottom:1px solid var(--border)}.stage-comment-item>button:first-child{display:block;width:100%;text-align:left;overflow-wrap:anywhere}.stage-comment-item span{display:block;color:var(--fg-muted)}
137
137
 
138
138
  /* Top mode switch and picked-build Setup/Animate panels (#234). */
139
139
  .mode-switch{display:flex;gap:3px;padding:3px;border:1px solid var(--border-strong);border-radius:8px;background:var(--rv-segmented)}
@@ -171,7 +171,6 @@ main{position:relative}.stage-comment-mode{cursor:crosshair}.stage-comment-mode
171
171
  .applied-records{padding:12px 15px;border-bottom:1px solid var(--border);background:var(--rv-panel);font-size:11px}.applied-records .row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.applied-records .eyebrow{margin:0}.applied-records button{padding:4px 9px;font-size:11px}.applied-list{margin:0 0 6px;padding-left:0;list-style:none;display:flex;flex-direction:column;gap:3px}.applied-list li{font:11px var(--font-mono);color:var(--fg-muted);overflow-wrap:anywhere}.applied-list li.on-stage{color:var(--fg-strong)}#applied-status{margin:0}#applied-status.error{color:var(--fail)}
172
172
  .density-strip{margin-top:12px;padding-top:10px;border-top:1px solid var(--border)}.density-strip-form label{display:inline-flex;align-items:center;gap:4px}.density-strip-form input[type=number]{width:64px}.density-strip-table{overflow-x:auto;max-width:100%}.density-strip-rows{width:100%;border-collapse:collapse;font:11px var(--font-mono);font-variant-numeric:tabular-nums}.density-strip-rows th,.density-strip-rows td{padding:4px 6px;border-top:1px solid var(--border);text-align:left;vertical-align:top}.density-strip-rows th{color:var(--fg-muted);font-weight:500;white-space:nowrap}.density-strip-rows tr.pending td{background:var(--rv-pressed-bg)}.density-strip-rows tr.refused td{color:var(--fg-muted)}.density-strip-value strong{display:block;color:var(--fg-strong)}.density-strip-label{display:block;margin-top:3px;padding:1px 5px;border:1px solid var(--rv-pressed-border);border-radius:4px;color:var(--fg-strong);white-space:nowrap;font-family:var(--font-sans)}.density-strip-bars div{white-space:nowrap}.density-strip-verdict{min-width:140px;max-width:340px;overflow-wrap:anywhere}.density-strip-verdict.pass{color:var(--pass)}.density-strip-actions{white-space:nowrap}.density-strip-actions button{margin:0 4px 4px 0}
173
173
  /* Key inspection and dopesheet editing (#235): tokens only. */
174
- #stage-comment-refusal{flex:0 1 180px;min-width:0;max-width:220px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:var(--fg-muted)}
175
174
  .inspector-body{display:flex;flex-direction:column;min-height:0;overflow:hidden}
176
175
  .inspector-body>[data-inspector-panel]{flex:1 1 0;min-height:0}
177
176
  .applied-records:not([hidden]){display:flex;align-items:center;gap:8px;padding:1px 10px;height:20px;min-height:20px;max-height:20px;box-sizing:border-box;overflow:hidden;flex:none}
@@ -54,8 +54,10 @@ export function bindStageComments(host:Host):{refresh:()=>void;dispose:()=>void;
54
54
  const toggle=document.getElementById('stage-comment') as HTMLButtonElement;Object.assign(toggle.style,{whiteSpace:'nowrap',flex:'none'});
55
55
  const list=document.createElement('section');list.id='stage-comment-list';list.className='stage-comment-list stage-comment-ui';list.setAttribute('aria-label',t('Stage comments'));list.hidden=true;
56
56
  // An absolute overlay is not stage chrome: workspace measures stack children
57
- // to allocate Inspector height. Keep the list in its positioned main instead.
57
+ // to allocate Inspector height. Keep the list in its positioned main instead,
58
+ // anchored below the toolbar even when the bar wraps (#284).
58
59
  const workspace=host.toolbar.closest('main');if(workspace)workspace.append(list);else host.toolbar.after(list);
60
+ const placeList=()=>{const bar=host.toolbar.getBoundingClientRect?.(),parent=(workspace??host.toolbar).getBoundingClientRect?.();if(bar&&parent&&Number.isFinite(bar.bottom)&&Number.isFinite(parent.top)&&bar.bottom>parent.top){const topPx=`${Math.ceil(bar.bottom-parent.top)+5}px`;if(list.style.top!==topPx)list.style.top=topPx;}};
59
61
  const refusalNote=document.createElement('small');refusalNote.id='stage-comment-refusal';refusalNote.setAttribute('role','status');refusalNote.hidden=true;Object.assign(refusalNote.style,{position:'absolute',width:'1px',height:'1px',overflow:'hidden',clipPath:'inset(50%)',whiteSpace:'nowrap'});toggle.after(refusalNote);toggle.setAttribute('aria-describedby',refusalNote.id);toggle.setAttribute('aria-controls',list.id);toggle.setAttribute('aria-expanded','false');const originalTitle=toEn(toggle.title);
60
62
  const updateRefusal=()=>{const raw=host.refusal?.()??null,reason=raw?t(raw):null,prev=refusalNote.textContent||'',nextTitle=reason??t(originalTitle);toggle.disabled=false;if(toggle.title!==nextTitle)toggle.title=nextTitle;if(refusalNote.title!==(reason??''))refusalNote.title=reason??'';if(refusalNote.textContent!==(reason??''))refusalNote.textContent=reason??'';refusalNote.hidden=!reason;if(!list.hidden&&(reason??'')!==prev)renderList();return reason;};
61
63
  const layers=new Map<StageComment['viewport'],HTMLDivElement>();for(const [key,pane]of Object.entries(host.viewports)){const layer=document.createElement('div');layer.className='stage-comment-layer';pane!.append(layer);layers.set(key as StageComment['viewport'],layer);}
@@ -70,12 +72,12 @@ export function bindStageComments(host:Host):{refresh:()=>void;dispose:()=>void;
70
72
  if(host.shortcutBlocked?.()){host.error(t('COMMENT_BUSY: close the active editor or wait for the inspection to settle'));return;}
71
73
  const reason=updateRefusal();
72
74
  if(!reason&&host.blocked()){host.error(t('COMMENT_BUSY: close the active editor or wait for the inspection to settle'));return;}
73
- list.hidden=false;toggle.setAttribute('aria-expanded','true');renderList();
75
+ list.hidden=false;placeList();toggle.setAttribute('aria-expanded','true');renderList();
74
76
  if(reason){setCapture(false);host.error(reason);return;}
75
77
  setCapture(true);
76
78
  };
77
79
  const openComment=async(f:Feedback)=>{const mark=markOf(f);if(!mark)return;if(list.hidden)setOpen(true);if(list.hidden)return;if(await jump(f)){const reason=updateRefusal();setCapture(!reason&&!host.blocked());openComposer(mark.viewport,mark.screen,f,host.pose(mark.viewport)?.mode??mark.mode);}};
78
- const renderList=()=>{list.setAttribute('aria-label',t('Stage comments'));list.replaceChildren();const title=document.createElement('strong');title.textContent=t('Comments');list.append(title);const rawReason=host.refusal?.()??null,reason=rawReason?t(rawReason):null;if(reason){const note=document.createElement('small');note.className='stage-comment-refusal-note';note.title=reason;note.textContent=reason;Object.assign(note.style,{display:'block',marginTop:'4px',maxWidth:'100%',whiteSpace:'nowrap',overflow:'hidden',textOverflow:'ellipsis'});list.append(note);}const all=host.feedback().filter(f=>markOf(f));toggle.textContent=t(`Comment · C (${all.length})`);if(!all.length){const empty=document.createElement('p');empty.textContent=t(reason?'Read only · Escape closes':'Mark a point or region, then type. Enter saves · Escape cancels.');list.append(empty);}for(const [i,f]of all.entries()){
80
+ const renderList=()=>{placeList();list.setAttribute('aria-label',t('Stage comments'));list.replaceChildren();const title=document.createElement('strong');title.textContent=t('Comments');list.append(title);const rawReason=host.refusal?.()??null,reason=rawReason?t(rawReason):null;if(reason){const note=document.createElement('small');note.className='stage-comment-refusal-note';note.title=reason;note.textContent=reason;Object.assign(note.style,{display:'block',marginTop:'4px',maxWidth:'100%',whiteSpace:'nowrap',overflow:'hidden',textOverflow:'ellipsis'});list.append(note);}const all=host.feedback().filter(f=>markOf(f));toggle.textContent=t(`Comment · C (${all.length})`);if(!all.length){const empty=document.createElement('p');empty.textContent=t(reason?'Read only · Escape closes':'Mark a point or region, then type. Enter saves · Escape cancels.');list.append(empty);}for(const [i,f]of all.entries()){
79
81
  const mark=markOf(f)!,row=document.createElement('div');row.className='stage-comment-item';row.dataset.commentId=f.id;
80
82
  const go=document.createElement('button');go.type='button';go.className='stage-comment-summary';go.textContent=`${i+1} · ${mark.mode.toUpperCase()} · ${mark.viewport.toUpperCase()} · ${mark.frame?`F${mark.frame.index} (${mark.frame.basis})`:t(feedbackTimingLabel(f))} · ${f.summary}`;go.onclick=()=>openComment(f);row.append(go);
81
83
  if(host.locked(f.id)){const submitted=document.createElement('span');submitted.textContent=t('Submitted');row.append(submitted);}
@@ -146,8 +148,9 @@ export function bindStageComments(host:Host):{refresh:()=>void;dispose:()=>void;
146
148
  disposers.push(()=>{pane!.removeEventListener('pointerdown',down,true);pane!.removeEventListener('pointermove',move,true);pane!.removeEventListener('pointerup',up,true);pane!.removeEventListener('pointercancel',abort,true);pane!.removeEventListener('lostpointercapture',abort,true);});
147
149
  }
148
150
  const key=(e:KeyboardEvent)=>{if(e.key==='Escape'&&(pending||composer||(enabled||!list.hidden)&&!host.shortcutBlocked?.()&&!textEntryFocused(e.target))){e.preventDefault();setOpen(false);return;}if(e.defaultPrevented||e.repeat||e.ctrlKey||e.metaKey||e.altKey||textEntryFocused(e.target)||host.shortcutBlocked?.())return;if(e.key.toLowerCase()==='c'){e.preventDefault();setOpen(list.hidden);}};
149
- window.addEventListener('blur',cancel);document.addEventListener('keydown',key);toggle.onclick=()=>setOpen(list.hidden);
150
- const renderPins=()=>{if(disposed)return;const refusal=updateRefusal();if(refusal&&(enabled||pending||composer&&!composerReadOnly)){cancel();setCapture(false);host.error(refusal);}const all=host.feedback().map(f=>({f,mark:markOf(f)})).filter(x=>x.mark);
151
+ window.addEventListener('blur',cancel);window.addEventListener('resize',placeList);document.addEventListener('keydown',key);toggle.onclick=()=>setOpen(list.hidden);
152
+ const ro=typeof ResizeObserver==='function'?new ResizeObserver(()=>{if(!disposed&&!list.hidden)placeList();}):null;if(ro){try{ro.observe(host.toolbar);if(workspace)ro.observe(workspace);}catch{}}
153
+ const renderPins=()=>{if(disposed)return;if(!list.hidden)placeList();const refusal=updateRefusal();if(refusal&&(enabled||pending||composer&&!composerReadOnly)){cancel();setCapture(false);host.error(refusal);}const all=host.feedback().map(f=>({f,mark:markOf(f)})).filter(x=>x.mark);
151
154
  const poses=new Map([...layers.keys()].map(view=>[view,host.pose(view)]));
152
155
  if(draftMark&&poses.get(draftMark.view)?.mode!==draftMark.mode||pending&&poses.get(pending.view)?.mode!==pending.mode)cancel();
153
156
  const signature=JSON.stringify([curLang(),refusal,all.map(({f,mark})=>[f.id,f.summary,mark!.mode,mark!.world]),[...poses].map(([view,p])=>[view,p?.mode,p?.animation,p?.frame,p?.timeBasis,p?.time,p?.turn,p?.camera,p?.referenceId,p?.referenceHash]),draftMark]);
@@ -157,5 +160,5 @@ export function bindStageComments(host:Host):{refresh:()=>void;dispose:()=>void;
157
160
  }if(draftMark)layers.get(draftMark.view)?.append(rectElement(draftMark.screen));}};
158
161
  const paint=()=>{if(disposed)return;renderPins();raf=requestAnimationFrame(paint);};
159
162
  const offLang=onLang(()=>{if(disposed)return;updateRefusal();renderList();syncComposerLang?.();last='';renderPins();});
160
- refresh();paint();return {active:()=>enabled,draft:()=>!!pending||!!composer&&!composerReadOnly,refresh,dispose:()=>{disposed=true;offLang();cancelAnimationFrame(raf);cancel();window.removeEventListener('blur',cancel);document.removeEventListener('keydown',key);for(const dispose of disposers)dispose();for(const layer of layers.values())layer.remove();list.remove();refusalNote.remove();}};
163
+ refresh();paint();return {active:()=>enabled,draft:()=>!!pending||!!composer&&!composerReadOnly,refresh,dispose:()=>{disposed=true;ro?.disconnect();offLang();cancelAnimationFrame(raf);cancel();window.removeEventListener('blur',cancel);window.removeEventListener('resize',placeList);document.removeEventListener('keydown',key);for(const dispose of disposers)dispose();for(const layer of layers.values())layer.remove();list.remove();refusalNote.remove();}};
161
164
  }
package/web/styles.css CHANGED
@@ -146,9 +146,9 @@ main{min-height:0;overflow:hidden;display:flex;flex-direction:column}
146
146
  .layer-toggle:has(input:disabled){opacity:.45;cursor:default}
147
147
  .layer-toggle:has(input:focus-visible){outline:2px solid var(--rv-focus);outline-offset:2px}
148
148
  .layer-toggle kbd{font:10px var(--font-mono);padding:0 4px;border:1px solid var(--border-strong);border-radius:3px;color:var(--fg-muted)}
149
- /* View bar is one row: layers, camera sync and zoom, then the View menu at the right end. */
150
- .viewbar{flex-wrap:nowrap;justify-content:flex-start;gap:8px;padding:8px 10px;min-width:0}
151
- .viewbar>.layer-toggles{flex:0 1 auto;overflow:hidden}
149
+ /* View bar: layers, camera sync and zoom, then the View menu at the right end; wraps when the stage is narrow. */
150
+ .viewbar{flex-wrap:wrap;justify-content:flex-start;gap:6px 8px;padding:8px 10px;min-width:0;anchor-name:--stage-comment-bar}
151
+ .viewbar>.layer-toggles{flex:none}
152
152
  .viewbar .zoom-controls{flex:none}
153
153
  .view-menu{position:relative;margin-left:auto;flex:none;font-size:11px}
154
154
  .view-menu>summary{list-style:none;cursor:pointer;display:inline-flex;align-items:center;gap:5px;padding:5px 9px;border:1px solid var(--border-strong);border-radius:6px;background:var(--rv-control);white-space:nowrap}
@@ -229,7 +229,7 @@ footer.status-bar{flex-wrap:nowrap}
229
229
  @media(max-width:540px){.review-dialog-header .hint{display:none}}
230
230
  :root{--rv-mesh-region:#ff7ae0;--rv-mesh-region-fill:rgba(255,122,224,.12);--rv-mesh-handle:#ffffff;--rv-bust-r:#00e5ff;--rv-bust-r-fill:rgba(0,229,255,.13);--rv-bust-l:#52ff88;--rv-bust-l-fill:rgba(82,255,136,.13);--rv-bust-overlap:#ff5252;--rv-bust-overlap-fill:rgba(255,82,82,.13);--rv-bust-handle:#ffffff;--rv-bust-ink:#111318;--rv-bust-label-bg:rgba(12,14,18,.82);--rv-bust-flash:#ffcc00;--rv-landmark:#ffd34d;--rv-landmark-fill:#ffd34d;--rv-landmark-ink:#111318}
231
231
  :root[data-theme=light]{--rv-mesh-region:#c2189b;--rv-mesh-region-fill:rgba(194,24,155,.12);--rv-mesh-handle:#ffffff;--rv-bust-r:#00e5ff;--rv-bust-r-fill:rgba(0,229,255,.13);--rv-bust-l:#52ff88;--rv-bust-l-fill:rgba(82,255,136,.13);--rv-bust-overlap:#ff5252;--rv-bust-overlap-fill:rgba(255,82,82,.13);--rv-bust-handle:#ffffff;--rv-bust-ink:#111318;--rv-bust-label-bg:rgba(12,14,18,.82);--rv-bust-flash:#ffcc00;--rv-landmark:#ffd34d;--rv-landmark-fill:#ffd34d;--rv-landmark-ink:#111318}
232
- .view-tools{display:flex;gap:4px;flex:none}.view-tool{padding:5px 9px;font-size:11px;white-space:nowrap}
232
+ .view-tools{display:flex;gap:4px;flex:none}.view-tools:not(:has(:not([hidden]))){display:none}.view-tool{padding:5px 9px;font-size:11px;white-space:nowrap}
233
233
  .chest-editor-bar{display:flex;align-items:center;flex-wrap:wrap;gap:6px 12px;padding:6px 10px;border-bottom:1px solid var(--border);background:var(--rv-bar);font-size:11px}.chest-editor-bar[hidden]{display:none}.chest-editor-bar input[type=range]{width:84px}.chest-editor-bar input[type=text]{width:104px;padding:3px 5px;font-size:11px}.chest-editor-bar output{min-width:2.6em;font:10px/1 var(--font-mono);color:var(--fg)}.chest-editor-bar [data-landmark][aria-pressed=true]{outline:2px solid var(--rv-landmark);outline-offset:1px}#lm-derived{flex:1 1 100%;order:9;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:10px/1.4 var(--font-mono)}#lm-derived.error{color:var(--fail)}.chest-editor-bar .bust-group{display:flex;align-items:center;flex-wrap:wrap;min-width:0;gap:6px;padding-left:10px;border-left:1px solid var(--border)}.chest-editor-bar .bust-group:first-child{padding-left:0;border-left:0}.chest-editor-bar label{display:flex;align-items:center;gap:4px;color:var(--fg-muted)}.chest-editor-bar input[type=number]{width:58px;padding:3px 5px;font-size:11px}.chest-editor-bar button{padding:4px 8px;font-size:11px}.chest-editor-bar button[aria-disabled=true]{opacity:.6}.bust-tag{font-weight:700}.bust-tag-r{color:var(--rv-bust-r)}.bust-tag-l{color:var(--rv-bust-l)}#handoff-line{flex:1 1 100%;order:10;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:10px/1.4 var(--font-mono)}#chest-editor-status{flex:1 1 220px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chest-editor-bar{position:relative}.rebuild-log{position:absolute;top:100%;left:10px;right:10px;z-index:6;margin:4px 0 0;max-height:7.5em;overflow:auto;padding:5px 8px;font:10px/1.5 var(--font-mono);white-space:pre-wrap;overflow-wrap:anywhere;background:var(--code-bg);color:var(--code-fg);border:1px solid var(--border);border-radius:5px}
234
234
  :root{--rv-mesh-veil:rgba(8,10,14,.55);--rv-mesh-edge:#69f1ff;--rv-mesh-hull:#ffb020;--rv-mesh-constraint:#ff4fd8;--rv-mesh-removed:#ff5252;--rv-mesh-vertex:#ffffff;--rv-mesh-ink:#111318;--rv-mesh-selected:#ffe14d;--rv-mesh-added:#52ff88;--rv-mesh-hover:#ffffff;--rv-mesh-box:#ffe14d;--rv-mesh-box-fill:rgba(255,225,77,.12)}
235
235
  :root[data-theme=light]{--rv-mesh-veil:rgba(245,247,251,.6);--rv-mesh-edge:#69f1ff;--rv-mesh-hull:#ffb020;--rv-mesh-constraint:#ff4fd8;--rv-mesh-removed:#ff5252;--rv-mesh-vertex:#ffffff;--rv-mesh-ink:#111318;--rv-mesh-selected:#ffe14d;--rv-mesh-added:#52ff88;--rv-mesh-hover:#ffffff;--rv-mesh-box:#ffe14d;--rv-mesh-box-fill:rgba(255,225,77,.12)}
@@ -388,5 +388,5 @@ footer.status-bar{flex-wrap:nowrap}
388
388
  #turn-pad-host>p{margin:0 12px 6px}
389
389
 
390
390
  /* Source-bound stage comments; the layer never intercepts ordinary inspection. */
391
- main{position:relative}#stage-comment{white-space:nowrap;flex:none}#stage-comment-refusal{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.stage-comment-refusal-note{display:block;margin-top:4px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:var(--fg-muted)}.stage-comment-mode{cursor:crosshair}.stage-comment-mode video{pointer-events:none}.stage-comment-layer{position:absolute;inset:0;pointer-events:none;z-index:20;overflow:hidden}.stage-comment-region{position:absolute;border:2px solid var(--link);pointer-events:none}.stage-comment-pin{position:absolute;transform:translate(-50%,-50%);border-radius:50%;min-width:26px;height:26px;padding:2px 5px;background:var(--link);color:var(--btn-fg);pointer-events:auto}.stage-comment-composer{position:absolute;z-index:30;width:286px;max-width:calc(100% - 8px);max-height:calc(100% - 8px);overflow:auto;overflow-wrap:anywhere;padding:10px;background:var(--rv-panel);border:1px solid var(--link);border-radius:6px;box-shadow:0 4px 20px var(--rv-backdrop)}.stage-comment-composer input{width:100%}.stage-comment-composer small{display:block;margin-top:6px;color:var(--fg-muted)}.stage-comment-composer p{color:var(--fail);margin:4px 0}.stage-comment-list{position:absolute;z-index:40;right:8px;top:55px;width:310px;max-width:90%;max-height:60%;overflow:auto;background:var(--rv-panel);border:1px solid var(--border-strong);padding:12px;border-radius:6px}.stage-comment-item{padding:8px 0;border-bottom:1px solid var(--border)}.stage-comment-item>button:first-child{display:block;width:100%;text-align:left;overflow-wrap:anywhere}.stage-comment-item span{display:block;color:var(--fg-muted)}
391
+ main{position:relative}.toolbar{anchor-name:--stage-comment-bar}#stage-comment{white-space:nowrap;flex:none}#stage-comment-refusal{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.stage-comment-refusal-note{display:block;margin-top:4px;max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px;color:var(--fg-muted)}.stage-comment-mode{cursor:crosshair}.stage-comment-mode video{pointer-events:none}.stage-comment-layer{position:absolute;inset:0;pointer-events:none;z-index:20;overflow:hidden}.stage-comment-region{position:absolute;border:2px solid var(--link);pointer-events:none}.stage-comment-pin{position:absolute;transform:translate(-50%,-50%);border-radius:50%;min-width:26px;height:26px;padding:2px 5px;background:var(--link);color:var(--btn-fg);pointer-events:auto}.stage-comment-composer{position:absolute;z-index:30;width:286px;max-width:calc(100% - 8px);max-height:calc(100% - 8px);overflow:auto;overflow-wrap:anywhere;padding:10px;background:var(--rv-panel);border:1px solid var(--link);border-radius:6px;box-shadow:0 4px 20px var(--rv-backdrop)}.stage-comment-composer input{width:100%}.stage-comment-composer small{display:block;margin-top:6px;color:var(--fg-muted)}.stage-comment-composer p{color:var(--fail);margin:4px 0}.stage-comment-list{position:absolute;position-anchor:--stage-comment-bar;z-index:40;right:8px;top:calc(anchor(bottom,50px) + 5px);width:310px;max-width:90%;max-height:60%;overflow:auto;background:var(--rv-panel);border:1px solid var(--border-strong);padding:12px;border-radius:6px}.stage-comment-item{padding:8px 0;border-bottom:1px solid var(--border)}.stage-comment-item>button:first-child{display:block;width:100%;text-align:left;overflow-wrap:anywhere}.stage-comment-item span{display:block;color:var(--fg-muted)}
392
392
  :root:lang(ko){word-break:keep-all;overflow-wrap:break-word}