Repository navigation
탭별 File Views 기억 및 CLI 백그라운드 열기 - #1065
Merged
Merged
Conversation
# Conflicts: # herdr-core/src/runtime/view_areas.rs # herdr-core/src/runtime/view_bookmarks.rs
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 빌드를 생략했습니다. - **확인하지 못한 것**: 이미 쌓인 복사본은 자동으로 정리되지 않습니다. 다음에 열 때부터 오래된 것부터 닫힙니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
--beside는 A 안에서 배치하고,--reveal은 실제 요청한 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를 유지합니다.Evidence
추가 화면 증거
A의 배경 열기 이후에도 선택된 B는 File Views가 꺼진 상태를 유지합니다.
같은 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.jsonandagents/runs/cli-tab-background-views/verification-report.md; source fingerprint 9e21368be85df4a333fef575cfcbc99ef1973a60a02227fabad455491e094251Suites:
bash scripts/verify-cargo.sh test(exit 0)bash scripts/verify-cargo.sh lint(exit 0)요구사항 리뷰: 최종
711f8d542, 전체 25 behaviors/16 decisions 유지, Fix now 0.코드 리뷰: 최종
711f8d542, Fix now 0.Evidence: 111 registered (44 log, 3 browser, 40 file, 24 screenshot); paths are local to the run directory
Changed paths: 29 (see Files changed)
Delivery: mode pr, branch
feat/tab-file-view-visibility, basemainReport 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.