feat: P1 풀빌드 — React 프론트 7화면 + 백엔드 상담루프·평가·음성·RAG

web (Vite+React19+TS, Cloudflare Pages 배포):
- 디자인토큰(세이지틸/테라코타 SSOT), 앱셸, 공통 UI 프리미티브
- 7화면: 로그인/학습자홈/상담세션/회기리뷰/교수자/관리자/설정
- ClientAvatar: SVG 반구상 흉상 4상태 + RMS 립싱크 + 6파라미터 정서
- 회기리뷰는 외부 레퍼런스 디자인을 Vignette 토큰으로 리스킨

api (FastAPI):
- 게이트웨이 /v1/generate·/v1/stream 어댑터(상주풀/EngineSession 보존)
- services: 페르소나 L0~L6 빌더 / 결정론 상태머신 / 가드레일 /
  턴 오케스트레이터 / 회기간 메모리 / 평가AI / 음성 / RAG
- store: DB off 폴백(in-memory), sessions 실구현

검증:
- web: node22 tsc+vite build 통과(node23 segfault 회피), Pages 배포 200
- api: app.main import 통과
- 핫픽스: Topbar initials undefined-safe (undefined.trim 크래시)
- E2E: 서연(P1) 상담 1턴 — 좋은/나쁜 상담에 차등 반응 실증
This commit is contained in:
Yun Chan 2026-06-25 23:37:22 +09:00
parent 859ab26314
commit 24b1b7a6e1
84 changed files with 19645 additions and 107 deletions

View file

