균형 개선 4건 + 악센트 다이어트 — 파랑의 역할을 행동·현재점·차트로 한정

- 라운드 분모 6/6 정정 (시작 제안 1 + 재협상 5)
- 완료 배너 한 줄로 경량화 (큰 숫자는 좌측 패널 전담, 완료 배지는 초록 전환)
- 차트 기준선 라벨을 선 위로 — 우측 여백 제거로 플롯이 카드 폭 전체 사용
- 우측 순서 재배치: 가격 라운드 → 엔진 판단 → 협상 진행
- 무채색 강등: 완료 스텝 체크·라운드 %·채팅 카드 칩·지표 바

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UFZ7JWdwCaQAwNYJErL8pP
This commit is contained in:
민헌andClaude Fable 5 committed 2026-08-31 14:59:52 +09:00
1 parent b7cc25681e
commit 9f5bf64b02
4 files changed
+64 -51

No files matched your search

+11 -8
View File
@@ -130,7 +130,7 @@ export function ChatPanel({
<div className="chat-header mb-1 flex items-center gap-1.5 text-xs font-semibold text-base-content/45"> <div className="chat-header mb-1 flex items-center gap-1.5 text-xs font-semibold text-base-content/45">
<span>{stepLabel(m.step)}</span> <span>{stepLabel(m.step)}</span>
{m.meta?.card_id && ( {m.meta?.card_id && (
<span className="num rounded-full bg-primary/10 px-1.5 py-px font-mono text-primary"> <span className="num rounded-full bg-base-200 px-1.5 py-px font-mono text-base-content/55">
{m.meta.card_id} {m.meta.card_id}
</span> </span>
)} )}
@@ -167,16 +167,19 @@ export function ChatPanel({
<div className="border-t border-base-300/60 p-4"> <div className="border-t border-base-300/60 p-4">
{nego.done ? ( {nego.done ? (
<div className="flex flex-wrap items-center justify-between gap-3"> <div className="flex flex-wrap items-center justify-between gap-3">
{/* 큰 숫자는 좌측 최종 합의가 패널이 담당 — 여기서는 사건만 알린다 */}
{finalPrice != null ? ( {finalPrice != null ? (
<div> <p className="flex items-center gap-2 text-[15px]">
<p className="text-[13px] font-semibold text-success">협상 완료</p> <span className="flex size-5 shrink-0 items-center justify-center rounded-full bg-success" aria-hidden>
<p className="num mt-0.5 text-xl font-bold"> <svg viewBox="0 0 10 8" className="w-2.5">
{finalPrice.toLocaleString()}원 <path d="M1 4l2.5 2.5L9 1" fill="none" stroke="white" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" />
<span className="num ml-2 align-[2px] rounded-full bg-primary/10 px-2 py-0.5 text-xs font-semibold text-primary"> </svg>
기존가 대비 −{savedPct}% </span>
<span className="font-bold">협상 완료</span>
<span className="num text-base-content/60">
최종 합의가 <span className="font-semibold text-base-content">{finalPrice.toLocaleString()}원</span> · −{savedPct}%
</span> </span>
</p> </p>
</div>
) : ( ) : (
<span className="text-sm font-bold">협상이 종료되었습니다</span> <span className="text-sm font-bold">협상이 종료되었습니다</span>
)} )}
+33 -32
View File
@@ -3,7 +3,7 @@ import type { DemoCase } from '../content/cases'
import type { NegoState, Round } from '../App' import type { NegoState, Round } from '../App'
const FLOW = ['서비스안내', '담당자확인', '협상품목안내', '가격협상', '협상종료'] const FLOW = ['서비스안내', '담당자확인', '협상품목안내', '가격협상', '협상종료']
const MAX_ROUNDS = 5 const MAX_ROUNDS = 6 // 시작 제안 1회 + 재협상 5회(엔진 MAX_ITERATION)
// 긴장도 구간 → 응대 페르소나 (엔진 프리셋과 동일한 3구간) // 긴장도 구간 → 응대 페르소나 (엔진 프리셋과 동일한 3구간)
const PERSONA_ZONE: Record<string, number> = { const PERSONA_ZONE: Record<string, number> = {
@@ -35,7 +35,7 @@ function Panel({ title, right, children }: { title: string; right?: React.ReactN
function StepCircle({ state }: { state: 'done' | 'current' | 'todo' }) { function StepCircle({ state }: { state: 'done' | 'current' | 'todo' }) {
if (state === 'done') { if (state === 'done') {
return ( return (
<span className="flex size-5 shrink-0 items-center justify-center rounded-full bg-primary"> <span className="flex size-5 shrink-0 items-center justify-center rounded-full bg-base-content/25">
<svg viewBox="0 0 10 8" className="w-2.5" aria-hidden> <svg viewBox="0 0 10 8" className="w-2.5" aria-hidden>
<path d="M1 4l2.5 2.5L9 1" fill="none" stroke="white" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" /> <path d="M1 4l2.5 2.5L9 1" fill="none" stroke="white" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" />
</svg> </svg>
@@ -72,34 +72,6 @@ export function Dashboard({
return ( return (
<aside className="flex flex-col gap-4 min-[960px]:min-h-0 min-[960px]:overflow-y-auto"> <aside className="flex flex-col gap-4 min-[960px]:min-h-0 min-[960px]:overflow-y-auto">
<Panel title="협상 진행">
<ol className="flex flex-col">
{FLOW.map((s, i) => {
const state = i < fi ? 'done' : i === fi ? 'current' : 'todo'
return (
<li key={s} className={`flex gap-3 ${i === FLOW.length - 1 ? '' : ''}`}>
<div className="flex flex-col items-center">
<StepCircle state={state} />
{i < FLOW.length - 1 && (
<div className={`w-0.5 flex-1 ${i < fi ? 'bg-primary' : 'bg-base-200'}`} />
)}
</div>
<span
className={`text-[13px] leading-5 ${i < FLOW.length - 1 ? 'pb-4' : ''} ${
state === 'current'
? 'font-bold text-primary'
: state === 'done'
? 'text-base-content/55'
: 'text-base-content/35'
}`}
>
{s}
</span>
</li>
)
})}
</ol>
</Panel>
<Panel <Panel
title="가격 라운드" title="가격 라운드"
@@ -125,7 +97,7 @@ export function Dashboard({
{r.price.toLocaleString()}원 {r.price.toLocaleString()}원
</span> </span>
{pct != null && ( {pct != null && (
<span className={`num text-xs font-medium ${pct >= 0 ? 'text-primary' : 'text-base-content/45'}`}> <span className={`num text-xs font-medium text-base-content/55`}>
{pct >= 0 ? `−${pct}%` : `+${Math.abs(pct)}%`} {pct >= 0 ? `−${pct}%` : `+${Math.abs(pct)}%`}
</span> </span>
)} )}
@@ -168,7 +140,7 @@ export function Dashboard({
</div> </div>
<div className="mt-1.5 h-1 rounded-full bg-base-200"> <div className="mt-1.5 h-1 rounded-full bg-base-200">
<div <div
className="h-full rounded-full bg-primary transition-[width] duration-500 motion-reduce:transition-none" className="h-full rounded-full bg-base-content/55 transition-[width] duration-500 motion-reduce:transition-none"
style={{ width: `${indicator ?? 0}%` }} style={{ width: `${indicator ?? 0}%` }}
/> />
</div> </div>
@@ -224,6 +196,35 @@ export function Dashboard({
</p> </p>
)} )}
</Panel> </Panel>
<Panel title="협상 진행">
<ol className="flex flex-col">
{FLOW.map((s, i) => {
const state = i < fi ? 'done' : i === fi ? 'current' : 'todo'
return (
<li key={s} className={`flex gap-3 ${i === FLOW.length - 1 ? '' : ''}`}>
<div className="flex flex-col items-center">
<StepCircle state={state} />
{i < FLOW.length - 1 && (
<div className={`w-0.5 flex-1 ${i < fi ? 'bg-base-content/20' : 'bg-base-200'}`} />
)}
</div>
<span
className={`text-[13px] leading-5 ${i < FLOW.length - 1 ? 'pb-4' : ''} ${
state === 'current'
? 'font-bold text-primary'
: state === 'done'
? 'text-base-content/55'
: 'text-base-content/35'
}`}
>
{s}
</span>
</li>
)
})}
</ol>
</Panel>
</aside> </aside>
) )
} }
+15 -10
View File
@@ -10,7 +10,8 @@ export function PriceChart({ demoCase, priceTrail }: { demoCase: DemoCase; price
const W = 300 const W = 300
const H = 150 const H = 150
const PAD = { top: 14, right: 78, bottom: 12, left: 10 } // 기준선 라벨을 선 위에 얹어 우측 여백을 최소화 — 플롯이 카드 폭을 거의 다 쓴다
const PAD = { top: 16, right: 10, bottom: 10, left: 10 }
const plotW = W - PAD.left - PAD.right const plotW = W - PAD.left - PAD.right
const plotH = H - PAD.top - PAD.bottom const plotH = H - PAD.top - PAD.bottom
@@ -31,12 +32,13 @@ export function PriceChart({ demoCase, priceTrail }: { demoCase: DemoCase; price
] ]
.map((r) => ({ ...r, y: yOf(r.v), ly: yOf(r.v) })) .map((r) => ({ ...r, y: yOf(r.v), ly: yOf(r.v) }))
.sort((a, b) => a.y - b.y) .sort((a, b) => a.y - b.y)
const MIN_GAP = 14 // 라벨은 각자 선 위에 얹히므로, 가까우면 위쪽 라벨을 밀어 올려 겹침을 피한다
for (let i = 1; i < refs.length; i++) { const MIN_GAP = 12
if (refs[i].ly - refs[i - 1].ly < MIN_GAP) refs[i].ly = refs[i - 1].ly + MIN_GAP for (let i = refs.length - 2; i >= 0; i--) {
if (refs[i + 1].ly - refs[i].ly < MIN_GAP) refs[i].ly = refs[i + 1].ly - MIN_GAP
} }
const overflow = refs[refs.length - 1].ly - (H - 4) const clip = 13 - refs[0].ly
if (overflow > 0) for (const r of refs) r.ly -= overflow if (clip > 0) for (const r of refs) r.ly += clip
const pts = priceTrail.map((v, i) => ({ x: xOf(i), y: yOf(v), v })) const pts = priceTrail.map((v, i) => ({ x: xOf(i), y: yOf(v), v }))
const line = pts.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x},${p.y}`).join(' ') const line = pts.map((p, i) => `${i === 0 ? 'M' : 'L'}${p.x},${p.y}`).join(' ')
@@ -68,7 +70,7 @@ export function PriceChart({ demoCase, priceTrail }: { demoCase: DemoCase; price
<line <line
x1={PAD.left} x1={PAD.left}
y1={r.y} y1={r.y}
x2={W - PAD.right + 6} x2={W - PAD.right}
y2={r.y} y2={r.y}
stroke={r.color} stroke={r.color}
strokeOpacity={r.op * 0.45} strokeOpacity={r.op * 0.45}
@@ -76,12 +78,15 @@ export function PriceChart({ demoCase, priceTrail }: { demoCase: DemoCase; price
strokeDasharray="3 4" strokeDasharray="3 4"
/> />
<text <text
x={W - 2} x={W - PAD.right}
y={r.ly + 3} y={r.ly - 3}
textAnchor="end" textAnchor="end"
fontSize="11.5" fontSize="10"
fill={r.color} fill={r.color}
fillOpacity={Math.min(r.op + 0.2, 1)} fillOpacity={Math.min(r.op + 0.2, 1)}
stroke="var(--color-base-100)"
strokeWidth="2.5"
paintOrder="stroke"
className="num" className="num"
> >
{r.label} {r.v.toLocaleString()} {r.label} {r.v.toLocaleString()}
+5 -1
View File
@@ -32,7 +32,11 @@ export function PricePanel({
<span className="ml-0.5 text-lg font-semibold text-base-content/55">원</span> <span className="ml-0.5 text-lg font-semibold text-base-content/55">원</span>
</p> </p>
{savedPct != null && ( {savedPct != null && (
<span className="num rounded-full bg-primary/10 px-2 py-0.5 text-[13px] font-semibold text-primary"> <span
className={`num rounded-full px-2 py-0.5 text-[13px] font-semibold ${
finalPrice != null ? 'bg-success/10 text-success' : 'bg-primary/10 text-primary'
}`}
>
기존가 대비 −{savedPct}% 기존가 대비 −{savedPct}%
</span> </span>
)} )}