@rig-c/review 0.24.1 → 0.25.1
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/README.md +1 -1
- package/docs/DESIGN.md +1 -1
- package/docs/PANELS.md +20 -5
- package/docs/REVIEW_PACKAGE.md +3 -3
- package/docs/WORKFLOWS.md +1 -1
- package/package.json +1 -1
- package/skills/rig-review/SKILL.md +1 -1
- package/web/animation-inspection.ts +2 -1
- package/web/catalog-en.ts +2956 -0
- package/web/catalog-ko.ts +2956 -0
- package/web/compare-picked-tools.ts +4 -3
- package/web/compare.css +6 -0
- package/web/compare.html +1 -1
- package/web/compare.ts +2 -2
- package/web/i18n.ts +1154 -0
- package/web/index.html +1 -1
- package/web/main.ts +6 -5
- package/web/stage-comments.ts +95 -41
- package/web/styles.css +7 -6
- package/web/workspace-preferences.ts +15 -13
- package/web/workspace-ui.ts +8 -7
|
@@ -15,6 +15,7 @@ import { AnimationInspectionPanel, type AnimationSideState } from './animation-i
|
|
|
15
15
|
import type { AnimationSourceOp } from '../src/animation-ops.ts';
|
|
16
16
|
import { partBounds, type PartExplorer } from './part-selection.ts';
|
|
17
17
|
import { bindInspectorBlocks, activeBlocksUI, restoreActiveBlocksUI, type InspectorBlocks } from './inspector-blocks.ts';
|
|
18
|
+
import { sourceTextContent, tr } from './i18n.ts';
|
|
18
19
|
import { bindChestEditor, canvasToCrop, bustLabel, bustSides, LANDMARKS, landmarkInputId, rowCircle, type ChestEditor, type LandmarkKey } from './chest-editor.ts';
|
|
19
20
|
import { chestOverlayCircles, chestOverlayPolygons, chestRegionRows, chestRowId, evaluateChestForm } from './chest-regions-tool.ts';
|
|
20
21
|
import { chestRegionsBinding, cropWorldMapping, type CropWorldMapping } from '../src/chest-regions.ts';
|
|
@@ -834,7 +835,7 @@ export function mountComparePickedTools(host: ComparePickedToolsHost): ComparePi
|
|
|
834
835
|
state.appliedOnStage?.schema === 'rig-review-applied/5' ? state.appliedOnStage : null,
|
|
835
836
|
restored?.panel === 'animation' ? { text: restored.text, error: restored.error } : null,
|
|
836
837
|
);
|
|
837
|
-
const statusText = (id: string) => document.getElementById(id)
|
|
838
|
+
const statusText = (id: string) => sourceTextContent(document.getElementById(id));
|
|
838
839
|
const reconciled = reconcilePanelStatuses(
|
|
839
840
|
{
|
|
840
841
|
chest: chestEditor?.noticeText() ?? '',
|
|
@@ -847,7 +848,7 @@ export function mountComparePickedTools(host: ComparePickedToolsHost): ComparePi
|
|
|
847
848
|
physics: statusText('physics-apply-status'),
|
|
848
849
|
idle: statusText('idle-apply-status'),
|
|
849
850
|
retarget: statusText('retarget-status'),
|
|
850
|
-
animation: document.querySelector('[data-animation-editor-status]')
|
|
851
|
+
animation: sourceTextContent(document.querySelector('[data-animation-editor-status]')),
|
|
851
852
|
},
|
|
852
853
|
state.appliedOnStage,
|
|
853
854
|
restored,
|
|
@@ -2278,7 +2279,7 @@ export function mountComparePickedTools(host: ComparePickedToolsHost): ComparePi
|
|
|
2278
2279
|
applied: () => currentState().appliedOnStage?.schema === 'rig-review-applied/3',
|
|
2279
2280
|
resetBuild: () => resetRebuild(stageWorld()),
|
|
2280
2281
|
message: host.message,
|
|
2281
|
-
confirm: msg => window.confirm(msg),
|
|
2282
|
+
confirm: msg => window.confirm(tr(msg)),
|
|
2282
2283
|
token,
|
|
2283
2284
|
});
|
|
2284
2285
|
disposers.push(() => meshEditor?.dispose());
|
package/web/compare.css
CHANGED
|
@@ -268,3 +268,9 @@ main{position:relative}.stage-comment-mode{cursor:crosshair}.stage-comment-mode
|
|
|
268
268
|
.animation-bone-pick[data-pose-editable=true]{border-color:var(--pass);background:var(--pass)}
|
|
269
269
|
.animation-bone-pick[aria-pressed=true]{outline:3px solid var(--rv-bone-selected);outline-offset:2px}
|
|
270
270
|
#motion-tools>.animation-inspection{flex-basis:100%;min-width:0}
|
|
271
|
+
.workspace-settings>.sticky-header{gap:6px}
|
|
272
|
+
.workspace-settings[data-collapsed=true]>.sticky-header{margin-bottom:0;padding-bottom:0;border-bottom:0}
|
|
273
|
+
.settings-toggle{display:inline-flex;align-items:center;gap:4px;min-height:22px;padding:1px 7px;font-size:11px;font-weight:700;border-radius:4px}
|
|
274
|
+
.settings-toggle::before{content:"▾";font-size:10px;line-height:1}
|
|
275
|
+
.settings-toggle[aria-expanded=true]::before{content:"▴"}
|
|
276
|
+
:root:lang(ko){word-break:keep-all;overflow-wrap:break-word}
|
package/web/compare.html
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<!doctype html>
|
|
2
2
|
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>rig review · compare</title><link rel="stylesheet" href="styles.css"></head><body>
|
|
3
3
|
<header><div class="brand">rig review <span>COMPARE</span></div><div><h1 id="title">A / B comparison</h1><span id="animation" class="hint"></span></div><div class="mode-switch" role="group" aria-label="Mode"><button type="button" data-mode="rig" aria-pressed="false">Setup</button><button type="button" data-mode="playback" aria-pressed="false">Animate</button><button type="button" data-mode="compare" aria-pressed="true">Compare</button></div><div id="mode-build-picker" class="mode-build-picker" role="group" aria-label="Picked build for Setup and Animate" hidden><span class="eyebrow">Editing</span><button type="button" data-build-side="a" aria-pressed="true">Build A</button><button type="button" data-build-side="b" aria-pressed="false">Build B</button><span id="picked-build-label" class="picked-build-label" role="status" aria-live="polite">Build A</span></div><div class="actions"><span id="save-state" class="hint">Loading…</span><button id="export-json">Feedback JSON</button><button id="export-markdown">Issue Markdown</button><button id="submit" class="primary" disabled>Submit review</button></div></header>
|
|
4
|
-
<div class="layout"><main><div class="toolbar"><button id="stage-comment" type="button" aria-pressed="false" title="Comment · C (active mesh editor keeps C)">Comment
|
|
4
|
+
<div class="layout"><main><div class="toolbar"><button id="stage-comment" type="button" aria-pressed="false" aria-expanded="false" aria-controls="stage-comment-list" title="Comment · C (active mesh editor keeps C)">Comment · C (0)</button><span id="toolbar-mode-hint">Inspect A and B at the reference video time</span><!-- shared:view-tools --><div class="row"><label class="camera-sync"><input id="camera-sync" type="checkbox" checked>Sync cameras</label><button id="zoom-out" aria-label="Zoom active view out">−</button><output id="zoom-label">100%</output><button id="zoom-in" aria-label="Zoom active view in">+</button><button id="fit">Fit synchronized views</button></div></div><!-- shared:stage-bars -->
|
|
5
5
|
<div id="stage-layout" class="stages"><section id="reference-pane" class="pane"><div class="pane-head"><strong>REFERENCE</strong><span id="reference-name"></span></div><div id="reference-viewport" class="reference-viewport"><video id="reference-video" preload="auto" playsinline muted></video><p id="reference-empty" class="empty">Loading reference video…</p></div><div class="pane-foot"><span id="reference-time">— s</span><label><input id="reference-audio" type="checkbox">Video audio</label></div></section><section id="a-pane" class="pane"><div class="pane-head"><strong class="side-label">A</strong><span id="a-title"></span></div><div id="a-viewport" class="rig-viewport"><div id="a-root" class="rig-root"></div><canvas id="a-overlay" class="rig-overlay" aria-label="A actual rig mesh and bone overlay"></canvas><!-- shared:stage-handles --><p id="a-empty" class="empty">Loading rig…</p></div><div class="pane-foot"><span id="a-time">— s</span><span id="a-frame">rate unknown</span><span id="a-renderer" aria-label="A last draw backend" title="DOM images for rigid parts; WebGL meshes when available, Canvas2D fallback.">Not rendered</span></div></section><section id="b-pane" class="pane"><div class="pane-head"><strong class="side-label">B</strong><span id="b-title"></span></div><div id="b-viewport" class="rig-viewport"><div id="b-root" class="rig-root"></div><canvas id="b-overlay" class="rig-overlay" aria-label="B actual rig mesh and bone overlay"></canvas><p id="b-empty" class="empty">Loading rig…</p></div><div class="pane-foot"><span id="b-time">— s</span><span id="b-frame">rate unknown</span><span id="b-renderer" aria-label="B last draw backend" title="DOM images for rigid parts; WebGL meshes when available, Canvas2D fallback.">Not rendered</span></div></section></div>
|
|
6
6
|
<section class="inspector" aria-label="Inspection controls"><div class="inspector-heading"><strong>INSPECTOR</strong><div role="tablist" aria-label="Inspector sections"><button role="tab" id="tab-view" data-inspector="view" aria-controls="inspector-view" aria-selected="true" tabindex="0">View</button><button role="tab" id="tab-rig" data-inspector="rig" aria-controls="inspector-rig" aria-selected="false" tabindex="-1">Rig</button><button role="tab" id="tab-playback" data-inspector="playback" aria-controls="inspector-playback" aria-selected="false" tabindex="-1">Playback</button><button role="tab" id="tab-feedback" data-inspector="feedback" aria-controls="inspector-feedback" aria-selected="false" tabindex="-1">Feedback</button></div><span class="hint">Local view controls · source files stay unchanged</span></div><div class="draft-notice"><span id="draft-state" role="status" aria-live="polite"></span><div id="draft-recovery"></div></div><div class="inspector-body"><!-- shared:applied-records --><section id="inspector-view" role="tabpanel" aria-labelledby="tab-view" data-inspector-panel="view"><div class="view-link-controls"><button id="copy-view" type="button">Copy view link</button><span class="hint">Numeric source region · opening this link restores a paused inspection</span></div><pre id="view-coordinates" class="numeric-view" aria-label="Current numeric inspection region"></pre><div class="inspection-controls" aria-label="Inspection display controls"><label>Appearance <select id="appearance"><option value="system">System</option><option value="dark">Dark</option><option value="light">Light</option></select></label><label><input id="idle-repeat" type="checkbox" checked>Repeat idle</label><span id="idle-state" class="hint" role="status">Idle preview unavailable</span><span id="control-state" class="hint" role="status"></span></div><p class="hint">Sync cameras links fit-relative zoom and viewport-relative pan across visible panes. Turn it off for independent Reference, A and B views. Toolbar zoom and Fit use the last active pane.</p></section><section id="inspector-rig" role="tabpanel" aria-labelledby="tab-rig" data-inspector-panel="rig" hidden><!-- shared:setup-block-row --><section id="selected-part" aria-label="Selected part" aria-live="polite"></section><div class="rig-layer-controls"><fieldset id="layer-controls"><legend>Rig layers</legend><label><input id="layer-images" type="checkbox" checked disabled>Images</label><label><input id="layer-mesh" type="checkbox" disabled>Mesh edges</label><label><input id="layer-bones" type="checkbox" disabled>Bone points</label></fieldset><span id="layer-state" class="hint">No rig supplied</span></div><p id="rig-inspector-hint" class="hint">These controls show actual images, last-drawn mesh edges and named bone points. Both builds use the fixed animation named above. This inspector does not author geometry or motion.</p><!-- shared:setup-panels --></section><section id="inspector-playback" role="tabpanel" aria-labelledby="tab-playback" data-inspector-panel="playback" hidden><div id="animation-dock" class="animation-dock-panel" role="region" aria-label="Animation timeline"><section id="transport" class="transport"><button id="play" aria-label="Play reference video and both rigs" disabled>▶</button><input id="scrub" type="range" min="0" max="1" step="0.0001" value="0" aria-label="Shared comparison time" disabled><output id="time">— / — s</output><label for="time-input" class="sr-only">Reference video time to inspect</label><input id="time-input" type="number" min="0" step="0.0001" placeholder="Seconds" disabled><button id="seek" disabled>Go to time</button><!-- shared:transport-strips --></section><section id="animation-inspection" aria-label="Read-only animation inspection"></section></div><div id="animate-blocks" class="animate-blocks-panel" data-inspector-scroll><!-- shared:animate-block-row --><div class="compare-info"><output id="sync-status">Presentation pending</output><span id="sync-warning"></span></div><div class="compare-info"><label for="frame-basis">Review frame</label><select id="frame-basis"><option value="a">A explicit samples</option><option value="b">B explicit samples</option></select><input id="frame-input" type="number" min="0" step="1" aria-label="Explicit producer frame" disabled><button id="frame-seek" type="button" disabled>Inspect frame</button><span id="frame-index-status">Loading reference timestamp index…</span></div><div class="compare-info"><span id="domain">Checking shared playback range…</span><span id="clock-source">Waiting for video time</span></div><details class="trace"><summary>Synchronization trace</summary><pre id="trace">No frame presented yet.</pre></details><p id="playback-inspector-hint" class="boundary">Motion is read only. The reference video FPS is not used to infer the pose frame clock.</p><!-- shared:animate-panels --></div></section><section id="inspector-feedback" role="tabpanel" aria-labelledby="tab-feedback" data-inspector-panel="feedback" hidden><div class="review-summary"><div class="eyebrow">COMPARE REVIEW</div><label for="status">Review status</label><select id="status"><option value="pending">Pending</option><option value="approved">Approved</option><option value="changes-requested">Changes requested</option></select><section class="provenance"><h2>Source provenance</h2><div id="provenance-brief"></div><details><summary>Both builds, versions and reference video hash</summary><pre id="provenance-full"></pre></details></section></div><section class="feedback-form"><h2>Frame-range feedback</h2><label for="side">Target build</label><select id="side"><option value="">Select A or B</option><option value="a">A</option><option value="b">B</option></select><div class="frame-range"><label>Start frame<input id="frame-start" type="number" min="0" step="1" inputmode="numeric"></label><label>End frame<input id="frame-end" type="number" min="0" step="1" inputmode="numeric"></label></div><p id="feedback-range-hint" class="hint">Select A or B to check frame bounds.</p><label for="target-kind">Target type</label><select id="target-kind"><option value="">Select</option><option value="bone">Bone</option><option value="slot">Slot</option><option value="rig">Entire rig</option></select><label for="target-name">Actual target name</label><input id="target-name" type="text" list="target-names" autocomplete="off"><datalist id="target-names"></datalist><p id="target-hint" class="hint">Select a target build and type.</p><label for="category">Category</label><select id="category"><option value="">Select</option><option value="defect">Defect</option><option value="quality">Quality</option></select><label for="summary">One-line summary</label><input id="summary" type="text" maxlength="1000" placeholder="What looks wrong, and over which frames?"><button id="add-feedback" class="block" disabled>Add feedback</button><p id="feedback-warnings" class="hint" role="status" hidden></p><div id="feedback-list"></div></section><details id="strip-panel" class="trace"><summary>Export frame strip</summary><p class="hint">Uses the feedback form start and end frames, inclusive. Exports Reference / A / B rows without changing inspection time.</p><label for="strip-scope">Export range</label><select id="strip-scope"><option value="interval">Entered start–end frames</option><option value="feedback">All feedback ranges</option></select><label for="strip-basis">Report defining the range frames</label><select id="strip-basis"><option value="">Select A or B as frame basis</option><option value="a">A report frameTimes</option><option value="b">B report frameTimes</option></select><label for="strip-format">Format</label><select id="strip-format"><option value="png">PNG strip</option><option value="json">JSON frames and provenance</option></select><p class="hint">The same frame number in A and B is not assumed to mean the same time. Batch export uses each feedback side as its frame basis. Without frameTimes, PNG is refused and JSON preserves time: null.</p><button id="strip-export" type="button" disabled>Download strip</button><p id="strip-status" class="hint" role="status" aria-live="polite">Loading comparison provenance…</p></details></section></div></section></main><aside id="parts-explorer" class="parts-explorer" aria-label="Parts explorer"><div class="parts-tools"><h2>PARTS</h2><button type="button" data-part-whole aria-pressed="true">Whole rig</button><label for="part-search">Find slot</label><input id="part-search" data-part-search type="search" autocomplete="off" placeholder="Exact slot name or text"><label class="part-solo"><input id="part-solo" data-part-solo type="checkbox" disabled>Solo selected slot</label><p data-part-status class="hint" role="status">Loading actual slots…</p></div><ul data-part-list aria-label="Actual rig slots"></ul><p class="hint">Select in context or enable Solo. Thumbnails are each slot's declared page region; a type icon stands in where the model declares none. Atlas pages are not part thumbnails.</p></aside>
|
|
7
7
|
</div><footer><span id="message" role="status" aria-live="polite">Loading comparison provenance from the server…</span><span>Source files remain unchanged.</span></footer><script type="module" src="main.js"></script></body></html>
|
package/web/compare.ts
CHANGED
|
@@ -323,10 +323,10 @@ function renderFeedback(): void {
|
|
|
323
323
|
if (appliedCheck) { appliedCheck.hidden = !unchecked; appliedCheck.textContent = unchecked ? `${unchecked} · Submit refuses this review; delete the entry written on that build or Apply a build that passes check.` : ''; }
|
|
324
324
|
warnings.textContent = session.feedbackWarnings.length ? `${session.feedbackWarnings.length} validation warnings in existing feedback · original records are preserved. Review the marked entries, delete them and add valid replacements before submitting. JSON and Markdown exports preserve both the original records and warnings.` : '';
|
|
325
325
|
for (const feedback of session.feedback) {
|
|
326
|
-
const row = document.createElement('div'); row.className = 'feedback-item'; const title = document.createElement('strong'); title.textContent = `${feedback.side.toUpperCase()} · ${feedback.category} · ${feedback.target.kind}:${feedback.target.name} · F${feedback.frameStart}–${feedback.frameEnd}`; const summary = document.createElement('span'); summary.textContent = feedback.summary;
|
|
326
|
+
const row = document.createElement('div'); row.className = 'feedback-item'; const title = document.createElement('strong'); title.className = 'feedback-heading'; title.textContent = `${feedback.side.toUpperCase()} · ${feedback.category} · ${feedback.target.kind}:${feedback.target.name} · F${feedback.frameStart}–${feedback.frameEnd}`; const summary = document.createElement('span'); summary.className = 'feedback-summary'; summary.textContent = feedback.summary;
|
|
327
327
|
row.append(title, summary);
|
|
328
328
|
for (const warning of session.feedbackWarnings.filter(value => value.id === feedback.id)) { const note = document.createElement('p'); note.className = 'hint'; note.textContent = `Validation warning · ${warning.error}`; row.append(note); }
|
|
329
|
-
const details = document.createElement('details'), heading = document.createElement('summary'), source = document.createElement('pre'); heading.textContent = 'Saved feedback and inspection context'; source.textContent = JSON.stringify(feedback, null, 2); details.append(heading, source);
|
|
329
|
+
const details = document.createElement('details'), heading = document.createElement('summary'), source = document.createElement('pre'); heading.textContent = 'Saved feedback and inspection context'; source.className = 'feedback-json'; source.textContent = JSON.stringify(feedback, null, 2); details.append(heading, source);
|
|
330
330
|
const remove = document.createElement('button'); remove.type = 'button'; remove.textContent = 'Delete'; remove.onclick = () => { session.feedback = session.feedback.filter(value => value.id !== feedback.id); session.feedbackWarnings = session.feedbackWarnings.filter(warning => warning.id !== feedback.id); renderFeedback(); markDirty(); };
|
|
331
331
|
row.append(details);if((feedback.context as any)?.comment?.schema!=='rig-review-comment/1'||!submittedBaseline?.feedback.some(f=>f.id===feedback.id))row.append(remove); list.append(row);
|
|
332
332
|
}
|