Skip to content

fix: open a view card in the slot of the pane where it was pressed - #2326

Merged
yansfil merged 10 commits into
mainfrom
fix/view-slot-opens-where-clicked
Nov 9, 2026
Merged

yansfil merged 10 commits into
mainfrom
fix/view-slot-opens-where-clicked

Conversation

@yansfil

@yansfil yansfil commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Related: with-hide/hide-private#777

Summary

보기 칸이 탭마다 하나여서 세 가지가 어긋났습니다.
같은 탭의 다른 에이전트를 누르면 남의 미션 지도가 그대로 보였습니다.
부모 줄이나 기록 카드에서 누른 자식 PR은 일하는 자식의 탭으로 화면을 옮겼습니다.
이제 칸은 pane마다 하나이고, 카드는 누른 자리에 열립니다(운영자 결정 2026-11-09).

누른 곳 열리는 곳
에이전트 줄(태스크 목록, 프로젝트 트리)의 PR, 기록, 미션 표시 그 pane의 칸, pane이 키보드를 받음
카드 안의 PR 같은 칸에 쌓임, 탭과 포커스 그대로, ←로 돌아감
에이전트가 없는 자리 만든 이의 pane 칸, 없으면 앞 칸
미션 줄, 미션 칩 Conductor의 칸

pane이 닫히면 그 칸도 지우고(보던 기록이면 ⌘K에서 그 세션을 찾아 다시 엶), 남겨 두는 칸은 64개까지입니다.

고치기 전: 부모 줄에서 자식 PR #34를 누르면 자식 탭으로 넘어감
고친 뒤: 누른 부모 pane의 칸에 #34가 열림

위: 고치기 전, 부모 줄에서 #34를 누르면 자식의 탭(초록 테두리 pane)으로 넘어감. 아래: 고친 뒤, 부모 pane 그대로 그 칸에 #34.

Review

  • 판단해 주세요: 잠든 에이전트가 새 pane에서 깨면 빈 칸으로 시작합니다(칸은 세션이 아니라 pane의 것).
  • 판단해 주세요: 앞 pane이 닫히는 순간 보던 기록도 화면에서 사라집니다; 그냥 닫은 세션은 ⌘K에서 찾아 기록을 열고 Restore합니다.
  • 판단해 주세요: 이전 빌드가 저장한 탭별 칸(detail_home, detail_tabs)은 읽지 않고, 앞 칸(detail)만 이어받습니다.
  • 조심해서 볼 파일: hide-core/src/runtime/detail.rs - sync_detail_pane이 runtime mutex 안에서 이벤트마다 돕니다(high-frequency path).
  • 조심해서 볼 파일: hide-core/src/persistence.rs, hide-core/src/node_migration.rs - 저장 모양(detail_pane, detail_panes)과 기기 이동 키.
  • 조심해서 볼 파일: hide-core/src/model.rs - snapshot wire는 앞 칸 하나뿐이고 다른 칸은 core에만 있습니다(skip_serializing).
  • 조심해서 볼 파일: web/src/components/sidebar-agent-row.tsx, web/src/sidebar.tsx - 프로젝트 트리 줄의 PR 카드·목록이 이제 pr_open {pane}입니다(전에는 브라우저 문서).
  • 조심해서 볼 파일: web/src/actions.ts - detail_open, pr_open이 at(here | {pane} | owner)을 한 이벤트에 실어 보냅니다.
  • 비용 검토: 이벤트마다 앞 pane 조회 1번, pane이 바뀔 때만 64칸 이하 탐색 1번과 떠나는 pane 목록 확인 1번.
  • 비용 검토: 알림 fan-out은 그대로, 칸 맵 상한 64를 넘으면 오래 안 본 칸부터 버리고 진단 detail.slot_evicted를 남깁니다.
  • hide file/diff/browser open으로 연 View 탭 동작은 바뀌지 않습니다.
  • #2254와 web/src/practice/worlds/mission.ts에서 겹칩니다(merge-order: 그대로 둠).

