Repository navigation
새 탭은 빈 View로 시작하고, View가 꽉 차면 가장 오래된 것을 닫기 - #1098
Merged
Merged
Conversation
… Workspace is full A tab seen for the first time copied every View of the tab in front, and the copies counted against the checkout's 64-View cap while staying out of sight, so after a few tab visits every open was refused. A browser open's refusal also carried a kind the shell does not show, so a terminal link click did nothing visible. A new tab now starts with no Views. An open that would pass the cap first closes the view looked at longest ago in any of the checkout's tabs, never a view on screen or a document with unsaved work; only when nothing can close is the open refused, and a browser open's layout refusal now carries the View layout kind so the shell shows it.
A tab shown for the first time now starts with no Views, so the specs that relied on it inheriting the first tab's page or file open it from the second tab's own pane, and count only that tab's Views.
The cap e2e seeded 64 views and expected the 65th open to be refused; the open now closes the view looked at longest ago, so the seed names it and the test checks that it closed, the new file opened and no notice showed.
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
터미널 링크를 클릭해도 옆 View에 페이지가 열리지 않던 문제를 고칩니다.
원인은 새 Agent 탭에 처음 들어갈 때 앞 탭의 View 목록을 통째로 복사하던 동작이었습니다(#1065).
복사본은 화면에 보이지 않는데도 체크아웃의 View 상한 64개에 같이 들어가서, 탭 몇 개만 오가도 상한이 차고 이후 모든 열기가 거절됐습니다.
거절 종류(
browser.open_refused)가 알림 대상이 아니어서 클릭이 아무 반응 없이 무시된 것처럼 보였습니다.이제 이렇게 동작합니다.
Review
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)으로 일합니다.Evidence
core.jsonl)에서 링크 클릭마다browser.open_refused: This Workspace has 64 views open이 찍힌 것을 확인했습니다. 저장 상태는 보이는 13개 + 숨은 탭 복사본 12/12/16/11개였습니다.browser_openpayload 그대로 재현한 core 테스트(a_link_opened_in_a_full_workspace_closes_the_oldest_hidden_view)를 추가했습니다. 페이지가 열리고, 숨은 탭에서 가장 오래된 View가 닫히고, 합계는 64로 유지됩니다.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-corenextest 2240개 통과,clippy -p herdr-core --all-targets -D warnings통과,cargo fmt --check통과.browser.spec.ts와 webview-bookmarks,file-view-visibility스펙을 두 번째 탭의 에이전트가 직접 여는 흐름으로 고쳤습니다(ec8084ead).s7.spec.ts의 64개 상한 테스트만 실패했습니다. 거절을 기대하던 테스트라, 가장 오래 본 기록이 이른 View(f10)가 닫히고 새 파일이 열리며 알림이 없는지 확인하도록 바꿨습니다(836f16cd6). 이름이 바뀐 테스트는shard-durations.json이 다음에 갱신될 때까지 중앙값 시간으로 배정됩니다.