Skip to content

Show documents side by side in each Workspace's View areas (S7) - #145

Merged
yansfil merged 46 commits into
mainfrom
prd/workspace-views-layout
Sep 25, 2026
Merged

yansfil merged 46 commits into
mainfrom
prd/workspace-views-layout

Conversation

@yansfil

@yansfil yansfil commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Related: PRD agents/prd/workspace-views-layout/prd.md (S7), S6 #144 위에 쌓이고 main의 S8 #146을 merge했습니다.

Summary

  • Workspace의 Views를 View 영역(분할 트리, 최대 6개·깊이 3)으로 나누고, 영역마다 자기 탭 줄과 미리보기 탭을 가집니다.
  • 한 문서를 두 영역에 열면 편집 버퍼 하나를 공유하므로, 한쪽 입력(한글 IME 포함)이 다른 쪽에 바로 보입니다.
  • 탭 끌기(순서·다른 영역·가장자리 분할), 탭 메뉴, 명령 팔레트, 키보드 divider로 배치하고, 안 되는 동작은 이유와 함께 꺼집니다.
  • core가 Workspace마다 트리를 workspace-views.json schema 2에 기억하고(v1 이전), 재시작하면 같은 배치로 돌아옵니다.
  • Changes 읽기 한 번이 보이는 모든 View diff에 답합니다(helper protocol 9, 8인 helper는 이유와 함께 거절).

두 영역: 탭 줄마다 보이는 탭을 시야에 두고, 활성 영역의 탭에 강조색
탭을 오른쪽 가장자리로 끌면 절반 overlay와 "Split right"
Open to the side: 같은 문서의 두 View가 한 버퍼를 공유

