Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
12 commits
Select commit Hold shift + click to select a range
0f12163
feat(browser): PC 가 켜져 있어도 서버 브라우저에서 — 기본값 「브라우저 작업 위치」 · 「서버에서 해 줘」 …
jinyoung Dec 2, 2026
238c7f8
fix(agent): browserStarts 에는 where 를 정했을 때만 — 기존 모양 그대로(browser-repla…
jinyoung Dec 2, 2026
4d5b059
fix(browser): 「내 PC」 브라우저의 진행 화면이 끊기지 않게 — 최소화 · 앱 숨김 창의 새 페이지(5초 0장 …
jinyoung Dec 2, 2026
b529d19
docs(browser): 설계 노트 · 스펙 · 카탈로그 §105 · 변경 기록 윤문(codex astra, 바뀐 줄만)
jinyoung Dec 2, 2026
817ab78
fix(browser): 독립 검토 반영 — 옮기기는 하던 동작이 끝난 뒤 · 서버 브라우저 먼저 열고 PC 를 놓음 · 열…
jinyoung Dec 2, 2026
ba85ed7
docs(browser): 독립 검토 반영 절 윤문(codex astra)
jinyoung Dec 2, 2026
13cb5c2
docs(browser): 기기 이름 대신 자리표시자
jinyoung Dec 2, 2026
733a6a6
fix(browser): 옮기기는 동작을 끊지 않는다 — 읽기 · 사진 · 모델의 답만 바로 멈추고, 동작은 끝난 뒤 턴 사…
jinyoung Dec 2, 2026
64b6aa4
docs(browser): 옮기기 규칙 줄 윤문
jinyoung Dec 2, 2026
4e18b26
fix(browser): 확인 검토 — 읽기만 하는 기다림은 옮기기로 끝남 · 끝나지 않는 동작은 2분 뒤 옮기기를 그만둠 …
jinyoung Dec 2, 2026
6640108
docs(browser): 확인 검토 줄 윤문
jinyoung Dec 2, 2026
9157894
docs(browser): 설계 노트에 두 번째 확인 검토
jinyoung Dec 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@

### 바뀜

- **「내 PC」 브라우저 작업의 진행 화면이 끊기지 않습니다. 이 PC에 보였다가 최소화했거나 앱을 숨긴 창에서 작업이 새 페이지로 가면, 실시간 화면이 5초에 0장이던 것이 15장으로 늘었습니다. 그런 창에서 다음 작업이 시작하면 같은 주소의 새 숨은 탭에서 일합니다. 그림이 한 장도 오지 않는 PC 작업의 카드는 「브라우저 여는 중」에 머물지 않고 「PC 화면을 받지 못하고 있어요」를 보여 줍니다** (스펙 `browser-handoff` 「PC 화면이 오지 않을 때에도 진행 화면이 이어진다」, 설계 `docs/browser-where/design.md`(측정), 데스크톱 `desktop/src/browser/host.js` `startLive`(받쳐 주는 캡처, `LIVE_STILL_MS`) · `begin` — 데스크톱 0.2.13에 함께 나감, 서버 `lib/browser.js dropStale`, 시험 `desktop/test/browser.test.js` 6개 · `server/test/browserDriver.test.js` 실제 Electron 2개 · `browserTabShot.test.js`, 카탈로그 §105)

- **PC가 켜져 있어도 브라우저 작업을 서버 브라우저에서 할 수 있습니다. 설정 「브라우저 작업 위치」에서 기본값을 「PC 우선」 또는 「늘 서버」로 고르고(웹 · 휴대폰에서도 바꿈), 채팅에서 「서버에서 해 줘」라고 하면 그 작업만 서버에서 합니다. PC에서 일하는 작업의 카드에는 「서버에서 이어서」가 있어, 누르면 서버 브라우저가 같은 페이지에서 이어서 합니다. PC를 기다리며 줄 선 작업에는 「서버에서 바로 시작」이 있습니다. PC 화면이 오지 않으면 카드에 「서버에서 이어서」가 나오고, 옛 PC 앱이면 진행 화면을 볼 수 있는 새 판(0.2.13이 나온 뒤) 안내가 함께 나옵니다. 확장 화면의 단추는 휴대폰에서 글자가 두 줄로 갈라지지 않고 둘째 줄로 넘어갑니다** (스펙 `browser-handoff` 「서버 브라우저를 고르기」, 설계 `docs/browser-where/design.md`, 서버 `lib/browserWhere.js`(새) · `lib/browserRemote.js routeOf`(`where` · `person`) · `lib/browser.js moveToServer · routeTo · liveUpdateOf` · `lib/agent.js`(`browser_task`의 `where`) · `PUT /api/browser/where`, DB `server/sql/076_browser_where.sql`(`pro_profile.browser_where` — 없으면 모두 「PC 우선」, 변경은 503), 화면 `TaskCard.vue` · `LocalAgentsSettings.vue`, 시험 `server/test/browserWhere.test.js` · `browser-local.test.js`(실제 Electron 4개) · `e2e/tests/feature/browser-where.spec.js` F-BW-01…05 · F-LB-03 · 05 고침, 카탈로그 §105)

- **프로젝트 방의 산출물 더미에서 프로젝트 계획을 함께 봅니다 — 접힌 더미 이름은 「산출물 · 계획」이고, 펼치면 파일 위에 계획 카드가 있습니다. 파일마다 붙어 있던 「팀원에게 공유」 사람 아이콘은 모두 없애고, 공유 기능은 파일을 길게 누르거나(휴대폰) 오른쪽 클릭하면(컴퓨터) 나오는 메뉴로 옮겼습니다** (스펙 `chat-artifacts` 「프로젝트 방의 더미에는 계획도 있다」 · 「파일의 공유는 파일의 메뉴에 있다」, `project-room` · `messenger-drop-folder` · `answer-share`, 설계 `docs/chat-artifacts/design.md`, 화면 `ArtifactStack.vue` · `ProjectPlanView.vue` · `FileItemMenu.vue` · `ArtifactList.vue` · `Message.vue` · `FileGroupRow.vue` · `holdMenu.js` · `ProjectNote.vue`, 순수 규칙 `src/artifactScope.js`, 시험 AS-U-07 · 08 · F-SPL-01~07, 카탈로그 103절, 2026-12-02 사용자 — 「프로젝트 내에서 프로젝트 계획을 볼 수 있는 부분이 필요한데, 여기 산출물 열기를 했을 때 거기에 프로젝트 계획 보기 같은 게 있으면 같이 볼 수 있을 것 같아. 산출물 및 계획 뭐 이런 식으로 아이콘 줄어들었을 때 그 조그만한 다이얼로그 부분에는 그렇게 표시해주면 좋겠네.」 · 「그리고 지금 공유 버튼을 위해 가지고 팀원에게 공유하는 저 아이콘들, 뭐 대화방에도 있고 산출물 여기에도 있고, 저기 그 사람 아이콘 저거는 다 없애줘. 다 없애고 우클릭, 그러니까 모바일에서는 길게 클릭했을 때 나오는 컨텍스트 메뉴로 다 바꾸자.」): 프로젝트 계획은 방 맨 위의 칩으로만 열 수 있어서, 대화가 길어지면 칩이 위로 밀려 보이지 않았습니다. 이제 프로젝트 방에서 더미를 펼치면 맨 위에 목적이 보이는 「프로젝트 계획」 카드가 있고, 누르면 같은 상자 안에서 목적 · 쓰는 도구 · 만들 것 · 지킬 것 · 정한 것과 최근에 바뀐 것을 읽습니다. 긴 항목도 줄을 바꿔 휴대폰에서 다 보입니다. 고치기 · 바뀐 기록 · 되돌리기는 예전처럼 계획 시트에서 하며, 「고치기 · 바뀐 기록」을 누르면 시트가 열립니다. 넓은 화면의 오른쪽 산출물 목록 맨 위에도 계획 줄이 있습니다. 채팅의 더미는 예전처럼 「산출물」입니다. 더미의 파일, 오른쪽 목록의 행, 채팅의 파일 카드와 묶은 카드의 줄에서는 모두 파일 메뉴(열기 · 팀원에게 공유 · 폴더에 정리)의 「팀원에게 공유」로 공유합니다. 키보드로는 Shift+F10이나 메뉴 키로 열고, 더미의 파일과 목록의 행에도 채팅 카드처럼 포인터를 올리거나 키보드 초점을 맞추면 보이는 「⋯」이 있습니다. 같은 파일의 메뉴를 다시 열어도 폴더 판정을 다시 묻지 않습니다. 길게 눌러도 글자가 선택되거나 파일이 열리지 않습니다. 계획을 읽는 동안 Esc를 누르면 파일로 돌아가고, 휴대폰을 옆으로 들어도 상자가 화면 안에 있습니다. 여러 파일을 한 번에 보내는 「모두 공유」와 문서 편집기 머리의 「공유」 단추는 그대로입니다. 공유 권한 · 서버는 바뀌지 않았고 새 SQL은 없습니다.

- **「내 PC」에서 도는 브라우저 작업 카드의 화면이 앞 작업의 페이지가 아니라 그 작업이 지금 있는 페이지를 보여 줍니다. 지금 페이지의 그림을 얻지 못하면 「PC 화면을 받지 못하고 있어요 — 작업은 이어서 해요」라고 표시합니다** (스펙 `browser-handoff` 「작업 카드의 화면은 그 작업이 지금 있는 페이지다」, 데스크톱 `desktop/src/browser/host.js` · `src/runner/index.js`(`caps.freshFrames`), 서버 `lib/browser.js` `dropStale` · `lib/browserRemote.js` `frameShot` · `lib/localAgents/devices.js`, 화면 `TaskCard.vue`, 시험 `desktop/test/browser.test.js` · `server/test/browserTabShot.test.js` · `browserDriver.test.js` · `browser-local.test.js` · LB-04 · F-LB-05, 카탈로그 102절, 설계 `docs/local-agents/design.md` 5.15, 2026-12-02 06:08 사용자(휴대폰 화면) — 「그리고 브라우저 다른탭에서 작업하는건지 화면에 기존 노트북 엘엠 화면이고 작업은 유튜브에서 작업중이라고 나온다. 화면 캡쳐가 다은탭을 보여주는건가?」): 유튜브 스튜디오에 영상을 올리는 작업의 카드에 앞 작업이 남긴 NotebookLM 홈이 보였습니다. 상태 알약의 제목(「승인 필요 · 채널 대시보드 - YouTu…」)은 맞았습니다. 다른 탭을 찍은 것이 아니었습니다. 작업은 앞 작업이 남긴 같은 탭에서 유튜브 스튜디오로 이동했는데, 그 탭의 창은 「이 PC에서 보기」로 보였다가 내려가 있어 새 화면을 그리지 않았고, PC 앱은 그 탭이 마지막으로 그린 그림(앞 작업의 NotebookLM)을 보냈습니다. 이제 PC 앱(0.2.13)은 그림마다 어느 페이지의 것인지 확인해 앞 페이지의 그림은 보내지 않습니다. 「이 PC에서 보기」로 보였다가 내려 두었거나 숨은 창은 그때마다 한 번 캡처해 지금 페이지를 찍으며(40ms 안팎 — 모델이 보는 그림도 비밀 칸을 칠한 뒤에 찍습니다), 그 뒤에는 창이 다시 화면을 그려 실시간 화면도 다시 들어옵니다. 한 번도 보이지 않은 숨은 창은 캡처하지 않습니다. 서버도 지금 페이지가 아닌 그림은 카드 · 끝난 카드의 마지막 화면에서 내리고, 0.2.12 이하의 PC 앱에는 카드용 그림도 「지금 그린 것이 아니면 없음」으로 요청합니다(2.5초까지 기다리고, 없다고 답한 주소에서는 PC가 다시 그리거나 주소가 바뀔 때까지 다시 묻지 않습니다). 주소의 물음표 뒤가 바뀌면(`/watch?v=`처럼) 다른 페이지로 봅니다. 따라서 PC 앱을 업데이트하기 전에도 앞 페이지는 보이지 않고, 창이 화면을 그리지 않는 동안에는 「PC 화면을 받지 못하고 있어요」가 보입니다. PC에서 작업의 창을 앞으로 띄우지는 않습니다. PC에 창을 보일지는 지금처럼 「이 PC에서 보기」로 사람이 정하고, 보이는 동안에는 늘 작업 중인 탭이 보입니다. 함께 고친 것: 페이지가 연 새 창(탭)을 「이 PC에서 보기」로 본 뒤 숨기면, 같은 주소의 새 숨은 탭이 문서 없이 만들어져 준비에 3초 넘게 걸렸고 서버가 기다리는 5초를 넘길 수 있었습니다(이번 시험에서 발견). 이제 0.6초 안팎입니다.
Expand Down
66 changes: 61 additions & 5 deletions desktop/src/browser/host.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ const MAX_TABS = 8
const STILL_MS = 1200
// a capture of a tab that shows nothing ends here (one a picture: the server waits 8 s for the model's picture)
const WAKE_MS = 2500
// the live view of a tab shown on this PC whose screencast sent nothing this long: a capture (startLive), about this often — less often
// while the picture stays the same (up to four times this)
const LIVE_STILL_MS = 1000
const KEYS = {
Enter: [13, '\r'], Tab: [9, ''], Escape: [27, ''], Backspace: [8, ''], Delete: [46, ''], ArrowLeft: [37, ''], ArrowUp: [38, ''], ArrowRight: [39, ''], ArrowDown: [40, ''],
Home: [36, ''], End: [35, ''], PageUp: [33, ''], PageDown: [34, ''], ' ': [32, ' '], Space: [32, ' '],
Expand Down Expand Up @@ -417,23 +420,40 @@ function createBrowserHost({ electron, log = () => {}, tmp = path.join(os.tmpdir
// Every picture of a tab that draws comes from it — the live view (to the server, at most one per live.minMs, always the newest, made
// 1024×640) and the model's picture (the next frame after the page changed). Never a capture of such a tab: a capture of a hidden
// window leaves it hidden after, and a hidden window draws nothing — scrolls then waited 1.2 s each and the live view stopped
// (measured 2026-11-24). Only a tab that shows nothing is captured (freshFrame · wake, 2026-12-02). Each frame is
// acknowledged once, at most ten a second (the screencast sends the next frame only after that).
// (measured 2026-11-24). Only a tab shown on this PC is captured: one that shows nothing (freshFrame · wake, 2026-12-02), and one
// whose live view went still during a task (below). Each frame is acknowledged once, at most ten a second (the screencast sends the
// next frame only after that).
// A frame shows one document of the tab (doc): a frame of an earlier one never goes out as the page — not to the live view, not as
// a picture (2026-12-02 사용자: 「화면에 기존 노트북 엘엠 화면이고 작업은 유튜브에서 작업중이라고 나온다」 — a window shown on this PC
// and then minimized drew nothing, and the last picture it drew, an earlier task's NotebookLM, stood for YouTube Studio).
// A window shown on this PC and then minimized, or with the app hidden (⌘H), goes on drawing the page it shows, but no new document:
// from the next page on its screencast sends nothing (2026-12-02 사용자: 「Pc 에 연결된 브라우저 사용시 진행상태가 보이지 않음」 — the
// card stayed on 「브라우저 여는 중」 for minutes). Measured 2026-12-02, a page that changes every 250 ms, live frames in 5 s: a hidden tab
// never shown here 15, shown 15, shown under another window that covers all of it 14–15 (a new page too), minimized or the app hidden
// on the page it showed 14–15 — and 0 once it went to another page, or the next task began in it. So while a task holds the
// browser, a tab shown here whose screencast sent nothing for LIVE_STILL_MS gets one capture (wake) about that often as its live frame:
// of this document only, not when it is the picture sent last (then less often), never after a newer frame of the screencast, and none
// once the screencast sends again. Never a tab not shown here (a capture of a hidden window that draws stopped it drawing — 2026-11-24).
// (begin: the next task does not start in such a window at all — a fresh hidden tab takes it)
const ACK_MS = 100
async function startLive(t) {
stopLive(t)
let lastSent = 0, lastAck = 0, timer = null, ackTimer = null, unacked = [], first = true
// (castAt: the screencast's last frame out — from now · casts: how many went · capAt: the last capture begun · gap: how long after
// it the next may be · capSent: the capture sent last, while nothing of the screencast went after it)
let castAt = Date.now(), casts = 0, capAt = 0, gap = 0, capturing = false, capSent = null, still = null
t.liveSent = null
const out = (data) => { t.liveSent = data; host.emit({ type: 'browser-frame', data, url: maskUrl(t.wc.getURL()), tab: t.id }) }
const ackAll = () => { ackTimer = null; lastAck = Date.now(); for (const f of unacked.splice(0)) t.cdp.send('Page.screencastFrameAck', { sessionId: f.sessionId }).catch(() => {}) }
const send = () => {
timer = null
const f = t.latest
if (!f || f.sent || state.active !== t || !state.busy || f.doc !== t.doc) return
f.sent = true
lastSent = Date.now()
host.emit({ type: 'browser-frame', data: smaller(f.data), url: maskUrl(t.wc.getURL()), tab: t.id })
lastSent = castAt = Date.now()
casts++
capSent = null
out(smaller(f.data))
}
const onFrame = (method, p) => {
if (method !== 'Page.screencastFrame') return
Expand All @@ -450,9 +470,30 @@ function createBrowserHost({ electron, log = () => {}, tmp = path.join(os.tmpdir
const sendIn = lastSent + state.live.minMs - Date.now()
if (sendIn <= 0) { clearTimeout(timer); send() } else if (!timer) timer = setTimeout(send, sendIn)
}
// (a tab shown here that sent nothing a while: its picture now — above)
const stand = async () => {
const now = Date.now(), ms = state.live.stillMs || LIVE_STILL_MS
if (capturing || t.cast !== cast || !state.busy || state.active !== t || !t.shownOnce || now - castAt < ms || now - capAt < Math.max(ms, gap)) return
capturing = true
capAt = now
const doc = t.doc, sent = casts
try {
const pic = await wake(t)
// (not once the screencast sent a newer frame, the page went on or the task let go — and not the same picture again)
if (!pic || t.cast !== cast || !state.busy || state.active !== t || t.doc !== doc || casts !== sent) return
const data = pic === capSent ? t.liveSent : smaller(pic)
if (data === t.liveSent) { gap = Math.min(4 * ms, Math.max(ms, gap) * 2); return }
gap = 0
capSent = pic
out(data)
} finally { capturing = false }
}
t.waiters ||= []
t.cdp.on('event', onFrame)
t.cast = { stop: () => { clearTimeout(timer); clearTimeout(ackTimer); ackAll(); t.cdp.off('event', onFrame); t.cdp.send('Page.stopScreencast').catch(() => {}) } }
const cast = { stop: () => { clearTimeout(timer); clearTimeout(ackTimer); clearInterval(still); ackAll(); t.cdp.off('event', onFrame); t.cdp.send('Page.stopScreencast').catch(() => {}) } }
t.cast = cast
still = setInterval(() => { stand().catch(() => {}) }, Math.max(20, Math.round((state.live.stillMs || LIVE_STILL_MS) / 4)))
still.unref?.()
await t.cdp.send('Page.startScreencast', { format: 'jpeg', quality: 50, maxWidth: VIEW.width, maxHeight: VIEW.height, everyNthFrame: 1 })
}
function stopLive(t) { if (t?.cast) { t.cast.stop(); t.cast = null } }
Expand Down Expand Up @@ -765,6 +806,21 @@ function createBrowserHost({ electron, log = () => {}, tmp = path.join(os.tmpdir
state.dialogs = []
state.refused = []
await ensureTab()
// A window shown on this PC that nobody sees now — minimized, or the app hidden (⌘H) — draws no new document: the next task's pages
// sent no live frame at all (2026-12-02 사용자: 「Pc 에 연결된 브라우저 사용시 진행상태가 보이지 않음」 — shown here in the morning and
// minimized, the card stayed on 「브라우저 여는 중」; measured the same day: 0 frames in 5 s, 15 in a hidden tab never shown). It is
// taken as not shown, as when the person hides it (show): the task works in a fresh hidden tab at its address, muted. One the person
// has on the screen stays as it is. (At most 10 s here — the server waits 15 s for begin; the operations after it wait for the tab.)
const was = state.active
if (state.shown && was && showsNothing(was)) {
log(`[browser] tab ${was.id} was shown on this PC and nobody sees it now (minimized or hidden): the task goes on in a fresh hidden tab`)
state.shown = false
for (const x of state.tabs) { try { x.wc.setAudioMuted(true) } catch { /* gone */ } }
try { was.win.hide() } catch { /* gone */ }
state.replacing = refresh(was).then((f) => follow(f)).finally(() => { state.replacing = null })
await withTimeout(state.replacing, 10_000, 'a fresh tab').catch((e) => log('[browser] a fresh tab for the task', e.message))
host.emit({ type: 'browser-event', kind: 'hidden' })
}
if (state.active && !state.active.cast) await startLive(state.active).catch(() => {})
return true
},
Expand Down
Loading
Loading