Skip to content

Open file and diff views with long lines wrapped - #297

Merged
yansfil merged 3 commits into
mainfrom
view-wrap-default
Oct 1, 2026
Merged

yansfil merged 3 commits into
mainfrom
view-wrap-default

Conversation

@yansfil

@yansfil yansfil commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

긴 줄이 있는 파일을 열면 가로 스크롤이 생겨서 매번 Wrap을 눌러야 했습니다.
이제 파일 뷰와 Diff 뷰 모두 새로 열거나, 닫았다 다시 열거나, 앱을 재시작하면 Wrap이 켜진 상태로 시작합니다.
Diff 뷰에도 파일 뷰와 같은 Wrap 토글을 달아, 탭마다 끌 수 있게 했습니다.
Wrap을 끄면 예전처럼 추가/삭제 줄 배경이 가로 스크롤 끝까지 이어집니다.

Review

  • 판단해 주세요: Diff 뷰까지 기본 Wrap을 켜는 게 맞는지. 좁은 영역에서 diff --git 헤더 줄도 접힙니다.
  • 조심해서 볼 파일: herdr-core/src/runtime/events.rs - file_view 이벤트가 이제 Diff 탭도 받습니다(runtime mutex 안, 필드 두 개만 씀).

Evidence

  • 확인한 것: 새 e2e web/e2e/view-wrap.spec.ts가 격리된 Herdr+hided+브라우저에서 파일·Diff 모두 기본 Wrap(가로 넘침 없음), 토글 후 가로 넘침과 Diff 줄 배경 폭을 확인. 스크린샷 두 장을 눈으로 확인.
  • 확인한 것: verify-cargo.sh test -p herdr-core 1082개 중 1081 통과. 실패 1개(gh_boundary...)는 web 레인과 동시 실행 중 1초 타임아웃이 난 것으로, 단독 재실행에서 통과.
  • 확인한 것: verify-web.sh 통과(web 735, desktop 72, typecheck/lint/build). e2e s3, s4, view-wrap 36개 통과.
  • 확인한 것: verify-cargo.sh lint(fmt + clippy -D warnings) 통과.
  • 확인하지 못한 것: 패키지된 데스크톱 앱에서의 수동 확인. 설치된 앱은 바꾸지 않았습니다.

A new, reopened, or restored file tab and a new diff tab now start with
Wrap on. Diff views gain the same per-tab Wrap toggle file views have:
the core's file_view event accepts a diff tab, and the patch view keeps
the full-width row bands under a horizontal scroll only when Wrap is off.
@yansfil
yansfil merged commit a52d62b into main Oct 1, 2026
16 checks passed
@yansfil
yansfil deleted the view-wrap-default branch October 1, 2026 15:22
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