@ -0,0 +1,479 @@
/* =====================================================================
Settings 페이지 전용 스타일 tokens.css 변수만 참조.
철칙: border-left·좌측바·이모지·카드덤프·순흑백·과한 라운드 금지.
원형 예외: dot / 토글 노브 / 아바타만. 카드/버튼 8px, 입력 6px.
강조 = weight + accent 텍스트 + accent-tint 배경 + kicker(+dot).
===================================================================== */
/* ── 레이아웃: 좌측 섹션 내비(sticky) + 우측 폼 ── */
.vg-set {
display: grid;
grid-template-columns: 220px 1fr;
gap: var(--sp-7);
align-items: start;
max-width: 1000px;
}
/* 좌측 섹션 내비 */
.vg-set__nav {
position: sticky;
top: calc(var(--topbar-h) + var(--sp-4));
display: flex;
flex-direction: column;
gap: 2px;
}
.vg-set__nav-kicker {
font-family: var(--font-num);
font-size: var(--fs-kicker);
font-weight: 600;
letter-spacing: 0.08em;
color: var(--text-muted);
padding: 0 12px var(--sp-3);
}
.vg-set__nav-item {
display: flex;
align-items: center;
gap: 11px;
font-size: var(--fs-sm);
font-weight: 500;
color: var(--text-body);
background: transparent;
border: none;
text-align: left;
padding: 10px 12px;
border-radius: var(--radius);
cursor: pointer;
transition: background var(--dur-fast) var(--ease-out),
color var(--dur-fast) var(--ease-out);
}
.vg-set__nav-item:hover {
background: var(--bg-surface-2);
color: var(--text-strong);
}
.vg-set__nav-item.is-active {
background: var(--accent-tint);
color: var(--accent-deep);
font-weight: 600;
}
.vg-set__nav-item svg {
flex: none;
opacity: 0.85;
}
/* 우측 폼 컬럼 */
.vg-set__forms {
display: flex;
flex-direction: column;
gap: var(--sp-6);
min-width: 0;
}
/* ── 그룹(섹션 카드) — 헤어라인 + 톤차, 상단 강조선 없음 ── */
.vg-set__group {
scroll-margin-top: calc(var(--topbar-h) + var(--sp-4));
}
.vg-set__group-head {
margin-bottom: var(--sp-5);
}
.vg-set__group-title {
font-size: var(--fs-h3);
font-weight: 600;
letter-spacing: -0.01em;
color: var(--text-strong);
}
.vg-set__group-desc {
font-size: var(--fs-sm);
color: var(--text-body);
margin-top: 5px;
max-width: 60ch;
line-height: 1.55;
}
/* ── 폼 한 줄: 라벨(좌) / 입력(우) ── */
.vg-set__row {
display: grid;
grid-template-columns: 200px 1fr;
gap: var(--sp-5);
padding: var(--sp-5) 0;
border-top: 1px solid var(--bg-surface-2);
}
.vg-set__row:first-of-type {
border-top: none;
padding-top: var(--sp-2);
}
.vg-set__row-label {
display: flex;
flex-direction: column;
gap: 4px;
}
.vg-set__row-label .l {
font-size: var(--fs-sm);
font-weight: 600;
color: var(--text-strong);
}
.vg-set__row-label .h {
font-size: var(--fs-xs);
color: var(--text-muted);
line-height: 1.5;
}
.vg-set__row-field {
display: flex;
flex-direction: column;
gap: var(--sp-2);
min-width: 0;
}
/* ── select (입력과 동일 톤, radius 6px) ── */
.vg-set__select {
width: 100%;
font-family: var(--font-sans);
font-size: var(--fs-sm);
color: var(--text-strong);
background: var(--bg-surface-2);
border: 1px solid var(--border-strong);
border-radius: var(--radius-sm);
padding: 10px 38px 10px 12px;
line-height: 1.5;
appearance: none;
-webkit-appearance: none;
cursor: pointer;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2393A09C' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 12px center;
background-size: 16px;
transition: border-color var(--dur-fast) var(--ease-out),
box-shadow var(--dur-fast) var(--ease-out);
}
.vg-set__select:focus {
outline: none;
border-color: var(--border-focus);
box-shadow: 0 0 0 3px var(--focus-ring);
}
.vg-set__select:disabled {
opacity: 0.55;
cursor: not-allowed;
}
/* ── 토글 스위치 (노브만 원형 예외) ── */
.vg-toggle {
position: relative;
width: 42px;
height: 24px;
flex: none;
border: none;
background: transparent;
padding: 0;
cursor: pointer;
}
.vg-toggle:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.vg-toggle__track {
position: absolute;
inset: 0;
background: var(--neutral-200);
border-radius: 100px;
transition: background var(--dur-base) var(--ease-out);
}
.vg-toggle__knob {
position: absolute;
top: 3px;
left: 3px;
width: 18px;
height: 18px;
border-radius: 50%;
background: var(--surface);
box-shadow: var(--shadow-sm);
transition: transform var(--dur-base) var(--ease-out);
}
.vg-toggle.is-on .vg-toggle__track {
background: var(--accent);
}
.vg-toggle.is-on .vg-toggle__knob {
transform: translateX(18px);
}
.vg-toggle:focus-visible {
outline: none;
}
.vg-toggle:focus-visible .vg-toggle__track {
box-shadow: 0 0 0 3px var(--focus-ring);
}
/* ── 옵션 행: 라벨+설명 / 우측 컨트롤 ── */
.vg-set__opt {
display: flex;
align-items: center;
gap: var(--sp-4);
padding: var(--sp-4) 0;
border-top: 1px solid var(--bg-surface-2);
}
.vg-set__opt:first-of-type {
border-top: none;
}
.vg-set__opt-text {
flex: 1;
min-width: 0;
}
.vg-set__opt-text .l {
font-size: var(--fs-sm);
font-weight: 600;
color: var(--text-strong);
}
.vg-set__opt-text .h {
font-size: var(--fs-xs);
color: var(--text-muted);
margin-top: 3px;
line-height: 1.5;
}
/* ── 세그먼트 토글(엔진 모드): 2지선다, 둥근 알약 아님(8px) ── */
.vg-set__seg {
display: inline-flex;
background: var(--bg-surface-2);
border: 1px solid var(--border-subtle);
border-radius: var(--radius);
padding: 3px;
gap: 3px;
}
.vg-set__seg-btn {
display: inline-flex;
align-items: center;
gap: 8px;
font-family: var(--font-sans);
font-size: var(--fs-sm);
font-weight: 500;
color: var(--text-body);
background: transparent;
border: none;
border-radius: var(--radius-sm);
padding: 8px 16px;
cursor: pointer;
white-space: nowrap;
transition: background var(--dur-base) var(--ease-out),
color var(--dur-base) var(--ease-out);
}
.vg-set__seg-btn:hover:not(.is-active) {
color: var(--text-strong);
}
.vg-set__seg-btn.is-active {
background: var(--surface);
color: var(--accent-deep);
font-weight: 600;
box-shadow: var(--shadow-sm);
}
/* ── 라디오형 음성 프리셋 행 ── */
.vg-set__voicelist {
display: flex;
flex-direction: column;
gap: 8px;
}
.vg-set__voice {
display: flex;
align-items: center;
gap: var(--sp-4);
padding: 13px var(--sp-4);
border: 1px solid var(--border-subtle);
border-radius: var(--radius);
background: var(--bg-surface);
cursor: pointer;
text-align: left;
width: 100%;
transition: border-color var(--dur-fast) var(--ease-out),
background var(--dur-fast) var(--ease-out);
}
.vg-set__voice:hover {
border-color: var(--border-strong);
}
.vg-set__voice.is-on {
border-color: var(--accent);
background: var(--accent-tint);
}
.vg-set__voice-rad {
width: 18px;
height: 18px;
border-radius: 50%;
border: 2px solid var(--neutral-200);
flex: none;
position: relative;
}
.vg-set__voice.is-on .vg-set__voice-rad {
border-color: var(--accent);
}
.vg-set__voice.is-on .vg-set__voice-rad::after {
content: "";
position: absolute;
inset: 3px;
border-radius: 50%;
background: var(--accent);
}
.vg-set__voice-info {
flex: 1;
min-width: 0;
}
.vg-set__voice-info .vn {
font-size: var(--fs-sm);
font-weight: 600;
color: var(--text-strong);
}
.vg-set__voice-info .vd {
font-size: var(--fs-xs);
color: var(--text-muted);
margin-top: 2px;
}
.vg-set__voice-play {
width: 34px;
height: 34px;
border-radius: 50%;
flex: none;
border: 1px solid var(--border-subtle);
background: var(--bg-surface);
color: var(--accent);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background var(--dur-fast) var(--ease-out);
}
.vg-set__voice-play:hover {
background: var(--accent-tint);
}
/* ── 콜아웃(정보/주의) — 좌측바 없음, 틴트 배경 + 아이콘 ── */
.vg-set__callout {
border-radius: var(--radius);
padding: var(--sp-4) var(--sp-5);
display: flex;
gap: 12px;
margin-bottom: var(--sp-5);
}
.vg-set__callout--info {
background: var(--info-tint);
color: var(--info-text);
}
.vg-set__callout--warn {
background: var(--warn-tint);
color: var(--warn-text);
}
.vg-set__callout-ico {
flex: none;
margin-top: 1px;
}
.vg-set__callout--info .vg-set__callout-ico {
color: var(--info-solid);
}
.vg-set__callout--warn .vg-set__callout-ico {
color: var(--warn-solid);
}
.vg-set__callout-text {
font-size: var(--fs-xs);
line-height: 1.6;
}
.vg-set__callout-text strong {
font-weight: 600;
}
/* ── 그룹 푸터(저장/취소) ── */
.vg-set__foot {
display: flex;
justify-content: flex-end;
align-items: center;
gap: 10px;
margin-top: var(--sp-6);
padding-top: var(--sp-5);
border-top: 1px solid var(--bg-surface-2);
}
.vg-set__saved {
margin-right: auto;
font-size: var(--fs-xs);
color: var(--pos-text);
display: inline-flex;
align-items: center;
gap: 6px;
}
/* ── 프로필 헤더(아바타 원형 예외) ── */
.vg-set__profile {
display: flex;
align-items: center;
gap: var(--sp-5);
margin-bottom: var(--sp-5);
}
.vg-set__avatar {
width: 56px;
height: 56px;
border-radius: 50%;
flex: none;
background: var(--accent);
color: var(--text-on-accent);
display: flex;
align-items: center;
justify-content: center;
font-size: 22px;
font-weight: 600;
}
.vg-set__profile-meta .n {
font-size: var(--fs-lead);
font-weight: 600;
color: var(--text-strong);
}
.vg-set__profile-meta .e {
font-size: var(--fs-sm);
color: var(--text-body);
margin-top: 2px;
}
.vg-set__profile-meta .badges {
display: flex;
gap: 8px;
margin-top: 8px;
}
/* ── 모델/엔진 메타 한 줄(읽기전용 상태 표기) ── */
.vg-set__meta {
display: flex;
flex-wrap: wrap;
gap: var(--sp-2) var(--sp-5);
font-size: var(--fs-xs);
color: var(--text-muted);
margin-top: var(--sp-2);
}
.vg-set__meta code {
font-family: var(--font-num);
font-size: var(--fs-xs);
color: var(--text-body);
background: var(--bg-surface-2);
padding: 2px 7px;
border-radius: var(--radius-sm);
}
/* ── 반응형: 좁아지면 단일 컬럼 ── */
@media (max-width: 860px) {
.vg-set {
grid-template-columns: 1fr;
}
.vg-set__nav {
position: static;
flex-direction: row;
flex-wrap: wrap;
gap: 6px;
}
.vg-set__nav-kicker {
display: none;
}
.vg-set__row {
grid-template-columns: 1fr;
gap: 10px;
}
}
@media (prefers-reduced-motion: reduce) {
.vg-toggle__track,
.vg-toggle__knob,
.vg-set__seg-btn,
.vg-set__nav-item,
.vg-set__voice,
.vg-set__select {
transition-duration: 0.01ms !important;
}
}