균형 개선 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
+66 -53

No files matched your search

+13 -10
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">
<span>{stepLabel(m.step)}</span>
{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}
</span>
)}
@@ -167,16 +167,19 @@ export function ChatPanel({
<div className="border-t border-base-300/60 p-4">
{nego.done ? (
<div className="flex flex-wrap items-center justify-between gap-3">
{/* 큰 숫자는 좌측 최종 합의가 패널이 담당 — 여기서는 사건만 알린다 */}
{finalPrice != null ? (
<div>
<p className="text-[13px] font-semibold text-success">협상 완료</p>
<p className="num mt-0.5 text-xl font-bold">
{finalPrice.toLocaleString()}원
<span className="num ml-2 align-[2px] rounded-full bg-primary/10 px-2 py-0.5 text-xs font-semibold text-primary">
기존가 대비 −{savedPct}%
</span>
</p>
</div>
<p className="flex items-center gap-2 text-[15px]">
<span className="flex size-5 shrink-0 items-center justify-center rounded-full bg-success" aria-hidden>
<svg viewBox="0 0 10 8" className="w-2.5">
<path d="M1 4l2.5 2.5L9 1" fill="none" stroke="white" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" />
</svg>
</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>
</p>
) : (
<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'
const FLOW = ['서비스안내', '담당자확인', '협상품목안내', '가격협상', '협상종료']
const MAX_ROUNDS = 5
const MAX_ROUNDS = 6 // 시작 제안 1회 + 재협상 5회(엔진 MAX_ITERATION)
// 긴장도 구간 → 응대 페르소나 (엔진 프리셋과 동일한 3구간)
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' }) {
if (state === 'done') {
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>
<path d="M1 4l2.5 2.5L9 1" fill="none" stroke="white" strokeWidth="1.8" strokeLinecap="round" strokeLinejoin="round" />
</svg>
@@ -72,34 +72,6 @@ export function Dashboard({
return (
<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
title="가격 라운드"
@@ -125,7 +97,7 @@ export function Dashboard({
{r.price.toLocaleString()}원
</span>
{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)}%`}
</span>
)}
@@ -168,7 +140,7 @@ export function Dashboard({
</div>
<div className="mt-1.5 h-1 rounded-full bg-base-200">
<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}%` }}
/>
</div>
@@ -224,6 +196,35 @@ export function Dashboard({
</p>
)}
</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>
)
}
+15 -10
View File
@@ -10,7 +10,8 @@ export function PriceChart({ demoCase, priceTrail }: { demoCase: DemoCase; price
const W = 300
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 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) }))
.sort((a, b) => a.y - b.y)
const MIN_GAP = 14
for (let i = 1; i < refs.length; i++) {
if (refs[i].ly - refs[i - 1].ly < MIN_GAP) refs[i].ly = refs[i - 1].ly + MIN_GAP
// 라벨은 각자 선 위에 얹히므로, 가까우면 위쪽 라벨을 밀어 올려 겹침을 피한다
const MIN_GAP = 12
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)
if (overflow > 0) for (const r of refs) r.ly -= overflow
const clip = 13 - refs[0].ly
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 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
x1={PAD.left}
y1={r.y}
x2={W - PAD.right + 6}
x2={W - PAD.right}
y2={r.y}
stroke={r.color}
strokeOpacity={r.op * 0.45}
@@ -76,12 +78,15 @@ export function PriceChart({ demoCase, priceTrail }: { demoCase: DemoCase; price
strokeDasharray="3 4"
/>
<text
x={W - 2}
y={r.ly + 3}
x={W - PAD.right}
y={r.ly - 3}
textAnchor="end"
fontSize="11.5"
fontSize="10"
fill={r.color}
fillOpacity={Math.min(r.op + 0.2, 1)}
stroke="var(--color-base-100)"
strokeWidth="2.5"
paintOrder="stroke"
className="num"
>
{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>
</p>
{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}%
</span>
)}