diff --git a/src/gateway/routes/routes-chat-sessions.ts b/src/gateway/routes/routes-chat-sessions.ts index ba501dd..7ed7108 100644 --- a/src/gateway/routes/routes-chat-sessions.ts +++ b/src/gateway/routes/routes-chat-sessions.ts @@ -8,10 +8,16 @@ import { getConfig } from '../../config/config'; // itself (the actual message/tool-execution loop) stays in server-v2.ts — // it's tightly coupled to handleChat, same reasoning as /api/code/round. export function registerChatSessionRoutes(app: express.Application): void { - // 'app_' style session IDs (iv_/dt_/lw_/mn_/ac_/wt_/music_/dental_) are created by + // 'app_' style session IDs (iv_/dt_/lw_/mn_/ac_/wt_/dr_/ws_/music_/dental_) are created by // dedicated per-app UIs and use the same session store as main-chat sessions // but belong to their own app UI — keep them out of the main chat sidebar. - const APP_SESSION_PREFIXES = ['iv_', 'dt_', 'lw_', 'mn_', 'ac_', 'wt_', 'music_', 'dental_']; + // + // 2026-09-21: dr_(doctor-app.html)와 ws_(workshop-app.html)가 이 목록에서 빠져있어서 두 앱의 + // 세션이 메인 채팅 사이드바에 그대로 노출되고 있었다(사용자 신고: "작업실 컨텍스트는 메인 + // 채팅 세션 창에 안 보이게 하자"). 앱별 프리픽스를 늘어놓는 이 방식 자체가 새 앱이 생길 때마다 + // 똑같이 깜빡할 수 있는 구조라는 게 근본 문제 — 앱 HTML들이 실제로 쓰는 프리픽스와 이 목록을 + // 대조해서 확인할 것(`grep -rn "Math.random" web-ui/html/*.html | grep sessionId`). + const APP_SESSION_PREFIXES = ['iv_', 'dt_', 'lw_', 'mn_', 'ac_', 'wt_', 'dr_', 'ws_', 'music_', 'dental_']; // GET /api/chat/sessions — list current user's sessions from disk app.get('/api/chat/sessions', async (req, res) => {