From e23a96292371a91d77efc3456b76f0ce90750139 Mon Sep 17 00:00:00 2001 From: javis-bot Date: Thu, 19 Nov 2026 14:01:16 +0900 Subject: [PATCH] feat(app): side menu in groups that open, settings split into tidy screens MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The side menu keeps 대시보드 and 대화 on top and puts the rest in groups that open when their name is pressed (디스코드, 대화 방식, 음성·모델, 기능, PC, 관리); the shown screen's group opens and open groups are kept. 채널·호출 is split into 음성 채널, 호출 and 여럿이 말할 때, and 모델 into 받아 적기·말하기 and 대화 모델; the chat wake words join 호출, the recording switch 음성 채널 and the default location 기능 켜기·MCP. Co-Authored-By: Claude Opus 5.5 --- app/src/admin.spec.md | 11 +++++-- app/src/settings_edit.rs | 69 +++++++++++++++++++++------------------- app/ui/app.js | 28 ++++++++++++++-- app/ui/index.html | 59 ++++++++++++++++++++++++++-------- app/ui/style.css | 8 +++++ docs/v2/architecture.md | 2 +- docs/v2/desktop-app.md | 2 ++ 7 files changed, 126 insertions(+), 53 deletions(-) diff --git a/app/src/admin.spec.md b/app/src/admin.spec.md index 3bde05d..f0fe2a9 100644 --- a/app/src/admin.spec.md +++ b/app/src/admin.spec.md @@ -885,8 +885,13 @@ its data folder, and again after each one is saved. The log hub writes to the da ## Screens (`app/ui/`) Plain HTML, CSS and an ES module, no build step, dark theme after `DESIGN.md`. All text is Korean. -The side menu has 대화 right under 대시보드 and 앱 last; there is no separate update screen (updates -are on the 앱 screen) and no separate 한 일 screen (it is a view of the 로그 screen). +The side menu has 대시보드 and 대화 on top, then groups that open and close when their name is +pressed (user request, 2026-11-19): 디스코드 (봇, 음성 채널, 채팅 채널), 대화 방식 (호출, 여럿이 말할 +때, 대화 기억, 사람별 지침), 음성·모델 (받아 적기·말하기, 대화 모델), 기능 (기능 켜기·MCP, 예약, +백그라운드 수집), PC (PC 제어·화면 보기, 게임 모드) and 관리 (로그, 앱). The group of the screen +shown opens (and the 관리 group when a new version renames the 앱 button); which groups are open is +kept in the page's storage for the next start. There is no separate update screen (updates are on +the 앱 screen) and no separate 한 일 screen (it is a view of the 로그 screen). - **First-run wizard** (while `firstRun`): data folder (free space, warning under 200 GB), PC check, the model to download, Discord bot (token check with the @@ -899,7 +904,7 @@ are on the 앱 screen) and no separate 한 일 screen (it is a view of the 로 Strata's last line, and stop in the header; the header with start, restart and stop is rebuilt only when the state changes, so a click is never lost to the refresh. Every screen change starts a new generation: an answer that arrives after the user moved to another screen is dropped. -- **Settings screens** (봇, 채널·호출, 채팅 채널, 대화 기억, 모델, 기능, 백그라운드 수집, 예약, PC 제어, 게임 모드, 앱): built from `settings_fields`; only +- **Settings screens** (봇, 음성 채널, 호출, 여럿이 말할 때, 채팅 채널, 대화 기억, 받아 적기·말하기, 대화 모델, 기능 켜기·MCP, 백그라운드 수집, 예약, PC 제어·화면 보기, 게임 모드, 앱): built from `settings_fields`, each field on one screen: 음성 채널 has the server, the auto-join channel, the speakers, bots, the join notice and the recording switch; 호출 the voice and chat wake words and `call.*`; 여럿이 말할 때 `response.*`; 받아 적기·말하기 `voice.stt.*` and the speech speed; 대화 모델 `llm.*`; the default location is on 기능 켜기·MCP (weather and search use it); only changed fields are sent; the server and voice channel are pickers (choosing another server clears the voice channel and lists only that server's channels); the chat channels are a table with their switches; the bot screen also changes the token; the 기능 screen has the feature diff --git a/app/src/settings_edit.rs b/app/src/settings_edit.rs index a3194b5..eaaa3b9 100644 --- a/app/src/settings_edit.rs +++ b/app/src/settings_edit.rs @@ -15,10 +15,13 @@ use crate::settings::{parse_settings, DEFAULT_JOIN_NOTICE}; #[serde(rename_all = "camelCase")] pub enum Screen { Bot, - Channels, + VoiceChannel, + Call, + Response, Chat, Memory, - Model, + Voice, + Llm, Features, Collect, Game, @@ -78,33 +81,33 @@ pub fn fields() -> Vec { vec![ f("discord.commandName", Bot, Text { max: 32, non_empty: true }, json!("자비스"), "슬래시 명령 이름"), f("discord.ephemeralReplies", Bot, Bool, json!(true), "명령 응답은 부른 사람만 보기"), - f("discord.guildId", Channels, Id, Value::Null, "서버"), - f("discord.voiceChannelId", Channels, Id, Value::Null, "자동으로 들어갈 음성 채널"), - f("voice.maxSpeakers", Channels, Int { min: 1, max: 10 }, json!(10), "동시에 받아 적을 최대 인원"), - f("voice.listenToBots", Channels, Bool, json!(false), "다른 봇의 말도 받아 적기"), - f("voice.wakeWords", Channels, TextList { max_items: 20, nullable: false }, json!(crate::settings::default_wake_words()), "호출어"), - f("call.mode", Channels, Choice { values: &["wakeWord", "addressed", "everything"] }, json!("wakeWord"), + f("discord.guildId", VoiceChannel, Id, Value::Null, "서버"), + f("discord.voiceChannelId", VoiceChannel, Id, Value::Null, "자동으로 들어갈 음성 채널"), + f("voice.maxSpeakers", VoiceChannel, Int { min: 1, max: 10 }, json!(10), "동시에 받아 적을 최대 인원"), + f("voice.listenToBots", VoiceChannel, Bool, json!(false), "다른 봇의 말도 받아 적기"), + f("voice.wakeWords", Call, TextList { max_items: 20, nullable: false }, json!(crate::settings::default_wake_words()), "호출어"), + f("call.mode", Call, Choice { values: &["wakeWord", "addressed", "everything"] }, json!("wakeWord"), "호출 방식"), - f("call.similarity", Channels, Number { min: 0.0, max: 0.5 }, json!(0.2), "비슷한 발음 허용 정도"), - f("call.designated", Channels, IdList, json!([]), "지정한 사람"), - f("call.designatedOnly", Channels, Bool, json!(false), "지정한 사람에게만 응답"), - f("call.designatedNoWakeWord", Channels, Bool, json!(false), "지정한 사람은 호출어 없이 대답"), - f("call.stopWords", Channels, TextList { max_items: 20, nullable: false }, + f("call.similarity", Call, Number { min: 0.0, max: 0.5 }, json!(0.2), "비슷한 발음 허용 정도"), + f("call.designated", Call, IdList, json!([]), "지정한 사람"), + f("call.designatedOnly", Call, Bool, json!(false), "지정한 사람에게만 응답"), + f("call.designatedNoWakeWord", Call, Bool, json!(false), "지정한 사람은 호출어 없이 대답"), + f("call.stopWords", Call, TextList { max_items: 20, nullable: false }, json!(["멈춰", "그만", "정지", "stop"]), "정지 명령"), - f("call.followUpMs", Channels, Int { min: 0, max: 5000 }, json!(1500), "호출어 뒤 이어 말하기 대기(ms)"), - f("call.earcon", Channels, Bool, json!(true), "부르면 효과음"), - f("response.policy", Channels, Choice { values: &["first", "inOrder", "latest", "important"] }, + f("call.followUpMs", Call, Int { min: 0, max: 5000 }, json!(1500), "호출어 뒤 이어 말하기 대기(ms)"), + f("call.earcon", Call, Bool, json!(true), "부르면 효과음"), + f("response.policy", Response, Choice { values: &["first", "inOrder", "latest", "important"] }, json!("latest"), "동시 대화 응답 정책"), - f("response.queueMax", Channels, Int { min: 1, max: 20 }, json!(5), "기다리는 요청 최대 개수"), - f("response.collectMs", Channels, Int { min: 0, max: 3000 }, json!(700), "중요도 비교 대기(ms)"), - f("response.settleMs", Channels, Int { min: 0, max: 3000 }, json!(800), "먼저 끝난 말 전사 대기(ms)"), - f("response.priorities", Channels, IdNumberMap, json!({}), "사람별 우선순위"), - f("response.interrupt", Channels, Bool, json!(true), + f("response.queueMax", Response, Int { min: 1, max: 20 }, json!(5), "기다리는 요청 최대 개수"), + f("response.collectMs", Response, Int { min: 0, max: 3000 }, json!(700), "중요도 비교 대기(ms)"), + f("response.settleMs", Response, Int { min: 0, max: 3000 }, json!(800), "먼저 끝난 말 전사 대기(ms)"), + f("response.priorities", Response, IdNumberMap, json!({}), "사람별 우선순위"), + f("response.interrupt", Response, Bool, json!(true), "말하는 중에 새 요청이 오면 하던 말 멈추기(가장 최근 것, 중요한 것 먼저)"), - f("voice.joinNotice", Channels, Text { max: 2000, non_empty: true }, json!(DEFAULT_JOIN_NOTICE), + f("voice.joinNotice", VoiceChannel, Text { max: 2000, non_empty: true }, json!(DEFAULT_JOIN_NOTICE), "입장 시 전사 고지 문구"), f("chatChannels", Chat, ChatChannels, json!([]), "채팅 채널"), - f("call.chatWakeWords", Chat, TextList { max_items: 20, nullable: true }, Value::Null, + f("call.chatWakeWords", Call, TextList { max_items: 20, nullable: true }, Value::Null, "채팅 호출어(비우면 음성과 같음)"), // The worker's memory settings and their defaults (voice_worker.spec.md, "Memory settings"). f("memory.chat", Memory, Bool, json!(true), "등록한 채팅 채널 참고"), @@ -116,21 +119,21 @@ pub fn fields() -> Vec { f("memory.recent_records", Memory, Int { min: 0, max: 200 }, json!(20), "최근 대화 원문 개수"), f("memory.matches", Memory, Int { min: 0, max: 20 }, json!(5), "과거 기록 가져올 개수"), f("memory.budget_tokens", Memory, Number { min: 0.0, max: 100000.0 }, json!(4000), "참고 분량 상한(토큰)"), - f("voice.record", Memory, Bool, json!(false), + f("voice.record", VoiceChannel, Bool, json!(false), "목소리 녹음 저장(사람 말과 자비스 말, 분석용, 7일 보관, 다음 시작부터)"), // The worker's STT settings and their defaults (voice_worker.spec.md, "STT"). - f("voice.stt.end_silence_ms", Model, Int { min: 100, max: 2000 }, json!(300), "말 끝 판정 시간(ms)"), - f("voice.stt.partials", Model, Bool, json!(true), "중간 전사"), - f("voice.stt.partial_interval_ms", Model, Int { min: 100, max: 5000 }, json!(400), "중간 전사 간격(ms)"), - f("voice.stt.final_beam", Model, Int { min: 1, max: 5 }, json!(2), "최종 전사 정확도(빔)"), - f("voice.stt.language", Model, LanguageCode, json!("ko"), "받아 적을 언어(비우면 자동)"), + f("voice.stt.end_silence_ms", Voice, Int { min: 100, max: 2000 }, json!(300), "말 끝 판정 시간(ms)"), + f("voice.stt.partials", Voice, Bool, json!(true), "중간 전사"), + f("voice.stt.partial_interval_ms", Voice, Int { min: 100, max: 5000 }, json!(400), "중간 전사 간격(ms)"), + f("voice.stt.final_beam", Voice, Int { min: 1, max: 5 }, json!(2), "최종 전사 정확도(빔)"), + f("voice.stt.language", Voice, LanguageCode, json!("ko"), "받아 적을 언어(비우면 자동)"), // MeloTTS's Korean model has one voice (speaker "KR"), so only the speed is a choice. - f("voice.tts.speed", Model, Number { min: 0.5, max: 2.0 }, json!(1.5), "말하기 속도(1.0 보통, 기본 1.5, 저장하면 바로 적용)"), + f("voice.tts.speed", Voice, Number { min: 0.5, max: 2.0 }, json!(1.5), "말하기 속도(1.0 보통, 기본 1.5, 저장하면 바로 적용)"), // The LLM (admin.spec.md, "LLM"); `llm.url` (a server the app does not start) is file-only. - f("llm.context", Model, Int { min: 4096, max: 262144 }, json!(32768), "대화 모델이 한 번에 기억하는 양(토큰)"), - f("brain.location", Model, Text { max: 100, non_empty: false }, json!(crate::settings::DEFAULT_LOCATION), + f("llm.context", Llm, Int { min: 4096, max: 262144 }, json!(32768), "대화 모델이 한 번에 기억하는 양(토큰)"), + f("brain.location", Features, Text { max: 100, non_empty: false }, json!(crate::settings::DEFAULT_LOCATION), "기본 위치(날씨, 검색, 추천의 기준, 비우면 자동 감지)"), - f("llm.port", Model, Int { min: 1024, max: 65535 }, json!(8080), "대화 모델 포트"), + f("llm.port", Llm, Int { min: 1024, max: 65535 }, json!(8080), "대화 모델 포트"), // The brain's features (admin.spec.md, "Features and MCP servers"). f("features.weather", Features, Bool, json!(true), "날씨"), f("features.webSearch", Features, Bool, json!(true), "웹 검색"), diff --git a/app/ui/app.js b/app/ui/app.js index 75879df..ff0caba 100644 --- a/app/ui/app.js +++ b/app/ui/app.js @@ -992,7 +992,7 @@ function updateCard() { async function checkUpdate() { try { const u = await api("update_check"); - if (u.latest) { $("#nav-app").textContent = "앱 (새 버전)"; toast(`새 버전 ${u.latest.version}이 있습니다. 앱 화면에서 설치할 수 있습니다.`); } + if (u.latest) { $("#nav-app").textContent = "앱 (새 버전)"; setGroup($("#nav-app").closest(".group"), true); toast(`새 버전 ${u.latest.version}이 있습니다. 앱 화면에서 설치할 수 있습니다.`); } } catch (e) { /* offline: the 앱 screen shows why */ } } @@ -1025,14 +1025,18 @@ async function show(name) { current = name; clearInterval(ticker); for (const b of document.querySelectorAll(".nav")) b.classList.toggle("on", b.dataset.screen === name); + // The group of the screen shown opens (a new version's 앱 button is then seen too). + const group = document.querySelector(`.nav[data-screen="${name}"]`)?.closest(".group"); + if (group) setGroup(group, true); const screen = $("#screen"); try { if (name === "dashboard") { screen.replaceChildren(); await refresh(); ticker = setInterval(refresh, 1000); return; } if (name === "logs") { const l = logsScreen(); screen.replaceChildren(l.view); ticker = setInterval(l.tick, 1000); return; } if (name === "conversations") { const c = conversationScreen(); screen.replaceChildren(c.view); ticker = setInterval(c.tick, 500); return; } if (name === "notes") { screen.replaceChildren(notesScreen()); return; } - const titles = { bot: "봇", channels: "채널·호출", chat: "채팅 채널", memory: "대화 기억", model: "모델", features: "기능", - collect: "백그라운드 수집", game: "게임 모드", schedule: "예약", pcControl: "PC 제어", app: "앱" }; + const titles = { bot: "봇", voiceChannel: "음성 채널", call: "호출", response: "여럿이 말할 때", chat: "채팅 채널", + memory: "대화 기억", voice: "받아 적기·말하기", llm: "대화 모델", features: "기능 켜기·MCP", + collect: "백그라운드 수집", game: "게임 모드", schedule: "예약", pcControl: "PC 제어·화면 보기", app: "앱" }; const update = name === "app" ? updateCard() : null; const extra = name === "bot" ? await tokenCard() : name === "features" ? h("div", {}, await kmaKeyCard(), await displayDriverCard()) : name === "app" ? h("div", {}, update.view, h("div", { class: "hint", style: "margin:12px 0" }, "트레이로 최소화하면 창만 숨고 봇과 서비스는 계속 돕니다. 작업 표시줄 오른쪽의 Jarvis 아이콘을 누르면 창이 다시 열리고, 아이콘의 오른쪽 클릭 메뉴에서 완전 종료할 수 있습니다. 저장하면 바로 적용됩니다.")) : null; @@ -1046,6 +1050,23 @@ async function show(name) { } catch (e) { fail(e); } } +/** Open or close one menu group; which groups are open is kept for the next start. */ +function setGroup(g, open) { + g.classList.toggle("open", open); + g.querySelector(".group-head").setAttribute("aria-expanded", String(open)); + const kept = new Set(JSON.parse(localStorage.getItem("openGroups") || "[]")); + open ? kept.add(g.dataset.group) : kept.delete(g.dataset.group); + localStorage.setItem("openGroups", JSON.stringify([...kept])); +} + +function initGroups() { + const kept = new Set(JSON.parse(localStorage.getItem("openGroups") || "[]")); + for (const g of document.querySelectorAll(".group")) { + if (kept.has(g.dataset.group)) setGroup(g, true); + g.querySelector(".group-head").onclick = () => setGroup(g, !g.classList.contains("open")); + } +} + // ---- first-run wizard --------------------------------------------------------------------------- const WIZ = ["데이터 폴더", "PC 점검", "모델", "디스코드 봇", "서버·채널", "호출어", "완료"]; @@ -1213,6 +1234,7 @@ async function start() { $("#wizard").hidden = true; $("#main").hidden = false; for (const b of document.querySelectorAll(".nav")) b.onclick = () => show(b.dataset.screen); + initGroups(); show("dashboard"); checkUpdate(); } diff --git a/app/ui/index.html b/app/ui/index.html index 627ff2b..36dd469 100644 --- a/app/ui/index.html +++ b/app/ui/index.html @@ -13,19 +13,52 @@
Jarvis
- - - - - - - - - - - - - +
+ +
+ + + +
+
+
+ +
+ + + + +
+
+
+ +
+ + +
+
+
+ +
+ + + +
+
+
+ +
+ + +
+
+
+ +
+ + +
+
diff --git a/app/ui/style.css b/app/ui/style.css index 67a45ae..2269c22 100644 --- a/app/ui/style.css +++ b/app/ui/style.css @@ -17,6 +17,14 @@ button, input, select, textarea { font: inherit; color: inherit; } .nav { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; color: var(--ink2); cursor: pointer; } .nav:hover { background: var(--s2); } .nav.on { background: var(--s3); color: var(--ink); } +.group { display: flex; flex-direction: column; margin-top: 6px; } +.group-head { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; color: var(--ink3); cursor: pointer; font-size: 12px; font-weight: 600; letter-spacing: 0.2px; display: flex; align-items: center; gap: 6px; } +.group-head::before { content: "▸"; font-size: 10px; color: var(--ink4); } +.group-head[aria-expanded="true"]::before { content: "▾"; } +.group-head:hover { background: var(--s2); color: var(--ink2); } +.group-items { display: none; flex-direction: column; gap: 2px; } +.group.open .group-items { display: flex; } +.group-items .nav { padding-left: 24px; } .side-foot { margin-top: auto; color: var(--ink4); font-size: 12px; padding: 8px 10px; } .screen { padding: 28px 32px; max-width: 1100px; } h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.4px; margin: 0 0 18px; } diff --git a/docs/v2/architecture.md b/docs/v2/architecture.md index 5179bb7..ba02784 100644 --- a/docs/v2/architecture.md +++ b/docs/v2/architecture.md @@ -51,7 +51,7 @@ v1도 STT는 이미 faster-whisper입니다. 느린 진짜 이유는 엔진이 [게임PC (Windows 11) 한 대에서 전부 실행] 1. Jarvis 관리 앱 (exe, Rust. 화면은 Tauri 2 + Windows 기본 WebView2) - ├─ GUI: 대시보드 / 봇 / 채널·호출 / 채팅 채널 / 대화 기억 / 모델 / 기능 + ├─ GUI: 대시보드 / 대화 / 디스코드 / 대화 방식 / 음성·모델 / 기능 / PC / 관리 │ / 게임 모드 / PC 제어 / 화면 보기 / 데이터 / 로그 ├─ 서비스 관리자: 아래 프로세스를 띄우고, 감시하고, 죽으면 재시작 ├─ 디스코드 음성 코어 (serenity + songbird + DAVE 복호화, Opus 해독은 앱이 직접) diff --git a/docs/v2/desktop-app.md b/docs/v2/desktop-app.md index 9811a74..fa4a8a4 100644 --- a/docs/v2/desktop-app.md +++ b/docs/v2/desktop-app.md @@ -47,6 +47,8 @@ ## 설정 화면 +왼쪽 메뉴는 대시보드와 대화를 위에 두고, 나머지는 묶음으로 접어 둡니다(사용자 요청, 2026-11-19). 묶음 이름을 누르면 펼쳐집니다: 디스코드(봇, 음성 채널, 채팅 채널), 대화 방식(호출, 여럿이 말할 때, 대화 기억, 사람별 지침), 음성·모델(받아 적기·말하기, 대화 모델), 기능(기능 켜기·MCP, 예약, 백그라운드 수집), PC(PC 제어·화면 보기, 게임 모드), 관리(로그, 앱). 아래 표의 "채널·호출"은 음성 채널, 호출, 여럿이 말할 때 세 화면으로, "모델"은 받아 적기·말하기와 대화 모델로 나눴습니다. 화면마다 정확히 어떤 항목이 있는지는 [admin.spec.md](../../app/src/admin.spec.md) "Screens"에 있습니다. + | 화면 | 내용 | |---|---| | 대시보드 | 서비스 상태(디스코드, LLM, STT, TTS), GPU/VRAM/RAM 사용량, 현재 음성 채널과 참가자, 실시간 자막, 단계별 지연 시간, 성능 단계(평소/게임 중/일시정지와 이유), 놓친 요청, 봇 시작/정지 |