Skip to content

Show the Explorer's Git status as a mark in its root row - #587

Merged
yansfil merged 2 commits into
mainfrom
fix/flaky-570
Oct 6, 2026
Merged

yansfil merged 2 commits into
mainfrom
fix/flaky-570

Conversation

@yansfil

@yansfil yansfil commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Refs #570

Summary

tab-strip-fit.spec.ts "File View tabs use the same shrinking strip..."가 파일 12개를 연달아 열 때 한 개를 못 열던 제품 원인을 고칩니다.

  • 원인: Explorer의 Git 상태 줄이 root 행과 목록 사이에 있었고, Git 답이 목록을 그린 뒤에 도착하면 줄 높이가 바뀌어 모든 행이 움직였습니다.
    Git 저장소가 아닌 폴더는 "Loading Git status"(25.5 px)가 두 줄로 접히는 "Git status unavailable: <경로> is not inside a Git repository"(58.5 px)가 되어 행이 33 px 내려가고, 저장소는 loading 줄이 사라져 한 줄 올라갑니다.
    그 사이에 떨어진 더블클릭은 겨냥한 행의 위 행(이미 열린 파일)을 엽니다. 실제 사용자의 빠른 더블클릭도 같습니다.
  • 수정(운영자 결정, #570의 C안):
    • Git 상태 줄을 없애고 Explorer root 행의 새로고침 버튼 옆에 작은 표시만 둡니다. root 행 높이는 그대로라 어떤 상태 전환에도 행이 움직이지 않습니다.
    • 첫 답을 기다리는 동안은 작은 spinner, 운영자가 고칠 수 있는 실패(git을 실행할 수 없음, Git이 읽지 못하는 저장소, 이전 답을 보여 주는 중 실패)는 경고색 ! badge이고 tooltip이 이유를 말합니다.
    • Git 저장소가 아닌 폴더는 할 일이 없으므로 아무것도 그리지 않고 diagnostic log(changes.unavailable)에만 남깁니다(설계 원칙 13).
    • 그 구분을 위해 host가 git 실행 실패를 더 이상 "저장소 아님"으로 덮지 않습니다: 실행 실패와 시간 초과는 Io, Unsupported는 Git이 저장소를 찾지 못한 폴더뿐입니다. core는 그 답을 not_a_repository로 표시합니다.
  • 새 부품이나 token은 없습니다: 기존 Badge(outline + border-warning text-warning, TaskBoards와 같은 모양)와 LoaderCircleIcon(SearchPalette와 같은 크기)를 씁니다.

비 Git 폴더, 수정 전후: 수정 전에는 Git 답이 도착하면 두 줄 문장이 행을 밀어 내리고, 수정 후에는 root 행의 spinner만 사라집니다

Review

  • 판단해 주세요:
    • History 패널은 비 Git 폴더에서 지금처럼 "not inside a Git repository"를 말합니다. History는 Git 변경이 내용 전부라 그 문장이 빈 상태라고 보고 두었습니다. Explorer만 조용하게 했습니다.
    • .git 파일이 엉뚱한 곳을 가리키거나 dubious ownership처럼 rev-parse가 실패하는 저장소도 지금처럼 "저장소 아님"으로 남아 Explorer에 표시가 없습니다. 이를 가르려면 상위 폴더의 .git을 보는 판정이 필요해 이 PR에 넣지 않았습니다.
  • 조심해서 볼 파일:
    • hide-host/src/git.rs - failure path. rev-parse 실행 실패가 Io로 올라갑니다. wire 모양은 그대로라 protocol 번호는 올리지 않았고, 이전 helper가 있는 device는 git 실행 실패를 계속 "저장소 아님"으로 보내 표시가 없을 뿐입니다.
    • herdr-core/src/runtime/projects.rs - runtime mutex 안. ingest_changes에 diagnostic 한 줄이 늘었고, 실패 이유가 처음 나타나거나 바뀔 때만 씁니다.
    • herdr-core/src/model.rs - snapshot wire. not_a_repository는 false일 때 생략됩니다.

Evidence

  • 확인한 것:
    • 새 e2e web/e2e/explorer-git-status.spec.ts 3개: socket에서 Git 답이 실린 frame을 잡아 두고 second.md 행을 잰 뒤 풀어서, 행 상자가 그대로이고 최종 표시가 맞는지 봅니다(비 Git 폴더: 없음, 저장소: 없음, index가 깨진 저장소: !와 이유).
      수정 전(origin/main a64e118)에는 3개 모두 행 위치에서 실패했습니다: y 179.5 -> 212.5, 179.5 -> 154, 179.5 -> 196.
      수정 후 3/3, --repeat-each=20 --workers=8 --retries=0로 60/60 통과.
    • 원래 실패한 tab-strip-fit.spec.ts를 --repeat-each=20 --workers=8 --retries=0: 80/80 통과(test 4개 x 20). 수정 전 같은 조건에서 :173이 2/20 실패했습니다.
    • core test changes::tests::only_a_folder_git_finds_no_repository_for_is_not_a_repository: 실제 host로 비 Git 폴더는 not_a_repository, helper 미준비와 index가 깨진 저장소는 아님.
      host와 core의 changes, git, snapshot delta, stale test 188개 통과.
    • web typecheck, lint(e2e 크기 검사 포함), 단위 test 1038개, cargo fmt --check, node scripts/check-design-contract.mjs 통과.
    • 화면: headless Chromium에서 세 상태의 Explorer를 캡처했고, Pen의 Screen / Menus and Overlays를 Light/Dark로 export해 확인했습니다(아래 접힌 블록).
  • 확인하지 못한 것:
    • 로컬 clippy. 기기 디스크가 빌드 하한 가까이(8.8 GiB)여서 돌리지 않았고, 이 PR의 Rust lint lane이 확인합니다.
    • hide-host 전체 test 중 clone::a_taken_name_is_refused_before_git_runs 1개가 이 기기의 git commit 서명 agent 오류로 실패했습니다. 이 변경과 무관하고 CI에는 서명 설정이 없습니다.
    • git을 실행할 수 없는 경우(Io)를 직접 만드는 test는 없습니다. test 프로세스의 PATH를 바꿔야 해서 넣지 않았고, 고칠 수 있는 실패의 표시는 index가 깨진 저장소로 확인했습니다.
    • packaged app의 실제 창 확인은 하지 않았습니다. 바뀐 것은 web 화면뿐이라 headless 캡처로 보았습니다.
  • 생성물: design/hide-screens.pen은 node scripts/gen-screens.mjs가 scripts/pen-screens.mjs에서 다시 만든 것입니다.
추가 증거

index가 깨진 저장소: ! badge와 tooltip의 이유

Pen Screen / Menus and Overlays의 root 행 세 상태(loading, 고칠 수 있는 실패, 없음), Light

같은 세 상태, Dark

…reads

The host refused every failed rev-parse as not a repository, so a git that
could not run or did not finish read the same as a plain folder. A git that
cannot run is now Io, the operator's to act on; Unsupported stays only for
a folder Git finds no repository for. The core marks that answer
not_a_repository and logs each new History failure as changes.unavailable.
The Git status was a line between the root row and the tree. It changed
height when the answer landed (loading, then a wrapped unavailable line, or
nothing), so every row moved, and a double-click aimed during loading opened
the row above. The status is now a spinner or a warning badge beside the
refresh button, and a folder that is not a repository draws nothing. The
new spec holds the Git answer at the socket, measures a row, releases it
and asserts the row did not move, for a plain folder, a repository and a
repository whose index is corrupt.
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