Review

  • 판단해 주세요: 영역 가운데는 drop target이 아니고 가장자리 30%만 분할입니다. 키보드 divider 한 칸은 0.05입니다.
  • 판단해 주세요: 마지막 View를 닫을 때 저장 안 된 문서는 pending_save나 discard 없이 거절됩니다(view_layout.unsaved).
  • 판단해 주세요: 문서가 이미 보이는 영역으로 View를 옮기면 그 쌍둥이를 대신하고, index는 쌍둥이를 뺀 최종 자리입니다.
  • 판단해 주세요: ⌥W는 View 영역에 키보드가 있거나 Views만 그려지면(좁은 창 포함) 기기 Workspace에서도 활성 View를 닫습니다.
  • 판단해 주세요: 빈 Views에서 Open to the side는 빈 영역에 엽니다. 하나뿐인 영역에서는 Split right만큼 폭이 있어야 켜집니다.
  • 판단해 주세요: 좁은 창의 tools overlay·영역 전환은 표시용이며 저장하지 않습니다(B12, B13).
  • 판단해 주세요: hided는 모르는 checkout root를 거절하기 전에 core를 한 번 다시 읽습니다(첫 CI 실패의 원인과 수정, Evidence).
  • 판단해 주세요: Pen library는 S8과 줄이 아니라 sheet 단위로 합쳤고, main의 Session row 자리를 두고 View sheet 4개를 480 오른쪽으로 옮겼습니다.
  • 판단해 주세요: 최종 리뷰 뒤 커밋 7개(dcfc1c0..4868ee6, 425fff1)는 사용자 결정으로 delta 리뷰 없이 올립니다.
  • 조심해서 볼 파일: herdr-core/src/runtime/view_areas.rs - runtime mutex. event마다 Views 정리가 lock 안에서 돌고, 키 입력은 건너뜁니다.
  • 조심해서 볼 파일: herdr-core/src/runtime/projects.rs ingest_changes - high-frequency path. 250 ms pump의 늦은 답이 선택 행을 되돌리지 않게 막습니다.
  • 조심해서 볼 파일: herdr-core/src/model.rs, runtime/documents.rs - snapshot wire. documents 섹션은 바뀐 문서만 edit number로 보냅니다.
  • 조심해서 볼 파일: herdr-core/src/view_layout.rs, workspace_views.rs - failure path. 읽을 수 없거나 다른 schema인 파일은 옆 이름으로 옮겨 보관합니다.
  • 조심해서 볼 파일: herdr-core/src/remote/host.rs - failure path. protocol이 다른 helper는 두 버전과 다시 빌드·설치하라는 안내로 거절됩니다.
  • 조심해서 볼 파일: hide-host/src/git.rs - 보이는 View diff 여러 개를 Changes 한 번에 답하고, diff마다 256 KiB 한도를 지킵니다.
  • 조심해서 볼 파일: web/src/ViewAreas.tsx, web/src/editor/sync.ts - 문서 하나에 버퍼 하나, View마다 스크롤·선택 기억, Workspace마다 트리를 새로 mount.
  • 조심해서 볼 파일: hided/src/lib.rs RootFollower, hided/src/server.rs admit_event - failure path. 거절 직전의 따라잡기가 lock 하나 뒤에서 core를 읽습니다.
  • 조심해서 볼 파일: web/src/actions.ts closeTab - ⌥W가 View, 기기의 탭, 이 Mac의 탭 중 무엇을 닫을지 정하는 순서.
  • 질문: Swift 셸의 History에도 같은 늦은 답 반복이 있습니다(Show a checkout summary card with worktree, pull request and disk state in the sidebar #15/#27부터). main에 따로 고치는 것이 맞을까요?

Evidence

  • 확인한 것: sasu implement verify PASS (eb671c0): cargo test 132 s, Swift test 16 s, cargo lint 22 s.
  • 확인한 것: eb671c0의 CI 6개 모두 통과: web shell(e2e 포함) 14분 46초, rust, swift, repository invariants, static-design.
  • 확인한 것: 6e03f32의 verify가 main에도 있던 opener 테스트 경쟁(pid 파일을 쓰기 전에 읽음)으로 한 번 실패해, eb671c0에서 고쳤습니다(3회 연속 통과).
  • 확인한 것: 실제 Herdr·hided web e2e 전체 54개 통과, 8.9분(merge한 6e03f32, worker 1개). eb671c0은 hided 테스트 보조 함수만 바꿉니다.
  • 확인한 것: S7 흐름 12개가 B1-B22를 덮습니다(접힌 표).
  • 확인한 것: 첫 CI(4868ee6)의 web e2e 1개 실패: 재시작 직후 Explorer의 첫 file_list가 hided의 root 갱신보다 먼저 와 outside_checkout으로 거절됐습니다.
  • 확인한 것: Explorer는 거절된 폴더를 다시 묻지 않아 트리가 빈 채였습니다. 425fff1은 거절 전에 root를 core와 맞추고 한 번 더 확인합니다.
  • 확인한 것: 그 순서는 hided 단위 테스트가 결정적으로 재현합니다. 실패했던 e2e는 로컬 5회 반복과 s7 12개 모두 통과했습니다.
  • 확인한 것: 앞면 전환 회귀 테스트(F6)는 View 트리의 Workspace key를 빼면 실패합니다(음성 대조).
  • 확인한 것: vitest 284개, tsc·eslint, design contract, CONTRIBUTING script gate 17개, scripts unittest 39개, design node test 2개, attribution 검사 (모두 6e03f32).
  • 확인한 것: 격리 기기 endpoint(비특권 asyncssh, private Herdr)에서 원격 흐름 3/3 (eb671c0, 6e03f32에서도 3/3), B23을 덮습니다(접힌 표).
  • 확인한 것: PERFORMANCE_TESTING 절차로 views(영역 4개) 대 multi 대조 3쌍(be00526 빌드): idle 60 s 프레임 0(양쪽 모두).
  • 확인한 것: 같은 측정에서 hided CPU 0.92% 대 0.85%, echo p95 1.0 ms 대 0.98 ms, 두 View 입력 반영 p95 5.6 ms.
  • 확인한 것: 드래그 중 전송·PTY resize·reattach 0, 놓을 때 pane마다 resize 한 번 이하.
  • 확인한 것: 120 s 구동 중 놓친 refresh는 7200번 중 1번(양쪽 같음). 기존 "16.7 ms 초과 1% 이하" 규칙은 양쪽 다 실패합니다(31% 대 31%).
  • 확인한 것: 최종 리뷰 1차(57e3237, 6개 관점, 발견마다 도달성 반박과 판정): Fix now 6건 모두 회귀 테스트와 함께 수정, 후속 9건 중 4건 수정.
  • 확인하지 못한 것: 수정 뒤 delta 리뷰(57e3237 이후)는 사용자 결정으로 돌리지 않았습니다. 이 구간은 테스트와 e2e로만 확인했습니다.
  • 확인하지 못한 것: 경쟁은 로컬에서 재현되지 않았습니다(로컬 hided 로그의 거절 0건).
  • 확인하지 못한 것: eb671c0의 CI web e2e는 통과했지만 CI는 실패할 때만 로그를 올려, 그 실행에서 따라잡기가 실제로 돌았는지는 모릅니다.
  • 확인하지 못한 것: 12daff3(비활성 영역의 Close view·Retry를 이벤트 하나로)에는 전용 테스트가 없습니다.
  • 확인하지 못한 것: 60 Hz 프레임 규칙 실패는 타이머 떨림으로 보이지만 원인을 증명하지 않았습니다. 규칙 보정은 후속입니다.
  • 확인하지 못한 것: 물리 기기 두 대. 같은 절대 경로·다른 내용은 root나 두 번째 기계가 필요해, 같은 경로가 두 문서가 되는 것까지만 확인했습니다.
  • 확인하지 못한 것: Pen 렌더링(새 sheet 4개, CLI 로그인 필요), 네이티브 macOS 화면 캡처(검증 세션에 화면 기록 권한 없음). 화면은 Playwright로 찍었습니다.
  • 생성물: design/hide-ui.lib.pen의 큰 diff는 새 sheet 4개와 gen-pen 토큰 갱신입니다. --size-view-area-min-height 토큰을 추가했습니다.
S7 e2e 흐름과 B 번호
  • 1 배치·미리보기·포커스 B1-B3 / 2 Open to the side, 두 View에 한글 IME B4 B5 B20
  • 2b 하나뿐인 영역은 폭이 생길 때까지 거절, History 행 메뉴가 포인터 자리에 온전히 열림 B4 B9
  • 3 끌기 B6-B8 / 4 분할·divider·키보드 B9 B10 B18 B20 / 5 메뉴 집합과 한도, 모든 view_layout에 workspace B11 B19
  • 6 좁은 창, 아무것도 저장하지 않음, Views만 그려질 때 ⌥W는 View를 닫고 Herdr 탭·pane은 그대로 B12 B13
  • 6b 바깥 클릭이 포커스를 돌려줌 / 7a 복원·삭제된 파일 unavailable+Retry B14-B16
  • 7b 손상·schema 3 보관, S6 v1 파일 이전 B17 / 8 S6 동작 유지 B22
  • 다른 client가 앞면을 다른 Workspace로 옮기면 끌기와 탭 메뉴가 끝나고 아무것도 보내지 않음 B8
  • 원격(별도 실행, 3개): 기기 Workspace 분할·이동·끌기·resize에 device_id, 재시작 대기, endpoint 소실과 복귀, 같은 경로 두 문서, protocol 8 거절 B23
리뷰 처리와 후속 작업
  • 중간 리뷰: Workspace identity, 기기 이유, 토큰, 64 View 한도, 비교 비용, Retry diff, 거절 문구를 고쳤습니다.
  • 초기 core 리뷰 Fix now 1건·후속 17건, web 리뷰 Fix now 5건을 모두 고쳤습니다.
  • 구현 중 발견해 고친 것: 빈 Views의 Open to the side, 쌍둥이 View 이동, 탭 줄 시야, 팔레트 이유 잘림, 기기 Explorer 재목록, tools overlay 포커스, History 선택 반복.
  • 최종 리뷰 1차(57e3237): 6개 관점(fidelity, core 상태, wire·성능, web, 보안, 테스트·문서), 21건 중 Fix now 6, 후속 9, 반박 6.
  • F1+F4 (b6501fe): 기기 Workspace에서 ⌥W가 활성 View 대신 기기의 Herdr 탭을 닫았습니다. remote.test.ts가 View close 한 번을 확인합니다.
  • F2 (dcfc1c0): 쌍둥이 View 쪽으로의 이동이 한 칸 왼쪽에 놓여 같은 이동이 순서를 또 바꿨습니다(B18). core 단위 테스트는 옛 코드에서 실패합니다.
  • F3 (f3e2a65): History 행 메뉴가 transform된 행 기준으로 놓여 포인터에서 벗어나고 잘렸습니다. e2e 2b가 모서리와 꺼진 항목을 확인합니다.
  • F5 (b6501fe): 좁은 Together에서 Views만 그려질 때 ⌥W가 보이지 않는 Agent 탭을 닫았습니다. e2e 6이 Herdr id 불변을 확인합니다.
  • F6 (e711dfd): 한 Workspace에서 시작한 끌기·divider 끌기·탭 메뉴가 앞면 전환 뒤 다른 Workspace의 같은 id View에 적용됐습니다.
  • 후속에서 끌어와 고친 것: 비활성 영역 Close view·Retry의 이벤트 두 개(12daff3), draft.ts 주석, Open to the side 폭 e2e의 skip, docs/README.md 소유자 행(4868ee6).
  • 수정 뒤 delta 리뷰는 사용자 결정으로 돌리지 않았습니다.
  • CI 수정 (425fff1): root 추적을 RootFollower 하나로 모으고, Explorer 이벤트·file_index·file_bytes·기기 root의 outside_checkout 거절 전에 한 번 따라잡습니다.
  • 후속: Explorer는 거절된 폴더를 새로 고침이나 변경 알림 전까지 다시 묻지 않습니다. 이번 경쟁은 hided에서 막았지만 다른 일시적 거절도 같은 식으로 남습니다.
  • 후속: 읽는 중인 파일에 보낸 Open to the side가 그 읽기에 합쳐져 조용히 사라집니다(기기, 복원, Retry).
  • 후속: diff View 클릭이 Changes 섹션 전체를 두 번 보냅니다. web이 쓰지 않는 changes.diff 읽기와 같은 원인입니다.
  • 후속: 같은 Workspace에서 다른 client가 분할을 없애면 divider 끌기 안내선이 다음 끌기까지 남습니다.
  • 후속: 조작된 Views 파일이 큰 복구 진단을 만들 수 있고, ARCHITECTURE.md의 "as counts"는 실제보다 강하게 씁니다.
  • 후속: sync.test.ts의 stale echo 경우는 대기 echo가 컴포넌트에 있어 실패할 수 없습니다.
  • 후속: 60 Hz에서 16.7 ms 초과 프레임 1% 규칙은 views와 multi 모두 31%로 실패합니다. 규칙이나 측정을 고쳐야 합니다.
  • 후속: View diff를 checkout root 기준으로(helper protocol 10), 트리 모양이 바뀌면 editor가 다시 mount됨.
  • 후속: Swift History의 늦은 답 반복, 탭 줄 가장자리 끌기 자동 스크롤 없음.
  • 후속: 키 입력마다 문서 전체 왕복(S5.5 file_draft 약 207 KB, S7 documents 약 208 KB), 편집 중인 문서만.
  • 후속(기존): Explorer의 outside_checkout 원문, 터미널 아래 어두운 띠(S6), Main의 key=value 기기 오류와 남는 연결 중 문구.
  • 반박: ⌥` 순환(요구 없음), 반복 Open to the side(쌍둥이에 포커스), 문서 재진입(e2e가 덮음), 한도 정리 병합(조작된 파일만), Swift delta 키(모르는 키 무시).
스크린샷 전체 39장 (격리 fixture, 임시 HOME, Playwright)

이 Mac의 Workspace (1440x900, 이름에 적힌 창 크기는 예외)

s7-01 빈 Views: 열린 View가 없는 영역

빈 Views: 열린 View가 없는 영역

s7-02 미리보기(기울임) 탭과 고정된 View가 나란히

미리보기(기울임) 탭과 고정된 View가 나란히

s7-03 미리보기 탭 메뉴: Keep open과 분할·이동 항목

미리보기 탭 메뉴: Keep open과 분할·이동 항목

s7-04 같은 탭 줄 안에서 끌면 삽입선

같은 탭 줄 안에서 끌면 삽입선

s7-05 영역 오른쪽 가장자리로 끌면 절반 overlay와 Split right

영역 오른쪽 가장자리로 끌면 절반 overlay와 Split right

s7-06 두 영역: 탭 줄마다 보이는 탭을 시야에 두고, 활성 영역의 탭에 강조색

두 영역: 탭 줄마다 보이는 탭을 시야에 두고, 활성 영역의 탭에 강조색

s7-07 자기 영역의 하나뿐인 View를 가장자리로 끌면 overlay 없이 끌기 표시에 이유

자기 영역의 하나뿐인 View를 가장자리로 끌면 overlay 없이 끌기 표시에 이유

s7-08 반으로 나눌 수 없게 좁은 영역은 가장자리 drop을 이유와 함께 거절

반으로 나눌 수 없게 좁은 영역은 가장자리 drop을 이유와 함께 거절

s7-09 탭 메뉴: 꺼진 분할 항목과 이름 아래 이유

탭 메뉴: 꺼진 분할 항목과 이름 아래 이유

s7-10 다른 영역의 탭 줄로 끌기

다른 영역의 탭 줄로 끌기

s7-11 영역 아래 가장자리로 끌면 Split down overlay

영역 아래 가장자리로 끌면 Split down overlay

s7-12 세 영역

세 영역

s7-13 Open to the side: 한 문서의 두 View가 한 버퍼를 공유해 입력이 양쪽에 보임

Open to the side: 한 문서의 두 View가 한 버퍼를 공유해 입력이 양쪽에 보임

s7-14 명령 팔레트의 View 명령: 꺼진 항목은 제목 아래 이유 전체

명령 팔레트의 View 명령: 꺼진 항목은 제목 아래 이유 전체

s7-15 작업 중 diff를 그 파일 옆에 열기

작업 중 diff를 그 파일 옆에 열기

s7-16 키보드로 포커스한 divider

키보드로 포커스한 divider

s7-17 재시작 후 같은 배치, 삭제된 파일의 View는 unavailable과 Close view·Retry

재시작 후 같은 배치, 삭제된 파일의 View는 unavailable과 Close view·Retry

s7-18 여는 중인 View

여는 중인 View

s7-19 이유와 함께 기다리는 View (Explorer의 outside_checkout 원문은 기존 후속 항목)

이유와 함께 기다리는 View (Explorer의 outside_checkout 원문은 기존 후속 항목)

s7-20 900 px 창: Agents와 Views 함께

900 px 창: Agents와 Views 함께

s7-21 900 px 창: 요청해서 연 tools overlay

900 px 창: 요청해서 연 tools overlay

s7-22 900 px 창: 영역 전환

900 px 창: 영역 전환

s7-23 700 px 창: 작업 영역 전환

700 px 창: 작업 영역 전환

s7-24 깊이 한도에서 분할 항목이 이유와 함께 꺼짐

깊이 한도에서 분할 항목이 이유와 함께 꺼짐

s7-25 영역 6개에서 분할 항목이 이유와 함께 꺼짐

영역 6개에서 분할 항목이 이유와 함께 꺼짐

s7-26 View 64개에서 하나를 닫으라는 안내, 보이는 탭은 시야에 유지

View 64개에서 하나를 닫으라는 안내, 보이는 탭은 시야에 유지

기기 Workspace (루프백 SSH 뒤의 격리 기기 endpoint, 1680x960)

b23-01 기기 Workspace의 두 View 영역

기기 Workspace의 두 View 영역

b23-01a 기기 Workspace에서 탭 줄 안 순서 바꾸기 삽입선

기기 Workspace에서 탭 줄 안 순서 바꾸기 삽입선

b23-02 재시작 후 기기의 View가 devbox 연결을 기다림

재시작 후 기기의 View가 devbox 연결을 기다림

b23-03 같은 트리·비율·탭·활성 영역으로 기기의 View가 열림

같은 트리·비율·탭·활성 영역으로 기기의 View가 열림

b23-04 endpoint가 사라지면 기기 이유만 보이고 로컬로 대체하지 않음 (key=value 오류 문구는 기존 후속 항목)

endpoint가 사라지면 기기 이유만 보이고 로컬로 대체하지 않음 (key=value 오류 문구는 기존 후속 항목)

b23-05 endpoint가 없는 채로 Hide를 다시 열기

endpoint가 없는 채로 Hide를 다시 열기

b23-05a endpoint가 돌아오면 Retry 없이 기다림에서 열림으로

endpoint가 돌아오면 Retry 없이 기다림에서 열림으로

b23-06 같은 절대 경로의 기기 문서에 입력. fixture가 폴더를 읽기 전용으로 두어 자동 저장이 거절되고 편집은 기기 버퍼에만 남음

같은 절대 경로의 기기 문서에 입력. fixture가 폴더를 읽기 전용으로 두어 자동 저장이 거절되고 편집은 기기 버퍼에만 남음

b23-07 같은 경로의 이 Mac 문서는 그대로

같은 경로의 이 Mac 문서는 그대로

b23-08 기기로 돌아오면 편집이 기기 문서에 그대로(저장 안 됨)

기기로 돌아오면 편집이 기기 문서에 그대로(저장 안 됨)

b23-09 protocol 8 helper: 두 영역이 protocol 불일치와 다시 빌드·설치 안내를 표시 (Explorer에 남는 연결 중 문구는 기존 후속 항목)

protocol 8 helper: 두 영역이 protocol 불일치와 다시 빌드·설치 안내를 표시 (Explorer에 남는 연결 중 문구는 기존 후속 항목)

b23-10 protocol 8 helper: Main도 같은 이유와 Retry

protocol 8 helper: Main도 같은 이유와 Retry

b23-11 현재 helper: 두 View 모두 열림

현재 helper: 두 View 모두 열림

Verification record
  • PRD: agents/prd/workspace-views-layout/prd.md (sha256 8ce830299da8ade558deaa232f6934f8274445a54fd08ef032dc16f0c335803b)
  • Base 0c0d248 → head eb671c0, verified 2026-09-25T09:16:26.841Z: PASS
  • Verification report: agents/runs/workspace-views-layout/verification-report.json and agents/runs/workspace-views-layout/verification-report.md; source fingerprint b36069f5331df0b4061d49e8fe57092470fcc1a46a32b44593bc6a7de5aa6201
  • Suites:
    • S1: GREEN bash scripts/verify-cargo.sh test (exit 0)
    • S2: GREEN bash scripts/verify-swift.sh test (exit 0)
    • S3: GREEN bash scripts/verify-cargo.sh lint (exit 0)
  • Reviews:
    • Fidelity, Code (core state, wire and performance, web, tests and docs) and Security, final round 1 on 57e3237, each finding checked by a reachability refuter and a disposition judge: 21 findings, Fix now 6, Follow-up 9, refuted 6.
    • Fix now, all fixed with a regression test: F1+F4 and F5 in b6501fe, F2 in dcfc1c0, F3 in f3e2a65, F6 in e711dfd (its e2e fails without the fix).
    • Follow-up fixed: fol04 in 12daff3 (no dedicated test), fol06, fol09 and the owner row of dro04 in 4868ee6; fol01/02, fol03, fol05, fol07, fol08 are listed as follow-ups in this PR.
    • Delta review after 57e3237 (dcfc1c0..4868ee6 and the CI fix 425fff1): not run, by the user's decision; covered by verify, vitest and the whole e2e suite on the merged head.
    • CI on 4868ee6 failed one e2e (s7 caps): the Explorer's first listing after a restart reached hided before its roots did; fixed in 425fff1 with a hided unit test, then main (S8 Find and read a Project's past agent sessions in the web shell (S8) #146) merged in 6e03f32.
    • Verification on 6e03f32 failed once in hided/tests/opener_lifecycle.rs (a pid file read before the fake opener wrote it, the same code as main); eb671c0 fixes that helper.
    • Earlier rounds: core review (Fix now 1, Follow-up 17) and web review (Fix now 5), all fixed before 57e3237.
  • Evidence: 142 registered (12 log, 30 file, 91 screenshot, 9 api); paths are local to the run directory
    • agents/runs/workspace-views-layout/e2e-s7/logs/suite-be00526.txt
    • agents/runs/workspace-views-layout/e2e-s7/summary.txt
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-01-views-empty.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-02-preview-beside-pinned.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-03-menu-preview-keep-open.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-04-drag-reorder-insertion-line.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-05-drag-split-right-overlay.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-06-two-areas.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-07-drag-refused-only-view.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-08-drag-refused-too-narrow.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-09-menu-pinned-split-disabled.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-10-drag-move-into-other-bar.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-11-drag-split-down-overlay.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-12-three-areas.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-13-open-to-side-shared-edit.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-14-palette-view-commands.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-15-diff-beside-file.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-16-divider-keyboard-focus.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-17-restored-layout-unavailable.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-18-view-opening.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-19-view-waiting.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-20-narrow-900-together.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-21-narrow-900-tools-overlay.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-22-narrow-900-area-switcher.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-23-narrow-700-region-switch.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-24-cap-depth-menu.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-25-cap-six-areas-menu.png
    • agents/runs/workspace-views-layout/pr-shots/run-4/s7-26-cap-64-views-notice.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/playwright.txt
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-01-device-two-areas.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-01a-device-drag-insertion.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-02-restored-waiting.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-03-restored-open.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-04-endpoint-gone.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-05-reopened.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-05a-endpoint-back-waiting.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-06-same-path-device-edited.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-07-same-path-local-unchanged.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-08-same-path-device-kept.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-09-stale-helper-reason.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-10-stale-helper-main.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/b23-11-current-helper-open.png
    • agents/runs/workspace-views-layout/remote-b23/run-6/t1-wire.json
    • agents/runs/workspace-views-layout/remote-b23/run-6/t2-wire.json
    • agents/runs/workspace-views-layout/remote-b23/run-6/t3-wire.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/report.md
    • agents/runs/workspace-views-layout/perf-s7/phase2/comparison.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-1/idle.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-1/frames-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-1/echo-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-1/drags.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-1/typing.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/multi-1/idle.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/multi-1/frames-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/multi-1/echo-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-2/idle.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-2/frames-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-2/echo-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-2/drags.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-2/typing.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/multi-2/idle.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/multi-2/frames-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/multi-2/echo-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-3/idle.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-3/frames-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-3/echo-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-3/drags.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/views-3/typing.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/multi-3/idle.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/multi-3/frames-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/multi-3/echo-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/committed-multi/echo-summary.json
    • agents/runs/workspace-views-layout/perf-s7/phase2/committed-multi/frames-summary.json
    • agents/runs/workspace-views-layout/remote-b23/run-7/playwright.txt
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-01-device-two-areas.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-01a-device-drag-insertion.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-02-restored-waiting.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-03-restored-open.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-04-endpoint-gone.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-05-reopened.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-05a-endpoint-back-waiting.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-06-same-path-device-edited.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-07-same-path-local-unchanged.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-08-same-path-device-kept.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-09-stale-helper-reason.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-10-stale-helper-main.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/b23-11-current-helper-open.png
    • agents/runs/workspace-views-layout/remote-b23/run-7/t1-wire.json
    • agents/runs/workspace-views-layout/remote-b23/run-7/t2-wire.json
    • agents/runs/workspace-views-layout/remote-b23/run-7/t3-wire.json
    • agents/runs/workspace-views-layout/e2e-s7/logs/suite-4868ee6.txt
    • agents/runs/workspace-views-layout/e2e-s7/logs/s7-fix06-without-key.txt
    • agents/runs/workspace-views-layout/pr-shots/run-5/playwright.txt
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-01-views-empty.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-02-preview-beside-pinned.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-03-menu-preview-keep-open.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-04-drag-reorder-insertion-line.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-05-drag-split-right-overlay.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-06-two-areas.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-07-drag-refused-only-view.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-08-drag-refused-too-narrow.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-09-menu-pinned-split-disabled.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-10-drag-move-into-other-bar.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-11-drag-split-down-overlay.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-12-three-areas.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-13-open-to-side-shared-edit.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-14-palette-view-commands.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-15-diff-beside-file.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-16-divider-keyboard-focus.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-17-restored-layout-unavailable.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-18-view-opening.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-19-view-waiting.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-20-narrow-900-together.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-21-narrow-900-tools-overlay.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-22-narrow-900-area-switcher.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-23-narrow-700-region-switch.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-24-cap-depth-menu.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-25-cap-six-areas-menu.png
    • agents/runs/workspace-views-layout/pr-shots/run-5/s7-26-cap-64-views-notice.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/playwright.txt
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-01-device-two-areas.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-01a-device-drag-insertion.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-02-restored-waiting.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-03-restored-open.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-04-endpoint-gone.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-05-reopened.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-05a-endpoint-back-waiting.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-06-same-path-device-edited.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-07-same-path-local-unchanged.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-08-same-path-device-kept.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-09-stale-helper-reason.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-10-stale-helper-main.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/b23-11-current-helper-open.png
    • agents/runs/workspace-views-layout/remote-b23/run-8/t1-wire.json
    • agents/runs/workspace-views-layout/remote-b23/run-8/t2-wire.json
    • agents/runs/workspace-views-layout/remote-b23/run-8/t3-wire.json
    • agents/runs/workspace-views-layout/e2e-s7/logs/suite-6e03f32.txt
    • agents/runs/workspace-views-layout/e2e-s7/logs/s7-caps-repeat-fix-roots.txt
    • agents/runs/workspace-views-layout/e2e-s7/logs/s7-fix-roots.txt
    • agents/runs/workspace-views-layout/ci-145-4868ee6/hided-s7-caps.log
    • agents/runs/workspace-views-layout/ci-145-4868ee6/s7-caps-error-context.md
    • agents/runs/workspace-views-layout/ci-145-4868ee6/web-shell-e2e-tail.txt
  • Changed paths: 89 (see Files changed)

An agent run with worktree isolation checks out a whole branch under
.claude/worktrees/<name>. Tracked, that directory became a gitlink in an
automatic checkpoint commit and would have shipped another checkout's
state with the change. The rule is anchored so it cannot match the tracked
.claude/agents/ definitions.
A Workspace with several View areas can show several diffs side by
side, so the Changes read takes a list of further diff targets beside
the selected one and answers each in order (at most six, one per View
area, each bounded as before). A target no longer in its group is
answered with empty text and a notice saying why, never left out, so
a display can say what happened to its file.

The helper protocol moves from 8 to 9: a helper on 8 would ignore the
list and answer no diffs. A device still running the previous helper
is refused with a reason naming both versions, which becomes that
device's unavailable reason, and the next connection installs this
build's helper because a helper is stored under the digest of its
bytes; the consent contract is unchanged, so the operator is not asked
again.
With View areas (the web shell), a Workspace's View is a tree of areas
whose displays bind to the editor's documents at runtime, so several
displays can show one buffer and a restart binds them again. The
stored Workspace file moves to schema 2 with the tree; a schema 1 file
migrates once (its tabs become one area) and anything else keeps the
existing rename-aside path.

- An open lands in the area used last; a preview open retargets that
  area's preview display and retires the document it showed only when
  nothing else shows it; Open to the side uses the neighbouring area or
  a new one to the right. A document already shown is focused where it
  was focused last.
- One view_layout event per operator action (focus, move, split,
  resize, close, keep open, retry). Refusals say why and change nothing;
  caps are six areas, split depth three and 64 displays; a repeated
  split request id splits once; closing a document's last display goes
  through the file close, so a refused save keeps it.
- After every event and before every snapshot read the displays follow
  the editor: a closed document's displays go, a rename is followed, a
  dirty document is never a preview, and the editor's active tab is the
  active area's active display.
- A restart publishes the stored tree at once; displays wait for their
  device or root, then open or say why their file is unavailable.
- The visible documents ride their own snapshot section with a revision
  each, so a keystroke re-sends one document, and the Changes read takes
  every diff on screen.

The Swift shell keeps today's editor and snapshot keys: all of this is
inert without the Workspace file hided names.
DESIGN.md's Web Workspace now describes repeated left/right and up/down
View areas with their own tab bars, the active area mark, dividers that
drag with a guide line and move from the keyboard, one preview per area,
Open to the side over one shared document, the drag previews (insertion
line, half-area split overlay, forbidden cursor) and their cancel rules,
the exact View tab menu, per-view states, narrow windows, the caps and
the minimum sizes, and names the new library masters.

ARCHITECTURE.md's Workspaces section replaces the single View area, the
per-checkout preview slot and strip-order tab recording with schema 2 of
workspace-views.json: the split tree, displays bound to the S5.5 buffer,
one view_layout event per action and how each converges, file_open beside,
file_draft/file_conflict naming their document, the reconcile after every
event, restore states, and what stays presentation-only in the web. The
editor section adds the documents delta with per-document revisions,
per-display editors kept in step locally, and several diffs through one
Changes read with the helper protocol bump.

docs/README.md adds the S7 code owners to the Workspace row.
Four Component sheets sit to the right of the S6 layout switch: the View
tab with its preview, pinned, hover, active-area, other-area, dirty,
unavailable, diff, long-title and floating drag states; the tab-bar
insertion line and the half-area split overlay with their reorder, move,
right, down and ineligible examples; the View tab menu with a preview's
items and a pinned view's disabled Split with its reason; and the View
area message for the empty Views and each view's opening, waiting and
unavailable states.

Every state is a ref of its master with overrides, the close control is
the shared icon button, colours and spacing are the existing variables,
and widths and heights are literals; the minimum area height is drawn at
its literal 144. No existing sheet, id or variable changed, and gen-pen
leaves the file as written. DESIGN.md names the masters and states.
A view dragged over an edge of an area it alone occupies is not a split
target, a moved or split view becomes active in its new area, and a
preview open adds a preview view when the active area has none.
…s as they were

A Workspace's views file is not rewritten while its displays wait for the
device or while their files are still read, so quitting mid-restore keeps
the stored layout byte for byte (contract 5, the S6 rule).

A save with no draft before it keeps every display of its document open,
while it runs and after it lands (B5).

A draft or conflict choice naming a document that is no longer open is
refused with the reason and never lands in the document in use.

The device restore test's display reader and device setup become helpers
shared with the mid-restore test.
Every view_layout payload now names its Workspace as
workspace: {device_id, path}, copied from the workspace_view of the frame
the operator acted on. Display, area and split ids repeat across
Workspaces, and the front can move between that frame and the event, so a
close meant for one Workspace's clean d2 could close another's dirty d2.

An action naming any Workspace other than the one in front changes
nothing and leaves a view_layout.stale_workspace diagnostic with both
Workspaces and the action, and no screen error. With no Workspace in
front the same rule applies, so view_layout.no_workspace is gone.
A restored device view said "Waiting for <device> to connect" for every
helper phase but Ready, so a helper refused for its protocol, unsupported,
on a changed identity or not allowed left its views waiting forever under
the wrong reason. Only a connecting helper, or none yet, reads that way
now; any other phase gives the device's own reason, the text History and
Settings already show, and the views keep waiting so they open once the
device is fixed. Retry on such a view is refused with that reason.

The protocol refusal now says what to do: a device always runs the helper
this Hide carries, installed by its digest, so only rebuilding or
reinstalling Hide clears it. The comment no longer claims the next
connection fixes it, since a development hided reinstalls the stale
hide-host-helper beside its executable on every connection.
The 64-view cap held only for a plain open, so a Workspace could pass it
through other paths and then lose the extra views silently when its file
was repaired on the next start. Now every path that would add a view
says why and changes nothing:

- a preview open beside a preview whose document holds work (the open
  becomes an addition), Reopen Closed, a file the Explorer creates and a
  revealed file are refused with the reason before anything is read or
  made, and the closed file stays reopenable;
- a read admitted below the cap that lands after the views filled is
  refused as it lands, and its document goes unless a view shows it or
  it holds work;
- the reconcile holds the cap too: a document no view can show waits
  off screen, is reported once in the diagnostic log and shows once a
  view is closed;
- Open to the side whose split became impossible while the file was
  read focuses a view that already shows the document, or is refused,
  instead of doubling the document up in the area it was asked from.
A snapshot read runs on every terminal output burst, and it compared the
whole Changes section, with every diff on screen, and each visible View
document against its last sent copy. Both now carry an edit number that
every mutable access takes, so a read compares two numbers and copies a
value only when it was edited; a landing Changes read replaces the
section only when it differs. Activating a file tab in the web shell no
longer copies its document, which that shell never shows from the editor.
Retry on an unavailable diff view did nothing while the view offered it:
it now opens the diff's tab again, which the view binds to, and the view
says Retry opens the diff rather than reads a file. A diff view stored
without its Changes group never found the tab its restore opened and
stood beside a second view of it; loading repairs it to the working
group, the one the restore opens.
A diff view whose file lies outside the folder History reads, which a
Workspace shared by several Projects of one checkout can show, said only
that it was outside that folder. It now names the folder and says the
diff shows when a Project that holds the file is in front. Taking View
diffs relative to the checkout needs a helper protocol change and is left
for its own slice.
The web decides whether a close carries its save from the frame it drew,
and that frame can still show a second view of a dirty document the core
already holds in one. Such a close reached the last view without a save
and closed the document, leaving its draft only in the browser's
recovery store. A last-view close of a dirty, saving or failed document
now needs its save or an explicit discard, the operator's Don't Save;
without either it is refused as view_layout.unsaved, naming the
document, and nothing changes.
Reads land on workers and nothing reconciles between two landings. When
the restore read of a preview's document landed just before a single
click's read, the click found the preview still unbound, took it over as
if its document were still being read, and left the restored document
with no view, so the next reconcile brought it back pinned beside the new
preview. An open now reconciles before it adds and places its tab, as a
layout action does, and the replaced document goes as a replaced preview
does.
A file restored as unavailable keeps its tab, and a read that fills that
tab showed it by the Swift path, which only focused the view that could
not show it: Open to the side of it, once it was back, put nothing
beside. The read now lands where it was asked for, as a fresh read does.
Retry reads a file again into the tab that holds its failure, and the
view kept showing that failure, with Retry still offered, until the read
landed; over a slow device a second Retry was dropped with no sign the
first was running. A view whose unavailable tab has a read in flight now
shows opening.
Every keystroke of a dirty document walked every stored Workspace's views
to keep them open, and then rebuilt the front tree after the event and
again before the read, each display finding its tab by a linear search.
A keystroke now skips the pass after its event, as terminal input does,
since it moves no area and the read's pass follows; only the edit that
makes a document dirty keeps its views open, in its own Workspace; and a
tree build maps the editor's tabs and checks the root once instead of per
display. The publish comment now says what a read builds.
Each committed diff resolved the base branch again with its own
rev-parse forks, so a read with several committed diffs on screen ran
up to a dozen extra git processes every two seconds. The read that lists
the committed group now hands the ref it resolved to every committed
diff it takes.
The web shell now reads the S7 wire: the front Workspace's View area tree
(areas, splits, displays with their open, opening, waiting or unavailable
state, and the caps the core publishes), the documents section beside the
editor section, and one patch per visible diff display.

The store keeps a documents map by editor tab id: a snapshot replaces it,
and a delta that carries the section keeps the documents still visible,
overwrites the ones that changed and drops the rest, object for object.

viewLayout.ts holds the View areas' rules as pure functions: the geometry
of areas and dividers for a body rectangle with each area's minimum, the
neighbour in a direction, split eligibility from the caps and the pixel
rule, where a dragged tab lands, a display's menu commands, and what a
narrow window shows. viewDrag.ts is the tab drag as a local session that
lands only on the target its preview showed.

The View area minimum height is a design token.
Each View area draws its own tab bar and its active display from the
core's split tree: nested splits with focusable dividers that land one
resize on release, an editor per display that keeps its own selection
and scroll, and one document shared by every display that shows it, so
an edit reaches the other displays at once, outside their undo history.

A tab drag previews its landing locally, as an insertion line or an edge
overlay with one label, and sends one move or split only on a valid
drop; Escape, a drop on nothing and a target the layout moved or removed
send nothing. Tab menus, an overflow menu per area, Explorer and History
rows and the palette offer the same View commands, and a command that
cannot run says why.

A narrow window shows the tools over the working region, one working
region with a switch, and one area with an area switcher, without
sending or storing anything.

Closing the last display of a document carries its unsaved text as
pending_save, and the close, keep-open and find chords act on the
active display.
… text

Every view_layout payload now carries the Workspace of the frame the
operator acted on, read from what the View areas last drew, so an action
that arrives after the front moved is refused instead of landing on
another Workspace's ids (contract 4.1).

A close carries the document's unsaved text as pending_save whenever
there is any, since the core decides whether the view is the last one.
Unsaved work this page never loaded is not sent: a notice offers Don't
save, which closes with discard on the Workspace it was asked on. The
close watch ends as keep once the document is edited again, its save
settles with the tab still open, a refusal arrives, its view goes alone
or another Workspace is in front, so autosave comes back.

View refusals (display_limit, limit, unsaved, waiting, unknown ids) are
shown in the core's words; stale_workspace stays in the log.

The keyboard follows a moved or split view once the frame that lands it
arrives. A display's selection and scroll are kept per document, so a
retargeted preview opens the next file at its top. The palette offers
every View tab menu command. A diff view shows the core's own reason,
another area's shown tab draws no indicator, and a divider drag redraws
only its guide line.
The tools overlay of a narrow window is now a placement the page keeps:
the column while there is room for it, else an overlay that starts
closed and opens only on an explicit ask (a tool toggle, Cmd-Shift-B,
Reveal in Explorer, a palette tool command). It no longer floats over
the work when the window narrows, nor stays open over another Workspace.

Cmd-Shift-B, Reveal in Explorer and the palette's tool commands read the
tools as shown on screen, so a closed overlay is opened rather than the
stored tools flipped. The overlay takes the keyboard when it opens and
answers Escape only from inside it, after a name field or menu inside it
had its turn, then gives the keyboard back; a focused terminal keeps its
Escape. A History row opened in a narrow Together window shows the Views.
Open to the side on a History row now sends changes_select with beside,
so the row's diff opens pinned beside the active View area, as a click
opens it in that area, instead of the working file. A deleted file has a
diff too, so the item is no longer disabled for it.
A stored id, next_id or focus stamp at the top of u64 made loading or
the next layout action overflow: a panic in a debug build, and wrapped
duplicate ids in a release one. Loading now renumbers such a tree,
keeping what each area shows, the area in use and which view was focused
last. Dropping empty areas walked the whole tree once per area and noted
each one, so a file of thousands of empty areas stalled the start and
filled the diagnostics; it is now one pass with one count.
Adds tests for rules that held but that no test would have kept: a View
diff's absolute path through the History folder's read and back, the same
path on this machine and a device staying two documents in two views, Keep
Open from either entry point pinning a preview so the next click opens
beside it, focus_area and the unknown-id refusals, Views alone making no
split, and the last close keeping the mode.
The architecture guide sent a reader to runtime/workspace_view.rs for the
rule that derives editor.active_tab_id, which lives in view_areas.rs. Code
and test comments cited review item labels that mean nothing once the
review is gone; they now state the rule, or the PRD rule it serves.
From the only View area, Open to the side creates a split, but the Explorer
menu, the History row menu and the palette offered it at any width, while
Split right was already disabled there. The core checks only counts, so the
new area landed in a tree the page could not show side by side and the Views
fell back to one area with a switcher (PRD S7 B9, D-06).

Open to the side now asks the same room Split right does whenever the
Workspace has one area, and stays listed, disabled, with its reason in all
three places. With a neighbour it splits nothing and is never blocked; while
the View areas are not drawn their room is unknown and the core's caps decide.
With no view open, the only area is empty and has no neighbour, so Open to
the side split it and left that empty area on screen beside the new view,
an arrangement the layout's own invariant forbids: an empty area is only
ever the root (PRD S7 B4, B10). A diff opened beside took the same path.

The open now lands in the empty area itself, admitted against the view cap
alone, and the web keeps the command enabled there since no split is made.
Moving the second view of a document back into the area that shows the
first one left the area with two tabs of the same document side by side,
which only Open to the side may create, and never within one area (PRD S7
B6, D-03).

A view moved into an area that already shows its document now takes the
twin's place, at the index the drop asked for; the twin goes and the
document stays open. The moved view keeps its id, so the page's focus
follows it as it does after any move, and the same move twice still
changes nothing the second time.
With more tabs than an area is wide, the strip stayed where it was, so the
tab of the view on screen could sit scrolled out of sight: an area showed a
document whose tab could not be seen, and six full areas showed no active
indicator at all (PRD S7 B20, B21). Each area's strip now scrolls itself,
and nothing around it, to show the shown view's tab whenever that view
changes or the strip is resized; a manual scroll is left alone otherwise.

The palette cut the reason of a command it cannot run to about twenty
characters in a right-hand column, so the reason B9 asks to show could not
be read. It now draws such a command muted with its whole reason under the
title, as the menus do.
One test per operator flow of S7, each asserting what the operator sees
or what is stored: a click previews in the area used last and a pin keeps
a view; Open to the side shows one document twice with edits and Korean
composition in both, each view keeping its own scroll and cursor, and a
last-view close that saves, waits on a save that cannot land, or drops
only on Don't save; tab drags reorder, move and split once and land
nothing on Escape, outside the window or on an ineligible target; splits,
moves, resizes, focus and closes run from the palette and the tab menu by
keyboard, one event each, and a split delivered twice splits once; the
tab menu set and every cap refuse with their reason; a narrow window
floats the tools and shows one region and one area without storing any
of it; a restart brings the tree back with a missing file unavailable on
its own view until Retry; a broken or unknown Views file is kept aside
for Main and an S6 file becomes one area.

A click outside the narrow tools overlay does not give the keyboard back
to its toggle as PRD B12 says; that check is marked as an expected
failure until the overlay restores focus.
A restored device Workspace asked for its Explorer listing while the
device helper was still starting; the refusal ("Connecting to the device
helper") kept the folder marked as asked, and nothing asked again when the
helper came up, so the restored Explorer stayed on that refusal after the
views had opened, until the operator pressed Retry (PRD S7 B14, B16).

The Explorer now asks again for the folders it has no listing of when the
front device's helper turns ready, as the views read their files again then.
From the only area, Open to the side is a split: in a window where that
area cannot be halved, the Explorer's menu and the palette list it
disabled with the reason and send nothing, and once the area has room
the same item opens the second view to the right. The check runs once
the served page carries the rule and is skipped by an older build.
Since a first run opens on Main (PRD S6), the measurement harness waited for
a terminal pane that the page never showed, so `run.sh` stopped before its
first trial in both scenarios. It now chooses the fixture's Project on Main
and then its Workspace in the Overview, one click per poll, before it waits
for the measured pane; the trials and their gates are unchanged.
In a narrow window the Explorer or History overlay closes on a press
outside it, but when that press landed on something that takes no focus
(the toolbar's padding) the overlay went away with the keyboard and left it
on the page body; Escape already handed it back to what had it (PRD S7 B12,
DESIGN.md "Narrow windows").

After an outside press has had its chance to focus what it landed on, the
overlay now gives the keyboard back to what had it when it opened, or to
its toggle, only when nothing took it; a click into an editor or terminal
keeps the focus it gave. The end-to-end test for it no longer expects a
failure.
A History read lands one pump wake after its request, and with View areas
a file in front leaves the next request asking for the row History shows.
A read started for a row the operator had since left put that row back, so
the next request asked for it again, the answer after brought the newer
row back, and the two alternated for as long as nothing moved: a Git read
and a changes frame on every 250 ms wake while nothing was driven, with
History's highlight flipping between the two rows. The performance smoke
met it after two History selections and a tab move landed inside one wake
(PRD S7 A5, B19).

Each answer now names the row its request asked for. With View areas an
answer for another row still publishes its lists and View diffs but keeps
the row and the diff in front, so the reads settle after one. The Swift
shell's reading is unchanged.
…ice changes nothing

A move's index is the view's final place on both sides now. The web
counted the twin that gives way in the drop slot and the core took one
off when the twin sat left of it, so a repeated move reordered the strip
again. The web names the final place and the core no longer shifts it.
…when only Views are drawn

On a device Workspace the chord took the device branch before looking at
the View areas, so it ended the device's Herdr tab instead of closing the
active view. In a narrow Together window that draws only the Views, the
chord looked for the keyboard inside a View area and otherwise closed the
Agent tab that was not on screen. Both now close the active view.
Each History row was placed with a transform, which made the row the
containing block of its menu's fixed position: the menu landed away from
the pointer and the list clipped it, so a disabled Open to the side and
its reason were never seen. Rows are placed with top instead.
…Workspace

The View tree was not keyed by its Workspace, so a gesture begun on one
Workspace survived a front that moved to another (another client, a
device's own focus) and landed on that Workspace's view with the same
id, stamped with the new Workspace so the stale-workspace fence let it
through. One tree per Workspace ends the gesture and its menus instead.
A press on either button also claimed its area, so a click in an area
the operator was not working in sent a focus before the close or retry,
and a close then left the active area on that area's neighbour. Like a
tab's close button, each now acts on its view alone.
…ys, and list the View area owners

The closing-draft comment said a view goes at once; it stays until its
document closes. The room test skipped itself when the built page lacked
the rule it checks, so losing the rule would have read as a skip. The
docs map now names the runtime, test and drag files that own View areas.
After a launch, a checkout the core learns from Herdr's first sync
reaches a client's snapshot and hided's roots on separate reads. On
the slower CI runner the Explorer's first listing arrived first and
was refused as outside_checkout; the Explorer keeps a refused folder,
so the tree stayed empty until Refresh and the S7 caps test failed.

One RootFollower now keeps the root cursors behind one lock for the
boot seed, the notify reader and a refused event. An Explorer event,
file_index, file_bytes or device root refused as outside every
checkout brings the roots current and is checked once more before it
is refused; a second check that admits it logs
boundary.roots_caught_up.
Both sides added a snapshot section (documents, project_sessions), a
delta-state field and a design library sheet; each keeps both. The
library was merged by sheet, not by line: main's Session row stays
where it is and this branch's four View sheets move right past it, and
gen-pen leaves the result unchanged.
The fake opener's shell creates its pid file before printf writes the
pid into it, so wait_for_pid could read an empty file and panic on the
parse. That failed repeated_owned_helpers_are_reaped_between_requests
once in verification; an empty read now means the pid is not there yet.
@yansfil
yansfil merged commit 806c92f into main Sep 25, 2026
6 checks passed
@yansfil
yansfil deleted the prd/workspace-views-layout branch September 25, 2026 09:30
yansfil added a commit that referenced this pull request Oct 30, 2026
…1870)

Refs with-hide/hide-private#354

## Summary

Windows CI의 web unit suite에서 처음 도는 테스트 파일(MissionMap, PaneHeaderBand,
SessionRecord)이 가끔 12-18초 멈춰 5초 timeout으로 실패했습니다.
관측: vitest는 테스트 파일마다 새 Node 프로세스를 띄우고, Windows runner의 Node는 느린 시스템
디스크(C:)에 있습니다. 첫 wave 프로세스들은 Node 실행 파일(83 MB)을 첫 테스트의 시간 제한 안에서 수천 번의
작은 읽기로 디스크에서 읽습니다.
이 PR(완화): vitest 자신의 프로세스가 worker를 띄우기 전에 Node 실행 파일을 한 번 통째로 읽어, 첫
wave의 그 차가운 읽기를 테스트 밖으로 뺍니다(`web/e2e/unit-node-binary.ts`). timeout과
retry는 그대로입니다.
미확정: 이 차가운 읽기가 12-18초 정지의 원인이라는 인과는 확인하지 못했습니다. 실패한 run의 정지 구간을 trace로
잡은 적이 없어서, #354는 열어 두고 이 PR 뒤 main에서 다시 나오면 trace로 그 구간의 대기를 잡습니다.
범위 밖: C:를 느리게 만드는 runner 자신의 유지보수(Defender 업데이트, Windows Update, VSS)는
with-hide/hide-private#372.

## Review

- **판단해 주세요**: 모든 OS에서 web unit suite 전에 Node 실행 파일을 한 번 읽습니다. 메모리에 이미
있으면 12-23 ms, 차가운 Windows runner에서 약 0.5초, C:가 유지보수로 바쁜 job에서는 3.5초까지
걸렸습니다(trace t3). 어느 경우든 테스트의 시간 제한 밖입니다.
- **판단해 주세요**: #372(runner의 Windows Update와 Defender 예약 업데이트를 job 동안
멈출지)는 보안 업데이트를 끄는 결정이라 운영자 판단으로 남겼습니다.
- **조심해서 볼 파일**: `web/vite.config.ts` - `globalSetup`이 web unit suite 전체
앞에 실립니다. desktop suite(`desktop/vitest.config.ts`)는 그대로입니다.

## Evidence

- **확인한 것**: main 실패 run 41001145069에서 세 worker가 같은 구간에 멈췄고 node 프로세스 누적
CPU는 약 5초(테스트 12-18초)였습니다. 무엇을 기다렸는지는 그 run에서 잡지 못했습니다.
- **확인한 것**: 커널 trace(NT Kernel Logger, disk·file·hard fault)로 본 worker
시작 뒤 Node 실행 파일 디스크 읽기: base 3 job 980-2929번(30.6-86.8 MB), 고침 6 job 모두
0번. 고침 쪽은 그 읽기가 worker 전 한 번의 순차 읽기로 옮겨집니다. 이 trace들은 정지가 없던 run이라, 정지
구간의 대기와 직접 연결되지는 않습니다.
- **확인한 것**: 반복 실행(windows check의 cargo 단계 뒤 같은 install/test 단계). 세 파일은
base 13 job, 고침 29 job 어디서도 실패하지 않았습니다. job마다 세 파일에서 가장 긴 테스트의 중앙값은 base
557 ms, 고침 552 ms이고, 가장 느린 job은 base 2536 ms, 고침 1122 ms입니다.
- **확인한 것**: 반복 실행의 다른 실패는 이 PR 밖입니다. OverviewGraph overflow 3번은
#145(#1857로 merge됨), `bounded-child.unit.ts`의 `lld-link did not end`
2번(base 1, 고침 1)은 C: 유지보수 폭주로 #372.
- **확인한 것**: 첫 Intl 생성 하나가 CPU 30 ms에 벽시계 0.5-1.7초를 기다렸고, Intl이 없는
module 수집이 14-50초 멈춘 job도 있었습니다. Intl만 예열해서는 덮이지 않습니다.
- **확인한 것**: 아래 표(최소-최대). C:를 일부러 대량으로 읽어 느리게 만든 뒤에도 고침 쪽 숫자는 그대로였습니다.
- **확인하지 못한 것**: 12-18초 정지 자체는 반복 실행에서 재현되지 않았습니다(main windows check 약
40 run 중 3번). 통과·실패 횟수는 해결의 증거가 아니고, 위 trace는 차가운 읽기 경로가 테스트 안에서 사라졌다는
것만 보입니다.
- **확인하지 못한 것**: macOS와 Linux에서 한 번 읽기 비용은 따로 재지 않았습니다(같은 표준 fs 호출).

| 방식 (Windows diag) | MissionMap 첫 테스트 | 테스트 안 Intl 대기 | SessionRecord
수집 | 한 번 드는 비용 |
| --- | --- | --- | --- | --- |
| main 그대로 (13) | 395-599 ms | 30-61 ms | 9.4-18.6 s | |
| main, C:를 지치게 함 (5) | 473-1032 ms | 36-538 ms | 10.1-23.5 s | |
| 파일마다 Intl 예열 (5) | 270-572 ms | 1 ms | 8.1-12.6 s | setup으로 43-823 ms
이동 |
| main 프로세스에서 Intl 한 번 (5) | 339-647 ms | 30-49 ms | 8.2-10.9 s | 35-764
ms |
| Node 실행 파일 한 번 읽기 (4) | 273-454 ms | 26-40 ms | 7.5-10.7 s | 12-531 ms
|
| Node 실행 파일 한 번 읽기, C:를 지치게 함 (5) | 272-380 ms | 23-37 ms | 6.9-9.1 s |
12-537 ms |

| 반복 실행 | job | 통과 | 실패(원인) |
| --- | --- | --- | --- |
| base (고침 줄 삭제) | 13 | 12 | bounded-child lld-link 1 (#372) |
| 고침 | 29 | 25 | OverviewGraph 3 (#145), bounded-child lld-link 1 (#372)
|

`windows check`는 `web/vite.config.ts` 변경으로 이 PR의 계획에
들어갑니다(`scripts/ci-plan.py`). 같은 커밋에서 다시 돌리려면 `gh run rerun <run> --job
<windows check job id>`.

<details><summary>Verification record</summary>

- base `1e8355e40`, head `acd3ea806` (코드는 `bf41323a1`과 같고 주석과 문서 표현만 바뀜)
- 로컬: `scripts/verify-web.sh web lint` 통과, `scripts/verify-web.sh web
test` (MissionMap, PaneHeaderBand, SessionRecord 89 tests) 통과
- PR verify 41007907035 통과(windows check job 123906969308, 첫 wave 파일
2.2-5.1 s)
- diag run: 41005002294, 41005568846, 41005960879, 41006191963,
41006614043 (브랜치 diag/windows-unit-stall, 버릴 것)
- 반복 실행(브랜치 diag/windows-unit-stall-repeat, 버릴 것): 41007829725 (고침 10,
base 10은 checkout 오류로 무효), 41009840527 (base 10, 고침 10, 고침 trace 3),
41011316116 (고침 trace 6), 41013119002 (base trace 3)

</details>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant