Skip to content

Team 02 - Final PR - #86

Open
hi-em wants to merge 18 commits into
mainfrom
team_02
Open

Team 02 - Final PR#86
hi-em wants to merge 18 commits into
mainfrom
team_02

Conversation

@hi-em

@hi-em hi-em commented Jun 28, 2026

Copy link
Copy Markdown
Collaborator

Team 02 | Sensi

Core product
Conversational comfort agent with SSE streaming for live agent turns
CAD-style floor-plan rendering — real walls, furniture symbols, and window breaks replacing bounding boxes
Expanded edit tools with a redesigned capabilities menu, plus a biophilic ("talk green to me") lens
"Focus Pull" edit-guide that highlights exactly what changed
Persona & report
Persona fidelity — honest reveal math and a refinable, editable comfort profile
Closed input→output loop — the moodboard and persona recap return in the Report
Visualization & narrative
Galaxy "Narrator" — an educational layer that makes the relationship view readable
Checkpoint ripple-graph — commit history shown as a horizontal sense graph
Models & deliverables
Upgraded to current Gemini 3.x models with refreshed week-9 benchmarks
Week-9/10 final-review deck (reveal.js + PDF), spoken scripts, and demo clips/screenshots

hi-em added 18 commits June 19, 2026 14:55
… replace bounding boxes

Render the floor plan as CAD-accurate linework in Sensi's luminous style instead
of a stack of bounding boxes.

- walls.js: derive the wall network from shared room-polygon edges (the layout's
  `structure` array is sparse) — merge collinear overlaps, tag exterior/interior,
  each segment addressable for the upcoming wall-edit tools (B3)
- WallsLayer: render each wall as a luminous band (model-unit mass + crisp centerline)
- RoomsLayer: drop the per-room rectangle outline (the "box"); keep tint/label/ring/
  hit-area/handlers; focus shown as a soft inner glow; snap room labels inside the
  polygon so concave (L-shaped) rooms' labels don't land in a neighbour's cell
- furnitureSymbols.jsx + FurnitureLayer: recognizable plan symbols per furniture type
  (plant = sage orb), with a labelled-footprint fallback and a facing heuristic
- OpeningsLayer: windows render as a wall break + glass symbol (axis-agnostic); doors kept
- global.css: wall/room/window/furniture symbol classes; room-label halo uses
  vector-effect:non-scaling-stroke (without it stroke-width was read as metres and the
  label halos blanketed the walls)
- Walls/Openings/Furniture wrapped in React.memo to skip per-hover re-renders
- Dev preview harness (?plan=<id>) renders SensePlan against static fixtures
…philic lens

Edit tools — 9 ops on one sound chokepoint:
- add_window, change_wall_material (room-scoped + visible), modify_ventilation, add_curtain,
  change_window_location, remove_furniture/door/window — all ride edit_planner→apply_edits→
  re-score→compare. Chosen by score-impact ROI (move scores AND close a suggested-but-can't-do gap).
- spatial.py (Shapely): place windows/furniture/curtains soundly, never mid-room.
- check_layout_geometry.audit_layout(dict): floor-plan-review runs in-app. apply_edits does
  per-op atomic revert (snapshot→apply→audit→revert on a new defect), records rejected_edits/notes.
- Scoring coherence (compute_comfort_scores): room-scoped wall material, soft-furnishing + wall
  acoustic absorption, per-window orientation→thermal — so the agent's advice actually moves scores.
- Suggestion lifecycle (suggestion_lifecycle.py): a fulfilled suggestion is crossed off the list.
- Fix find_target_room: exact room NAME beats roomType ("guest bedroom" no longer routes to Master).
- Tests: python/tests/test_edit_tools.py (23, pure). Adds shapely to requirements.

Capabilities menu redesign (Capabilities.jsx):
- One registry → by-action verb families + a by-sense "what moves this sense" lever map.
- Clickable launcher chips (drop the phrase into chat). Feature-type taxonomy
  ◆ agentic / ◇ analytic / · general via glyph+pill-shape; status = small dot; tiers corrected.

Biophilic lens — "talk green to me" (biophilic.js, BiophilicLayer.jsx, BiophilicCard.jsx):
- A lens MODE that simplifies the canvas; rooms glow green by richness; thriving rooms grow leaf
  particles; bare rooms invite a plant; tap a room → 5-leaf Terrapin fingerprint with documented
  benefits + a playful narrator. Greening rides the sound edit pipeline; richness is client-side so
  it ticks up live. Botanical narrator in biophilic_audit.py.
…orbs)

