@rig-c/review 0.22.0 → 0.24.0

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/web/main.ts CHANGED
@@ -26,7 +26,7 @@ import {bindClothPanel,type ClothPanel} from './cloth-panel.ts';
26
26
  import {animationAppliedRecord,animationOutcomeLine,retargetAppliedRecord,retargetOutcomeLine,stripPendingAfter,type AnimationJobView,type AnimationRequestBody,type AnimationSourceOp,type StageChange,type AppliedAnimation,type AppliedRetarget,type RetargetJobView,type RetargetRequestBody} from './rebuild-client.ts';
27
27
  import {bindRetargetPanel,type PoseMap,type RetargetPanel} from './retarget-panel.ts';
28
28
  import type {RetargetFlags} from '../src/retarget.ts';
29
- import {historyRow,isPatchJob,recordFor,refusedText,retargetStage,undoControl,type AppliedHistoryView,type UndoView,type AnyJobView,appliedRecord,deltaAppliedRecord,deltaOutcomeLine,designatedRegions,handoffText,landmarksRequest,seedLandmarks,makePatch,outcomeLine,patchAppliedRecord,patchOutcomeLine,pickPart,runRebuild,seedFields,stageModel,type AppliedDelta,type AppliedPatch,type AppliedRecord,type DeltaJobView,type DeltaRequestBody,type ConfigPatch,type PatchJobView,type RebuildJobView,type RebuildRefusal,type RebuildRequestBody,type RebuildStatusView} from './rebuild-client.ts';
29
+ import {historyRow,isPatchJob,recordFor,refusedText,restoredOutcomeForJob,retargetStage,undoControl,type AppliedHistoryView,type UndoView,type AnyJobView,appliedRecord,deltaAppliedRecord,deltaOutcomeLine,designatedRegions,handoffText,landmarksRequest,seedLandmarks,makePatch,outcomeLine,patchAppliedRecord,patchOutcomeLine,pickBustPart,pickPart,runRebuild,seedFields,stageModel,type AppliedDelta,type AppliedPatch,type AppliedRecord,type DeltaJobView,type DeltaRequestBody,type ConfigPatch,type PatchJobView,type RebuildJobView,type RebuildRefusal,type RebuildRequestBody,type RebuildStatusView} from './rebuild-client.ts';
30
30
  import {meshEditBinding,meshEditText,type MeshEditDocument} from '../src/mesh-edit.ts';
31
31
  import {chestRegionsBinding,cropWorldMapping,type CropWorldMapping} from '../src/chest-regions.ts';
32
32
  import {bindWorkspaceUI,selectedInspector,type WorkspaceUI} from './workspace-ui.ts';
@@ -56,7 +56,7 @@ import {barLine,beforeLine} from '../src/physics-tuning.ts';
56
56
  import {bindRequirementsPanel,type RequirementsCatalogView,type RequirementsJobView,type RequirementsPanel,type RequirementsRefusal} from './requirements-panel.ts';
57
57
  import {patchRoute} from '../src/retune-route.ts';
58
58
  import {appliedCheckRefusal,type CheckSummary} from '../src/applied-context.ts';
59
- import {appliedBlockOps,recordBlock,staleReadouts} from '../src/applied-blocks.ts';
59
+ import {appliedBuildOwner,appliedPanelOps,dropNoticeForPanel,reconcilePanelStatuses,recordBlock,staleReadouts,type RebuildPanelKind} from '../src/applied-blocks.ts';
60
60
  import {bindPhysicsPanel,type PhysicsPanel} from './physics-panel.ts';
61
61
  import {bindIdlePanel,type BoneSetup,type IdlePanel} from './idle-panel.ts';
62
62
  import {composeAdjust,PhysicsPreview} from './preview.ts';