Evidence

  • 확인한 것: c1 a_card_opened_for_one_pane_is_not_shown_on_another_pane_of_the_same_tab은 main(f859661)에서 실패, 여기서 통과.
  • 확인한 것: c2 a_pull_request_pressed_on_a_parents_row_opens_in_the_parents_slot, ..._inside_a_record_stacks_in_the_same_slot_and_back_returns도 main에서 실패, 여기서 통과.
  • 확인한 것: 리뷰 고침 2건의 새 테스트(64칸 경계 복귀, 프로젝트 트리 PR 2개)는 5e191aafb에서 실패, 지금 통과.
  • 확인한 것: session-record-restore e2e를 ⌘K로 기록을 다시 여는 흐름으로 바꿔 로컬 0898ecb 빌드에서 통과(같은 native 세션 복원 단언은 그대로).
  • 확인한 것: hide-core lib 4279개 통과, clippy -D warnings, fmt; web typecheck, lint, unit 2773개, design contract 통과.
  • 확인한 것: 격리된 hided(HIDE_STATE_DIR)와 e2e fixture로 세 증상을 main과 이 브랜치에서 어두운·밝은 테마로 24장 찍어 비교.
  • 확인하지 못한 것: 캡처는 Chromium의 웹 화면이고 Electron 창은 아닙니다.
  • 확인하지 못한 것: 캡처 fixture는 #34를 자식 브랜치의 열린 PR로, 자식을 작업 중으로 바꿨습니다(기본은 merged, 쉬는 자식).
  • 확인하지 못한 것: 기기 pane은 core 테스트(a_device_agents_row_opens_its_card_when_the_device_brings_the_pane_forward)로만 확인했습니다.
  • 확인하지 못한 것: Playwright e2e와 Windows, Linux는 로컬에서 돌리지 않고 CI에 맡깁니다(플랫폼별 코드 없음).
추가 증거

증상 1, 고치기 전: Conductor 칸의 미션 지도가 같은 탭의 다른 pane에도 남음.
고치기 전: Conductor 칸의 미션 지도가 같은 탭 다른 pane에도 남음

증상 1, 고친 뒤: 다른 pane을 누르면 그 pane의 칸(빈 칸).
고친 뒤: 다른 pane을 누르면 그 pane의 칸(빈 칸)

증상 2, 고친 뒤, 밝은 테마.
고친 뒤, 밝은 테마: 부모 pane의 칸에 #34

증상 3, 고친 뒤: 기록 카드 안의 #34는 같은 칸에 쌓이고 ←로 기록에 돌아감(고치기 전에는 증상 2처럼 자식 탭으로 넘어감).
고친 뒤: 기록 카드 안 #34는 같은 칸에 쌓이고 ← 로 돌아감

Verification record
  • base: main f859661, head: f2ff36d
  • scripts/verify-cargo.sh nextest -p hide-core --lib: 4279 passed, 19 skipped (0898ecb)
  • scripts/verify-cargo.sh fmt-check, scripts/verify-cargo.sh clippy -p hide-core --all-targets -- -D warnings: pass
  • scripts/verify-web.sh web typecheck|lint|test: pass, 2773 passed, 3 skipped (0898ecb); node scripts/check-design-contract.mjs: pass
  • c1, c2 on main f859661 with the tests ported: fail at the symptoms; on head: pass
  • review fixes: returning_to_the_pane_seen_longest_ago_at_the_cap_keeps_both_slots and two projectTreePrFamily tests fail on 5e191aa, pass on 0898ecb
  • pnpm --dir web exec playwright test e2e/session-record-restore.spec.ts on the 0898ecb build: 1 passed (a4a4969 and f2ff36d change only the spec, docs and one comment)
  • Native capture: isolated hided per run, web shell in Chromium, before = f859661, after = 5e191aa, dark and light

Take the incoming pane's kept slot before the outgoing one joins the kept
slots, so at 64 the slot coming back is never the one dropped.
The project tree's parent and child rows sent a PR pressed in their card or
list to a browser page; they now open its card in the row's pane slot, as
the task list does, and the browser modifier still opens GitHub.
The slot goes with its pane, so the record shown for a pane closes with it;
the record restore test now finds the session again in search and still
proves the same native session resumes in a fresh pane.
The open practice reshape removes that file; a comment-only edit here would
only make the two pull requests conflict.
@yansfil
yansfil added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit cb5f069 Nov 9, 2026
38 checks passed
@yansfil
yansfil deleted the fix/view-slot-opens-where-clicked branch November 9, 2026 15:31
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