The edit-guide no longer floats a marker over the plan. On an agent edit, the
rest of the plan gently recedes and a soft, breathing pool of light lands on
exactly what changed.

New: web/src/canvas/EditFocusLayer.jsx
- Nothing at rest; reads the turn's layout_diffs.
- Element-precise: an added window's glass / placed furniture / removed door's
  ghost ignite IN PLACE; room-wide edits (floor/wall material, ventilation,
  glazing) light the whole room — material edits glow in the actual finish.
- A breathing focal iris + a sense-glyph cue + per-edit life (air motes, window
  glint). Hover -> old->new + affected senses + score impact; click -> opens the
  room's full breakdown.
- Scrim @0.2 (full layout stays readable) and pointer-events:none so the plan
  stays fully INTERACTIVE — only the focus hit-circles take the mouse.

Backend: python/nodes/editing/_edits.py
- make_layout_diff now carries optional at=[x,y] (anchor) + el=geometry for
  location-bearing edits (add/move/remove window, add/remove furniture, remove
  door) via an _anchor() helper; removals capture geometry before deletion.
  Room-wide edits omit both; the frontend falls back to the room polygon. Diff
  flows through contracts unchanged.

Removed the old material-orb lens:
- delete web/src/canvas/MaterialLayer.jsx (the 3D material orbs).
- materials.jsx: drop the dead mat-orb gradient path (MaterialDefs,
  materialOrbFill, shading helpers); keep materialColor/materialLabel.
- remove the `material` layer toggle (LayerToggles, LayoutModeScreen,
  SensePlan DEFAULT_LAYERS) — the guide is not a lens.

SensePlan: expose view bounds, wire EditFocusLayer, generalize the change
tooltip (old->new + sense + impact), click-to-open-room.

Cleanup: stale "orb" comments updated in _edits.py, InteractiveMessage.jsx,
WallsLayer.jsx. Docs: week09 narrative + memory updated to Focus Pull.
Session 6. Audit the front door, then make the persona actually travel into
layout mode, tell the truth about its own math, and become editable.

- Fidelity: capture household members + pets (persona_compiler), a single
  persona_context formatter wired into every responder (incl. chitchat), and a
  labelled apply_context scoring layer (elderly/children/pets amplify deficits,
  capped, no-op for neutral personas — demo layouts score unchanged).
- Honest reveal: rewrite "how Sensi scores your comfort" to the real model
  (non-additive veto, weights-at-aggregation, cross-modal/personality/household),
  constants mirrored from sense_model.py so the reveal can't drift.
- Companion: shared PersonaCard for the reveal + an enriched, discoverable
  profile drawer; removed the read-only "tweak it"/ProfileChat dead-end.
- Refine: refine_persona() + /api/refine-persona — "tell Sensi what changed"
  patches the relevant fields (household/pets flow into scoring), plus a redo-
  onboarding link. No slider editor by design.
- Fix: persona_comparison keyed off a dead field and tied every room; now scores
  the user's real persona vs a representative archetype.

Docs: docs/week09/flow-audit.md (INPUT/OUTPUT map + gap tables); narrative notes.
Verified live end-to-end (grandma+cat → description/scoring/answers; dog refine →
acoustic 0.80→0.95); 23 pytest + tests/validate_session6.py green.
…turn in the Report

The aesthetic and persona given at onboarding now come back in the output
(flow-audit §6, items 1/2/3/5).

