Skip to content

Fit Lab: keep other slots visible while fitting one (whole-outfit view) - #20

Open
DatMoshu wants to merge 2 commits into
mainfrom
fit-lab-outfit-view-impl
Open

DatMoshu wants to merge 2 commits into
mainfrom
fit-lab-outfit-view-impl

Conversation

@DatMoshu

@DatMoshu DatMoshu commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Sprint item 2: while you fit one slot, the other slots you have kept stay visible.

What it does

  • Keep visible (beside the Slot selector): the slot's selected item stays in the 3D view while you edit other slots. If you select another item in a kept slot, the slot now wears that item.
  • Show outfit: turns every kept slot on or off at once, without forgetting them.
  • Wear set: keeps one family's item in every slot that family has. Clear outfit forgets every kept slot.
  • Measure outfit (Measure tab, off by default):
    • Body hiding includes the kept items.
    • Measure slot counts each edited item with the kept items' hidden faces removed.
    • It adds one row per kept item.

The design commit (79cfaf9) is included: the README section "Whole outfit while fitting one slot" and schemas/fit-lab-view.schema.json.

What it doesn't change

  • The outfit is view state only. It adds no history step and no autosave, and it changes nothing in lab-adjustments.json, builds or renders.
  • It is stored per browser, server origin and pack under fit-lab:outfit:<origin>:<pack>.
  • On load, slots and items that are no longer in the manifest are dropped.
  • Slot preview cards, A/B and builds stay per item.

Also fixed

  • Measure slot's "measured …" message used to be overwritten by the hidden-face count straight away. It now stays.

Checks

  • pytest -q: 107 passed, 1 skipped, including 4 new tests in tests/unit/test_fit_lab_outfit.py (Node for outfit.mjs, plus the schema).
  • Outfit-lab unittest: 15 OK. tools/agents/run.py --check: up to date. launchers\dev\editor-tests.bat: 125 checks, passed.
  • In the browser, on the CC0 starter:
    • Keep, Show off/on, Wear set (20 slots) and Measure outfit (action 0: 1 item + 19 kept rows) all work.
    • History stays at 0 and the save status at "Saved to disk". The outfit survives a reload, and the console shows no errors.
  • No Blender-side code changed.

Note for merging

🤖 Generated with Claude Code

DatMoshu and others added 2 commits October 5, 2026 22:39
Keep visible / Show outfit / Wear set / Measure outfit rules, and the
browser-local view document in schemas/fit-lab-view.schema.json.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keep visible holds a slot's selected item in the 3D view while another slot is
edited; Show outfit turns all kept slots on or off; Wear set keeps one family
across every slot it has; Clear outfit forgets them. Measure outfit makes body
hiding and Measure slot include kept items and adds one row per kept item.

The outfit is view state only (web/outfit.mjs, schemas/fit-lab-view.schema.json):
no history step, no autosave, no change to lab-adjustments.json or builds. It
is remembered per browser, origin and pack in localStorage.

Also keeps Measure slot's result message visible: updateBody() in the finally
block used to overwrite it with the hidden-face count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-06T08:42:21.917906Z a4bae13 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@DatMoshu
DatMoshu marked this pull request as draft October 6, 2026 08:38
@DatMoshu

DatMoshu commented Oct 6, 2026

Copy link
Copy Markdown
Owner Author

Converted to draft. Fable's rule is that directors review and workers build, so item 2 gets an independent build. spritemotion-worker is building it fresh from the design commit 79cfaf9, and I'll review that PR instead. This branch stays only as a fallback; Fable decides whether to close it.

@DatMoshu
DatMoshu marked this pull request as ready for review October 6, 2026 08:40

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4bae13204

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread tools/fit-lab/web/lab.js
for (const it of kept) totals[it.info.id] += pokeCount(it, others(it)).n;
if (++done % 10 === 0) { $('status').textContent = `measuring ${done}/${jobs} poses…`; await new Promise(r => setTimeout(r)); }
}
for (const id in totals) { state.baseline[id] ??= totals[id]; state.results[id] = totals[id]; }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Key measurement baselines by outfit context

If an item was measured previously in its own slot, then is kept while another slot is measured with Measure outfit enabled, state.baseline[id] ??= reuses the earlier solo baseline. The displayed delta therefore compares counts produced with different hidden-face sets, even though the documented behavior says a kept row gets its baseline from its first outfit measurement. Reset or separately key baselines when the measured outfit context changes.

Useful? React with 👍 / 👎.

Comment thread tools/fit-lab/web/lab.js
state.slot = slot;
state.shown = new Set([list[0].id]); state.selected = list[0];
renderItems(); for (const it of items.values()) setVisible(it, state.shown.has(it.info.id));
renderItems(); refreshVisible(); outfitUI();

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Restore the worn item when reopening a kept slot

When a kept slot is reopened after choosing a non-first item, selectSlot selects and shows list[0] but outfit.worn[slot] still points to the previously selected item. The checkbox consequently says the slot is kept while the item being edited is not the item that reappears after leaving the slot. Initialize the selection from the slot's worn item, or synchronize the worn entry with the new selection.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant