Skip to content

탭별 File Views 기억 및 CLI 백그라운드 열기 - #1065

Merged
yansfil merged 15 commits into
mainfrom
feat/tab-file-view-visibility
Oct 13, 2026
Merged

yansfil merged 15 commits into
mainfrom
feat/tab-file-view-visibility

Conversation

@yansfil

@yansfil yansfil commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • 체크아웃의 Agent 탭마다 File Views의 표시 여부와 열린 View·배치·선택 상태를 기억합니다.
  • A 탭의 CLI가 파일·diff·브라우저를 열어도 보고 있던 B 화면을 유지하며, A로 돌아오면 결과를 보여 줍니다.
  • --beside는 A 안에서 배치하고, --reveal은 실제 요청한 A 탭을 표시합니다.
  • 처음 방문한 탭은 현재 구성을 이어받으며, 같은 파일의 미저장 내용은 탭 사이에서 공유합니다.
  • Explorer에서 시작한 파일 읽기도 요청한 탭에서 완료하며, 같은 파일을 여러 탭이 열어도 각 요청을 유지합니다.

A로 돌아오면 백그라운드에서 열린 파일과 배치가 나타납니다
B에서 File Views를 꺼 둔 채 A가 파일을 열었고, A로 돌아오자 해당 파일과 배치가 나타납니다.

Review

  • 판단해 주세요: 첫 방문의 구성 상속과 이미 여러 영역에 보이는 탭 사이의 일반 포커스 이동 규칙입니다.
  • 판단해 주세요: 새 숨김 브라우저는 탭을 보여 줄 때 최초 로드하며, 그동안 --wait는 pending 또는 timeout을 반환할 수 있습니다.
  • 조심해서 볼 파일: herdr-core/src/runtime/view_areas.rs, herdr-core/src/workspace_views.rs - 배치 전환·롤백과 문서 참조입니다.
  • 조심해서 볼 파일: herdr-core/src/runtime/documents.rs - 비동기 요청의 탭 소유권, 공유 버퍼와 종료·거부 경로입니다.
  • 조심해서 볼 파일: herdr-core/src/runtime/agent_areas.rs, herdr-core/src/node_migration/reown.rs - 입장·이동 소유권입니다.
  • 조심해서 볼 파일: desktop/src/main/browser.ts - 화면에서 빠진 같은 체크아웃 페이지를 숨기며 native identity를 유지합니다.
  • 비용 검토: 기존 메모리 상태 조회·배치 교환을 사용하며 새 폴링·프로세스·잠금 안 I/O는 없습니다. 변경할 때만 저장·알립니다.
  • 기존 상한과 저장 worker의 1 active / 1 pending을 유지합니다. 대기 중 파일 배치도 체크아웃별 64개로 제한하며 실측 성능은 미확인입니다.

Evidence

  • 동작: 반복 열기, B On/Off 유지, dirty 공유, 닫힌 탭 정리, 대기·위임 호출, 거부·롤백을 코어 회귀 테스트로 확인했습니다.
  • 비동기 열기: 공유 읽기·버퍼 종료 결함을 실패 재현 후 고쳤고, dirty 보존·연속 거부·65번째 요청 제한도 회귀 검사했습니다.
  • 화면: 격리된 macOS 창에서 파일 배경 열기·A 복귀와 동일 URL의 탭별 페이지·한글 입력 보존을 실제 확인했습니다.
  • 이동: 실제 loopback SSH의 코어 이동·복귀에서 서로 다른 두 탭의 저장 구성을 비교했고, 기존 터미널 HTML 열기·소스 보기도 확인했습니다.
  • CI: 최종 커밋의 필수 verify·디자인 계약과 Windows·Linux 웹, macOS·Windows 데스크톱 E2E가 통과했습니다.
  • 검사·리뷰: Rust 전체 test/lint와 웹·데스크톱 타입·린트·단위·빌드, 디자인 계약 검사 및 요구사항·코드 리뷰를 통과했습니다.
  • 미확인: 로컬의 Windows/Linux native·전체 E2E·전체 ignored suite, 물리 IME·포커스 경합·실측 성능은 미실행입니다.
  • Linux CI는 Chromium 웹 E2E이며, Linux native GUI 렌더링은 확인하지 않았습니다.
  • 초기 병렬 ignored 이동 검사는 시작 timeout으로 실패했습니다. 관련 실제 이동 1건은 통과했으며, 과거 자식별 정리는 기록 부족으로 확정하지 못했습니다.
추가 화면 증거

A가 파일을 열어도 B는 File Views를 꺼 둔 상태를 유지합니다
A의 배경 열기 이후에도 선택된 B는 File Views가 꺼진 상태를 유지합니다.

A가 같은 URL을 열어도 B의 페이지와 한글 입력이 유지됩니다
같은 URL을 A에서 열어도 B의 기존 페이지와 입력한 한글이 그대로 남습니다.

Verification record
  • PRD: agents/prd/cli-tab-background-views/prd.md (sha256 fa748f2873067c4e8b8330988ab29249598f03a9a4a94cef8a9007666032c4af)

  • Base 2a01c2e → head 711f8d5, verified 2026-10-13T18:50:44.012Z: PASS

  • Verification report: agents/runs/cli-tab-background-views/verification-report.json and agents/runs/cli-tab-background-views/verification-report.md; source fingerprint 9e21368be85df4a333fef575cfcbc99ef1973a60a02227fabad455491e094251

  • Suites:

    • S1: GREEN bash scripts/verify-cargo.sh test (exit 0)
    • S2: GREEN bash scripts/verify-cargo.sh lint (exit 0)
  • 요구사항 리뷰: 최종 711f8d542, 전체 25 behaviors/16 decisions 유지, Fix now 0.

    • GUI 완료의 B 유입, 공유 읽기의 다른 탭 요청 유실·버퍼 종료 취소를 실패 재현 후 수정·재검토했습니다.
    • 후속 개선: 준비 중 요청의 native session 교체 관찰, reload와 배치의 혼합 회귀, 큰 파일 완료의 실측 성능입니다.
  • 코드 리뷰: 최종 711f8d542, Fix now 0.

    • authoritative catalog·이동·위임 입장 및 GUI coalescing·dirty buffer·retirement 결함을 수정·재검토했습니다.
    • 최종 화면 보충 리뷰도 같은 커밋에서 Fix now 0이며, 두 리뷰어는 소스·제공 로그와 실제 PNG·영수증을 검사했습니다.
    • 리뷰어 자체 실행과 전체 플랫폼·물리 IME·성능 검증으로 주장하지 않습니다.
  • Evidence: 111 registered (44 log, 3 browser, 40 file, 24 screenshot); paths are local to the run directory

    • agents/runs/cli-tab-background-views/core-tests-final.log
    • agents/runs/cli-tab-background-views/web-checks.log
    • agents/runs/cli-tab-background-views/native-browser-4.log
    • agents/runs/cli-tab-background-views/native-mutation.log
    • agents/runs/cli-tab-background-views/native-browser-restored.log
    • agents/runs/cli-tab-background-views/manual-qa-2.log
    • agents/runs/cli-tab-background-views/aside-Boff-Areturn.log
    • agents/runs/cli-tab-background-views/core-move-roundtrip.log
    • agents/runs/cli-tab-background-views/invariants.log
    • agents/runs/cli-tab-background-views/design-contract.log
    • agents/runs/cli-tab-background-views/observation-evidence.md
    • agents/runs/cli-tab-background-views/native/file-B-after-background-beside.png
    • agents/runs/cli-tab-background-views/native/file-B-off-after-background-beside.png
    • agents/runs/cli-tab-background-views/native/file-final-after-Aside.png
    • agents/runs/cli-tab-background-views/native/background-tab-B-retained.png
    • agents/runs/cli-tab-background-views/native/background-tab-A-revealed.png
    • agents/runs/cli-tab-background-views/review-reproduction.log
    • agents/runs/cli-tab-background-views/review-fix-focused.log
    • agents/runs/cli-tab-background-views/review-node-final-2.log
    • agents/runs/cli-tab-background-views/integrated-core-2.log
    • agents/runs/cli-tab-background-views/integrated-web.log
    • agents/runs/cli-tab-background-views/integrated-lint.log
    • agents/runs/cli-tab-background-views/integrated-design.log
    • agents/runs/cli-tab-background-views/integrated-core-move-2.log
    • agents/runs/cli-tab-background-views/integrated-native-strict.log
    • agents/runs/cli-tab-background-views/final-desktop-typecheck.log
    • agents/runs/cli-tab-background-views/final-desktop-lint.log
    • agents/runs/cli-tab-background-views/integrated-native/background-tab-B-retained.png
    • agents/runs/cli-tab-background-views/integrated-native/background-tab-B-retained.json
    • agents/runs/cli-tab-background-views/integrated-native/background-tab-A-revealed.png
    • agents/runs/cli-tab-background-views/integrated-native/background-tab-A-revealed.json
    • agents/runs/cli-tab-background-views/integrated-native/terminal-html-rendered-native.png
    • agents/runs/cli-tab-background-views/integrated-native/terminal-html-rendered-native.json
    • agents/runs/cli-tab-background-views/integrated-native/terminal-html-source-native.png
    • agents/runs/cli-tab-background-views/integrated-native/terminal-html-source-native.json
    • agents/runs/cli-tab-background-views/delegated-reproduction.log
    • agents/runs/cli-tab-background-views/delegated-repair-core.log
    • agents/runs/cli-tab-background-views/final-file-cli-build.log
    • agents/runs/cli-tab-background-views/final-file-observation.log
    • agents/runs/cli-tab-background-views/final-design-contract.log
    • agents/runs/cli-tab-background-views/owned-fixture-audit.json
    • agents/runs/cli-tab-background-views/code-review-followup.md
    • agents/runs/cli-tab-background-views/fidelity-review-followup.md
    • agents/runs/cli-tab-background-views/final-file/aside-Boff-Areturn.log
    • agents/runs/cli-tab-background-views/final-file/aside-cleanup.log
    • agents/runs/cli-tab-background-views/final-file/cleanup.json
    • agents/runs/cli-tab-background-views/final-file/native/file-B-before.png
    • agents/runs/cli-tab-background-views/final-file/native/file-B-before.json
    • agents/runs/cli-tab-background-views/final-file/native/file-B-after-background-beside.png
    • agents/runs/cli-tab-background-views/final-file/native/file-B-after-background-beside.json
    • agents/runs/cli-tab-background-views/final-file/native/file-B-off-after-background-beside.png
    • agents/runs/cli-tab-background-views/final-file/native/file-B-off-after-background-beside.json
    • agents/runs/cli-tab-background-views/final-file/native/file-final-after-Aside.png
    • agents/runs/cli-tab-background-views/final-file/native/file-final-after-Aside.json
    • agents/runs/cli-tab-background-views/code-review-closure.md
    • agents/runs/cli-tab-background-views/fidelity-review-closure.md
    • agents/runs/cli-tab-background-views/review-dispositions.md
    • agents/runs/cli-tab-background-views/platform-native.log
    • agents/runs/cli-tab-background-views/platform-selection.log
    • agents/runs/cli-tab-background-views/platform-native-final.log
    • agents/runs/cli-tab-background-views/platform-final-typecheck.log
    • agents/runs/cli-tab-background-views/platform-final-lint.log
    • agents/runs/cli-tab-background-views/platform-native-final/cleanup.json
    • agents/runs/cli-tab-background-views/platform-native-final/background-tab-B-retained.png
    • agents/runs/cli-tab-background-views/platform-native-final/background-tab-B-retained.json
    • agents/runs/cli-tab-background-views/platform-native-final/background-tab-A-revealed.png
    • agents/runs/cli-tab-background-views/platform-native-final/background-tab-A-revealed.json
    • agents/runs/cli-tab-background-views/code-review-platform-closure.md
    • agents/runs/cli-tab-background-views/fidelity-review-platform-closure.md
    • agents/runs/cli-tab-background-views/ci-gui-core-reproduction.log
    • agents/runs/cli-tab-background-views/ci-gui-reproduction.log
    • agents/runs/cli-tab-background-views/ci-gui-coalesced-reproduction.log
    • agents/runs/cli-tab-background-views/ci-gui-retirement-reproduction.log
    • agents/runs/cli-tab-background-views/ci-gui-runtime-closure-v2.log
    • agents/runs/cli-tab-background-views/ci-gui-retirement-fixed.log
    • agents/runs/cli-tab-background-views/ci-gui-web-retirement-final.log
    • agents/runs/cli-tab-background-views/ci-gui-browser-closure.log
    • agents/runs/cli-tab-background-views/ci-gui-desktop-retirement-final.log
    • agents/runs/cli-tab-background-views/ci-gui-native-closure.log
    • agents/runs/cli-tab-background-views/ci-gui-build-retirement-final.log
    • agents/runs/cli-tab-background-views/ci-gui-static-closure.log
    • agents/runs/cli-tab-background-views/ci-gui-design-closure.log
    • agents/runs/cli-tab-background-views/ci-gui-aside-closure.log
    • agents/runs/cli-tab-background-views/ci-gui-final-cleanup.json
    • agents/runs/cli-tab-background-views/ci-gui-repair-dispositions.md
    • agents/runs/cli-tab-background-views/code-review-ci-gui-repair.md
    • agents/runs/cli-tab-background-views/fidelity-review-ci-gui-repair.md
    • agents/runs/cli-tab-background-views/code-review-ci-gui-closure.md
    • agents/runs/cli-tab-background-views/fidelity-review-ci-gui-closure.md
    • agents/runs/cli-tab-background-views/code-review-ci-gui-final.md
    • agents/runs/cli-tab-background-views/fidelity-review-ci-gui-final.md
    • agents/runs/cli-tab-background-views/ci-gui-native-closure/native/gui-open-A.png
    • agents/runs/cli-tab-background-views/ci-gui-native-closure/native/gui-open-A.json
    • agents/runs/cli-tab-background-views/ci-gui-native-closure/native/file-B-before.png
    • agents/runs/cli-tab-background-views/ci-gui-native-closure/native/file-B-before.json
    • agents/runs/cli-tab-background-views/ci-gui-native-closure/native/file-B-after-background-beside.png
    • agents/runs/cli-tab-background-views/ci-gui-native-closure/native/file-B-after-background-beside.json
    • agents/runs/cli-tab-background-views/ci-gui-native-closure/native/file-B-off-after-background-beside.png
    • agents/runs/cli-tab-background-views/ci-gui-native-closure/native/file-B-off-after-background-beside.json
    • agents/runs/cli-tab-background-views/ci-gui-native-closure/native/file-final-after-Aside.png
    • agents/runs/cli-tab-background-views/ci-gui-native-closure/native/file-final-after-Aside.json
    • agents/runs/cli-tab-background-views/ci-gui-browser-closure/background-tab-B-retained-1500.png
    • agents/runs/cli-tab-background-views/ci-gui-browser-closure/background-tab-B-retained-1500.json
    • agents/runs/cli-tab-background-views/ci-gui-browser-closure/background-tab-A-revealed-1500.png
    • agents/runs/cli-tab-background-views/ci-gui-browser-closure/background-tab-A-revealed-1500.json
    • agents/runs/cli-tab-background-views/ci-gui-browser-closure/background-tab-B-retained-720.png
    • agents/runs/cli-tab-background-views/ci-gui-browser-closure/background-tab-B-retained-720.json
    • agents/runs/cli-tab-background-views/ci-gui-browser-closure/background-tab-A-revealed-720.png
    • agents/runs/cli-tab-background-views/ci-gui-browser-closure/background-tab-A-revealed-720.json
    • agents/runs/cli-tab-background-views/code-review-ci-native-addendum.md
    • agents/runs/cli-tab-background-views/fidelity-review-ci-native-addendum.md
  • Changed paths: 29 (see Files changed)

  • Delivery: mode pr, branch feat/tab-file-view-visibility, base main

  • Report sha256: 285c5bb8e708189229e826c5c09f05848a719926d6b5c7bdee73f73c5beb771b

  • Input fingerprint: 336d529d7406f71f81d8c142382d42847d699f6c7dbbccf3ea0bef43c399bc22

  • Current base tip: 8446940; merge base: 2a01c2e; head: 711f8d5

  • Base exception: newer main changes only hook input readiness, its guide and an unrelated fixture; no overlapping paths with these 29 changed files.

  • Final required test: 4,537 passed / 0 failed / 96 ignored across 46 workspace result groups; lint exit 0, neither command changed the tree.

  • Additional static/unit/build: web 1,518 passed / 1 skipped and desktop 184 passed / 4 skipped; typecheck/lint/build and design contract passed on 5cfe8, with those source inputs unchanged at 711f8.

  • Final exact-head observations: 10 public GUI/CLI cases, 3 macOS GUI desktop cases, 2 same-URL native cases at 1500/720px and 1 actual Explorer/File Views background/A-return case passed.

  • Final file native target: candidate PID64320, daemon64499, exact background window920; final browser targets wide55835/55859/window914 and narrow56213/56218/window916.

  • Earlier evidence boundary: real loopback SSH core-move roundtrip and terminal HTML/source were observed on 16bdfc0; they are retained earlier-head evidence, not recollected final-head flows.

  • Cost: each admitted file destination uses the existing parked presentation transaction; one completion applies at most 64 destinations and publishes once after the event.

  • Bounds: checkout 64 Views / 6 occupied areas / 64 ordinary tabs; pending GUI destinations 64 per checkout; native 12 live pages / 1,536 scopes / 16,384 inventory entries / 4 popups.

  • No new polling, worker, dependency, process or blocking Runtime I/O; persistence retains its existing 1 active / 1 pending worker and notifications occur only on actual transitions.

  • Cleanup: the final six exact native/daemon PID scans, private socket and owned-path audit were empty; historical parallel-startup child cleanup cannot be certified without its missing PID/root record.

  • Public images: three independently inspected final-head native fixture frames uploaded; workstation path-bearing A/browser/HTML frames and all run logs remain private.

  • Final CI: verify and Design contract SUCCESS on 711f8d542ff5ea3d53cf183015ce7d91d1431ba1.

  • CI checks: 18 SUCCESS, 3 planned SKIPPED; skipped package, separate Windows build and macOS OS-contract lanes were not executed and are not reported as PASS.

  • CI web E2E: Windows 37 passed; Linux shards 68 + 69 + 68 + 66 = 271 passed, with no reported failure or flaky result.

  • CI desktop E2E: Windows 9 passed; macOS 75 passed / 9 existing skipped; both native same-URL widths executed on both systems.

  • Current required Rust checks, static web/desktop, remote-mailbox/core-move and Linux/Windows OS-contract jobs also passed.

  • CI watch receipt: pass, 21 checks present, no pending/failing checks; public screenshot rendering confirmed all three final-head images with their full native dimensions.

@yansfil yansfil changed the title 탭별 File Views 표시 상태 기억 탭별 File Views 기억 및 CLI 백그라운드 열기 Oct 13, 2026
@yansfil
yansfil merged commit 2634504 into main Oct 13, 2026
21 checks passed
@yansfil
yansfil deleted the feat/tab-file-view-visibility branch October 13, 2026 23:25
yansfil added a commit that referenced this pull request Oct 14, 2026
## Summary

터미널 링크를 클릭해도 옆 View에 페이지가 열리지 않던 문제를 고칩니다.
원인은 새 Agent 탭에 처음 들어갈 때 앞 탭의 View 목록을 통째로 복사하던 동작이었습니다(#1065).
복사본은 화면에 보이지 않는데도 체크아웃의 View 상한 64개에 같이 들어가서, 탭 몇 개만 오가도 상한이 차고 이후 모든
열기가 거절됐습니다.
거절 종류(`browser.open_refused`)가 알림 대상이 아니어서 클릭이 아무 반응 없이 무시된 것처럼 보였습니다.

이제 이렇게 동작합니다.

- 처음 보는 탭은 빈 View로 시작하고 File Views도 꺼져 있습니다.
- 상한에 닿은 열기는 체크아웃의 모든 탭을 통틀어 가장 오래 안 본 View를 먼저 닫습니다. 화면에 보이는 View와 저장 안
한 문서는 닫지 않습니다.
- 닫을 수 있는 게 없을 때만 거절하고, 브라우저 열기 거절도 View 알림으로 보입니다.

## Review

- **판단해 주세요**: 처음 보는 탭이 빈 View로 시작하면 그 탭으로 갈 때 File Views가 닫힙니다(운영자가 고른
방향). 기존 계약 D-04/B8, B22의 "탭 선택은 열을 바꾸지 않는다"가 Tools 열에만 남습니다.
- **판단해 주세요**: 자동으로 닫힌 파일은 Reopen Closed로 되돌릴 수 있지만, 브라우저 페이지는 되돌리기 스택에
들어가지 않습니다.
- **조심해서 볼 파일**: `herdr-core/src/runtime/view_areas.rs` -
`make_view_room`은 parked transaction 밖에서만 닫습니다. transaction의 rollback이
다른 presentation을 모두 되돌리기 때문에, 백그라운드 caller는 park 전에 자리를 만듭니다.
- **조심해서 볼 파일**: `herdr-core/src/runtime/view_bookmarks.rs` - projected
owner 자신의 백그라운드 호출은 지금처럼 자기 목록 복사본(`owner_copy`)으로 일합니다.
- **비용 검토**: 상한에 닿았을 때만, 닫는 View마다 체크아웃 display(최대 64개)를 한 번 더 훑습니다. 그
밖의 경로는 바뀌지 않습니다.

## Evidence

- **확인한 것**: 운영자 로그(`core.jsonl`)에서 링크 클릭마다 `browser.open_refused: This
Workspace has 64 views open`이 찍힌 것을 확인했습니다. 저장 상태는 보이는 13개 + 숨은 탭 복사본
12/12/16/11개였습니다.
- **확인한 것**: 그 상황을 web이 보내는 `browser_open` payload 그대로 재현한 core
테스트(`a_link_opened_in_a_full_workspace_closes_the_oldest_hidden_view`)를
추가했습니다. 페이지가 열리고, 숨은 탭에서 가장 오래된 View가 닫히고, 합계는 64로 유지됩니다.
- **확인한 것**: 백그라운드 caller
경로(`repeated_hidden_select_is_a_noop_and_a_full_workspace_closes_its_oldest_view`)와
닫을 것이 없을 때의 거절 및 그
kind(`a_link_opened_with_nothing_to_close_is_refused_with_the_view_reason`)를
테스트로 확인했습니다. 기존 거절-롤백 테스트는 닫을 수 없는 View만으로 상한을 채우도록 바꿨습니다.
- **확인한 것**: `herdr-core` nextest 2240개 통과, `clippy -p herdr-core
--all-targets -D warnings` 통과, `cargo fmt --check` 통과.
- **확인하지 못한 것**: 패키징한 앱에서 실제로 클릭하는 native 확인은 하지 않았습니다. 설치된 앱을 바꾸려면 운영자
요청이 필요합니다.
- **확인한 것**: 첫 CI에서 Windows desktop e2e의 같은 URL 테스트가 실패했습니다. 새 탭이 첫 탭의
페이지를 물려받는다고 가정한 테스트였습니다. 그래서 desktop `browser.spec.ts`와 web
`view-bookmarks`, `file-view-visibility` 스펙을 두 번째 탭의 에이전트가 직접 여는 흐름으로
고쳤습니다(`ec8084ead`).
- **확인한 것**: 두 번째 CI에서는 web `s7.spec.ts`의 64개 상한 테스트만 실패했습니다. 거절을 기대하던
테스트라, 가장 오래 본 기록이 이른 View(f10)가 닫히고 새 파일이 열리며 알림이 없는지 확인하도록
바꿨습니다(`836f16cd6`). 이름이 바뀐 테스트는 `shard-durations.json`이 다음에 갱신될 때까지 중앙값
시간으로 배정됩니다.
- **확인하지 못한 것**: web/desktop e2e는 로컬에서 돌리지 않았고 CI에 맡깁니다. 디스크 여유가 3 GiB라
로컬 debug 빌드를 생략했습니다.
- **확인하지 못한 것**: 이미 쌓인 복사본은 자동으로 정리되지 않습니다. 다음에 열 때부터 오래된 것부터 닫힙니다.
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