- Report opens with a persona-recap header (ReportPersonaHeader): "shaped for
  {name}", role + household, top-3 sense chips, and the curated moodboard
  replayed as "the aesthetic you curated" — the onboarding aesthetic finally
  has an afterlife, and the persona reads as one companion across all 3 acts.
- /api/report returns moodboard_urls (live session → persona.json fallback);
  a _write_persona stamp in /api/inspire/moodboard writes the board onto
  persona.json so it survives restarts / returning users.
- Image-gen wait reframed as a progressive reveal in RenderSlot: scores+prompt
  show instantly, a poetic status cycles over the shimmer, render fades in;
  honours prefers-reduced-motion.
- Exports carry the new content: JSON bundle gains persona + moodboard_urls;
  PNG verified to rasterize cross-origin Unsplash images without tainting.
- Fix: moodboard strip images couldn't shrink on mobile (flex min-width:auto)
  → min-width:0 on the shared .moodboard-strip rule.
- docs: week09 narrative notes.
Reframe the loved-but-flat checkpoint strip into a bold horizontal graph
where you watch the senses rise, fall, and pull on each other across commits.

- Each sense is a luminous strand on its own auto-zoomed scale (small moves
  read), strands weave and cross.
- Ripple = the centerpiece: glowing valence arcs (+ helped / ± trade-off /
  − hurt) braid two coupled senses wherever they co-moved at a commit, drawn
  from the canonical SENSE_SENSE model.
- Reading aids baked in: a one-line "how to read" caption + a sense glyph at
  each strand's end; legend solos a sense; hover = exact scores + ↑/↓.
- Stays navigable: dashed tail to the uncommitted "now" head, click a commit
  to focus, confirm-gated restore.
- Backend: add sense_means per checkpoint + live_head() helper, emitted on
  message/commit/restore (~14 lines, no schema break).
- Pure SVG, no chart library; reuses sense hues, VALENCE tints, .plan-tooltip.
… readable

The relationship galaxy was admired but opaque to first-timers. Add "The
Narrator": one ambient plain-language band (additive, on-brand) that teaches
it without redesigning the instrument.

- first-look orientation tour (5 beats, auto-plays once, "?" to replay) that
  names each part and SPOTLIGHTS it by reusing the existing ripple focus-fade
  — zero new rendering
- live readout: hover any sense / room / thread and it translates to plain
  English; same band reads it (onNodeHover/onLinkHover → React state)
- per-lens explainers on hover; "dismiss guide ×" for the clean power-user view
- legend now defaults collapsed (the Narrator does the cold-open teaching)

Additive only: no change to the 3D scene, forces, fibers, ripple, expand,
concept view, or lenses; no data-model change; galaxy stays self-contained
(no cross-screen linking). New copy lives as GALAXY_GUIDE beside the legend/
lens defs; band is one small component reusing app tokens + motion.

Fix (code-review): tour spotlight and ripple both borrowed focusRef.active —
marked tour-owned focus (spotlightRef/tourStepRef) so neither clobbers the other.

web/src/lib/relationshipGraph.js      — GALAXY_GUIDE + readNode/readLink/control
web/src/galaxy/RelationshipGalaxy.jsx — narrator wiring, spotlight, ?/dismiss
web/src/galaxy/GalaxyNarrator.jsx     — the band (new)
web/src/styles/global.css             — .galaxy-guide-* (additive)
docs/week09/narrative-notes.md        — session 9 notes
…chmarks

Research showed the Gemini lineup jumped a generation: 2.0 retired, 2.5 now
legacy-stable, current is 3.x. Every model ID was verified live against official
ai.google.dev docs and smoke-called before the swap (no model named from memory).
Two-tier strategy unchanged — only the IDs moved, via a one-token .env swap with
no app-code change on the model path.

Models (all GA, verified 2026-06-20):
- FAST  gemini-2.5-flash-lite  -> gemini-3.1-flash-lite
- SMART gemini-2.5-flash       -> gemini-3.5-flash
- IMAGE gemini-2.5-flash-image -> gemini-3.1-flash-image (Nano Banana 2)