@@ -978,7 +978,7 @@ async function start(): Promise<void> {
978
978
  // Checkpoints and reference fold away when the package supplies neither.
979
979
  (el('package-context') as HTMLDetailsElement).open = data.manifest.checkpoints.length > 0 || data.manifest.references.length > 0;
980
980
  const sourceFiles = el('source-files'); for (const file of data.manifest.authoring) { const a = document.createElement('a'); a.href = assetUrl(file.path); a.textContent = file.label; a.className = 'source-link'; a.target = '_blank'; a.rel = 'noopener'; sourceFiles.append(a); } if (!data.manifest.authoring.length) sourceFiles.textContent = 'No source files supplied';
981
- populateChestBones(); bind(); parts=new PartExplorer(el('workspace-left'),el('selected-part'),previous=>{if(player&&inspectionSourceState==='ready')animationPanel?.capture(player,parts?.frame('single'));else animationPanel?.capture(null,undefined);weightsView?.refresh();redrawOverlay(true);meshEditor?.selectionChanged();const part=parts?.value();animationPanel?.fromParts(part?.slot??null);meshPanel?.select(part?.slot??null);requirementsPanel?.selectionChanged();if(part){activeCamera='rig';if(view==='reference')setView('rig');if(selectedInspector(document)!=='playback')showInspector('rig');renderCameraControls();}if(!cameraRestoring&&(previous?.side!==part?.side||previous?.slot!==part?.slot))cameraAction(()=>fitActiveCamera(part?'rig':availableCamera()));persistence?.save();},part=>{select('feedback-target-kind').value='slot';renderFeedbackTargets(true);input('feedback-target-name').value=part.slot;showInspector('feedback');}); animationPanel=new AnimationInspectionPanel({host:el('animation-inspection'),stage:el('rig-viewport'),project:(x,y)=>rigProject()(x,y),enabled:()=>inspectionSourceState==='ready'&&selectedInspector(document)==='playback',pause,preview:fn=>{animAdjust=fn;if(!player)return;player.adjust=composeAdjust(composeAdjust(composeAdjust(idleAdjust,dialAdjust),turnAdjust),animAdjust);if(!inDrawRig&&player.current&&!playing){player.seek(time);drawRig(()=>player!.draw());}},apply:ops=>applyAnimation(ops),reset:()=>resetAnimationBuild(),seek:exact=>{if(!Number.isFinite(exact)||exact<0||exact>duration){message('KEY_TIME_OUT_OF_DOMAIN: no substitute time was used.',true);return;}seekMarker(animation,exact,'Stored key');},select:value=>{const slot=value?.kind==='slot'?value.name:null;if((parts?.value()?.slot??null)!==slot)parts?.select(slot?{side:'single',slot,mode:parts?.value()?.mode??'context'}:null);parts?.highlightBone(value?.kind==='bone'?value.name:null);redrawOverlay(false);}});viewDisposers.push(()=>animationPanel?.dispose()); updateStripControls(); stripStatus('Choose the entered start–end frames or all feedback ranges to download. Unsubmitted feedback is included; exporting does not submit the review.'); renderFeedbackTargets(true); renderFeedbackRange(); renderCheckpoints(); renderProposals(); renderProvenance(); updateSavedState(); renderCues(); initReport();
981
+ populateChestBones(); bind(); parts=new PartExplorer(el('workspace-left'),el('selected-part'),previous=>{if(player&&inspectionSourceState==='ready')animationPanel?.capture(player,parts?.frame('single'));else animationPanel?.capture(null,undefined);weightsView?.refresh();redrawOverlay(true);meshEditor?.selectionChanged();const part=parts?.value();animationPanel?.fromParts(part?.slot??null);meshPanel?.select(part?.slot??null);requirementsPanel?.selectionChanged();renderDropNotices();if(part){activeCamera='rig';if(view==='reference')setView('rig');if(selectedInspector(document)!=='playback')showInspector('rig');renderCameraControls();}if(!cameraRestoring&&(previous?.side!==part?.side||previous?.slot!==part?.slot))cameraAction(()=>fitActiveCamera(part?'rig':availableCamera()));persistence?.save();},part=>{select('feedback-target-kind').value='slot';renderFeedbackTargets(true);input('feedback-target-name').value=part.slot;showInspector('feedback');}); animationPanel=new AnimationInspectionPanel({host:el('animation-inspection'),stage:el('rig-viewport'),project:(x,y)=>rigProject()(x,y),enabled:()=>inspectionSourceState==='ready'&&selectedInspector(document)==='playback',pause,preview:fn=>{animAdjust=fn;if(!player)return;player.adjust=composeAdjust(composeAdjust(composeAdjust(idleAdjust,dialAdjust),turnAdjust),animAdjust);if(!inDrawRig&&player.current&&!playing){player.seek(time);drawRig(()=>player!.draw());}},apply:ops=>applyAnimation(ops),reset:()=>resetAnimationBuild(),seek:exact=>{if(!Number.isFinite(exact)||exact<0||exact>duration){message('KEY_TIME_OUT_OF_DOMAIN: no substitute time was used.',true);return;}seekMarker(animation,exact,'Stored key');},select:value=>{const slot=value?.kind==='slot'?value.name:null;if((parts?.value()?.slot??null)!==slot)parts?.select(slot?{side:'single',slot,mode:parts?.value()?.mode??'context'}:null);parts?.highlightBone(value?.kind==='bone'?value.name:null);redrawOverlay(false);}});viewDisposers.push(()=>animationPanel?.dispose()); updateStripControls(); stripStatus('Choose the entered start–end frames or all feedback ranges to download. Unsubmitted feedback is included; exporting does not submit the review.'); renderFeedbackTargets(true); renderFeedbackRange(); renderCheckpoints(); renderProposals(); renderProvenance(); updateSavedState(); renderCues(); initReport();
982
982
  const requestedId = new URLSearchParams(location.search).get('checkpoint'),initial=initialReviewSelection(data.manifest,requestedId,data.explicitReference?.id,data.initialAnimation??undefined),first=initial.checkpoint;
983
983
  rigInput=data.manifest.model?{state:'pending'}:{state:'absent'};renderLayout();
984
984
  if(initial.referenceId){select('reference-select').value=initial.referenceId;await showReference(initial.referenceId);}
@@ -1221,7 +1221,7 @@ function renderChest():void {
1221
1221
  el('chest-mapping').classList.toggle('error',!chestMapping.available);
1222
1222
  const value=chestEvaluation();text('chest-status',value.ok?`${value.document.mesh.value.contour.regions.map(r=>`${r.name} → ${r.bone}`).join(' · ')} · valid for export`:value.error);
1223
1223
  el('chest-status').classList.toggle('error',!value.ok);
1224
- chestEditor?.sync();meshEditor?.sync();weightsView?.sync();bonesPanel?.sync();cutsPanel?.sync();clothPanel?.sync();redrawOverlay(false);
1224
+ chestEditor?.sync();meshEditor?.sync();weightsView?.sync();bonesPanel?.sync();cutsPanel?.sync();clothPanel?.sync();renderDropNotices();redrawOverlay(false);
1225
1225
  }
1226
1226
  async function exportChest():Promise<void> {
1227
1227
  const value=chestEvaluation();if(!value.ok){message(`Chest regions not exported: ${value.error}`,true);return;}
@@ -1460,6 +1460,7 @@ async function applyMeshDelta(doc:MeshEditDocument,line:(text:string)=>void):Pro
1460
1460
  if(next.id===null||!('id' in result)){message(outcome.text,true);return {built:false,text:outcome.text,error:true};}
1461
1461
  await swapRig(new URL(access.route(next.url),location.href).href,access.route(`/rebuild/${next.id}/`),next.hash,world);
1462
1462
  appliedOnStage=deltaAppliedRecord(result);stageCheck=null;stageChanged({kind:'apply',via:'delta'});
1463
+ meshEditor?.setStatusNote(outcome.text,false);
1463
1464
  const draft=el<HTMLTextAreaElement>('rebuild-applied');draft.value=JSON.stringify(appliedOnStage);draft.dispatchEvent(new Event('input',{bubbles:true}));
1464
1465
  message(outcome.text);
1465
1466
  return {built:true,text:outcome.text,error:false};
@@ -1480,6 +1481,7 @@ async function loadRebuildStatus():Promise<RebuildStatusView|null> {
1480
1481
  cutsPanel?.load(rebuildStatus.inputs&&rebuildStatus.cuts?rebuildStatus.cuts.config:null,rebuildStatus.bones??[],rebuildStatus.inputs?null:rebuildStatus.reason??'CUTS_UNAVAILABLE: no producer handoff',rebuildStatus.cuts?.build??null);
1481
1482
  meshPanel?.load(rebuildStatus.inputs?rebuildStatus.meshes??{}:null,rebuildStatus.inputs?null:rebuildStatus.reason??'MESH_PANEL_UNAVAILABLE: no producer handoff');meshPanel?.select(parts?.value()?.slot??null);
1482
1483
  animationPanel?.loadSource(rebuildStatus.animations??null,rebuildStatus.reason);
1484
+ renderDropNotices();
1483
1485
  return rebuildStatus;
1484
1486
  }
1485
1487
  /** The handoff line (#101): path, hash and how it was found, then the baseline; re-read while the baseline runs. */
@@ -1497,11 +1499,87 @@ async function refreshApplied():Promise<void> {
1497
1499
  try{appliedHistory=await api<AppliedHistoryView>('/api/rebuild/history');}catch{return;}
1498
1500
  renderApplied();
1499
1501
  }
1500
- /** #172: the Cuts and Cloth blocks mark as applied only the ops the stage's applied record holds (none on the inspected build). */
1502
+ function chestPartForNotice():string|null {
1503
+ if(!rebuildStatus)return null;
1504
+ if(chestEditor?.mode()==='landmarks'){
1505
+ const read=chestEditor.landmarks();
1506
+ return 'derived' in read?pickBustPart(rebuildStatus,read.derived.regions):pickBustPart(rebuildStatus,[]);
1507
+ }
1508
+ const designated=designatedRegions(chestField);
1509
+ return 'regions' in designated?pickPart(rebuildStatus,designated.regions):rebuildStatus.parts.length===1?rebuildStatus.parts[0]!.name:null;
1510
+ }
1511
+ function renderDropNotices():void {
1512
+ const slot=parts?.value()?.slot??null,meshPart=meshPanel?.part()??slot,chestPart=chestPartForNotice();
1513
+ for(const node of document.querySelectorAll<HTMLElement>('[data-rebuild-drop]')){
1514
+ const panel=node.dataset.rebuildDrop as RebuildPanelKind;
1515
+ const part=panel==='mesh'?meshPart:panel==='mesh-edit'?slot:panel==='chest'?chestPart:null;
1516
+ let notice='';let isError=false;
1517
+ try{notice=dropNoticeForPanel(appliedOnStage,panel,{part,handoff:rebuildStatus});}
1518
+ catch(error){notice=errorText(error);isError=true;}
1519
+ node.textContent=notice;node.hidden=!notice;node.classList.toggle('error',isError);
1520
+ }
1521
+ }
1522
+ /** #172 / #250: every panel marks as applied only what the stage's applied record holds for that panel, and clears stale applied-outcome status text on non-owning panels (restoring it on Undo). */
1501
1523
  let readoutStage:AppliedRecord|AppliedPatch|AppliedDelta|AppliedRetarget|AppliedAnimation|null=null;
1502
- function renderAppliedBlocks():void {
1503
- const on=appliedBlockOps(appliedOnStage);cutsPanel?.applied(on.cuts);clothPanel?.applied(on.cloth);
1504
- animationPanel?.reconcileStageApplied(appliedOnStage?.schema==='rig-review-applied/5'?appliedOnStage:null);
1524
+ function renderAppliedBlocks(restoredJob:AnyJobView|null=null):void {
1525
+ const on=appliedPanelOps(appliedOnStage);
1526
+ cutsPanel?.applied(on.cuts);clothPanel?.applied(on.cloth);
1527
+ physicsPanel?.applied(on.physics);bonesPanel?.applied(on.bones);
1528
+ idlePanel?.applied(on.idle);rigFieldsPanel?.applied(on['rig-fields']);
1529
+ const restored=restoredJob?restoredOutcomeForJob(restoredJob):null;
1530
+ animationPanel?.reconcileStageApplied(
1531
+ appliedOnStage?.schema==='rig-review-applied/5'?appliedOnStage:null,
1532
+ restored?.panel==='animation'?{text:restored.text,error:restored.error}:null,
1533
+ );
1534
+ const statusText=(id:string)=>document.getElementById(id)?.textContent??'';
1535
+ const reconciled=reconcilePanelStatuses(
1536
+ {
1537
+ chest:chestEditor?.noticeText()??'',
1538
+ 'mesh-edit':meshEditor?.statusNote()??'',
1539
+ mesh:statusText('mesh-status'),
1540
+ bones:statusText('bones-status'),
1541
+ 'rig-fields':statusText('rig-fields-status'),
1542
+ cuts:statusText('cuts-status'),
1543
+ cloth:statusText('cloth-status'),
1544
+ physics:statusText('physics-apply-status'),
1545
+ idle:statusText('idle-apply-status'),
1546
+ retarget:statusText('retarget-status'),
1547
+ animation:document.querySelector('[data-animation-editor-status]')?.textContent??'',
1548
+ },
1549
+ appliedOnStage,
1550
+ restored,
1551
+ );
1552
+ const owner=appliedBuildOwner(appliedOnStage);
1553
+ if(owner?.panel!=='chest'){
1554
+ if(reconciled.chest!==(chestEditor?.noticeText()??''))chestEditor?.notify(null,false,[]);
1555
+ }else if(restored?.panel==='chest'){
1556
+ chestEditor?.notify(restored.text,restored.error,[]);
1557
+ }
1558
+ if(owner?.panel!=='mesh-edit'){
1559
+ if(reconciled['mesh-edit']!==(meshEditor?.statusNote()??''))meshEditor?.setStatusNote('',false);
1560
+ }else if(restored?.panel==='mesh-edit'){
1561
+ meshEditor?.setStatusNote(restored.text,restored.error);
1562
+ }
1563
+ const syncPanelStatus=(panel:RebuildPanelKind,id:string,set:(t:string,e:boolean)=>void,clearExtra?:()=>void)=>{
1564
+ const cur=statusText(id),next=reconciled[panel];
1565
+ if(owner?.panel!==panel){
1566
+ if(next!==cur){set('',false);clearExtra?.();}
1567
+ }else if(restored?.panel===panel){
1568
+ set(restored.text,restored.error);
1569
+ }
1570
+ };
1571
+ syncPanelStatus('mesh','mesh-status',(t,e)=>meshPanel?.status(t,e),()=>{if(!stripPending){meshPanel?.counts([]);meshPanel?.readout([]);}});
1572
+ syncPanelStatus('bones','bones-status',(t,e)=>bonesPanel?.status(t,e));
1573
+ syncPanelStatus('rig-fields','rig-fields-status',(t,e)=>rigFieldsPanel?.status(t,e),()=>rigFieldsPanel?.readout([]));
1574
+ syncPanelStatus('cuts','cuts-status',(t,e)=>cutsPanel?.status(t,e));
1575
+ syncPanelStatus('cloth','cloth-status',(t,e)=>clothPanel?.status(t,e));
1576
+ syncPanelStatus('physics','physics-apply-status',(t,e)=>physicsPanel?.status(t,e),()=>physicsPanel?.readout([]));
1577
+ syncPanelStatus('idle','idle-apply-status',(t,e)=>idlePanel?.status(t,e),()=>idlePanel?.readout([]));
1578
+ syncPanelStatus('retarget','retarget-status',(t,e)=>retargetPanel?.status(t,e),()=>retargetPanel?.result(null));
1579
+ if(restored?.panel==='retarget'&&restoredJob&&(restoredJob as RetargetJobView).kind==='retarget'){
1580
+ retargetPanel?.result(restoredJob as RetargetJobView);
1581
+ }
1582
+ renderDropNotices();
1505
1583
  // #186: when the stage record changes, a Cuts / Cloth readout the new record is not that block's names an older build.
1506
1584
  for(const block of staleReadouts(readoutStage,appliedOnStage))(block==='cuts'?cutsPanel:clothPanel)?.shown(null);
1507
1585
  readoutStage=appliedOnStage;
@@ -1535,21 +1613,18 @@ async function undoApply():Promise<UndoView|null> {
1535
1613
  result={status:'built',undone,job,history:await api<AppliedHistoryView>('/api/rebuild/history')};
1536
1614
  }
1537
1615
  if(result.status==='refused'){appliedStatus(result.error,true);message(result.error,true);return result;}
1538
- let ops:import('../src/config-patch.ts').PatchOp[]|null=null;
1539
1616
  if(result.status==='inspected'){await swapRig(inspectedModel.url,inspectedModel.prefix,inspectedModel.sha256,world);appliedOnStage=null;stageCheck=null;}
1540
1617
  else{
1541
1618
  const job=result.job;if(!job.build)throw new Error('the restored job carries no build');
1542
1619
  await swapRig(new URL(access.route(job.build.modelUrl),location.href).href,access.route(`/rebuild/${job.id}/`),job.build.modelHash,world);
1543
1620
  appliedOnStage=recordFor(job);stageCheck=(job as PatchJobView).kind==='patch'?{lines:[...job.lines],check:(job as PatchJobView).check}:null;
1544
- if((job as PatchJobView).kind==='patch')ops=(job as PatchJobView).request.patch.ops;
1545
1621
  // #186: a restored retarget build gets what its Apply set — its own clock, then its animation selected.
1546
1622
  const retarget=retargetStage(job,job.build.modelHash);stageClock=retarget?.clock??null;
1547
1623
  if(retarget&&assets?.animations.some(clip=>clip.name===retarget.animation))chooseAnimation(retarget.animation);
1548
1624
  }
1549
1625
  stageChanged({kind:'undo'});
1550
1626
  // The panels mark the ops the stage's build applied; the pending edits stay as they are.
1551
- physicsPanel?.applied(ops);idlePanel?.applied(ops);rigFieldsPanel?.applied(ops);bonesPanel?.applied(ops);
1552
- animationPanel?.reconcileStageApplied(appliedOnStage?.schema==='rig-review-applied/5'?appliedOnStage:null);
1627
+ renderAppliedBlocks(result.status==='built'?result.job:null);
1553
1628
  // #172: the Cuts and Cloth readouts show the restored build's job when it is theirs, else nothing (never the reverted one).
1554
1629
  const restored=result.status==='built'&&isPatchJob(result.job)?result.job:null,block=recordBlock(appliedOnStage);
1555
1630
  cutsPanel?.shown(block==='cuts'?restored:null);clothPanel?.shown(block==='cloth'?restored:null);
@@ -1665,7 +1740,7 @@ async function applyPatch(patch:ConfigPatch,world:StageWorld|null=null):Promise<
1665
1740
  apply:()=>applyIdle(idlePanel?.ops()??[],idlePanel?.keying()?.keys??null),reset:()=>resetIdleBuild(),
1666
1741
  sample:(bone:string,dt:number,n:number)=>sampleLocals(bone,dt,n),adjustSet:()=>!!player?.adjust},
1667
1742
  /** Mesh panel (#106): the selected part's pending entry, its edits, Apply, Reset, the folds reading and the overlay's triangle count per slot. */
1668
- mesh:{part:()=>meshPanel?.part()??null,select:(part:string)=>meshPanel?.select(part),entry:()=>meshPanel?.entry()??null,configEntry:()=>meshPanel?.configEntry()??null,set:(path:string[],value:import('../src/config-patch.ts').JsonValue|undefined)=>meshPanel?.set(path,value),setEntry:(entry:MeshEntry)=>meshPanel?.setEntry(entry),
1743
+ mesh:{part:()=>meshPanel?.part()??null,select:(part:string)=>{meshPanel?.select(part);renderDropNotices();},entry:()=>meshPanel?.entry()??null,configEntry:()=>meshPanel?.configEntry()??null,set:(path:string[],value:import('../src/config-patch.ts').JsonValue|undefined)=>meshPanel?.set(path,value),setEntry:(entry:MeshEntry)=>meshPanel?.setEntry(entry),
1669
1744
  regions:()=>meshPanel?.regions.list()??[],addRegion:(region:import('../src/mesh-entry.ts').MeshRegion)=>meshPanel?.regions.add(region),moveRegion:(region:number,vertex:number,to:[number,number])=>meshPanel?.regions.move(region,vertex,to),drawRegions:(on:boolean)=>meshPanel?.regions.draw(on),placing:()=>meshPanel?.regions.placing()??null,
1670
1745
  precheck:()=>meshPanel?.precheck()??[],apply:()=>{const part=meshPanel?.part(),entry=meshPanel?.entry();return part&&entry?applyMesh(part,entry):Promise.resolve(null);},reset:()=>resetMeshBuild(),folds:()=>meshFolds(),
1671
1746
  overlayTriangles:(slot:string)=>lastOverlay?.meshTriangles[slot]??null,status:()=>el('mesh-status').textContent,counts:()=>[...document.querySelectorAll('#mesh-counts code')].map(c=>c.textContent),readout:()=>[...document.querySelectorAll('#mesh-readout code')].map(c=>c.textContent),pending:()=>input('mesh-pending').value,lastPatch:()=>lastMeshPatch?JSON.parse(JSON.stringify(lastMeshPatch)):null,
@@ -2069,7 +2144,7 @@ async function swapRig(modelUrl:string,prefix:string,sha256:string,world:StageWo
2069
2144
  // A scratch build may hold another set of animations (a retarget adds one, #114): the picker lists what this build has.
2070
2145
  {const animations=select('animation-select');animations.replaceChildren(...assets.animations.map(item=>option(item.name,data.manifest.animations.find(a=>a.id===item.name)?.label??item.name)));animations.disabled=assets.animations.length===0;}
2071
2146
  player.on('event',event=>{text('event-log',`Runtime event: ${event.name} · ${event.time.toFixed(2)} s`);});
2072
- try{const catalog=await loadPartModel(modelUrl,sha256,data.feedbackCatalog.slots??[]);inspectionSourceState='ready';partModel=catalog.model;configureTurnPad(catalog.model);refreshAnimationInspection();weightsView?.refresh();parts?.register('single',catalog.entries,player,new PartThumbnails(pageRegionTable(catalog.model),assets.pageImages));}catch(error){inspectionSourceState='failed';partModel=null;refreshAnimationInspection();parts?.refuseCatalog('single',error);}
2147
+ try{const catalog=await loadPartModel(modelUrl,sha256,data.feedbackCatalog.slots??[]);inspectionSourceState='ready';partModel=catalog.model;configureTurnPad(catalog.model);refreshAnimationInspection();weightsView?.refresh();meshEditor?.selectionChanged();parts?.register('single',catalog.entries,player,new PartThumbnails(pageRegionTable(catalog.model),assets.pageImages));}catch(error){inspectionSourceState='failed';partModel=null;refreshAnimationInspection();parts?.refuseCatalog('single',error);}
2073
2148
  if(keepSet){try{player.setSet(keepSet);}catch{select('part-set').value='';player.setSet(null);}}
2074
2149
  // The same world before the first pose: a physics Apply resumes the wind (clock and pulse), the pending jolts, gravity and
2075
2150
  // whether the controls are engaged as they stood when Apply was pressed; then the seek re-poses under that world.
@@ -104,7 +104,7 @@ export interface MeshEditorHost {
104
104
  confirm:(text:string)=>boolean;
105
105
  token:(name:string)=>string;
106
106
  }
107
- export interface MeshEditor {active:()=>boolean;overlay:()=>OverlayMeshEdit|null;sync:()=>void;selectionChanged:()=>void;dispose:()=>void;session:()=>MeshEditSession|null;mode:()=>MeshMode|null}
107
+ export interface MeshEditor {active:()=>boolean;overlay:()=>OverlayMeshEdit|null;sync:()=>void;selectionChanged:()=>void;dispose:()=>void;session:()=>MeshEditSession|null;mode:()=>MeshMode|null;statusNote:()=>string;setStatusNote:(text:string,error?:boolean)=>void}
108
108
 
109
109
  type Drag={pointer:number;start:ScreenPoint;ids:number[];base:MeshView;ops:MeshOp[]}|{pointer:number;start:ScreenPoint;box:ScreenPoint;add:boolean};
110
110
 
@@ -112,7 +112,7 @@ export function bindMeshEditor(host:MeshEditorHost):MeshEditor {
112
112
  const node=<T extends HTMLElement>(id:string)=>document.getElementById(id) as T;
113
113
  const toggle=node<HTMLButtonElement>('mesh-edit'),bar=node<HTMLElement>('mesh-editor-bar'),status=node<HTMLElement>('mesh-editor-status'),draft=node<HTMLTextAreaElement>('mesh-edit-draft');
114
114
  const chestToggle=document.getElementById('chest-edit') as HTMLButtonElement|null;
115
- let active=false,entering=false,applying=false,mode:MeshMode|null=null,session:MeshEditSession|null=null,space=false,drag:Drag|null=null,pending:number|null=null,hover:ReturnType<typeof hitMesh>=null,note='',noteError=false;
115
+ let active=false,entering=false,applying=false,mode:MeshMode|null=null,session:MeshEditSession|null=null,space=false,drag:Drag|null=null,pending:number|null=null,hover:ReturnType<typeof hitMesh>=null,note='',noteError=false,appliedOutcome='';
116
116
  let preview:MeshView|null=null;const selected=new Set<number>();
117
117
  const view=()=>preview??session?.view()??null;
118
118
  const cropToScreen=()=>{const project=host.project(),mapping=host.mapping();if(!project||!mapping.available)return null;return affineOf((x,y)=>{const w=mapping.toWorld(x,y);return project(w.x,w.y);});};
@@ -123,22 +123,24 @@ export function bindMeshEditor(host:MeshEditorHost):MeshEditor {
123
123
  modify:'drag a vertex or edge · Shift-click selects more · drag empty space to box-select · arrows nudge 1 px (Shift 10)',
124
124
  create:'click empty space to add a vertex · click an edge to split it',
125
125
  delete:'click a vertex (with its edges) or an added constraint edge to remove it · hull and triangulation edges are the producer\'s',
126
- edges:'click vertex A then vertex B to add a constraint edge · click a constraint edge to remove it',
126
+ edges:'click vertex A then start vertex B to add a constraint edge · click a constraint edge to remove it'.replace('start ',''),
127
127
  };
128
128
  const sync=()=>{
129
129
  const visible=meshEditVisible(host.inspector());toggle.hidden=!visible;
130
130
  if(!visible&&active){setActive(false);return;}
131
+ if(!host.applied()&&note.startsWith('Applied mesh edit ')){appliedOutcome='';note='';noteError=false;}
131
132
  toggle.setAttribute('aria-pressed',String(active));bar.hidden=!active;
132
133
  for(const button of bar.querySelectorAll<HTMLButtonElement>('[data-mesh-mode]'))button.setAttribute('aria-pressed',String(button.dataset.meshMode===mode));
133
134
  node<HTMLButtonElement>('mesh-undo').disabled=!session?.canUndo();node<HTMLButtonElement>('mesh-redo').disabled=!session?.canRedo();node<HTMLButtonElement>('mesh-reset').disabled=!session?.canUndo()&&!session?.ops().length&&!host.applied();node<HTMLButtonElement>('mesh-apply').disabled=applying;
134
- if(!session){status.textContent='';return;}
135
+ if(!session){status.textContent=host.applied()&&appliedOutcome?appliedOutcome:'';status.classList.toggle('error',noteError);return;}
135
136
  const s=session.source,count=session.ops().length;
136
137
  status.textContent=`${note?note+' · ':''}${count} op${count===1?'':'s'} · setup pose · ${MESH_EDIT_PREVIEW_NOTE} · ${mode?hint[mode]:'no sub-mode — Escape again leaves mesh edit'} · Space-drag pans`;
137
138
  status.title=`${s.slot} / ${s.skin} / ${s.attachment} · ${s.vertices.length} vertices · ${s.triangles.length/3} triangles · hull ${s.hull} · ${status.textContent}`;
138
139
  status.classList.toggle('error',noteError);
139
140
  if(mode)host.pane.dataset.meshMode=mode;else delete host.pane.dataset.meshMode;
140
141
  };
141
- const say=(text:string,error=false)=>{note=text;noteError=error;if(text)host.message(text,error);sync();};
142
+ const say=(text:string,error=false)=>{if(text.startsWith('Applied mesh edit '))appliedOutcome=text;else if(!text)appliedOutcome='';note=text;noteError=error;if(text)host.message(text,error);sync();};
143
+ const setStatusNote=(text:string,error=false)=>{appliedOutcome=text.startsWith('Applied mesh edit ')?text:'';note=text;noteError=error;sync();};
142
144
  // While a delta revision is on the stage the draft keeps the delta that built it: edits over the revision are not written.
143
145
  const persist=()=>{if(!session||host.applied())return;const text=writeMeshDraft(parseMeshDraft(draft.value),session.source,session.ops());if(text.length>32768){say('MESH_EDIT_DRAFT_LIMIT: the local draft is full — download the JSON; edits after this are not kept on reload',true);return;}draft.value=text;draft.dispatchEvent(new Event('input',{bubbles:true}));};
144
146
  /** Reports a step: a refusal by its code, a no-op by its reason, a change by what it did. */
@@ -159,7 +161,7 @@ export function bindMeshEditor(host:MeshEditorHost):MeshEditor {
159
161
  const hash=await sha256Hex(attachmentHashText(result.entry)),source:MeshSource={...result.source,hash};
160
162
  const restored=draftOps(parseMeshDraft(draft.value),source);session=new MeshEditSession(source,restored??[]);
161
163
  if(chestToggle?.getAttribute('aria-pressed')==='true')chestToggle.click();
162
- host.pause();active=true;mode='modify';selected.clear();pending=null;note=restored?.length?`restored ${restored.length} draft op${restored.length===1?'':'s'}`:'';noteError=false;
164
+ host.pause();active=true;mode='modify';selected.clear();pending=null;note=host.applied()&&appliedOutcome?appliedOutcome:restored?.length?`restored ${restored.length} draft op${restored.length===1?'':'s'}`:'';noteError=false;
163
165
  sync();host.changed();
164
166
  }finally{entering=false;}
165
167
  };
@@ -294,11 +296,13 @@ export function bindMeshEditor(host:MeshEditorHost):MeshEditor {
294
296
  const selectionChanged=()=>{
295
297
  if(!active||!session)return;const result=host.source();
296
298
  if(!result.ok){leave();sync();host.message(result.code,true);host.changed();return;}
297
- if(result.source.slot!==session.source.slot||result.source.attachment!==session.source.attachment||result.source.skin!==session.source.skin){leave();void enter();}
299
+ if(result.source.slot!==session.source.slot||result.source.attachment!==session.source.attachment||result.source.skin!==session.source.skin){leave();void enter();return;}
300
+ const current=session;
301
+ void sha256Hex(attachmentHashText(result.entry)).then(hash=>{if(active&&session===current&&hash!==current.source.hash)void reenter();});
298
302
  };
299
303
  sync();
300
304
  return {
301
- active:()=>active,overlay,sync,selectionChanged,session:()=>session,mode:()=>mode,
305
+ active:()=>active,overlay,sync,selectionChanged,session:()=>session,mode:()=>mode,statusNote:()=>note||appliedOutcome,setStatusNote,
302
306
  dispose:()=>{observer.disconnect();chestObserver.disconnect();host.pane.removeEventListener('pointerdown',down,true);host.pane.removeEventListener('pointermove',move,true);for(const type of ['pointerup','pointercancel'] as const)host.pane.removeEventListener(type,end,true);document.removeEventListener('keydown',keyDown,true);window.removeEventListener('keyup',keyUp,true);window.removeEventListener('blur',blur);},
303
307
  };
304
308
  }
@@ -7,6 +7,8 @@ import {ellipsePolygon} from '../src/chest-regions.ts';
7
7
  import type {BustSpec} from '../src/chest-landmarks.ts';
8
8
  import {CONFIG_PATCH_SCHEMA,type ConfigPatch,type PatchCmd,type PatchOp} from '../src/config-patch.ts';
9
9
  import {APPLIED_ANIMATION_SCHEMA,APPLIED_DELTA_SCHEMA,APPLIED_PATCH_SCHEMA,APPLIED_RETARGET_SCHEMA,filesDiffText,type AppliedAnimation,type AppliedAssembled,type AppliedDelta,type AppliedPatch,type AppliedRetarget,type CheckSummary,type FilesDiff} from '../src/applied-context.ts';
10
+ import {appliedBuildOwner,type RestoredPanelOutcome} from '../src/applied-blocks.ts';
11
+ import {meshApplyOutcome} from '../src/mesh-entry.ts';
10
12
  import type {AnimationSourceOp} from '../src/animation-ops.ts';
11
13
  import type {MotionSummary,RetargetFlags,RetargetLine,RetargetRecord} from '../src/retarget.ts';
12
14
  export type {ConfigPatch,PatchOp,AppliedPatch,AppliedDelta,AppliedRetarget,AppliedAnimation,AnimationSourceOp,CheckSummary,BustSpec};
@@ -297,3 +299,18 @@ export function stripPendingAfter<P>(pending:P|null,change:StageChange<P>):P|nul
297
299
  if(change.kind==='refused')return pending;
298
300
  return null;
299
301
  }
302
+
303
+ /** #250: the owning panel and status outcome line for a built job (used when Undo restores a previous Apply onto the stage). */
304
+ export function restoredOutcomeForJob(job:AnyJobView):(RestoredPanelOutcome&{error:boolean})|null {
305
+ if(job.status!=='built'||!job.build)return null;
306
+ const owner=appliedBuildOwner(recordFor(job));
307
+ if(!owner)return null;
308
+ const outcome=
309
+ owner.panel==='chest'?outcomeLine(job as RebuildJobView)
310
+ :owner.panel==='mesh-edit'?deltaOutcomeLine(job as DeltaJobView)
311
+ :owner.panel==='mesh'?meshApplyOutcome(job as PatchJobView)
312
+ :owner.panel==='retarget'?retargetOutcomeLine(job as RetargetJobView)
313
+ :owner.panel==='animation'?animationOutcomeLine(job as AnimationJobView)
314
+ :patchOutcomeLine(job as PatchJobView);
315
+ return {panel:owner.panel,...(owner.part?{part:owner.part}:{}),text:outcome.text,error:outcome.error};
316
+ }
@@ -83,6 +83,7 @@ export function bindRetargetPanel(deps:RetargetPanelDeps):RetargetPanel {
83
83
  const legScale={on:checkbox('retarget-leg-scale-on'),min:numberInput('retarget-leg-scale-min',0.8,'0.01','leg scale min'),max:numberInput('retarget-leg-scale-max',1.05,'0.01','leg scale max')};
84
84
  const plant=checkbox('retarget-plant-feet'),raised=checkbox('retarget-raised-by-head'),carry=checkbox('retarget-carry-idle');
85
85
  const apply=make('button',{id:'retarget-apply',type:'button',className:'primary',textContent:'Apply · Retarget',disabled:true}),reset=make('button',{id:'retarget-reset',type:'button',textContent:'Reset'});
86
+ const dropNotice=make('span',{className:'hint rebuild-drop-notice',hidden:true});dropNotice.setAttribute('data-rebuild-drop','retarget');
86
87
  const statusLine=make('p',{id:'retarget-status',className:'hint'});statusLine.setAttribute('aria-live','polite');
87
88
  const logView=make('pre',{id:'retarget-log',className:'retarget-log',hidden:true}),refusals=make('ul',{id:'retarget-refusals',className:'requirements-refusals'}),readings=make('ul',{id:'retarget-lines',className:'readings-worst'});readings.setAttribute('aria-label','Retarget lines');
88
89
  body.append(
@@ -95,7 +96,7 @@ export function bindRetargetPanel(deps:RetargetPanelDeps):RetargetPanel {
95
96
  make('div',{className:'row'},labelled('flip °',flip.on),flip.value,labelled('short',short.on),short.value,labelled('min score',minScore.on),minScore.value),
96
97
  make('div',{className:'row'},labelled('bends',bends),labelled('tolerance °',tolerance.on),tolerance.value,labelled('leg scale',legScale.on),legScale.min,legScale.max),
97
98
  make('div',{className:'row'},labelled('plant feet',plant),labelled('stance',stance.on),stance.value,labelled('raised by head',raised),labelled('carry idle',carry)),
98
- make('div',{className:'row'},apply,reset),statusLine,refusals,logView,readings,
99
+ make('div',{className:'row'},apply,reset,dropNotice),statusLine,refusals,logView,readings,
99
100
  );
100
101
 
101
102
  const bonesOf=()=>status?.bones??[];
package/web/styles.css CHANGED
@@ -230,7 +230,7 @@ footer.status-bar{flex-wrap:nowrap}
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
232
  .view-tools{display:flex;gap:4px;flex:none}.view-tool{padding:5px 9px;font-size:11px;white-space:nowrap}
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;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}
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)}
236
236
  .mesh-editor-bar kbd{margin-left:5px;font-size:10px;opacity:.75}#mesh-editor-status{flex:1 1 260px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
@@ -263,6 +263,7 @@ footer.status-bar{flex-wrap:nowrap}
263
263
  .environment-check-lines{display:grid;gap:3px;margin:0 0 9px;font:11px var(--font-mono);color:var(--fg-muted);overflow-wrap:anywhere}.environment-check-lines .env-bar{color:var(--fg-strong)}.environment-check-lines .env-label{color:var(--fg-soft)}.environment-check-lines .env-error{color:var(--fail)}
264
264
  .cloth-fields{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:6px 10px;margin:0 0 10px;padding:9px 10px;border:1px solid var(--border);border-radius:6px}.cloth-field{display:flex;flex-direction:column;gap:2px;min-width:0;color:var(--fg-muted);font-size:11px}.cloth-field input,.cloth-field select{width:100%;min-width:0;padding:4px 6px;font:11px var(--font-mono)}.cloth-field code{font:10px var(--font-mono);color:var(--fg-soft);overflow-wrap:anywhere}.cloth-field.pending span{color:var(--warn)}.cloth-declared{display:inline-flex;align-items:center;gap:4px}#cloth-panel-state.error,#cloth-status.error{color:var(--fail)!important}#cloth-pending-list .error{color:var(--fail)}
265
265
  .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)}
266
+ .rebuild-drop-notice{color:var(--warn);font-size:11px;white-space:normal;overflow-wrap:anywhere;min-width:0;max-width:100%}.rebuild-drop-notice[hidden]{display:none}
266
267
  .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}
267
268
  /* Key inspection and dopesheet editing (#235): tokens only. */
268
269
  #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)}
@@ -294,15 +295,17 @@ footer.status-bar{flex-wrap:nowrap}
294
295
  .animation-preview-badge{padding:1px 4px;border:1px solid var(--warn);border-radius:4px;color:var(--warn);font:9px var(--font-mono);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:36px;max-width:95px;flex:0 1 auto}
295
296
  .animation-ops-summary{font:9.5px var(--font-mono);color:var(--fg-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:44px;max-width:95px;flex:0 1 auto}
296
297
  .workspace-layout:has(>.parts-explorer) .animation-preview-badge,.workspace-layout:has(>.parts-explorer) .animation-ops-summary{display:none}
297
- .animation-dock-status{display:flex;flex-direction:column;justify-content:flex-start;gap:2px;height:44px;min-height:44px;max-height:44px;padding:1px 6px;box-sizing:border-box;font-size:9.5px;line-height:11px;overflow:hidden}
298
+ .animation-dock-status{display:flex;flex-direction:column;justify-content:flex-start;gap:2px;height:44px;min-height:44px;max-height:44px;padding:1px 6px;box-sizing:border-box;font-size:9.5px;line-height:11px;overflow:hidden;flex:none}
299
+ .animation-dock-status:has(>[data-rebuild-drop="animation"]:not([hidden])){height:auto;max-height:none;overflow:visible}
298
300
  .animation-gate-banner{margin:0;padding:1px 6px;border:1px solid var(--border-strong);border-radius:4px;background:var(--rv-raised);color:var(--fg-soft);font-size:9.5px;line-height:11px;white-space:normal;overflow-wrap:anywhere;text-overflow:clip;max-width:100%;width:100%;box-sizing:border-box;flex:none}
299
301
  .animation-gate-banner[data-editable=true]{border-color:var(--pass);color:var(--fg-strong)}
300
302
  .animation-gate-banner[data-editable=false]{border-color:var(--warn);color:var(--warn)}
301
303
  .animation-gate-banner[data-loading=true]{border-color:var(--border-strong);color:var(--fg-muted)}
304
+ .animation-dock-status>[data-rebuild-drop="animation"]{margin:0;font-size:9.5px;line-height:11px;color:var(--warn);white-space:normal;overflow-wrap:anywhere;text-overflow:clip;max-width:100%;width:100%;min-width:0;flex:none}
302
305
  .animation-dock-status>[data-animation-editor-status]{margin:0;font:9.5px/11px var(--font-mono);white-space:normal;overflow-wrap:anywhere;text-overflow:clip;max-width:100%;width:100%;min-width:0;flex:none}
303
306
  .animation-dock-status>[data-animation-apply-note]{margin:0;font-size:9.5px;line-height:11px;color:var(--fg-muted);white-space:normal;overflow-wrap:anywhere;text-overflow:clip;max-width:100%;width:100%;flex:none}
304
307
  .animation-dock-status>[data-inspection-status]{display:none;margin:0;font-size:9.5px;line-height:11px;white-space:normal;overflow-wrap:anywhere}
305
- .animation-dock-status>[data-animation-editor-status]:not(:empty)~[data-animation-apply-note],.animation-gate-banner[data-editable=false]~[data-animation-apply-note]{display:none}
308
+ .animation-dock-status>[data-rebuild-drop="animation"]:not([hidden])~[data-animation-apply-note],.animation-dock-status>[data-animation-editor-status]:not(:empty)~[data-animation-apply-note],.animation-gate-banner[data-editable=false]~[data-animation-apply-note]{display:none}
306
309
  .animation-dock-status>[data-inspection-status]:empty,.animation-dock-status>[data-animation-editor-status]:empty{display:none}
307
310
  .animation-key-inspector{display:flex;align-items:center;flex-wrap:nowrap;gap:8px;height:26px;min-height:26px;max-height:26px;margin:0 0 1px;padding:0 6px;border:1px solid var(--border);border-radius:5px;background:var(--rv-raised);font-size:11px;overflow:hidden}
308
311
  .animation-insert-bar,.animation-key-detail{display:inline-flex;align-items:center;flex-wrap:nowrap;gap:6px;min-width:0}