v2/wiki/decisions/2026-06-19-ux-redesign-and-fix-learn-loop.md
ADR — 2×2 lab senior-UX redesign + Fix-and-Learn loop (2026-06-19)
Context
The 2×2 Answer-Quality Lab UI shipped logic-complete but visually rough; Arijit asked for a senior-UX pass across the three Algolia personas (developers, execs, merchandisers) — polished, modern, self-explanatory. During the pass, two performance complaints surfaced (slow answers, "no streaming"), and Arijit asked to institutionalise a self-improvement loop.
Decisions
-
One unified question bar (top). The input and the "what was asked" display are the same element; the submitted query stays in the field. Removed the separate read-only question strip and the bottom composer. Rationale: two elements for one concept confused users and lost the question on submit.
-
Removed the winner-verdict headline strip. Replaced by a compact "Best answer" tag (★ + glow) on the winning tile. Rationale: the strip added a heavy band without earning its space; execs still need a glanceable winner, which the tag provides.
-
Viewport-fit layout (cockpit pattern). The 2×2 fills the screen as equal halves; each tile scrolls internally; the page never scrolls (
grid-template-rows: auto minmax(0,1fr) minmax(0,1fr)). Rationale: best practice for N-way comparison — all four verdicts visible at once; eliminates the whitespace-when-one-declines problem. Mobile (<900px) stacks and page-scrolls. -
Alive waiting state. Ticking elapsed timer + per-panel context hint (multi-agent flagged as slower). Rationale: backend answers take 15–72s with no token streaming; a frozen "Answering…" read as broken.
-
Neural badge honesty. Show "enabling" only when the backend explicitly reports the index isn't live; otherwise plain "Neural". Rationale: with the old
/health(no neural field), state is unknown; "enabling" over-claims "not ready" from absent data. Absence ≠ negative state. -
Fix-and-Learn loop is now an always-on SOP. Mechanism:
~/.claude/docs/fix-and-learn-loop.md+Standards/FixAndLearnLoopSOP.md, wired into global CLAUDE.md (Cardinal Rule 6). Project arm: repodocs/sop/lessons-log.md. Every resolved issue → Symptom/Root-cause/Fix/Evidence/Prevention, recorded to memory + vault.
Diagnoses (backend, blocked on SSH/redeploy)
- No token streaming:
lab/server/src/answer.tsawaits the full Agent Studio completion then emits one SSE block (firstTokenMs===totalMs). Upstream streams; the runner buffers. Fix = forward tokens as SSE deltas. - Slowness: backend — multi-agent chains + neural + likely Gemini throttling. Frontend cannot affect generation time.
Status
UI changes shipped + verified live (desktop + mobile); committed + pushed to origin/refactor/2x2-answer-quality-lab @ 0b1e872. Backend fixes pending the VPS redeploy (SSH allow-rule).