Benchmarks (new baseline, docs/week09/):
- perf: session $0.013 -> $0.048; SMART 8.5s -> 11.3s; FAST sub-second/near-free;
  image 6.7s/$0.039 -> 11.4s/$0.067. Trades latency+cost for capability.
- quality (blind A/B, rubric judge): NEW won 7/8 nodes/cases; no regression.

Harness: new bench_quality.py + a BENCH_QUALITY-gated prompt-capture hook
(llm.py QUALITY_CAPTURE + graph.py _bench_wrap node tagging, zero overhead off);
bench_nodes/imaging pricing + week09 output dir; imaging providers env-configurable.
App verified green end-to-end on the new IDs (chat, scoring, an edit, a render).

Docs: docs/week09/models-and-benchmarks.md (cited models table + perf + quality
findings) and 3 Session-10 bullets in narrative-notes.md for the deck.
…de-17 number fix

Write the spoken talk for the capstone Final Review into the deck and script.

- Rewrite all 21 per-slide speaker notes (deck asides) as the spoken lines,
  tagged by presenter [S1/S2/S3] / [DEMO VO] with seconds + handoff cues.
- Split: S1 pages 1-6, S2 8-14, S3 16-21; both live handoffs masked by a demo
  clip (Clip 1, Clip 3). Lean ~9:30 talk + 3:30 demos. Math in plain English,
  formulas never read aloud, no em dashes.
- Mirror into presentation-script-week09.md: split + time tally, the 3 demo
  voiceovers (50/90/70s), and delivery/rehearsal notes.
- Fix slide 17: the Google-vs-OpenAI A/B mislabeled prior-gen numbers as
  "Nano Banana 2" and showed an unrecorded "OpenAI 18.7s". Now Google
  6.7s/$0.039 vs OpenAI 20.5s/$0.042 (~3x), grounded in week08/results.json.
- Fix slide 13 note: "thirteen LLM nodes" -> "every node" (13 was the
  classifier's action count, not the node count).
- Re-export Sensi-FinalReview-week09.pdf (21 pages).
…lity, placement/report fixes, stabilizers

Onboarding profile reveal
- Single-screen landscape: break out of the 560px chat column into a wide,
  non-scrolling stage; fits 1280x800 and 1440x900 with no page scroll
- Hero rose + name/role/household on the left; 3 evidence cards on the right as
  a fixed-area accordion (equal at rest; hover/focus expands one and collapses
  the others — no overlap, no page/CTA shift)
- Rose: opt-in SenseSignature `baselineTop` draws the average as a dashed
  outline on top of the fill + a baseline tick, so you-vs-average reads
  regardless of over/under (default off; FocusCard/report roses untouched)
- a/an agreement fix ("an architect"); add --r-md token (was undefined)

Moodboard
- Fast + reliably real: parallel + cached Unsplash, 12-cell floor (bug 1)
- Unique-per-round, quiz-seeded, pick-evolving selections + optional "say more"

Layout / report fixes
- Plant & furniture placement: size variants + door-aware, audit-checked spots (bugs 2 & 7)
- Focus Pull anchors on the changed element, not the room centre (bug 8)
- Report before/after shows the most-changed room (bug 3)

Demo stabilizers & presentation
- favicon, suggestion reset on layout load, silenced spurious load action
- week-9 deck / presentation script / faculty-update / demo-scripts edits
- Redesigned slides: scoring engine (deterministic pipeline), room graph
  (real NetworkX topology), checkpoint weave (commit chips + Act-3 handoff),
  and the close (wins vs open questions + benchmarks)
- Resynced presentation + demo scripts to the deck flow (~9 min slides,
  ~4 min demo); zero em dashes
- Regenerated the PDF and hardened make-pdf.py (dedicated Edge profile fixes
  the silent partial export)
- Gathered deck, PDF, and scripts into week09/deliverables/
- Removed the dead reportlab deck pipeline and stale planning docs; updated
  README + launch.json
Compressed demo clips; combines the two prior local commits so the
oversized original videos are not carried in history.
@hi-em
hi-em requested a review from sclebow June 28, 2026 10:25
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